Re: [RFC v1 2/3] vxlan: add support for underlay in non-default VRF

2018-11-16 Thread Alexis Bauvin
Le 16 nov. 2018 à 08:37, David Ahern a écrit : > On 11/15/18 2:05 AM, Alexis Bauvin wrote: >> Le 14 nov. 2018 à 20:58, David Ahern a écrit : >>> >>> you are making this more specific than it needs to be >>> >>> On 11/14/18 1:31 AM, Alexi

Re: [RFC v1 3/3] vxlan: handle underlay VRF changes

2018-11-15 Thread Alexis Bauvin
Le 14 nov. 2018 à 21:04, David Ahern a écrit : > > On 11/14/18 1:31 AM, Alexis Bauvin wrote: >> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c >> index 7477b5510a04..188c0cdb8838 100644 >> --- a/drivers/net/vxlan.c >> +++ b/drivers/net/vxlan.c >> @@ -2

Re: [RFC v1 2/3] vxlan: add support for underlay in non-default VRF

2018-11-15 Thread Alexis Bauvin
Le 14 nov. 2018 à 20:58, David Ahern a écrit : > > you are making this more specific than it needs to be > > On 11/14/18 1:31 AM, Alexis Bauvin wrote: >> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c >> index 27bd586b94b0..7477b5510a04 100644 >> ---

Re: [RFC v1 1/3] udp_tunnel: add config option to bind to a device

2018-11-14 Thread Alexis Bauvin
Le 14 nov. 2018 à 17:07, Nicolas Dichtel a écrit : > Le 14/11/2018 à 10:31, Alexis Bauvin a écrit : >> UDP tunnel sockets are always opened unbound to a specific device. This >> patch allow the socket to be bound on a custom device, which >> incidentally makes UDP tunnels

[PATCH v7 3/4] vxlan: add support for underlay in non-default VRF

2018-12-03 Thread Alexis Bauvin
device | | | | | eth0 | <- - - - - - - | vxlan-red | | tap-red | (... more taps) | || | | | +--++---+ +-+ Signed-off-by: Alexis Bauvin Reviewed-by: Am

[PATCH v7 4/4] test/net: Add script for VXLAN underlay in a VRF

2018-12-03 Thread Alexis Bauvin
a VRF to another works when down/up the VXLAN interface. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Reviewed-by: David Ahern Tested-by: Amine Kherbouche --- tools/testing/selftests/net/Makefile | 1 + .../selftests/net/test_vxlan_under_vrf.sh | 129

[PATCH v7 2/4] l3mdev: add function to retreive upper master

2018-12-03 Thread Alexis Bauvin
| | | ++-+ | | ++-+ | | | br-blue | | | ++-+ | | ++-+ | | | eth0 | | | +--+ This will properly resolve the l3mdev of eth0 to vrf-blue. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Reviewed-by: David Ahern Tested-by: Amine Kherbouche

[PATCH v7 0/4] Add VRF support for VXLAN underlay

2018-12-03 Thread Alexis Bauvin
a specific VRF device therefore looking up in the correct table. Alexis Bauvin (4): udp_tunnel: add config option to bind to a device l3mdev: add function to retreive upper master vxlan: add support for underlay in non-default VRF test/net: Add script for VXLAN underlay

[PATCH v7 1/4] udp_tunnel: add config option to bind to a device

2018-12-03 Thread Alexis Bauvin
UDP tunnel sockets are always opened unbound to a specific device. This patch allow the socket to be bound on a custom device, which incidentally makes UDP tunnels VRF-aware if binding to an l3mdev. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Tested-by: Amine Kherbouche

Re: [RFC v3 0/3] Add VRF support for VXLAN underlay

2018-11-21 Thread Alexis Bauvin
Le 20 nov. 2018 à 22:45, David Ahern a écrit : > > On 11/20/18 7:23 AM, Alexis Bauvin wrote: >> We are trying to isolate the VXLAN traffic from different VMs with VRF as >> shown >&

Re: [RFC v3 3/3] vxlan: handle underlay VRF changes

2018-11-21 Thread Alexis Bauvin
Le 20 nov. 2018 à 18:09, David Ahern a écrit : > On 11/20/18 9:58 AM, Alexis Bauvin wrote: >> A socket bound to vrf-blue listens on *:4789, thus owning the port. If >> moving an >> underlay to the default vrf (ip link set dummy-b nomaster), a new socket >> will be

[RFC v4 4/5] netdev: add netdev_is_upper_master

2018-11-21 Thread Alexis Bauvin
-blue | ++-+ | +++ | br-blue | +++ | +---+---+ | bond0 | +--+-+--+ | | +--+ +--+ | | +---+--+ +--+---+ | eth0 | | eth1 | +--+ +--+ Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Tested-by: Amine

[RFC v4 3/5] vxlan: add support for underlay in non-default VRF

2018-11-21 Thread Alexis Bauvin
device | | | | | eth0 | <- - - - - - - | vxlan-red | | tap-red | (... more taps) | || | | | +--++---+ +-+ Signed-off-by: Alexis Bauvin Reviewed-by: Am

[RFC v4 1/5] udp_tunnel: add config option to bind to a device

2018-11-21 Thread Alexis Bauvin
UDP tunnel sockets are always opened unbound to a specific device. This patch allow the socket to be bound on a custom device, which incidentally makes UDP tunnels VRF-aware if binding to an l3mdev. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Tested-by: Amine Kherbouche

[RFC v4 2/5] l3mdev: add function to retreive upper master

2018-11-21 Thread Alexis Bauvin
| | | ++-+ | | ++-+ | | | br-blue | | | ++-+ | | ++-+ | | | eth0 | | | +--+ This will properly resolve the l3mdev of eth0 to vrf-blue. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Tested-by: Amine Kherbouche --- include/net/l3mdev.h

[RFC v4 5/5] vxlan: handle underlay VRF changes

2018-11-21 Thread Alexis Bauvin
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

[RFC v4 0/5] Add VRF support for VXLAN underlay

2018-11-21 Thread Alexis Bauvin
c VRF device therefore looking up in the correct table. Alexis Bauvin (5): udp_tunnel: add config option to bind to a device l3mdev: add function to retreive upper master vxlan: add support for underlay in non-default VRF netdev: add netdev_is_upper_master vxlan: handle underlay VRF changes

Re: [RFC v3 0/3] Add VRF support for VXLAN underlay

2018-11-21 Thread Alexis Bauvin
Le 21 nov. 2018 à 20:26, David Ahern a écrit : > > On 11/21/18 6:30 AM, Alexis Bauvin wrote: >> Le 20 nov. 2018 à 22:45, David Ahern a écrit : >>> >>> On 11/20/18 7:23 AM, Alexis Bauvin wrote: >>>> We are trying to isolate the VXLAN traffic

Re: [RFC v3 3/3] vxlan: handle underlay VRF changes

2018-11-21 Thread Alexis Bauvin
Le 21 nov. 2018 à 20:28, David Ahern a écrit : > On 11/21/18 7:05 AM, Alexis Bauvin wrote: >> Le 20 nov. 2018 à 18:09, David Ahern a écrit : >>> On 11/20/18 9:58 AM, Alexis Bauvin wrote: >>>> A socket bound to vrf-blue listens on *:4789, thus owning the port. If

Re: [RFC v4 4/5] netdev: add netdev_is_upper_master

2018-11-22 Thread Alexis Bauvin
Le 22 nov. 2018 à 18:14, David Ahern a écrit : > On 11/21/18 6:07 PM, Alexis Bauvin wrote: >> diff --git a/net/core/dev.c b/net/core/dev.c >> index 93243479085f..12459036d0da 100644 >> --- a/net/core/dev.c >> +++ b/net/core/dev.c >> @@ -7225,6 +7225,23 @@ void

[RFC v3 1/3] udp_tunnel: add config option to bind to a device

2018-11-20 Thread Alexis Bauvin
UDP tunnel sockets are always opened unbound to a specific device. This patch allow the socket to be bound on a custom device, which incidentally makes UDP tunnels VRF-aware if binding to an l3mdev. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Tested-by: Amine Kherbouche

[RFC v3 3/3] vxlan: handle underlay VRF changes

2018-11-20 Thread Alexis Bauvin
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

[RFC v3 2/3] vxlan: add support for underlay in non-default VRF

2018-11-20 Thread Alexis Bauvin
| | | | | eth0 | <- - - - - - - | vxlan-red | | tap-red | (... more taps) | || | | | +--++---+ +-+ Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Tested-by: Amine Kherbou

[RFC v3 0/3] Add VRF support for VXLAN underlay

2018-11-20 Thread Alexis Bauvin
the issues describe above by allowing VXLAN socket to be bound to a specific VRF device therefore looking up in the correct table. Alexis Bauvin (3): udp_tunnel: add config option to bind to a device vxlan: add support for underlay in non-default VRF vxlan: handle underlay VRF changes

Re: [RFC v3 2/3] vxlan: add support for underlay in non-default VRF

2018-11-20 Thread Alexis Bauvin
Le 20 nov. 2018 à 16:25, Roopa Prabhu a écrit : > > On Tue, Nov 20, 2018 at 6:23 AM Alexis Bauvin wrote: >> >> Creating a VXLAN device with is underlay in the non-default VRF makes >> egress route lookup fail or incorrect since it will resolve in the >> default

Re: [RFC v3 2/3] vxlan: add support for underlay in non-default VRF

2018-11-20 Thread Alexis Bauvin
Le 20 nov. 2018 à 15:57, David Ahern a écrit : > > On 11/20/18 7:23 AM, Alexis Bauvin wrote: >> Creating a VXLAN device with is underlay in the non-default VRF makes >> egress route lookup fail or incorrect since it will resolve in the >> default VRF, and ingress fail be

Re: [RFC v3 3/3] vxlan: handle underlay VRF changes

2018-11-20 Thread Alexis Bauvin
Le 20 nov. 2018 à 16:04, David Ahern a écrit : > > 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

Re: [RFC v3 3/3] vxlan: handle underlay VRF changes

2018-11-20 Thread Alexis Bauvin
Le 20 nov. 2018 à 16:35, Roopa Prabhu a écrit : > > On Tue, Nov 20, 2018 at 7:04 AM David Ahern 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, th

Re: [RFC v3 3/3] vxlan: handle underlay VRF changes

2018-11-20 Thread Alexis Bauvin
Le 20 nov. 2018 à 17:13, David Ahern a écrit : > 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 >>> wrote: >>>> >>>> On 11/20/18 7:23 AM, Alexis Bauvin wro

Re: [RFC v4 3/5] vxlan: add support for underlay in non-default VRF

2018-11-26 Thread Alexis Bauvin
Le 26 nov. 2018 à 18:54, David Ahern a écrit : > On 11/26/18 9:32 AM, Alexis Bauvin wrote: >> Thanks for the review. I’ll send a v5 if you have no other comment on >> this version! > > A few comments on the test script; see attached which has the changes. > > Mainl

[PATCH v5 5/6] vxlan: handle underlay VRF changes

2018-11-26 Thread Alexis Bauvin
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

[PATCH v5 4/6] netdev: add netdev_is_upper_master

2018-11-26 Thread Alexis Bauvin
-blue | ++-+ | +++ | br-blue | +++ | +---+---+ | bond0 | +--+-+--+ | | +--+ +--+ | | +---+--+ +--+---+ | eth0 | | eth1 | +--+ +--+ Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Tested-by: Amine

[PATCH v5 1/6] udp_tunnel: add config option to bind to a device

2018-11-26 Thread Alexis Bauvin
UDP tunnel sockets are always opened unbound to a specific device. This patch allow the socket to be bound on a custom device, which incidentally makes UDP tunnels VRF-aware if binding to an l3mdev. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Reviewed-by: David Ahern Tested

[PATCH v5 3/6] vxlan: add support for underlay in non-default VRF

2018-11-26 Thread Alexis Bauvin
device | | | | | eth0 | <- - - - - - - | vxlan-red | | tap-red | (... more taps) | || | | | +--++---+ +-+ Signed-off-by: Alexis Bauvin Reviewed-by: Am

[PATCH v5 2/6] l3mdev: add function to retreive upper master

2018-11-26 Thread Alexis Bauvin
| | | ++-+ | | ++-+ | | | br-blue | | | ++-+ | | ++-+ | | | eth0 | | | +--+ This will properly resolve the l3mdev of eth0 to vrf-blue. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Reviewed-by: David Ahern Tested-by: Amine Kherbouche

[PATCH v5 0/6] Add VRF support for VXLAN underlay

2018-11-26 Thread Alexis Bauvin
ion of VXLAN packets from the overlay. This patch serie fixes the issues describe above by allowing VXLAN socket to be bound to a specific VRF device therefore looking up in the correct table. Alexis Bauvin (6): udp_tunnel: add config option to bind to a device l3mdev: add function to retreive

[PATCH v5 6/6] test/net: Add script for VXLAN underlay in a VRF

2018-11-26 Thread Alexis Bauvin
a VRF to another works when down/up the VXLAN interface. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Tested-by: Amine Kherbouche --- tools/testing/selftests/net/Makefile | 1 + .../selftests/net/test_vxlan_under_vrf.sh | 129 ++ 2 files changed, 130

Re: [RFC v4 3/5] vxlan: add support for underlay in non-default VRF

2018-11-26 Thread Alexis Bauvin
Le 27 nov. 2018 à 01:46, David Ahern a écrit : > On 11/26/18 5:41 PM, Alexis Bauvin wrote: >> Le 26 nov. 2018 à 18:54, David Ahern a écrit : >>> On 11/26/18 9:32 AM, Alexis Bauvin wrote: >>>> Thanks for the review. I’ll send a v5 if you have no other comment on >

Re: [RFC v4 3/5] vxlan: add support for underlay in non-default VRF

2018-11-26 Thread Alexis Bauvin
Le 22 nov. 2018 à 18:19, David Ahern a écrit : > On 11/21/18 6:07 PM, Alexis Bauvin wrote: >> Creating a VXLAN device with is underlay in the non-default VRF makes >> egress route lookup fail or incorrect since it will resolve in the >> default VRF, and ingress fail becau

Re: [PATCH v5 5/6] vxlan: handle underlay VRF changes

2018-11-27 Thread Alexis Bauvin
Le 27 nov. 2018 à 06:58, Roopa Prabhu a écrit : > On Mon, Nov 26, 2018 at 5:04 PM 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 >> devic

[PATCH v6 0/4] Add VRF support for VXLAN underlay

2018-11-27 Thread Alexis Bauvin
ue or red by e.g. a guest VM will be accepted by the socket, allowing injection of VXLAN packets from the overlay. This patch serie fixes the issues describe above by allowing VXLAN socket to be bound to a specific VRF device therefore looking up in the correct table. Alexis Bauvin (4): udp_tunne

[PATCH v6 4/4] test/net: Add script for VXLAN underlay in a VRF

2018-11-27 Thread Alexis Bauvin
a VRF to another works when down/up the VXLAN interface. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Reviewed-by: David Ahern Tested-by: Amine Kherbouche --- tools/testing/selftests/net/Makefile | 1 + .../selftests/net/test_vxlan_under_vrf.sh | 129

[PATCH v6 1/4] udp_tunnel: add config option to bind to a device

2018-11-27 Thread Alexis Bauvin
UDP tunnel sockets are always opened unbound to a specific device. This patch allow the socket to be bound on a custom device, which incidentally makes UDP tunnels VRF-aware if binding to an l3mdev. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Reviewed-by: David Ahern Tested

[PATCH v6 2/4] l3mdev: add function to retreive upper master

2018-11-27 Thread Alexis Bauvin
| | | ++-+ | | ++-+ | | | br-blue | | | ++-+ | | ++-+ | | | eth0 | | | +--+ This will properly resolve the l3mdev of eth0 to vrf-blue. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Reviewed-by: David Ahern Tested-by: Amine Kherbouche

[PATCH v6 3/4] vxlan: add support for underlay in non-default VRF

2018-11-27 Thread Alexis Bauvin
device | | | | | eth0 | <- - - - - - - | vxlan-red | | tap-red | (... more taps) | || | | | +--++---+ +-+ Signed-off-by: Alexis Bauvin Reviewed-by: Am

[RFC v2 2/3] vxlan: add support for underlay in non-default VRF

2018-11-19 Thread Alexis Bauvin
| | | | | eth0 | <- - - - - - - | vxlan-red | | tap-red | (... more taps) | || | | | +--++---+ +-+ Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Tested-by: Amine Kherbou

[RFC v2 1/3] udp_tunnel: add config option to bind to a device

2018-11-19 Thread Alexis Bauvin
UDP tunnel sockets are always opened unbound to a specific device. This patch allow the socket to be bound on a custom device, which incidentally makes UDP tunnels VRF-aware if binding to an l3mdev. Signed-off-by: Alexis Bauvin Reviewed-by: Amine Kherbouche Tested-by: Amine Kherbouche

[RFC v2 3/3] vxlan: handle underlay VRF changes

2018-11-19 Thread Alexis Bauvin
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

Re: [RFC v2 1/3] udp_tunnel: add config option to bind to a device

2018-11-19 Thread Alexis Bauvin
Le 19 nov. 2018 à 17:18, David Ahern a écrit : > > On 11/19/18 7:21 AM, Alexis Bauvin wrote: >> UDP tunnel sockets are always opened unbound to a specific device. This >> patch allow the socket to be bound on a custom device, which >> incidentally makes UDP tunn

[RFC v2 0/3] Add VRF support for VXLAN underlay

2018-11-19 Thread Alexis Bauvin
m blue or red by e.g. a guest VM will be accepted by the socket, allowing injection of VXLAN packets from the overlay. This patch serie fixes the issues describe above by allowing VXLAN socket to be bound to a specific VRF device therefore looking up in the correct table. Alexis Bauvin (3): udp_

Re: [RFC v4 3/5] vxlan: add support for underlay in non-default VRF

2018-11-26 Thread Alexis Bauvin
Le 26 nov. 2018 à 19:26, Roopa Prabhu a écrit : > > On Mon, Nov 26, 2018 at 9:54 AM David Ahern wrote: >> >> On 11/26/18 9:32 AM, Alexis Bauvin wrote: >>> Thanks for the review. I’ll send a v5 if you have no other comment on >>> this version! >>

Re: [PATCH v6 1/4] udp_tunnel: add config option to bind to a device

2018-12-03 Thread Alexis Bauvin
Le 30 nov. 2018 à 15:31, Sabrina Dubroca a écrit : > 2018-11-27, 14:05:42 +0100, Alexis Bauvin wrote: >> diff --git a/net/ipv4/udp_tunnel.c b/net/ipv4/udp_tunnel.c >> index 6539ff15e9a3..dc68e15a4f72 100644 >> --- a/net/ipv4/udp_tunnel.c >> +++ b/net/ipv4/udp_tunnel.