All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Benc <jbenc@redhat.com>
To: Tom Herbert <tom@herbertland.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
	Jesse Gross <jesse@kernel.org>
Subject: Re: [PATCH net-next v2 4/4] vxlan: implement GPE
Date: Wed, 16 Mar 2016 18:38:10 +0100	[thread overview]
Message-ID: <20160316183810.43eb3f3b@griffin> (raw)
In-Reply-To: <CALx6S37n=4-VUTOx7cZuAaVOFa4=wtGgd7iBwAk8pMNmpt_vcA@mail.gmail.com>

On Wed, 16 Mar 2016 10:31:10 -0700, Tom Herbert wrote:
> Sorry, I still don't like this. For VXLAN-GPE packets the above two
> conditionals are a complete waste of time and I shouldn't have to go
> pawing through configuration to determine what protocol has actually
> be implemented.  Please, at least move these into the else block of
> "if (vs->flags & VXLAN_F_GPE) {" above. This saves two conditionals in
> the data path, makes the parsing code more readable, and you don't
> need to reference configuration to figure things out.

As I already wrote, this is not possible. GPE parsing needs to occur
before iptunnel_pull_header (because we need to know the protocol), GBP
parsing needs to happen after it (after udp_tun_rx_dst specifically).

Believe me, I would do it that way if it was possible.

I also considered splitting rx path for GPE and non-GPE case and the
result was much uglier and longer code.

 Jiri

  reply	other threads:[~2016-03-16 17:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 16:51 [PATCH net-next v2 0/4] vxlan: implement Generic Protocol Extension (GPE) Jiri Benc
2016-03-16 16:51 ` [PATCH net-next v2 1/4] vxlan: move Ethernet initialization to a separate function Jiri Benc
2016-03-16 16:51 ` [PATCH net-next v2 2/4] vxlan: move fdb code to common location in vxlan_xmit Jiri Benc
2016-03-16 16:51 ` [PATCH net-next v2 3/4] ip_tunnel: implement __iptunnel_pull_header Jiri Benc
2016-03-16 16:51 ` [PATCH net-next v2 4/4] vxlan: implement GPE Jiri Benc
2016-03-16 17:31   ` Tom Herbert
2016-03-16 17:38     ` Jiri Benc [this message]
2016-03-17  3:35 ` [PATCH net-next v2 0/4] vxlan: implement Generic Protocol Extension (GPE) David Miller

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=20160316183810.43eb3f3b@griffin \
    --to=jbenc@redhat.com \
    --cc=jesse@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.com \
    /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.