Re: ip doesn't handle vxlan id and group correctly

2019-10-09 Thread Alexis Bauvin
r one for the overlay, if your application cannot run in a netns / requires access to all vnis. Alexis Bauvin (re-send for netdev as somehow the first one contained html) > Le 7 oct. 2019 à 13:39, Ondřej Flídr a écrit : > > Hello, > > it seems that ip doesn't handle combina

Re: VRF Issue Since kernel 5

2019-09-09 Thread Alexis Bauvin
if I set the > policy to ACCEPT and flush all the rules, the behaviour remains the same. > > Is it possible that the TCP stack isn't aware of the session (as is mapped to > wrong VRF internally or something to that effect) and is therefore sending > the RST? > > Gareth &

Re: VRF Issue Since kernel 5

2019-09-09 Thread Alexis Bauvin
Hi, There has been some changes regarding VRF isolation in Linux 5 IIRC, namely proper isolation of the default VRF. Some things you may try: - looking at the l3mdev_accept sysctls (e.g. `net.ipv4.tcp_l3mdev_accept`) - querying stuff from the management vrf through `ip vrf exec vrf-mgmt ` e.g

[PATCH v2] tun: mark small packets as owned by the tap sock

2019-07-23 Thread Alexis Bauvin
ires the host to support virtio tso for the guest to offload segmentation). All this leads to inconsistent behaviour in the kernel, especially on netfilter modules that uses sk->socket (e.g. xt_owner). Signed-off-by: Alexis Bauvin Fixes: 66ccbc9c87c2 ("tap: use build_skb() for small packe

Re: [PATCH v1] tun: mark small packets as owned by the tap sock

2019-07-23 Thread Alexis Bauvin
> Le 23 juil. 2019 à 15:53, Jason Wang a écrit : > On 2019/7/23 下午9:01, Alexis Bauvin wrote: >> Small packets going out of a tap device go through an optimized code >> path that uses build_skb() rather than sock_alloc_send_pskb(). The >> latter calls skb_set_owner_w(), b

[PATCH v1] tun: mark small packets as owned by the tap sock

2019-07-23 Thread Alexis Bauvin
. All this leads to inconsistent behaviour in the kernel, especially on netfilter modules that uses sk->socket (e.g. xt_owner). Signed-off-by: Alexis Bauvin Fixes: 66ccbc9c87c2 ("tap: use build_skb() for small packet") --- drivers/net/tun.c | 71 -

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

2018-12-03 Thread Alexis Bauvin
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 0/4] Add VRF support for VXLAN underlay

2018-12-03 Thread Alexis Bauvin
to be bound to 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

[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 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 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: [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.

[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-by

[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

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

2018-11-27 Thread Alexis Bauvin
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 0/4] Add VRF support for VXLAN underlay

2018-11-27 Thread Alexis Bauvin
nt from 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 (4):

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 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
tion 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 retr

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

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

[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-by

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 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. > > Mainly t

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: [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 because

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 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 0/5] Add VRF support for VXLAN underlay

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

[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

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 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 from dif

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

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-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 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 à 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 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

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

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

[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 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 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

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

2018-11-19 Thread Alexis Bauvin
t from 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):

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 tunnels VR

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 VR