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: Eric Dumazet <eric.dumazet@gmail.com>,
	netdev <netdev@vger.kernel.org>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Pravin B Shelar <pshelar@nicira.com>
Subject: Re: [PATCH] iplink_geneve: add UDP destination port configuration at link creation
Date: Fri, 18 Sep 2015 14:39:57 -0400	[thread overview]
Message-ID: <20150918183957.GC18191@tuxdriver.com> (raw)
In-Reply-To: <CAEP_g=8vCm48Hgjnm2ZYTNc1K4QCN=Jvd6hfSRA5b3YEw1cA0w@mail.gmail.com>

On Fri, Sep 18, 2015 at 09:15:56AM -0700, Jesse Gross wrote:
> On Fri, Sep 18, 2015 at 7:45 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > On Fri, 2015-09-18 at 10:26 -0400, John W. Linville wrote:
> >> On Thu, Sep 17, 2015 at 01:49:49PM -0700, Eric Dumazet wrote:
> >> > On Thu, 2015-09-17 at 15:27 -0400, John W. Linville wrote:
> >> > > Signed-off-by: John W. Linville <linville@tuxdriver.com>
> >> > > ---
> >> >
> >> > >  }
> >> > >
> >> > > @@ -150,6 +159,10 @@ static void geneve_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
> >> > >           else
> >> > >                   fprintf(f, "tos %#x ", tos);
> >> > >   }
> >> > > +
> >> > > + if (tb[IFLA_GENEVE_PORT])
> >> > > +         fprintf(f, "dstport %u ",
> >> > > +                 ntohs(rta_getattr_u16(tb[IFLA_GENEVE_PORT])));
> >> >
> >> > This looks strange.
> >> >
> >> > Kernel does :
> >> >
> >> > if (nla_put_u16(skb, IFLA_GENEVE_PORT, ntohs(geneve->dst_port)))
> >> >         goto nla_put_failure;
> >>
> >> Indeed, you are right.  I had essentially copied some vxlan code when
> >> I did my version of adding the port attribute, and didn't take much
> >> care when adapting that code for the version that actually got merged.
> >>
> >> The current geneve code is using host byte-order for the UDP port in
> >> the netlink messages.  But, I see that vxlan, gre, iptnl, etc are using
> >> network byte order for specifying UDP ports in their netlink stuff.
> >> Should geneve follow that practice as well?  Or does it matter?
> >
> > It might be too late to change the ABI, as geneve is in linux-4.2
> 
> We might be in luck actually. Geneve itself came earlier but I think
> the ability to specify the dest port is in 4.3 only, so we still have
> a chance to make it consistent.

Right, that's what I was thinking.  So we are agreed to use network
byte order?  I'll be happy to post a patch.

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-18 18:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17 19:27 [PATCH] iplink_geneve: add UDP destination port configuration at link creation John W. Linville
2015-09-17 20:49 ` Eric Dumazet
2015-09-18 14:26   ` John W. Linville
2015-09-18 14:45     ` Eric Dumazet
2015-09-18 16:15       ` Jesse Gross
2015-09-18 18:39         ` John W. Linville [this message]
2015-09-18 19:59 ` [PATCH] geneve: use network byte order for destination port config parameter John W. Linville
2015-09-18 20:14   ` Jesse Gross
2015-09-21 23:24   ` David Miller
2015-09-22 15:25     ` John W. Linville
2015-09-22 17:09       ` [PATCH v2] " John W. Linville
2015-09-23 22:41         ` 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=20150918183957.GC18191@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=eric.dumazet@gmail.com \
    --cc=jesse@nicira.com \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@nicira.com \
    --cc=stephen@networkplumber.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).