From: "John W. Linville" <linville@tuxdriver.com>
To: Jesse Gross <jesse@nicira.com>
Cc: Francois Romieu <romieu@fr.zoreil.com>,
netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Andy Zhou <azhou@nicira.com>,
Stephen Hemminger <stephen@networkplumber.org>,
Alexander Duyck <alexander.h.duyck@redhat.com>
Subject: Re: [RFC PATCH 5/5] geneve: add initial netdev driver for GENEVE tunnels
Date: Mon, 6 Apr 2015 14:44:09 -0400 [thread overview]
Message-ID: <20150406184409.GC2866@tuxdriver.com> (raw)
In-Reply-To: <CAEP_g=-qyy6PNEqKQWVaw5Wf9MvcUk-Hx5Mrk7jaTEihK3Tqzg@mail.gmail.com>
On Mon, Apr 06, 2015 at 11:06:02AM -0700, Jesse Gross wrote:
> On Fri, Apr 3, 2015 at 6:01 PM, Francois Romieu <romieu@fr.zoreil.com> wrote:
> > Jesse Gross <jesse@nicira.com> :
> > [...]
> >> > diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
> >> > new file mode 100644
> >> > index 000000000000..fe8895487fc2
> >> > --- /dev/null
> >> > +++ b/drivers/net/geneve.c
> >> > +/* geneve receive/decap routine */
> >> > +static void geneve_rx(struct geneve_sock *gs, struct sk_buff *skb)
> >> > +{
> >> > + struct genevehdr *gnvh = geneve_hdr(skb);
> >> > + struct geneve_dev *geneve;
> >> > + struct pcpu_sw_netstats *stats;
> >> > +
> >> > + geneve = gs->rcv_data;
> >> > +
> >> > + /* Does the VNI match the device? */
> >> > + if (memcmp(gnvh->vni, geneve->vni, sizeof(geneve->vni)))
> >> > + goto drop;
> >>
> >> Since Geneve packets can carry options and this doesn't currently
> >> support any, I think we need to at least check the 'C' bit in the
> >> header and drop packets if it is set to ensure that we don't
> >> accidentally ignore critical options.
> >
> > Speaking of it, it's imho a bit too easy to confuse GENEVE_CRIT_OPT_TYPE
> > with the relevant 'C' bit mask.
>
> Which 'C' bit mask? You mean the bitfield in the header? I guess but
> I'm not sure what would make it clearer and since they are different
> types it seems somewhat difficult to actually misuse them in practice.
What would you suggest, Francois? A GENEVE_CRIT_OPT_PRESENT() macro?
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
next prev parent reply other threads:[~2015-04-06 18:45 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-02 19:17 [RFC] add GENEVE netdev tunnel driver John W. Linville
2015-04-02 19:17 ` [RFC PATCH 1/5] geneve: remove MODULE_ALIAS_RTNL_LINK from net/ipv4/geneve.c John W. Linville
2015-04-02 23:39 ` Stephen Hemminger
2015-04-03 12:17 ` Jiri Pirko
2015-04-03 14:27 ` John W. Linville
2015-04-02 19:17 ` [RFC PATCH 2/5] geneve: move definition of geneve_hdr() to geneve.h John W. Linville
2015-04-02 19:17 ` [RFC PATCH 3/5] Rename support library for geneve John W. Linville
2015-04-03 0:05 ` Cong Wang
2015-04-03 14:40 ` John W. Linville
2015-04-03 15:54 ` Nicolas Dichtel
2015-04-03 18:25 ` John W. Linville
2015-04-02 19:17 ` [RFC PATCH 4/5] libgeneve: identify as driver library in modules description John W. Linville
2015-04-02 19:17 ` [RFC PATCH 5/5] geneve: add initial netdev driver for GENEVE tunnels John W. Linville
2015-04-02 20:20 ` Jiri Pirko
2015-04-03 14:57 ` John W. Linville
2015-04-03 15:07 ` John W. Linville
2015-04-03 15:20 ` Jiri Pirko
2015-04-03 18:31 ` John W. Linville
2015-04-03 5:55 ` Simon Horman
2015-04-03 14:41 ` John W. Linville
2015-04-03 21:05 ` Jesse Gross
2015-04-04 1:01 ` Francois Romieu
2015-04-06 18:06 ` Jesse Gross
2015-04-06 18:44 ` John W. Linville [this message]
2015-04-06 20:44 ` Francois Romieu
2015-04-06 18:43 ` John W. Linville
2015-04-06 22:52 ` Jesse Gross
2015-04-02 19:17 ` [RFC PATCH] iproute2: GENEVE support John W. Linville
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=20150406184409.GC2866@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=alexander.h.duyck@redhat.com \
--cc=azhou@nicira.com \
--cc=davem@davemloft.net \
--cc=jesse@nicira.com \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.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 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.