Re: netns_id in bpf_sk_lookup_{tcp,udp}

2018-11-20 Thread David Ahern
On 11/20/18 2:05 AM, Nicolas Dichtel wrote: > Le 20/11/2018 à 00:46, David Ahern a écrit : > [snip] >> That revelation shows another hole: >> $ ip netns add foo >> $ ip netns set foo 0x > It also works with 0xf000 ... > >> $ ip netns list >>

Re: [iproute2-next PATCH v3 2/2] man: tc-flower: Add explanation for range option

2018-11-20 Thread David Ahern
On 11/20/18 9:59 PM, Nambiar, Amritha wrote: > Oops, submitted the v2 patch for man changes too soon, without seeing > this. So, in this case, should I re-submit the iproute2-flower patch > that was accepted removing the 'range' keyword? I think so. Consistency across commands is a good thing.

Re: [iproute2-next PATCH v3 2/2] man: tc-flower: Add explanation for range option

2018-11-20 Thread David Ahern
On 11/20/18 9:44 PM, Nambiar, Amritha wrote: > On 11/20/2018 2:56 PM, David Ahern wrote: >> On 11/15/18 5:55 PM, Amritha Nambiar wrote: >>> Add details explaining filtering based on port ranges. >>> >>> Signed-off-by: Amritha Nambiar >>> --- >>

Re: [PATCH iproute2-next 2/8] json: add %hhu helpers

2018-11-20 Thread David Ahern
On 11/19/18 6:40 PM, Jakub Kicinski wrote: > On Mon, 19 Nov 2018 17:18:42 -0800, Stephen Hemminger wrote: >>> void jsonw_hu_field(json_writer_t *self, const char *prop, unsigned short >>> num) >>> { >>> jsonw_name(self, prop); >> >> Do you really need this? it turns out that because of C

Re: [iproute2-next PATCH v3 1/2] tc: flower: Classify packets based port ranges

2018-11-20 Thread David Ahern
On 11/15/18 5:55 PM, Amritha Nambiar wrote: > Added support for filtering based on port ranges. > UAPI changes have been accepted into net-next. > > Example: > 1. Match on a port range: > - > $ tc filter add dev enp4s0 protocol ip parent :\ > prio 1 flower ip_proto

Re: [iproute2-next PATCH v3 2/2] man: tc-flower: Add explanation for range option

2018-11-20 Thread David Ahern
On 11/15/18 5:55 PM, Amritha Nambiar wrote: > Add details explaining filtering based on port ranges. > > Signed-off-by: Amritha Nambiar > --- > man/man8/tc-flower.8 | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/man/man8/tc-flower.8

Re: [PATCH iproute2 22/22] rdma: make local functions static

2018-11-20 Thread David Ahern
On 11/15/18 3:36 PM, Stephen Hemminger wrote: > Several functions only used inside utils.c > > Signed-off-by: Stephen Hemminger > --- > rdma/rdma.h | 11 --- > rdma/utils.c | 12 ++-- > 2 files changed, 6 insertions(+), 17 deletions(-) > this patch breaks builds for me on

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

2018-11-20 Thread David Ahern
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 > in the schemas below: > > +-+ ++ > | +--+| | ++ | > | | |

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

2018-11-20 Thread David Ahern
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 > created, unbound to any interface and listening on *:4789. However, because it >

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

2018-11-20 Thread David Ahern
On 11/20/18 9:27 AM, Alexis Bauvin wrote: > maybe even move > the function to net/core/dev.c, with other master-related functions. > What do you think? yes, it is a generic function.

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

2018-11-20 Thread David Ahern
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 wrote: >>>> When underlay VRF changes, either because the lower device

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

2018-11-20 Thread David Ahern
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 wrote: >>> When underlay VRF changes, either because the lower device itself changed, >>> or its VRF changed, this patch release

Re: netns_id in bpf_sk_lookup_{tcp,udp}

2018-11-20 Thread David Ahern
On 11/20/18 2:05 AM, Nicolas Dichtel wrote: > Le 20/11/2018 à 00:46, David Ahern a écrit : > [snip] >> That revelation shows another hole: >> $ ip netns add foo >> $ ip netns set foo 0x > It also works with 0xf000 ... yes, I realized last night I sent

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

2018-11-20 Thread David Ahern
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

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

2018-11-20 Thread David Ahern
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 because the socket listens in the default > VRF. > > This patch binds the

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

2018-11-20 Thread David Ahern
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 > in the schemas below: > > +-+ ++ > | +--+| | ++ | > | | |

Re: [PATCH net] ipv6: fix a dst leak when removing its exception

2018-11-19 Thread David Ahern
On 11/19/18 7:16 PM, David Miller wrote: > From: Xin Long > Date: Thu, 15 Nov 2018 16:23:38 +0900 > >> The attachment is the ip6_dst.sh with IPVS. >> >> # sh ip6_dst.sh > > Maybe a selftests candidate? > That script was not a reliable reproducer for me. I created a much simpler one that

Re: netns_id in bpf_sk_lookup_{tcp,udp}

2018-11-19 Thread David Ahern
On 11/19/18 2:59 PM, Joe Stringer wrote: > @@ -2221,12 +,13 @@ union bpf_attr { > * **sizeof**\ (*tuple*\ **->ipv6**) > * Look for an IPv6 socket. > * > - * If the *netns* is zero, then the socket lookup table in the > - * netns

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-19 Thread David Ahern
On 11/9/18 5:06 PM, David Ahern wrote: > On 11/9/18 9:21 AM, David Ahern wrote: >>> Is there possible to add only counters from xdp for vlans ? >>> This will help me in testing. >> I will take a look today at adding counters that you can dump using >> bpftool

Re: netns_id in bpf_sk_lookup_{tcp,udp}

2018-11-19 Thread David Ahern
On 11/19/18 12:47 PM, Joe Stringer wrote: > On Mon, 19 Nov 2018 at 10:39, David Ahern wrote: >> >> On 11/19/18 11:36 AM, Joe Stringer wrote: >>> Hi David, thanks for pointing this out. >>> >>> This is more of an oversight through iterations, the run

Re: netns_id in bpf_sk_lookup_{tcp,udp}

2018-11-19 Thread David Ahern
On 11/19/18 11:36 AM, Joe Stringer wrote: > Hi David, thanks for pointing this out. > > This is more of an oversight through iterations, the runtime lookup > will fail to find a socket if the netns value is greater than the > range of a uint32 so I think it would actually make more sense to drop

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

2018-11-19 Thread David Ahern
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 VRF-aware if binding to an l3mdev. > > Signed-off-by: Alexis Bauvin > Reviewed-by:

netns_id in bpf_sk_lookup_{tcp,udp}

2018-11-18 Thread David Ahern
Hi Joe: The netns_id to the bpf_sk_lookup_{tcp,udp} functions in net/core/filter.c is a u64, yet the APIs in include/uapi/linux/bpf.h shows a u32. Is that intentional or an oversight through the iterations? David

[PATCH net] ipv6: Fix PMTU updates for UDP/raw sockets in presence of VRF

2018-11-18 Thread David Ahern
From: David Ahern Preethi reported that PMTU discovery for UDP/raw applications is not working in the presence of VRF when the socket is not bound to a device. The problem is that ip6_sk_update_pmtu does not consider the L3 domain of the skb device if the socket is not bound. Update the function

Re: [PATCH RFC net-next] net: SAIL based FIB lookup for XDP

2018-11-18 Thread David Ahern
On 11/11/18 7:25 PM, Md. Islam wrote: > This patch implements SAIL[1] based routing table lookup for XDP. I > however made some changes from the original proposal (details are > described in the patch). This changes decreased the memory consumption > from 21.94 MB to 4.97 MB for my example routing

Re: [PATCH iproute2 00/22] misc cleanups

2018-11-17 Thread David Ahern
On 11/15/18 3:36 PM, Stephen Hemminger wrote: > Code cleanup including: >* make local functions static >* drop dead code >* whitespace code style cleanup > Hi Stephen: You did not mark these for -next but that is typically where cleanups go. What is your intention?

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

2018-11-16 Thread David Ahern
On 11/16/18 2:41 AM, Alexis Bauvin wrote: > The case I am trying to cover here is the user creating a VXLAN device with > eth0 > as its lower device (ip link add vxlan0 type vxlan ... dev eth0), thus > ignoring > the fact that it should be br0 (the actual L3 interface). In this case, the > only

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

2018-11-15 Thread David Ahern
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, Alexis Bauvin wrote: >>> diff --git a/drivers/net/vxlan.c b/driver

Re: [PATCH net] ipv6: fix a dst leak when removing its exception

2018-11-15 Thread David Ahern
d-off-by: Xin Long > --- > net/ipv6/route.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > Ok, I see now. commit ad65a2f05695 add the dst_hold_safe with ip6_del_rt. ip6_del_rt called ip6_rt_put to release the reference taken by the hold_safe. Those paths are gone now. Reviewed-by: David Ahern

Re: [PATCH net] ipv6: fix a dst leak when removing its exception

2018-11-15 Thread David Ahern
On 11/14/18 11:23 PM, Xin Long wrote: > On Thu, Nov 15, 2018 at 3:33 PM David Ahern wrote: >> >> On 11/14/18 11:03 AM, David Ahern wrote: >>> On 11/13/18 8:48 AM, Xin Long wrote: >>>> These is no need to hold dst before calling rt6_remove_exception_

Re: [patch net-next] net: 8021q: move vlan offload registrations into vlan_core

2018-11-14 Thread David Ahern
el Shteinbok > --- > net/8021q/vlan.c | 96 - > net/8021q/vlan_core.c | 99 +++ > 2 files changed, 99 insertions(+), 96 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH net] ipv6: fix a dst leak when removing its exception

2018-11-14 Thread David Ahern
On 11/14/18 11:03 AM, David Ahern wrote: > On 11/13/18 8:48 AM, Xin Long wrote: >> These is no need to hold dst before calling rt6_remove_exception_rt(). >> The call to dst_hold_safe() in ip6_link_failure() was for ip6_del_rt(), >> which has been removed in Commit 93531c674315

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

2018-11-14 Thread David Ahern
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 > @@ -208,6 +208,18 @@ static inline struct vxlan_rdst > *first_remote_rtnl(struct vxlan_fdb *fdb) >

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

2018-11-14 Thread David Ahern
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 > --- a/drivers/net/vxlan.c > +++ b/drivers/net/vxlan.c > @@ -208,11 +208,23 @@ static inline

Re: [PATCH net] ipv6: fix a dst leak when removing its exception

2018-11-14 Thread David Ahern
On 11/13/18 8:48 AM, Xin Long wrote: > These is no need to hold dst before calling rt6_remove_exception_rt(). > The call to dst_hold_safe() in ip6_link_failure() was for ip6_del_rt(), > which has been removed in Commit 93531c674315 ("net/ipv6: separate > handling of FIB entries from dst based

Re: [iproute PATCH] man: ip-route.8: Document nexthop limit

2018-11-12 Thread David Ahern
On 11/12/18 2:21 PM, Phil Sutter wrote: > diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in > index a33ce1f0f4006..383178c11331e 100644 > --- a/man/man8/ip-route.8.in > +++ b/man/man8/ip-route.8.in > @@ -589,6 +589,13 @@ argument lists: > route reflecting its relative bandwidth or

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-10 Thread David Ahern
On 11/10/18 6:18 AM, Paweł Staszewski wrote: > > ./xdp_fwd enp175s0f0 enp175s0f1 > libbpf: failed to create map (name: 'stats_map'): Operation not permitted > libbpf: failed to load object './xdp_fwd_kern.o' Forgot I had increased locked memory: ulimit -l unlimited ./xdp_fwd enp175s0f0

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-09 Thread David Ahern
On 11/9/18 9:21 AM, David Ahern wrote: >> Is there possible to add only counters from xdp for vlans ? >> This will help me in testing. > I will take a look today at adding counters that you can dump using > bpftool. It will be a temporary solution for this xdp program only. >

Re: [PATCH iproute2 net-next v2 0/2] Add DF configuration for VXLAN and GENEVE link types

2018-11-09 Thread David Ahern
On 11/8/18 4:21 AM, Stefano Brivio wrote: > This series adds configuration of the DF bit in outgoing IPv4 packets for > VXLAN and GENEVE link types. > > Stefano Brivio (2): > iplink_vxlan: Add DF configuration > iplink_geneve: Add DF configuration > > include/uapi/linux/if_link.h | 18

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-09 Thread David Ahern
On 11/9/18 3:20 AM, Paweł Staszewski wrote: > > I just catch some weird behavior :) > All was working fine for about 20k packets > > Then after xdp start to forward every 10 packets Interesting. Any counter showing drops? > ping 172.16.0.2 -i 0.1 > PING 172.16.0.2 (172.16.0.2) 56(84) bytes of

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-08 Thread David Ahern
On 11/8/18 5:40 PM, Paweł Staszewski wrote: > > > W dniu 08.11.2018 o 17:32, David Ahern pisze: >> On 11/8/18 9:27 AM, Paweł Staszewski wrote: >>>>> What hardware is this? >>>>> >>> mellanox connectx 4 >>> ethtool -i enp175s0f

[PATCH bpf-next] bpftool: Improve handling of ENOENT on map dumps

2018-11-08 Thread David Ahern
From: David Ahern bpftool output is not user friendly when dumping a map with only a few populated entries: $ bpftool map 1: devmap name tx_devmap flags 0x0 key 4B value 4B max_entries 64 memlock 4096B 2: array name tx_idxmap flags 0x0 key 4B value 4B

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-08 Thread David Ahern
On 11/8/18 10:30 AM, Paweł Staszewski wrote: > Wondering about this: > swapper 0 [045] 68494.770287: fib:fib_table_lookup: table 254 oif 0 > iif 6 proto 1 192.168.22.237/0 -> 172.16.0.2/0 tos 0 scope 0 flags 0 ==> > dev vlan1740 gw 0.0.0.0 src 172.16.0.1 err 0 >     7fff818c13b5

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-08 Thread David Ahern
On 11/8/18 9:27 AM, Paweł Staszewski wrote: >>> What hardware is this? >>> > mellanox connectx 4 > ethtool -i enp175s0f0 > driver: mlx5_core > version: 5.0-0 > firmware-version: 12.21.1000 (SM_200101033) > expansion-rom-version: > bus-info: :af:00.0 > supports-statistics: yes >

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-08 Thread David Ahern
On 11/8/18 6:33 AM, Paweł Staszewski wrote: > > > W dniu 07.11.2018 o 22:06, David Ahern pisze: >> On 11/3/18 6:24 PM, Paweł Staszewski wrote: >>>> Does your setup have any other device types besides physical ports with >>>> VLANs (e.g., any macvlans or bon

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-07 Thread David Ahern
On 11/3/18 6:24 PM, Paweł Staszewski wrote: >> Does your setup have any other device types besides physical ports with >> VLANs (e.g., any macvlans or bonds)? >> >> > no. > just > phy(mlnx)->vlans only config VLAN and non-VLAN (and a mix) seem to work ok. Patches are here:

Re: [PATCH iproute2 net-next 1/2] iplink_vxlan: Add DF configuration

2018-11-07 Thread David Ahern
On 11/6/18 2:39 PM, Stefano Brivio wrote: > diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c > index 7fc0e2b4eb06..86afbe1334f0 100644 > --- a/ip/iplink_vxlan.c > +++ b/ip/iplink_vxlan.c > @@ -31,6 +31,7 @@ static void print_explain(FILE *f) > " [ local ADDR ]\n" >

Re: [PATCH net-next 07/11] selftests: pmtu: Introduce tests for IPv4/IPv6 over GENEVE over IPv6

2018-11-07 Thread David Ahern
On 11/6/18 2:39 PM, Stefano Brivio wrote: > This only introduces tests over GENEVE over IPv6 right now. I'll introduce > tests over IPv4 (they can be added trivially) once DF configuration support > is accepted into iproute2. same here.

Re: [PATCH net-next 04/11] selftests: pmtu: Introduce tests for IPv4/IPv6 over VxLAN over IPv6

2018-11-07 Thread David Ahern
On 11/6/18 2:39 PM, Stefano Brivio wrote: > Use a router between endpoints, implemented via namespaces, set a low MTU > between router and destination endpoint, exceed it and check PMTU value in > route exceptions. > > Reviewed-by: Sabrina Dubroca > Signed-off-by: Stefano Brivio > --- > This

Re: [PATCH net-next v5 9/9] ipv6: do not drop vrf udp multicast packets

2018-11-07 Thread David Ahern
+--- > 1 file changed, 5 insertions(+), 3 deletions(-) > Reviewed-by: David Ahern Tested-by: David Ahern

Re: [PATCH net-next v5 8/9] ipv6: handling of multicast packets received in VRF

2018-11-07 Thread David Ahern
; > Signed-off-by: Dewi Morgan > Signed-off-by: Mike Manning > --- > net/ipv6/ip6_input.c | 35 --- > 1 file changed, 32 insertions(+), 3 deletions(-) > Reviewed-by: David Ahern Tested-by: David Ahern

Re: [PATCH net-next v5 7/9] ipv6: allow ping to link-local address in VRF

2018-11-07 Thread David Ahern
ecking here. > > This fix makes ping to link-local consistent with that to global > addresses, in that this can now be done from within the same VRF that > the address is in. > > Signed-off-by: Mike Manning > --- > net/ipv6/ipv6_sockglue.c | 2 +- > 1 file changed, 1

Re: [PATCH net-next v5 6/9] vrf: mark skb for multicast or link-local as enslaved to VRF

2018-11-07 Thread David Ahern
VRF driver to also mark these skb as being > enslaved to the VRF. > > Signed-off-by: Mike Manning > --- > drivers/net/vrf.c | 19 +-- > 1 file changed, 9 insertions(+), 10 deletions(-) > Reviewed-by: David Ahern Tested-by: David Ahern

Re: [PATCH net-next v5 5/9] net: fix raw socket lookup device bind matching with VRFs

2018-11-07 Thread David Ahern
o account. > > Signed-off-by: Duncan Eastoe > Signed-off-by: Mike Manning > --- > include/net/raw.h | 13 - > net/ipv4/raw.c| 3 +-- > net/ipv6/raw.c| 5 ++--- > 3 files changed, 15 insertions(+), 6 deletions(-) > Reviewed-by: David Ahern Tested-by: David Ahern

Re: [PATCH net-next v5 2/9] net: ensure unbound stream socket to be chosen when not in a VRF

2018-11-07 Thread David Ahern
net6_hashtables.c | 14 ++ > 4 files changed, 31 insertions(+), 16 deletions(-) > Reviewed-by: David Ahern Tested-by: David Ahern

Re: [PATCH net-next v5 3/9] net: ensure unbound datagram socket to be chosen when not in a VRF

2018-11-07 Thread David Ahern
| 15 ++- > net/ipv6/datagram.c | 10 +++--- > net/ipv6/udp.c | 14 +----- > 5 files changed, 31 insertions(+), 21 deletions(-) Reviewed-by: David Ahern Tested-by: David Ahern

Re: [PATCH net-next v5 4/9] net: provide a sysctl raw_l3mdev_accept for raw socket lookup with VRFs

2018-11-07 Thread David Ahern
net/ipv4/sysctl_net_ipv4.c | 11 +++ > 7 files changed, 68 insertions(+), 2 deletions(-) Reviewed-by: David Ahern Tested-by: David Ahern

Re: [PATCH net-next v5 1/9] net: allow binding socket in a VRF when there's an unbound socket

2018-11-07 Thread David Ahern
et/inet_hashtables.h| 13 ++--- > include/net/inet_sock.h | 13 + > net/ipv4/inet_connection_sock.c | 13 ++--- > net/ipv4/inet_hashtables.c | 20 +++- > 6 files changed, 51 insertions(+), 22 deletions(-) Reviewed-by: David Ahern Tested-by: David Ahern

[PATCH net-next 2/3] net: Add extack argument to ip_fib_metrics_init

2018-11-06 Thread David Ahern
From: David Ahern Add extack argument to ip_fib_metrics_init and add messages for invalid metrics. Signed-off-by: David Ahern --- include/net/ip.h | 3 ++- net/ipv4/fib_semantics.c | 2 +- net/ipv4/metrics.c | 26 +++--- net/ipv6/route.c | 5

[PATCH net-next 1/3] net: Add extack argument to rtnl_create_link

2018-11-06 Thread David Ahern
From: David Ahern Add extack arg to rtnl_create_link and add messages for invalid number of Tx or Rx queues. Signed-off-by: David Ahern --- drivers/net/can/vxcan.c | 2 +- drivers/net/geneve.c| 2 +- drivers/net/veth.c | 2 +- drivers/net/vxlan.c | 2 +- include/net

[PATCH net-next 3/3] rtnetlink: Add more extack messages to rtnl_newlink

2018-11-06 Thread David Ahern
From: David Ahern Add extack arg to the nla_parse_nested calls in rtnl_newlink, and add messages for unknown device type and link network namespace id. In particular, it improves the failure message when the wrong link type is used. From $ ip li add bond1 type bonding RTNETLINK answers

[PATCH net-next 0/3] net: More extack messages

2018-11-06 Thread David Ahern
From: David Ahern Add more extack messages for several link create errors (e.g., invalid number of queues, unknown link kind) and invalid metrics argument. David Ahern (3): net: Add extack argument to rtnl_create_link net: Add extack argument to ip_fib_metrics_init rtnetlink: Add more

Re: [PATCH net-next v4 9/9] ipv6: do not drop vrf udp multicast packets

2018-11-06 Thread David Ahern
+--- > 1 file changed, 5 insertions(+), 3 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH net-next v4 8/9] ipv6: handling of multicast packets received in VRF

2018-11-06 Thread David Ahern
; > Signed-off-by: Dewi Morgan > Signed-off-by: Mike Manning > --- > net/ipv6/ip6_input.c | 35 --- > 1 file changed, 32 insertions(+), 3 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH net-next v4 6/9] vrf: mark skb for multicast or link-local as enslaved to VRF

2018-11-06 Thread David Ahern
VRF driver to also mark these skb as being > enslaved to the VRF. > > Signed-off-by: Mike Manning > --- > drivers/net/vrf.c | 19 +-- > 1 file changed, 9 insertions(+), 10 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH net-next v4 7/9] ipv6: allow ping to link-local address in VRF

2018-11-06 Thread David Ahern
ecking here. > > This fix makes ping to link-local consistent with that to global > addresses, in that this can now be done from within the same VRF that > the address is in. > > Signed-off-by: Mike Manning > --- > net/ipv6/ipv6_sockglue.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: David Ahern

Re: [PATCH net-next v4 5/9] net: fix raw socket lookup device bind matching with VRFs

2018-11-06 Thread David Ahern
since you are re-sending, a couple of nits ... On 11/2/18 1:10 PM, Mike Manning wrote: > diff --git a/include/net/raw.h b/include/net/raw.h > index 20ebf0b3dfa8..6ed2ae5b4a80 100644 > --- a/include/net/raw.h > +++ b/include/net/raw.h > @@ -18,6 +18,7 @@ > #define _RAW_H > > > +#include

Re: [PATCH net-next v4 4/9] net: provide a sysctl raw_l3mdev_accept for raw socket lookup with VRFs

2018-11-06 Thread David Ahern
On 11/2/18 1:10 PM, Mike Manning wrote: > diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c > index 8ca3eb06ba04..da453c7dfb75 100644 > --- a/net/ipv4/raw.c > +++ b/net/ipv4/raw.c > @@ -805,7 +805,7 @@ static int raw_recvmsg(struct sock *sk, struct msghdr > *msg, size_t len, > return copied; >

Re: [PATCH net-next v4 3/9] net: ensure unbound datagram socket to be chosen when not in a VRF

2018-11-06 Thread David Ahern
On 11/2/18 1:10 PM, Mike Manning wrote: > diff --git a/include/net/udp.h b/include/net/udp.h > index 9e82cb391dea..057972d0eea5 100644 > --- a/include/net/udp.h > +++ b/include/net/udp.h > @@ -252,6 +252,17 @@ static inline int udp_rqueue_get(struct sock *sk) > return sk_rmem_alloc_get(sk) -

Re: [PATCH net-next v4 2/9] net: ensure unbound stream socket to be chosen when not in a VRF

2018-11-06 Thread David Ahern
Since you need to re-send once net-next opens ... On 11/2/18 1:10 PM, Mike Manning wrote: > diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h > index 4ae060b4bac2..5de2d9f24c05 100644 > --- a/include/net/inet_hashtables.h > +++ b/include/net/inet_hashtables.h > @@ -189,6

Re: [PATCH net-next v4 1/9] net: allow binding socket in a VRF when there's an unbound socket

2018-11-06 Thread David Ahern
et/inet_hashtables.h| 13 ++--- > include/net/inet_sock.h | 13 + > net/ipv4/inet_connection_sock.c | 13 ++--- > net/ipv4/inet_hashtables.c | 20 +++- > 6 files changed, 51 insertions(+), 22 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH iproute2-next v3] rdma: Document IB device renaming option

2018-11-05 Thread David Ahern
On 11/4/18 12:11 PM, Leon Romanovsky wrote: > From: Leon Romanovsky > > [leonro@server /]$ lspci |grep -i Ether > 00:08.0 Ethernet controller: Red Hat, Inc. Virtio network device > 00:09.0 Ethernet controller: Mellanox Technologies MT27700 Family [ConnectX-4] > [leonro@server /]$ sudo rdma dev >

Re: [PATCH net v2 1/2] rtnetlink: restore handling of dumpit return value in rtnl_dump_all()

2018-11-05 Thread David Ahern
On 11/5/18 6:06 PM, David Miller wrote: > From: Alexey Kodanev > Date: Fri, 2 Nov 2018 19:11:04 +0300 > >> For non-zero return from dumpit() we should break the loop >> in rtnl_dump_all() and return the result. Otherwise, e.g., >> we could get the memory leak in inet6_dump_fib() [1]. The >>

Re: [PATCH net-next v4 0/9] vrf: allow simultaneous service instances in default and other VRFs

2018-11-04 Thread David Ahern
On 11/2/18 1:10 PM, Mike Manning wrote: > Services currently have to be VRF-aware if they are using an unbound > socket. One cannot have multiple service instances running in the > default and other VRFs for services that are not VRF-aware and listen > on an unbound socket. This is because there

Re: [PATCH iproute2-next v2] rdma: Document IB device renaming option

2018-11-04 Thread David Ahern
On 11/4/18 4:54 AM, Leon Romanovsky wrote: > @@ -45,6 +53,11 @@ rdma dev show mlx5_3 > Shows the state of specified RDMA device. > .RE > .PP > +rdma dev set mlx5_3 name rdma_0 > +.RS 4 > +Renames the mlx5_3 device to be named rdma_0. > +.RE > +.PP You missed my other comment: Fix the "Renames

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-03 Thread David Ahern
On 11/1/18 11:30 AM, Paweł Staszewski wrote:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/samples/bpf/xdp_fwd_kern.c >>> I can try some tests on same hw but testlab configuration - will give it >>> a try :) >>> >> That version does not work with

Re: [LKP] [net/ipv6] 4ed591c8ab: kernel_selftests.net.fib-onlink-tests.sh.fail

2018-11-02 Thread David Ahern
On 11/1/18 8:11 PM, kernel test robot wrote: > FYI, we noticed the following commit (built with gcc-7): > > commit: 4ed591c8ab44e711e56b8e021ffaf4f407c045f5 ("net/ipv6: Allow onlink > routes to have a device mismatch if it is the default route") >

Re: [LKP] [net/ipv6] 4ed591c8ab: kernel_selftests.net.fib-onlink-tests.sh.fail

2018-11-02 Thread David Ahern
On 11/1/18 8:11 PM, kernel test robot wrote: > FYI, we noticed the following commit (built with gcc-7): > > commit: 4ed591c8ab44e711e56b8e021ffaf4f407c045f5 ("net/ipv6: Allow onlink > routes to have a device mismatch if it is the default route") >

Re: [PATCH iproute2-next v1 4/4] rdma: Document IB device renaming option

2018-11-02 Thread David Ahern
On 10/31/18 1:17 AM, Leon Romanovsky wrote: > diff --git a/man/man8/rdma-dev.8 b/man/man8/rdma-dev.8 > index 461681b6..b2f9964a 100644 > --- a/man/man8/rdma-dev.8 > +++ b/man/man8/rdma-dev.8 > @@ -22,6 +22,12 @@ rdmak-dev \- RDMA device configuration > .B rdma dev show > .RI "[ " DEV " ]" > >

Re: [PATCH iproute2-next v1 1/4] rdma: Update kernel include file to support IB device renaming

2018-11-02 Thread David Ahern
On 10/31/18 1:17 AM, Leon Romanovsky wrote: > From: Leon Romanovsky > > Bring kernel header file changes upto commit 05d940d3a3ec > ("RDMA/nldev: Allow IB device rename through RDMA netlink") > > Signed-off-by: Leon Romanovsky > Reviewed-by: Steve Wise > --- >

Re: [PATCH iproute2-next v1 3/4] rdma: Add an option to rename IB device interface

2018-11-02 Thread David Ahern
On 10/31/18 1:17 AM, Leon Romanovsky wrote: > From: Leon Romanovsky > > Enrich rdmatool with an option to rename IB devices, > the command interface follows Iproute2 convention: > "rdma dev set [OLD-DEVNAME] name NEW-DEVNAME" > > Signed-off-by: Leon Romanovsky > Reviewed-by: Steve Wise > ---

Re: [PATCH iproute2-next v1 2/4] rdma: Introduce command execution helper with required device name

2018-11-02 Thread David Ahern
On 10/31/18 1:17 AM, Leon Romanovsky wrote: > From: Leon Romanovsky > > In contradiction to various show commands, the set command explicitly > requires to use device name as an argument. Provide new command > execution helper which enforces it. > > Signed-off-by: Leon Romanovsky >

Re: [PATCH net] rtnetlink: invoke 'cb->done' destructor before 'cb->args' reset

2018-11-01 Thread David Ahern
On 11/1/18 7:42 AM, Alexey Kodanev wrote: > On 11/01/2018 04:11 PM, Alexey Kodanev wrote: >> On 10/31/2018 08:35 PM, David Ahern wrote: >>> On 10/31/18 10:55 AM, David Ahern wrote: >>>> I think the simplest fix for 4.20 is to break the loop if ret is non-0 - >

Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-11-01 Thread David Ahern
On 11/1/18 3:06 PM, Jakub Kicinski wrote: > On Wed, 31 Oct 2018 20:48:05 -0600, David Ahern wrote: >>> spacing with a special character in the format string, that is: >>> >>> "%S.%Qr.%Qs %Al:%Pl %Ar:%Pr %p\n" >>> >>> would

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-11-01 Thread David Ahern
On 11/1/18 7:52 AM, Paweł Staszewski wrote: > > > W dniu 01.11.2018 o 11:55, Jesper Dangaard Brouer pisze: >> On Wed, 31 Oct 2018 21:37:16 -0600 David Ahern wrote: >> >>> This is mainly a forwarding use case? Seems so based on the perf report. >>> I suspec

Re: Kernel 4.19 network performance - forwarding/routing normal users traffic

2018-10-31 Thread David Ahern
On 10/31/18 3:57 PM, Paweł Staszewski wrote: > Hi > > So maybee someone will be interested how linux kernel handles normal > traffic (not pktgen :) ) > > > Server HW configuration: > > CPU : Intel(R) Xeon(R) Gold 6132 CPU @ 2.60GHz > > NIC's: 2x 100G Mellanox ConnectX-4 (connected to x16 pcie

Re: [PATCH net v5] net/ipv6: Add anycast addresses to a global hashtable

2018-10-31 Thread David Ahern
On 10/31/18 6:02 PM, Jeff Barnhill wrote: > I'll follow this email with a new patch using ifacaddr6 instead of > creating a new struct. I ended up using fib6_nh.nh_dev to get the net, > instead of adding a back pointer to idev. It seems that idev was > recently removed in lieu of this, so if this

Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-10-31 Thread David Ahern
[ sorry, too many distractions and I forgot to respond ] On 10/30/18 11:34 AM, Stefano Brivio wrote: > On Tue, 30 Oct 2018 10:34:45 -0600 > David Ahern wrote: > >> A more flexible approach is to use format strings to allow users to >> customize the output order and w

Re: [PATCH net] rtnetlink: invoke 'cb->done' destructor before 'cb->args' reset

2018-10-31 Thread David Ahern
On 10/31/18 10:55 AM, David Ahern wrote: > I think the simplest fix for 4.20 is to break the loop if ret is non-0 - > restore the previous behavior. that is the only recourse. It has to bail if ret is non-0. Do you want to send a patch with that fix?

Re: [PATCH net] rtnetlink: invoke 'cb->done' destructor before 'cb->args' reset

2018-10-31 Thread David Ahern
On 10/31/18 12:42 AM, Alexey Kodanev wrote: > cb->args[2] can store the pointer to the struct fib6_walker, > allocated in inet6_dump_fib(). On the next loop iteration in > rtnl_dump_all(), 'memset(, 0, sizeof(cb->args))' can reset > that pointer, leaking the memory [1]. > > Fix it by calling

Re: [PATCH net v5] net/ipv6: Add anycast addresses to a global hashtable

2018-10-30 Thread David Ahern
On 10/30/18 12:31 PM, David Miller wrote: > From: Jeff Barnhill <0xeff...@gmail.com> > Date: Tue, 30 Oct 2018 07:10:58 -0400 > >> I originally started implementing it the way you suggested; however, >> it seemed to complicate management of that structure because it isn't >> currently using rcu.

[PATCH iproute2-next] ip rule: Add ipproto and port range to filter list

2018-10-30 Thread David Ahern
From: David Ahern Allow ip rule dumps and flushes to filter based on ipproto, sport and dport. Example: $ ip ru ls ipproto udp 99: from all to 8.8.8.8 ipproto udp dport 53 lookup 1001 $ ip ru ls dport 53 99: from all to 8.8.8.8 ipproto udp dport 53 lookup 1001 Signed-off-by: David

[PATCH iproute2] ip rule: Require at least one argument for add

2018-10-30 Thread David Ahern
From: David Ahern 'ip rule add' with no additional arguments just adds another rule for the main table - which exists by default. Require at least 1 argument similar to delete. Signed-off-by: David Ahern --- ip/iprule.c | 5 + 1 file changed, 5 insertions(+) diff --git a/ip/iprule.c b/ip

[PATCH iproute2] ip rule: Honor filter arguments on flush

2018-10-30 Thread David Ahern
From: David Ahern 'ip ru flush' currently removes all rules with priority > 0 regardless of any other command line arguments passed in. Update flush_rule to call filter_nlmsg to determine if the rule should be flushed or not. This enables rule flushing such as 'ip ru flush table 1001' and 'ip

Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-10-30 Thread David Ahern
On 10/30/18 10:38 AM, Stephen Hemminger wrote: > On Tue, 30 Oct 2018 10:34:45 -0600 > David Ahern wrote: > >> On 10/30/18 9:05 AM, Stefano Brivio wrote: >>> Now that we have an abstraction for columns, it's relatively easy to >>> selectively display only some

Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to be displayed

2018-10-30 Thread David Ahern
On 10/30/18 9:05 AM, Stefano Brivio wrote: > Now that we have an abstraction for columns, it's relatively easy to > selectively display only some of them, and Yoann has a use case for it. > > Patch 1/3 fixes a rendering issue that shows up only when display of > arbitrary columns is disabled.

Re: [PATCH net v2] rtnetlink: Disallow FDB configuration for non-Ethernet device

2018-10-29 Thread David Ahern
("net: generic fdb support for drivers without > ndo_fdb_") > Signed-off-by: Ido Schimmel > Reported-and-tested-by: syzbot+3a288d5f5530b9013...@syzkaller.appspotmail.com > Reported-and-tested-by: syzbot+d53ab4e92a1db0411...@syzkaller.appspotmail.com > Cc: Vlad

Re: [PATCH iproute2-next 3/3] rdma: Add an option to rename IB device interface

2018-10-29 Thread David Ahern
On 10/29/18 4:30 AM, Leon Romanovsky wrote: > > Sorry for being slow in response, I was on vacation. > -- > > This print is intended to warn about missing "new name" and it is not > checked by rd_exec_require_dev() > > To emphasize it: > > diff --git a/rdma/dev.c b/rdma/dev.c > index

Re: [PATCH iproute2] Use libbsd for strlcpy if available

2018-10-29 Thread David Ahern
On 10/29/18 4:46 AM, Luca Boccassi wrote: > If libc does not provide strlcpy check for libbsd with pkg-config to > avoid relying on inline version. > > Signed-off-by: Luca Boccassi > --- > This allows distro maintainers to be able to choose to reduce > duplication and let this code be maintained

Re: [PATCH net] rtnetlink: Disallow FDB configuration for non-Ethernet device

2018-10-28 Thread David Ahern
On 10/27/18 2:39 PM, Ido Schimmel wrote: > When an FDB entry is configured, the address is validated to have the > length of an Ethernet address, but the device for which the address is > configured can be of any type. > > The above can result in the use of uninitialized memory when the address >

<    1   2   3   4   5   6   7   8   9   10   >