From: David Ahern <dsa@cumulusnetworks.com>
To: Roopa Prabhu <roopa@cumulusnetworks.com>
Cc: abauvin@scaleway.com, netdev <netdev@vger.kernel.org>,
akherbouche@scaleway.com
Subject: Re: [RFC v3 3/3] vxlan: handle underlay VRF changes
Date: Tue, 20 Nov 2018 09:13:43 -0700 [thread overview]
Message-ID: <2c97f9b6-ce98-671b-ce78-e55a3ef10159@cumulusnetworks.com> (raw)
In-Reply-To: <a38ee9a8-bae0-f7b8-7ff0-45de8277c2fc@cumulusnetworks.com>
On 11/20/18 8:48 AM, David Ahern wrote:
> On 11/20/18 8:35 AM, Roopa Prabhu wrote:
>> On Tue, Nov 20, 2018 at 7:04 AM David Ahern <dsa@cumulusnetworks.com> wrote:
>>>
>>> On 11/20/18 7:23 AM, Alexis Bauvin wrote:
>>>> When underlay VRF changes, either because the lower device itself changed,
>>>> or its VRF changed, this patch releases the current socket of the VXLAN
>>>> device and recreates another one in the right VRF. This allows for
>>>> on-the-fly change of the underlay VRF of a VXLAN device.
>>>>
>>>> Signed-off-by: Alexis Bauvin <abauvin@scaleway.com>
>>>> Reviewed-by: Amine Kherbouche <akherbouche@scaleway.com>
>>>> Tested-by: Amine Kherbouche <akherbouche@scaleway.com>
>>>> ---
>>>> drivers/net/vxlan.c | 94 +++++++++++++++++++++++++++++++++++++++++++++
>>>> 1 file changed, 94 insertions(+)
>>>>
>>>> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
>>>> index a3de08122269..1e6ccad6df6a 100644
>>>> --- a/drivers/net/vxlan.c
>>>> +++ b/drivers/net/vxlan.c
>>>> @@ -208,6 +208,18 @@ static inline struct vxlan_rdst *first_remote_rtnl(struct vxlan_fdb *fdb)
>>>> return list_first_entry(&fdb->remotes, struct vxlan_rdst, list);
>>>> }
>>>>
>>>> +static int vxlan_is_in_l3mdev_chain(struct net_device *chain,
>>>> + struct net_device *dev)
>>>> +{
>>>> + if (!chain)
>>>> + return 0;
>>>> +
>>>> + if (chain->ifindex == dev->ifindex)
>>>> + return 1;
>>>> + return vxlan_is_in_l3mdev_chain(netdev_master_upper_dev_get(chain),
>>>> + dev);
>>>> +}
>>>
>>> This should return bool and true/false.
>>>
>>> Also, why l3mdev in the name? None of the checks look at whether it is
>>> an l3mdev master.
>>>
>>> And again here, someone more familiar with the vxlan code should review it.
>>>
>>
>>
>> I understand the need for patch 2. But I don't understand the need for
>> the complexity this patch introduces (especially implicit down and up
>> of the vxlan device).
>> Alexis, If your underlay routing changes, you can down and up the
>> vxlan device from user-space correct ?. This should be true for any
>> tunnel device.
>>
>
> I believe this patch handles changes to the VRF association of the bridge.
>
Re-reading the commit message, this handles changes in VRF association
of the lower device.
If the vxlan socket in general (vrf or not) can be bound to the lower
device instead of the VRF then it simplifies things a lot.
next prev parent reply other threads:[~2018-11-21 2:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-20 14:23 [RFC v3 0/3] Add VRF support for VXLAN underlay Alexis Bauvin
2018-11-20 14:23 ` [RFC v3 1/3] udp_tunnel: add config option to bind to a device Alexis Bauvin
2018-11-20 14:23 ` [RFC v3 2/3] vxlan: add support for underlay in non-default VRF Alexis Bauvin
2018-11-20 14:57 ` David Ahern
2018-11-20 16:11 ` Alexis Bauvin
2018-11-20 15:25 ` Roopa Prabhu
2018-11-20 16:14 ` Alexis Bauvin
2018-11-20 14:23 ` [RFC v3 3/3] vxlan: handle underlay VRF changes Alexis Bauvin
2018-11-20 15:04 ` David Ahern
2018-11-20 15:35 ` Roopa Prabhu
2018-11-20 15:48 ` David Ahern
2018-11-20 16:13 ` David Ahern [this message]
2018-11-20 18:19 ` Alexis Bauvin
2018-11-20 16:58 ` Alexis Bauvin
2018-11-20 17:09 ` David Ahern
2018-11-21 14:05 ` Alexis Bauvin
2018-11-21 19:28 ` David Ahern
2018-11-22 0:54 ` Alexis Bauvin
2018-11-22 1:48 ` David Ahern
2018-11-20 16:27 ` Alexis Bauvin
2018-11-20 16:54 ` David Ahern
2018-11-20 14:48 ` [RFC v3 0/3] Add VRF support for VXLAN underlay David Ahern
2018-11-20 21:45 ` David Ahern
2018-11-21 13:30 ` Alexis Bauvin
2018-11-21 19:26 ` David Ahern
2018-11-22 0:47 ` Alexis Bauvin
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=2c97f9b6-ce98-671b-ce78-e55a3ef10159@cumulusnetworks.com \
--to=dsa@cumulusnetworks.com \
--cc=abauvin@scaleway.com \
--cc=akherbouche@scaleway.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox