netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: Jesse Gross <jesse@nicira.com>
Cc: netdev <netdev@vger.kernel.org>, David Miller <davem@davemloft.net>
Subject: Re: [PATCH v2] geneve: remove use of internal IP header when calling IP_ECN_decapsulate
Date: Fri, 18 Sep 2015 21:36:38 -0400	[thread overview]
Message-ID: <20150919013638.GF18191@tuxdriver.com> (raw)
In-Reply-To: <CAEP_g=_aDApp8+Uj8JOpg=jzxEs73XzSufgWzA-ODpfXS-ss-Q@mail.gmail.com>

On Fri, Sep 18, 2015 at 02:49:30PM -0700, Jesse Gross wrote:
> On Fri, Sep 18, 2015 at 1:40 PM, John W. Linville
> <linville@tuxdriver.com> wrote:
> > On Fri, Sep 18, 2015 at 01:30:36PM -0700, Jesse Gross wrote:
> >> On Thu, Sep 17, 2015 at 1:34 PM, John W. Linville
> >> <linville@tuxdriver.com> wrote:
> >> > This seems to have been a "thinko".  IP_ECN_decapsulate needs info
> >> > from both internal and external headers.
> >> >
> >> > Signed-off-by: John W. Linville <linville@tuxdriver.com>
> >>
> >> This looks good to me although I realized that the transmit path is
> >> also conditional based on !collect_md metadata. I suppose that means
> >> that this difference is intentional and I guess I could see arguments
> >> either way but I still think it is better to be consistent across
> >> different code paths in this respect.
> >
> > I'm happy with the v2 patch if you are. :-)
> 
> I'm happy with this part of the code path after this patch. However,
> my concern was that this patch, while correct, will make receive
> inconsistent with transmit. Presumably we should update the transmit
> side as well.

Oh, sorry -- I missed your point.  You mean something like this?

@@ -812,19 +815,16 @@ static netdev_tx_t geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev)
		if (unlikely(err))
			goto err;
 
-		tos = key->tos;
+		tos = ip_tunnel_ecn_encap(key->tos, iip, skb);
		ttl = key->ttl;
		df = key->tun_flags & TUNNEL_DONT_FRAGMENT ? htons(IP_DF) : 0;

Am I understanding now?

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

  reply	other threads:[~2015-09-19  1:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17 17:17 [PATCH] geneve: remove use of internal IP header when calling IP_ECN_decapsulate John W. Linville
2015-09-17 19:46 ` Jesse Gross
2015-09-17 20:17   ` John W. Linville
2015-09-17 20:34 ` [PATCH v2] " John W. Linville
2015-09-18 20:30   ` Jesse Gross
2015-09-18 20:40     ` John W. Linville
2015-09-18 21:49       ` Jesse Gross
2015-09-19  1:36         ` John W. Linville [this message]
2015-09-19  2:19           ` Jesse Gross
2015-09-21  5:24   ` David Miller
2015-09-21 14:04     ` John W. Linville
2015-09-21 14:29     ` [PATCH v3] geneve: ensure ECN info is handled properly in all tx/rx paths John W. Linville
2015-09-22  1:11       ` Jesse Gross
2015-09-22 23:50       ` 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=20150919013638.GF18191@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=davem@davemloft.net \
    --cc=jesse@nicira.com \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).