From: Simon Horman <horms@verge.net.au>
To: Pravin Shelar <pshelar@nicira.com>
Cc: "dev@openvswitch.org" <dev@openvswitch.org>,
netdev <netdev@vger.kernel.org>, Jesse Gross <jesse@nicira.com>,
Ben Pfaff <blp@nicira.com>, Ravi K <rkerur@gmail.com>,
Isaku Yamahata <yamahata@valinux.co.jp>,
Joe Stringer <joe@wand.net.nz>
Subject: Re: [PATCH v2.41 5/5] datapath: Add basic MPLS support to kernel
Date: Fri, 4 Oct 2013 15:40:16 +0900 [thread overview]
Message-ID: <20131004064016.GA8861@verge.net.au> (raw)
In-Reply-To: <CALnjE+o6TK_2OGbWjZ4EwXMnXw5bzMQH2PeTMJM6nJQV+V147Q@mail.gmail.com>
On Thu, Oct 03, 2013 at 07:46:46PM -0700, Pravin Shelar wrote:
> On Wed, Oct 2, 2013 at 5:20 PM, Simon Horman <horms@verge.net.au> wrote:
> > On Wed, Oct 02, 2013 at 11:03:57AM -0700, Pravin Shelar wrote:
> >> On Mon, Sep 30, 2013 at 11:47 PM, Simon Horman <horms@verge.net.au> wrote:
> >> > Allow datapath to recognize and extract MPLS labels into flow keys
> >> > and execute actions which push, pop, and set labels on packets.
> >> >
> >> > Based heavily on work by Leo Alterman, Ravi K, Isaku Yamahata and Joe Stringer.
> >> >
> >> > Cc: Ravi K <rkerur@gmail.com>
> >> > Cc: Leo Alterman <lalterman@nicira.com>
> >> > Cc: Isaku Yamahata <yamahata@valinux.co.jp>
> >> > Cc: Joe Stringer <joe@wand.net.nz>
> >> > Signed-off-by: Simon Horman <horms@verge.net.au>
> >> >
> >> > ---
> >> >
> >> > +
> >> > + /* this hack needed to get regular skb_gso_segment() */
> >> > +#ifdef HAVE___SKB_GSO_SEGMENT
> >> > +#undef __skb_gso_segment
> >> > + skb_gso = __skb_gso_segment(skb, features, tx_path);
> >> > +#else
> >> > +#undef skb_gso_segment
> >> > + skb_gso = skb_gso_segment(skb, features);
> >> > +#endif
> >> > +
> >>
> >> We can get rid of #ifdefs by just using different name for
> >> rpl___skb_gso_segment(), something like mpls_vlan_skb_gso_segment().
> >> The way it is done for tnl-gso.
> >
> > Thanks.
> >
> > The reason that I had the code arranged this way was so that
> > calls to __skb_gso_segment() would go via rpl___skb_gso_segment()
> > on kernels older than v3.11. In particular calls outside of gso.c.
> >
> > On closer examination the only such case is in ovs_dp_upcall().
> > Currently there should be no need to perform MPLS GSO segmentation in that
> > case because MPLS GSO segmentation can only be needed after actions are
> > applied.
> >
> > However, I am concerned that it may be necessary later when
> > recirculation is introduced as in that case an upcall may occur
> > on a packet which has had actions applied.
>
> good point.
>
> currently we define __skb_gso_segment using skb_gso_segemt(). You have
> reversed it. Is there any reason?
> if you keep it as it is, it can simplify code a bit.
Thanks. I believe that I wanted to use the real __skb_gso_segment()
to back the compat version of __skb_gso_segment(). I can't recall
specifically why and that change seems to be orthogonal to the
MPLS patches.
I have switched things around as you suggested and the code
looks much cleaner. Thanks for the suggestion.
prev parent reply other threads:[~2013-10-04 6:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-01 6:47 [PATCH v2.41 0/5] MPLS actions and matches Simon Horman
2013-10-01 6:47 ` [PATCH v2.41 1/5] odp: Allow VLAN actions after MPLS actions Simon Horman
2013-10-01 6:47 ` [PATCH v2.41 3/5] lib: Support pushing of MPLS LSE before or after VLAN tag Simon Horman
[not found] ` <1380610064-14856-1-git-send-email-horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2013-10-01 6:47 ` [PATCH v2.41 2/5] ofp-actions: Add separate OpenFlow 1.3 action parser Simon Horman
2013-10-01 6:47 ` [PATCH v2.41 4/5] datapath: Break out deacceleration portion of vlan_push Simon Horman
2013-10-01 6:47 ` [PATCH v2.41 5/5] datapath: Add basic MPLS support to kernel Simon Horman
2013-10-01 23:02 ` Jesse Gross
2013-10-02 0:40 ` Simon Horman
2013-10-02 0:45 ` Jesse Gross
2013-10-02 18:03 ` Pravin Shelar
2013-10-03 0:20 ` Simon Horman
2013-10-04 2:46 ` Pravin Shelar
2013-10-04 6:40 ` Simon Horman [this message]
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=20131004064016.GA8861@verge.net.au \
--to=horms@verge.net.au \
--cc=blp@nicira.com \
--cc=dev@openvswitch.org \
--cc=jesse@nicira.com \
--cc=joe@wand.net.nz \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
--cc=rkerur@gmail.com \
--cc=yamahata@valinux.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.