From: Simon Horman <simon.horman-wFxRvT7yatFl57MIdRCFDg@public•gmane.org>
To: Jiri Benc <jbenc-H+wXaHxf7aLQT0dZR+AlfA@public•gmane.org>
Cc: dev-yBygre7rU0TnMu66kgdUjQ@public•gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public•gmane.org
Subject: Re: [PATCH v9 net-next 4/7] openvswitch: add layer 3 flow/port support
Date: Wed, 11 May 2016 12:28:14 +0900 [thread overview]
Message-ID: <20160511032812.GC24805@vergenet.net> (raw)
In-Reply-To: <20160510140618.3ad4a35f@griffin>
Hi Jiri,
On Tue, May 10, 2016 at 02:06:18PM +0200, Jiri Benc wrote:
> On Mon, 9 May 2016 17:18:20 +0900, Simon Horman wrote:
> > On Fri, May 06, 2016 at 11:35:04AM +0200, Jiri Benc wrote:
> > > In addition, we should check whether mac_len > 0 and in such case,
> > > change skb->protocol to ETH_P_TEB first (and store that value in the
> > > pushed eth header).
> > >
> > > Similarly on pop_eth, we need to check skb->protocol and if it is
> > > ETH_P_TEB, call eth_type_trans on the modified frame to set the new
> > > skb->protocol correctly. It's probably not that simple, as we'd need a
> > > version of eth_type_trans that doesn't need a net device.
> >
> > I'm not sure I understand the interaction with ETH_P_TEB here.
> >
> > In my mind skb->protocol == ETH_P_TEB may be used early on in OvS's receive
> > processing to find the inner protocol from the packet and at that point
> > skb->protocol is set to that value. And that for further packet processing
> > the fact the packet was received as TEB is transparent.
>
> Yes but think about the case when you have two Ethernet headers pushed.
>
> We can either disallow it, or do what I described.
>
> Specifically, let's assume we have an IP packet with an Ethernet
> header present. skb->protocol is ETH_P_IP. Now, when there's skb_push,
> the correct operation would be setting skb->protocol to ETH_P_TEB,
> pushing a new Ethernet header and filing ETH_P_TEB to the ethertype
> field in the new header. The packet is not ETH_P_IP anymore, as the L2
> header is followed by another Ethernet header now.
Thanks for the clarification, I had not considered the case of two
ethernet headers when I wrote my previous email.
I think that at this stage I would prefer to prohibit push_eth() acting
on a packet which already has an ethernet header. Indeed that is what
my patch-set already does in its modifications of __ovs_nla_copy_actions().
The reason that I lean towards prohibiting this is that I do not
have an easy way to exercise this case within the current patch-set.
And thus this extra complexity seems well suited to being handled handled
incrementally as further work.
_______________________________________________
dev mailing list
dev@openvswitch•org
http://openvswitch.org/mailman/listinfo/dev
next prev parent reply other threads:[~2016-05-11 3:28 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-04 7:36 [PATCH v9 net-next 0/7] openvswitch: support for layer 3 encapsulated packets Simon Horman
2016-05-04 7:36 ` [PATCH v9 net-next 1/7] net: add skb_vlan_deaccel helper Simon Horman
2016-05-04 7:36 ` [PATCH v9 net-next 2/7] openvswitch: set skb protocol when receiving on internal device Simon Horman
2016-05-04 7:36 ` [PATCH v9 net-next 3/7] openvswitch: add support to push and pop mpls for layer3 packets Simon Horman
[not found] ` <1462347393-22354-4-git-send-email-simon.horman-wFxRvT7yatFl57MIdRCFDg@public.gmane.org>
2016-05-05 17:35 ` pravin shelar
2016-05-06 4:33 ` Simon Horman
2016-05-04 7:36 ` [PATCH v9 net-next 4/7] openvswitch: add layer 3 flow/port support Simon Horman
[not found] ` <1462347393-22354-5-git-send-email-simon.horman-wFxRvT7yatFl57MIdRCFDg@public.gmane.org>
2016-05-05 17:37 ` pravin shelar
2016-05-06 5:57 ` Simon Horman
2016-05-06 9:25 ` Jiri Benc
2016-05-09 8:04 ` Simon Horman
[not found] ` <20160509080420.GA4470-IxS8c3vjKQDk1uMJSBkQmQ@public.gmane.org>
2016-05-10 12:01 ` Jiri Benc
2016-05-11 1:50 ` Simon Horman
[not found] ` <20160511015009.GB24436-IxS8c3vjKQDk1uMJSBkQmQ@public.gmane.org>
2016-05-11 3:06 ` Simon Horman
2016-05-11 14:09 ` Jiri Benc
2016-05-11 22:46 ` Simon Horman
2016-05-17 14:43 ` Jiri Benc
2016-05-18 2:18 ` Simon Horman
2016-05-11 13:57 ` Jiri Benc
2016-05-06 9:35 ` Jiri Benc
2016-05-09 8:18 ` Simon Horman
2016-05-10 0:16 ` [ovs-dev] " Yang, Yi Y
[not found] ` <79BBBFE6CB6C9B488C1A45ACD284F51913CB6446-0J0gbvR4kTggGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-10 12:07 ` Jiri Benc
2016-05-10 12:06 ` Jiri Benc
2016-05-11 3:28 ` Simon Horman [this message]
2016-05-11 14:10 ` Jiri Benc
2016-05-17 14:32 ` Jiri Benc
2016-05-20 5:29 ` Simon Horman
2016-05-20 8:00 ` Jiri Benc
2016-05-20 8:11 ` Simon Horman
2016-05-20 8:16 ` Simon Horman
[not found] ` <20160520081611.GB17561-IxS8c3vjKQDk1uMJSBkQmQ@public.gmane.org>
2016-05-20 8:39 ` Jiri Benc
2016-05-20 9:12 ` Simon Horman
2016-05-20 9:20 ` Jiri Benc
2016-05-20 10:14 ` Simon Horman
[not found] ` <1462347393-22354-1-git-send-email-simon.horman-wFxRvT7yatFl57MIdRCFDg@public.gmane.org>
2016-05-04 7:36 ` [PATCH v9 net-next 5/7] openvswitch: add layer 3 support to ovs_packet_cmd_execute() Simon Horman
[not found] ` <1462347393-22354-6-git-send-email-simon.horman-wFxRvT7yatFl57MIdRCFDg@public.gmane.org>
2016-05-17 14:51 ` Jiri Benc
2016-05-18 2:24 ` Simon Horman
2016-05-04 7:36 ` [PATCH v9 net-next 6/7] openvswitch: extend layer 3 support to cover non-IP packets Simon Horman
2016-05-04 7:36 ` [PATCH v9 net-next 7/7] openvswitch: use ipgre tunnel rather than gretap tunnel Simon Horman
[not found] ` <1462347393-22354-8-git-send-email-simon.horman-wFxRvT7yatFl57MIdRCFDg@public.gmane.org>
2016-05-05 21:45 ` pravin shelar
2016-05-06 6:54 ` Simon Horman
2016-05-06 9:15 ` Jiri Benc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160511032812.GC24805@vergenet.net \
--to=simon.horman-wfxrvt7yatfl57midrcfdg@public$(echo .)gmane.org \
--cc=dev-yBygre7rU0TnMu66kgdUjQ@public$(echo .)gmane.org \
--cc=jbenc-H+wXaHxf7aLQT0dZR+AlfA@public$(echo .)gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox