From: Pravin Shelar <pshelar@nicira.com>
To: Jesse Gross <jesse@nicira.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH v3 net-next 7/8] geneve: Consolidate Geneve functionality in single module.
Date: Tue, 25 Aug 2015 13:54:35 -0700 [thread overview]
Message-ID: <CALnjE+ri3yy7xS5NeS+FHzby4LH--6FAXbWS73CkiBYPfVMs4A@mail.gmail.com> (raw)
In-Reply-To: <CAEP_g=84tg9nPE-PmmPF_rVW_0ctAmjZj-fxRP-Puf9=Da0++g@mail.gmail.com>
On Tue, Aug 25, 2015 at 12:03 PM, Jesse Gross <jesse@nicira.com> wrote:
> On Mon, Aug 24, 2015 at 10:43 AM, Pravin B Shelar <pshelar@nicira.com> wrote:
>> diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
>> index c05bc13..8eb875d 100644
>> --- a/drivers/net/geneve.c
>> +++ b/drivers/net/geneve.c
>> @@ -492,36 +813,36 @@ static int geneve_configure(struct net *net, struct net_device *dev,
> [...]
>> + gs = geneve_find_sock(gn, geneve->dst_port);
>> + if (gs) {
>> + if (metadata) {
>> + if (gs->collect_md)
>> + return -EEXIST;
>> + else
>> + return -EPERM;
>> + } else {
>> + if (gs->collect_md)
>> + return -EPERM;
>> +
>> + t = geneve_lookup(gn, htons(dst_port),
>> + rem_addr, geneve->vni);
>> + if (t)
>> + return -EBUSY;
>> + }
>> + }
>
> I like the new structure but unfortunately, I think there is a race.
> If two devices are created with conflicting configurations but neither
> is brought up then creation of both devices will succeed. However,
> when the second one is brought up, it will silently collide with the
> first.
geneve tunnel is added to hash table during configure time. So the
lookup does not have any dependency on device up or down state. The
Lookup and hash table updates are done under rtnl lock.
next prev parent reply other threads:[~2015-08-25 20:54 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-24 17:43 [PATCH v3 net-next 0/8] Geneve: Add support for tunnel metadata mode Pravin B Shelar
2015-08-24 17:43 ` [PATCH v3 net-next 1/8] geneve: Initialize ethernet address in device setup Pravin B Shelar
2015-08-26 20:42 ` John W. Linville
2015-08-24 17:43 ` [PATCH v3 net-next 2/8] geneve: Use skb mark and protocol to lookup route Pravin B Shelar
2015-08-26 20:46 ` John W. Linville
2015-08-24 17:43 ` [PATCH v3 net-next 3/8] tunnel: introduce udp_tun_rx_dst() Pravin B Shelar
2015-08-24 22:02 ` Jesse Gross
2015-08-25 17:46 ` Thomas Graf
2015-08-24 17:43 ` [PATCH v3 net-next 4/8] geneve: Make dst-port configurable Pravin B Shelar
2015-08-25 17:47 ` Thomas Graf
2015-08-26 20:47 ` John W. Linville
2015-08-24 17:43 ` [PATCH v3 net-next 5/8] geneve: Add support to collect tunnel metadata Pravin B Shelar
2015-08-25 1:42 ` Jesse Gross
2015-08-25 2:15 ` Pravin Shelar
2015-08-25 16:50 ` Jesse Gross
2015-08-25 17:48 ` Thomas Graf
2015-08-25 21:16 ` Pravin Shelar
2015-08-25 18:12 ` Thomas Graf
2015-08-24 17:43 ` [PATCH v3 net-next 6/8] openvswitch: Use Geneve device Pravin B Shelar
2015-08-25 17:48 ` Thomas Graf
2015-08-24 17:43 ` [PATCH v3 net-next 7/8] geneve: Consolidate Geneve functionality in single module Pravin B Shelar
2015-08-25 18:19 ` Thomas Graf
2015-08-25 20:55 ` Pravin Shelar
2015-08-25 19:03 ` Jesse Gross
2015-08-25 20:54 ` Pravin Shelar [this message]
2015-08-25 21:35 ` Jesse Gross
2015-08-26 0:05 ` Pravin Shelar
2015-08-24 17:43 ` [PATCH v3 net-next 8/8] geneve: Move device hash table to geneve socket Pravin B Shelar
2015-08-26 21:14 ` 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=CALnjE+ri3yy7xS5NeS+FHzby4LH--6FAXbWS73CkiBYPfVMs4A@mail.gmail.com \
--to=pshelar@nicira.com \
--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).