Re: [PATCH iproute2/next 0/2] set/match the tos/ttl fields of TC based IP tunnels

2018-07-20 Thread David Ahern
On 7/19/18 5:02 AM, Or Gerlitz wrote: > Hi Dave, > > This series comes to address the case to set (encap) and match (decap) > also the tos and ttl fields of TC based IP tunnels. > > Example command lines in the change log of each patch. > > The kernel bits are under review [1], sending this out

Re: DNAT with VRF support in Linux Kernel

2018-07-19 Thread David Ahern
On 7/19/18 7:52 PM, D'Souza, Nelson wrote: > Hi, > >   > > I'm seeing a VRF/Netfilter related issue on a system running a 4.14.52 > Linux kernel. > >   > > I have an eth interface enslaved to l3mdev mgmtvrf device. > >   > > After reviewing >

Re: VRF with enslaved L3 enabled bridge

2018-07-19 Thread David Ahern
On 7/19/18 8:19 PM, D'Souza, Nelson wrote: > Hi, > >   > > I'm seeing the following issue on a system running a 4.14.52 Linux kernel. > >   > > With an eth interface enslaved to a VRF device, pings sent out on the > VRF to an neighboring host are successful. But, with an eth interface >

Re: [PATCH iproute2-next v4] net:sched: add action inheritdsfield to skbedit

2018-07-19 Thread David Ahern
: Cong Wang > Reviewed-by: Marcelo Ricardo Leitner > Reviewed-by: Stephen Hemminger > Reviewed-by: David Ahern > --- > > Note that the motivation for this patch is found in the following discussion: > https://www.spinics.net/lists/netdev/msg501061.html > --- > tc/m_skbedit.

Re: [PATCH iproute2 net-next] devlink: Add support for devlink-region access

2018-07-19 Thread David Ahern
On 7/17/18 2:34 AM, Alex Vesker wrote: > Devlink region allows access to driver defined address regions. > Each device can create its supported address regions and register > them. A device which exposes a region will allow access to it > using devlink. > > This support allows reading and dumping

Re: [PATCH iproute2 0/5] Various BPF improvements

2018-07-17 Thread David Ahern
On 7/17/18 5:31 PM, Daniel Borkmann wrote: > Main part of this set is to: i) avoid strict af_alg kernel dependency, > ii) add loader support for bpf to bpf calls and iii) add btf loader > support with an option to annotate maps. For details please see the > individual patches. Thanks! > > Daniel

Re: [PATCH iproute2-next v3] net:sched: add action inheritdsfield to skbedit

2018-07-17 Thread David Ahern
On 7/14/18 1:10 AM, Qiaobin Fu wrote: > @@ -156,6 +162,9 @@ parse_skbedit(struct action_util *a, int *argc_p, char > ***argv_p, int tca_id, > if (flags & SKBEDIT_F_PTYPE) > addattr_l(n, MAX_MSG, TCA_SKBEDIT_PTYPE, > , sizeof(ptype)); > + if

Re: [PATCH iproute2 net-next] ipneigh: exclude NTF_EXT_LEARNED from default filter

2018-07-17 Thread David Ahern
On 7/16/18 4:19 PM, Roopa Prabhu wrote: > From: Roopa Prabhu > > NUD_NOARP entries are filtered out by default by iproute2. > We dont want NUD_NOARP with NTF_EXT_LEARNED flag filtered out. > This patch extends the default filter check for ip neigh show > to include the NTF_EXT_LEARNED flag. > >

Re: [PATCH v2 net] net/ipv6: Do not allow device only routes via the multipath API

2018-07-17 Thread David Ahern
On 7/16/18 3:09 PM, David Miller wrote: > > Is this a -stable candidate? > I think so. The API is not doing what the user requested, even though the route add does not fail.

Re: [PATCH v2 iproute2-next 06/31] tc/util: add print helpers for JSON

2018-07-16 Thread David Ahern
On 7/10/18 3:05 PM, Stephen Hemminger wrote: > From: Stephen Hemminger > > Add a helper to print rate, time and size in numeric or pretty format > based on JSON flag. > > Signed-off-by: Stephen Hemminger > --- > tc/tc_util.c | 83 +--- >

Re: [PATCH v2 net] net/ipv6: Do not allow device only routes via the multipath API

2018-07-16 Thread David Ahern
On 7/16/18 10:09 AM, Eric Dumazet wrote: > Yes, I guess we have no real choice for the moment. It is unfortunate that we are forever stuck with this mess from a short sighted implementation years ago. From a uapi perspective, dev-only nexthops and proper add-to/append/replace semantics should

Re: [PATCH iproute2-next v2] iplink: add support for reporting multiple XDP programs

2018-07-15 Thread David Ahern
On 7/13/18 4:54 PM, Jakub Kicinski wrote: > Kernel now supports attaching XDP programs in the driver > and hardware at the same time. Print that information > correctly. > > In case there are multiple programs attached kernel will > not provide IFLA_XDP_PROG_ID, so don't expect it to be > there

Re: [PATCH iproute2/net-next] tc: flower: Add support for QinQ

2018-07-15 Thread David Ahern
On 6/30/18 4:01 AM, Jianbo Liu wrote: > To support matching on both outer and inner vlan headers, > we add new cvlan_id/cvlan_prio/cvlan_ethtype for inner vlan header. > > Example: > # tc filter add dev eth0 protocol 802.1ad parent : \ > flower vlan_id 1000 vlan_ethtype 802.1q \ >

Re: [PATCH iproute2-next 0/9] TC more JSON support

2018-07-13 Thread David Ahern
On 7/9/18 3:48 PM, Stephen Hemminger wrote: > From: Stephen Hemminger > > Update core of TC command and library to do more JSON. > Most of this patch set is about getting tc utility functions > to be more friendly to the json_print infrastructure. > > Stephen Hemminger (9): > tc: use JSON in

Re: [PATCH 2/2] samples/bpf: test_cgrp2_sock2: fix an off by one

2018-07-13 Thread David Ahern
On 7/13/18 11:05 AM, Dan Carpenter wrote: > "prog_cnt" is the number of elements which are filled out in prog_fd[] > so the test should be >= instead of >. > > Signed-off-by: Dan Carpenter > Fixes: 554ae6e792ef3 ("samples/bpf: add userspace example for proh

Re: [PATCH net] net/ipv6: Do not allow device only routes via the multipath API

2018-07-13 Thread David Ahern
On 7/13/18 7:28 AM, Stefano Brivio wrote: > On Thu, 12 Jul 2018 14:48:23 -0700 > dsah...@kernel.org wrote: > >> @@ -4388,6 +4388,13 @@ static int ip6_route_multipath_add(struct fib6_config >> *cfg, >> rt = NULL; >> goto cleanup; >> } >> +

Re: [PATCH iproute2-next] ipaddress: fix label matching

2018-07-11 Thread David Ahern
On 7/11/18 7:36 AM, Vincent Bernat wrote: > diff --git a/ip/ipaddress.c b/ip/ipaddress.c > index 5009bfe6d2e3..20ef6724944e 100644 > --- a/ip/ipaddress.c > +++ b/ip/ipaddress.c > @@ -837,11 +837,6 @@ int print_linkinfo(const struct sockaddr_nl *who, > if (!name) > return -1; >

Re: [PATCH v4 iproute2-next 0/3] Add support for ETF qdisc

2018-07-11 Thread David Ahern
On 7/9/18 7:56 PM, Jesus Sanchez-Palencia wrote: > fixes since v3: > - Add support for clock names with the "CLOCK_" prefix; > - Print clock name on print_opt(); > - Use strcasecmp() instead of strncasecmp(). > > > The ETF (earliest txtime first) qdisc was recently merged into net-next > [1],

Re: [PATCH net v2 4/5] net/ipv6: propagate net.ipv6.conf.all.addr_gen_mode to devices

2018-07-10 Thread David Ahern
On 7/10/18 4:13 AM, Sabrina Dubroca wrote: > 2018-07-09, 11:24:49 -0600, David Ahern wrote: >> On 7/9/18 4:25 AM, Sabrina Dubroca wrote: >>> This aligns the addr_gen_mode sysctl with the expected behavior of the >>> "all" variant. >>> >>> Fixe

Re: [PATCH v3 iproute2 2/3] tc: Add support for the ETF Qdisc

2018-07-09 Thread David Ahern
On 7/9/18 9:48 AM, Jesus Sanchez-Palencia wrote: > Hi David, > > > On 07/06/2018 08:58 AM, David Ahern wrote: >> On 7/5/18 4:42 PM, Jesus Sanchez-Palencia wrote: >> >>> +static int get_clockid(__s32 *val, const char *arg) >>> +{ >>> + const

Re: [PATCH net v2 4/5] net/ipv6: propagate net.ipv6.conf.all.addr_gen_mode to devices

2018-07-09 Thread David Ahern
On 7/9/18 4:25 AM, Sabrina Dubroca wrote: > This aligns the addr_gen_mode sysctl with the expected behavior of the > "all" variant. > > Fixes: d35a00b8e33d ("net/ipv6: allow sysctl to change link-local address > generation mode") > Suggested-by: David A

Re: [PATCH net v2 5/5] Documentation: ip-sysctl.txt: document addr_gen_mode

2018-07-09 Thread David Ahern
on/networking/ip-sysctl.txt | 9 + > 1 file changed, 9 insertions(+) > Reviewed-by: David Ahern

Re: [PATCH net v2 1/5] net/ipv6: fix addrconf_sysctl_addr_gen_mode

2018-07-09 Thread David Ahern
e addr_gen_mode is a __u32, switch to proc_douintvec(). > > Fixes: d35a00b8e33d ("net/ipv6: allow sysctl to change link-local address > generation mode") > Signed-off-by: Sabrina Dubroca > --- > net/ipv6/addrconf.c | 27 ++- > 1 file changed, 14 insertions(+), 13 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH net] net: diag: Don't double-free TCP_NEW_SYN_RECV sockets in tcp_abort

2018-07-09 Thread David Ahern
On 7/9/18 9:17 AM, Eric Dumazet wrote: > > > On 07/09/2018 07:59 AM, David Ahern wrote: >> On 7/8/18 10:53 PM, Lorenzo Colitti wrote: >>> On Sat, Jul 7, 2018 at 10:29 PM Eric Dumazet wrote: >>>>>> Tested: passes Android sock_d

Re: [PATCH net] net: diag: Don't double-free TCP_NEW_SYN_RECV sockets in tcp_abort

2018-07-09 Thread David Ahern
On 7/8/18 11:24 PM, Lorenzo Colitti wrote: > On Sat, Jul 7, 2018 at 10:56 PM David Ahern wrote: >>> Here is a packetdrill test : >> >> So I have to either learn how to use packetdrill or install a web server >> and put load on it. If the Android te

Re: [PATCH net] net: diag: Don't double-free TCP_NEW_SYN_RECV sockets in tcp_abort

2018-07-09 Thread David Ahern
On 7/8/18 10:53 PM, Lorenzo Colitti wrote: > On Sat, Jul 7, 2018 at 10:29 PM Eric Dumazet wrote: Tested: passes Android sock_diag_test.py, which exercises this codepath >>> >>> If this Android test case exercises this path, why didn't it trigger >>> the double free and thus cause this bug to

Re: [PATCH v4,net-next] vlan: implement vlan id and protocol changes

2018-07-07 Thread David Ahern
On 7/7/18 7:14 AM, Ido Schimmel wrote: > On Sat, Jul 07, 2018 at 08:11:16PM +0900, David Miller wrote: >> Chas, it seems to me that you add the new notifier by not even one >> driver is listening for the event. >> >> Either it is necessary, and you should show at least one example >> use case, or

Re: [PATCH net] net: diag: Don't double-free TCP_NEW_SYN_RECV sockets in tcp_abort

2018-07-07 Thread David Ahern
d all the other codepaths > in tcp_abort don't free the socket, just remove the free in that > function. > > Cc: David Ahern > Tested: passes Android sock_diag_test.py, which exercises this codepath > Fixes: d7226c7a4dd1 ("net: diag: Fix refcnt leak in error path destroyin

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-07 Thread David Ahern
On 7/6/18 3:50 AM, Xin Long wrote: >>> Try this: >>> >>> diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c >>> index b21833651394..e46cdd310e5f 100644 >>> --- a/net/ipv4/fib_frontend.c >>> +++ b/net/ipv4/fib_frontend.c >>> @@ -300,6 +300,7 @@ __be32 fib_compute_spec_dst(struct sk_buff

Re: [PATCH net] net: diag: Don't double-free TCP_NEW_SYN_RECV sockets in tcp_abort

2018-07-07 Thread David Ahern
On 7/7/18 7:51 AM, Eric Dumazet wrote: > > > On 07/07/2018 06:45 AM, Eric Dumazet wrote: >> >> >> On 07/07/2018 06:33 AM, David Ahern wrote: >>> On 7/7/18 7:11 AM, David Miller wrote: >>>> From: Lorenzo Colitti >>>> Date: Sat,

Re: [PATCH net] net: diag: Don't double-free TCP_NEW_SYN_RECV sockets in tcp_abort

2018-07-07 Thread David Ahern
On 7/7/18 7:11 AM, David Miller wrote: > From: Lorenzo Colitti > Date: Sat, 7 Jul 2018 16:31:40 +0900 > >> Tested: passes Android sock_diag_test.py, which exercises this codepath > > If this Android test case exercises this path, why didn't it trigger > the double free and thus cause this bug

Re: [PATCH net 1/3] net/ipv6: fix addrconf_sysctl_addr_gen_mode

2018-07-06 Thread David Ahern
On 7/6/18 9:58 AM, Sabrina Dubroca wrote: > > Right. I'll add that as a separate patch in this series, unless you > really prefer the change squashed into this patch. no preference. > > >> Looking at other addr_gen_mode sites, addrconf_sysctl_stable_secret is >> messed up as well. It

Re: [PATCH iproute2-next] tc: m_tunnel_key: Add tunnel option support to act_tunnel_key

2018-07-06 Thread David Ahern
On 7/5/18 6:12 PM, Jakub Kicinski wrote: > From: Simon Horman > > Allow setting tunnel options using the act_tunnel_key action. > > Options are expressed as class:type:data and multiple options > may be listed using a comma delimiter. > > # ip link add name geneve0 type geneve dstport 0

Re: [PATCH v3 iproute2 2/3] tc: Add support for the ETF Qdisc

2018-07-06 Thread David Ahern
On 7/5/18 4:42 PM, Jesus Sanchez-Palencia wrote: > +static int get_clockid(__s32 *val, const char *arg) > +{ > + const struct static_clockid { > + const char *name; > + clockid_t clockid; > + } clockids_sysv[] = { > + { "CLOCK_REALTIME", CLOCK_REALTIME

Re: [PATCH net 1/3] net/ipv6: fix addrconf_sysctl_addr_gen_mode

2018-07-06 Thread David Ahern
On 7/6/18 9:02 AM, Sabrina Dubroca wrote: > 2018-07-06, 08:42:01 -0600, David Ahern wrote: >> On 7/6/18 7:49 AM, Sabrina Dubroca wrote: >>> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c >>> index 91580c62bb86..e9ba53d2a147 100644 >>> --- a/net/ipv6/addr

Re: [PATCH iproute2 net-next] bridge: add support for isolated option

2018-07-06 Thread David Ahern
On 7/3/18 6:42 AM, Nikolay Aleksandrov wrote: > This patch adds support for the new isolated port option which, if set, > would allow the isolated ports to communicate only with non-isolated > ports and the bridge device. The option can be set via the bridge or ip > link type bridge_slave

Re: [PATCH net 3/3] net/ipv6: reserve room for IFLA_INET6_ADDR_GEN_MODE

2018-07-06 Thread David Ahern
"ipv6: addrconf: implement address generation modes") > Signed-off-by: Sabrina Dubroca > --- > net/ipv6/addrconf.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Reviewed-by: David Ahern

Re: [PATCH net 2/3] net/ipv6: don't reinitialize ndev->cnf.addr_gen_mode on new inet6_dev

2018-07-06 Thread David Ahern
gned-off-by: Sabrina Dubroca > --- > net/ipv6/addrconf.c | 2 -- > 1 file changed, 2 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH net 1/3] net/ipv6: fix addrconf_sysctl_addr_gen_mode

2018-07-06 Thread David Ahern
On 7/6/18 7:49 AM, Sabrina Dubroca wrote: > diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c > index 91580c62bb86..e9ba53d2a147 100644 > --- a/net/ipv6/addrconf.c > +++ b/net/ipv6/addrconf.c > @@ -5892,32 +5892,31 @@ static int addrconf_sysctl_addr_gen_mode(struct > ctl_table *ctl, int

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-05 Thread David Ahern
On 7/5/18 1:57 AM, Xin Long wrote: > On Thu, Jul 5, 2018 at 2:36 AM, David Ahern wrote: >> On 7/4/18 11:56 AM, Xin Long wrote: >> >>>> your commands are not a proper test. The test should succeed and fail >>>> based on the routing lookup, not iptables rule

Re: [PATCH net] net/ipv6: Revert attempt to simplify route replace and append

2018-07-04 Thread David Ahern
On 7/4/18 8:29 PM, David Miller wrote: > From: Ido Schimmel > Date: Thu, 5 Jul 2018 00:10:41 +0300 > >> We can have the IPv4/IPv6 code only generate a REPLACE / DELETE >> notification for routes that are actually used for forwarding and >> relieve listeners from the need to implement this logic

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-04 Thread David Ahern
On 7/4/18 11:56 AM, Xin Long wrote: >> your commands are not a proper test. The test should succeed and fail >> based on the routing lookup, not iptables rules. > A proper test can be done easily with netns, as vrf can't isolate much. > I don't want to bother forwarding/ directory with netns, so

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-04 Thread David Ahern
On 7/4/18 11:56 AM, Xin Long wrote: > A proper test can be done easily with netns, as vrf can't isolate much. > I don't want to bother forwarding/ directory with netns, so I will probably > just drop this selftest, and let the feature patch go first. > > What do you think? > I think I would

Re: [PATCH net] net/ipv6: Revert attempt to simplify route replace and append

2018-07-03 Thread David Ahern
On 7/3/18 7:43 AM, Ido Schimmel wrote: > On Mon, Jul 02, 2018 at 03:03:12PM -0700, dsah...@kernel.org wrote: >> From: David Ahern >> >> NetworkManager likes to manage linklocal prefix routes and does so with >> the NLM_F_APPEND flag, breaking attempts to simp

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-03 Thread David Ahern
On 7/3/18 5:36 AM, Xin Long wrote: > On Mon, Jul 2, 2018 at 11:12 PM, David Ahern wrote: >> On 7/2/18 12:30 AM, Xin Long wrote: >>> +ping_ipv4() >>> +{ >>> + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 >>> + bc_forwarding_d

Re: [PATCH net-next 0/7] net/ipv6: Fix route append and replace use cases

2018-07-02 Thread David Ahern
On 5/22/18 2:44 PM, David Ahern wrote: > On 5/22/18 12:46 PM, David Miller wrote: >> >> Ok, I'll apply this series. >> >> But if this breaks things for anyone in a practical way, I am unfortunately >> going to have to revert no matter how silly the current behav

Re: [PATCH v4 net-next 0/9] Handle multiple received packets at each stage

2018-07-02 Thread David Ahern
On 7/2/18 9:11 AM, Edward Cree wrote: > This patch series adds the capability for the network stack to receive a > list of packets and process them as a unit, rather than handling each > packet singly in sequence. This is done by factoring out the existing > datapath code at each layer and

Re: Compiler warnings in kernel 4.14.51

2018-07-02 Thread David Ahern
On 7/1/18 2:35 PM, Enrico Mioso wrote: > Hello! > > While compiling kernel 4.14.51 I got the following warnings: > CC net/core/dev.o > net/core/dev.c: In function 'validate_xmit_skb_list': > net/core/dev.c:3121:15: warning: 'tail' may be used uninitialized in this > function

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-02 Thread David Ahern
On 7/2/18 12:30 AM, Xin Long wrote: > +ping_ipv4() > +{ > + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 > + bc_forwarding_disable > + ping_test $h1 198.51.100.255 > + > + iptables -A INPUT -i vrf-r1 -p icmp -j DROP > + bc_forwarding_restore > + bc_forwarding_enable >

Re: [PATCHv2 net-next 1/2] route: add support for directed broadcast forwarding

2018-07-02 Thread David Ahern
On 7/2/18 12:30 AM, Xin Long wrote: > @@ -2143,6 +2149,10 @@ static int devinet_conf_proc(struct ctl_table *ctl, > int write, > if ((new_value == 0) && (old_value != 0)) > rt_cache_flush(net); > > + if (i ==

Re: Anyone know if strongswan works with vrf?

2018-06-30 Thread David Ahern
On 6/29/18 4:10 PM, Ben Greear wrote: > Hello, > > We're trying to create lots of strongswan VPN tunnels on network devices > bound to different VRFs.  We are using Fedora-24 on the client side, > with a 4.16.15+ kernel > and updated 'ip' package, etc. > > So far, no luck getting it to work. >

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-29 Thread David Ahern
On 6/29/18 6:48 AM, Jiri Pirko wrote: > Fri, Jun 29, 2018 at 02:12:21PM CEST, j...@mojatatu.com wrote: >> On 29/06/18 04:39 AM, Jiri Pirko wrote: >>> Fri, Jun 29, 2018 at 12:25:53AM CEST, xiyou.wangc...@gmail.com wrote: On Thu, Jun 28, 2018 at 6:10 AM Jiri Pirko wrote: > Add a template

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread David Ahern
On 6/28/18 9:37 AM, Jiri Pirko wrote: Why this restriction? It's a template, so why can't it be removed regardless of whether there are filters? >>> >>> That means you could start to insert filters that does not match the >>> original template. I wanted to avoid it. The chain is

Re: [PATCH net] net: fib_rules: add protocol check in rule_find

2018-06-28 Thread David Ahern
protocol boot > RTNETLINK answers: File exists > > This patch adds protocol support to rule_find, forcing it to > check protocol match if given by the user. > > Fixes: f9d4b0c1e969 ("fib_rules: move common handling of newrule delrule msgs > into fib_nl2rule") > Signed-off-by: Roopa Prabhu > --- Reviewed-by: David Ahern

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread David Ahern
On 6/28/18 8:29 AM, Jiri Pirko wrote: > Thu, Jun 28, 2018 at 04:18:47PM CEST, dsah...@gmail.com wrote: >> On 6/28/18 7:08 AM, Jiri Pirko wrote: >>> Create dummy device with clsact first: >>> # ip link add type dummy >>> # tc qdisc add dev dummy0 clsact >>> >>> There is no template assigned by

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread David Ahern
On 6/28/18 7:08 AM, Jiri Pirko wrote: > Create dummy device with clsact first: > # ip link add type dummy > # tc qdisc add dev dummy0 clsact > > There is no template assigned by default: > # tc chaintemplate show dev dummy0 ingress > > Add a template of type flower allowing to insert rules

Re: [BISECTED] [4.17.0-rc6] IPv6 link-local address not getting added

2018-06-27 Thread David Ahern
On 6/27/18 6:35 PM, Sowmini Varadhan wrote: > > Hi David, > > An IPv6 regression has been introduced in 4.17.0-rc6 by > 8308f3f net/ipv6: Add support for specifying metric of connected routes > > The regression is that some interfaces on my test machine come > up with link-local addrs but the

Re: [PATCH net-next 2/4] net/sched: act_tunnel_key: add extended ack support

2018-06-26 Thread David Ahern
On 6/26/18 12:53 PM, Jakub Kicinski wrote: > From: Simon Horman > > Add extended ack support for the tunnel key action by using NL_SET_ERR_MSG > during validation of user input. > > Cc: David Ahern > Cc: Alexander Aring > Signed-off-by: Simon Horman > Signed-off-b

Re: [PATCH v2 bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-26 Thread David Ahern
On 6/26/18 3:50 AM, Daniel Borkmann wrote: > [...] > You change all the semantics of return code here, but this breaks > bpf_skb_fib_lookup(). > I cannot see how this would work in that case. The code does the following > with the > bpf_ipv{4,6}_fib_lookup() return code: > > [...] >

Re: [PATCH v3,net-next] vlan: implement vlan id and protocol changes

2018-06-25 Thread David Ahern
On 6/25/18 4:30 AM, Chas Williams wrote: > vlan_changelink silently ignores attempts to change the vlan id > or protocol id of an existing vlan interface. Implement by adding > the new vlan id and protocol to the interface's vlan group and then > removing the old vlan id and protocol from the

Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-21 Thread David Ahern
On 6/21/18 4:03 AM, Kirill Tkhai wrote: >> This patch does not remove the BUG, so does not really solve the >> problem. ie., it is fairly trivial to write a script (32k dev%d named >> devices in init_net) that triggers it again, so your commit subject and >> commit log are not correct with the

Re: [PATCH iproute2-next 1/1] tc: jsonify nat action

2018-06-20 Thread David Ahern
On 6/18/18 12:57 PM, Keara Leibovitz wrote: > Add json output support for nat action > ... > > Signed-off-by: Keara Leibovitz > --- > tc/m_nat.c | 32 +++- > 1 file changed, 19 insertions(+), 13 deletions(-) > applied to iproute2-next. Thanks

Re: [PATCH iproute2-next v3] ip-xfrm: Add support for OUTPUT_MARK

2018-06-20 Thread David Ahern
On 6/15/18 8:32 PM, Subash Abhinov Kasiviswanathan wrote: > This patch adds support for OUTPUT_MARK in xfrm state to exercise the > functionality added by kernel commit 077fbac405bf > ("net: xfrm: support setting an output mark."). > ... > v1->v2: Moved the XFRMA_OUTPUT_MARK print after

Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-20 Thread David Ahern
On 6/20/18 2:57 AM, Kirill Tkhai wrote: > From: Kirill Tkhai > > The following script makes kernel to crash since it can't obtain > a name for a device, when the name is occupied by another device: > > #!/bin/bash > ifconfig eth0 down > ifconfig eth1 down > index=`cat

Re: Route fallback issue

2018-06-20 Thread David Ahern
On 6/20/18 2:26 AM, Akshat Kakkar wrote: > Hi netdev community, > > I have 2 interfaces > eno1 : 192.168.1.10/24 > eno2 : 192.168.2.10/24 > > I added routes as > 172.16.0.0/12 via 192.168.1.254 metric 1 > 172.16.0.0/12 via 192.168.2.254 metric 2 > > My intention : All traffic to 172.16.0.0/12

Re: iproute2 won't compile without AF_VSOCK

2018-06-19 Thread David Ahern
On 6/19/18 2:27 PM, David Ahern wrote: > On 6/19/18 9:47 AM, Stephen Hemminger wrote: >> On Tue, 19 Jun 2018 10:17:45 -0500 >> Steve Wise wrote: >> >>> Hey David, >>> >>> I'm trying to compile the latest iproute2 on an RHEL-7.3 distro, and it >

Re: iproute2 won't compile without AF_VSOCK

2018-06-19 Thread David Ahern
On 6/19/18 9:47 AM, Stephen Hemminger wrote: > On Tue, 19 Jun 2018 10:17:45 -0500 > Steve Wise wrote: > >> Hey David, >> >> I'm trying to compile the latest iproute2 on an RHEL-7.3 distro, and it >> fails to compile because AF_VSOCK is not defined.  Should this >> functionality be a configure

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-19 Thread David Ahern
On 6/19/18 10:36 AM, Martin KaFai Lau wrote: > On Tue, Jun 19, 2018 at 09:34:28AM -0600, David Ahern wrote: >> On 6/19/18 9:25 AM, Martin KaFai Lau wrote: >>> On Mon, Jun 18, 2018 at 03:35:25PM -0600, David Ahern wrote: >>>> On 6/18/18 2:55 PM, Martin KaFai Lau

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-19 Thread David Ahern
On 6/19/18 9:25 AM, Martin KaFai Lau wrote: > On Mon, Jun 18, 2018 at 03:35:25PM -0600, David Ahern wrote: >> On 6/18/18 2:55 PM, Martin KaFai Lau wrote: >>>>/* rc > 0 case */ >>>>switch(rc) { >>>>case BPF_FIB_LKUP_RET_BLACKHOLE: >>

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-19 Thread David Ahern
On 6/18/18 2:55 PM, Martin KaFai Lau wrote: >> >> Arguably BPF_FIB_LKUP_RET_NO_NHDEV is not needed. See below. >> ... @@ -4252,16 +4277,19 @@ static int bpf_ipv6_fib_lookup(struct net *net, struct bpf_fib_lookup *params, if (check_mtu) { mtu =

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-19 Thread David Ahern
On 6/19/18 3:36 AM, Quentin Monnet wrote: > Since you are about to respin (I think?), could you please also fix the > formatting in your change to the doc? The "BPF_FIB_LKUP_RET_" is not > emphasized (and will even cause an error message when producing the man > page, because of the trailing

Re: [PATCH] tc, bpf: add option to dump bpf verifier as C program fragment

2018-06-18 Thread David Ahern
On 6/18/18 2:18 PM, Jakub Kicinski wrote: > On Sun, 17 Jun 2018 08:48:41 +, Ophir Munk wrote: >> Similar to cbpf used within tcpdump utility with a "-d" option to dump >> the compiled packet-matching code in a human readable form - tc has the >> "verbose" option to dump ebpf verifier output.

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-18 Thread David Ahern
On 6/18/18 2:55 PM, Martin KaFai Lau wrote: >> /* rc > 0 case */ >> switch(rc) { >> case BPF_FIB_LKUP_RET_BLACKHOLE: >> case BPF_FIB_LKUP_RET_UNREACHABLE: >> case BPF_FIB_LKUP_RET_PROHIBIT: >> return XDP_DROP; >> } >> >> For the others it becomes a

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-18 Thread David Ahern
On 6/18/18 12:11 PM, Martin KaFai Lau wrote: > On Sun, Jun 17, 2018 at 08:18:19AM -0700, dsah...@kernel.org wrote: >> From: David Ahern >> >> For ACLs implemented using either FIB rules or FIB entries, the BPF >> program needs the FIB lookup status to be able t

array bounds warning in xfrm_output_resume

2018-06-18 Thread David Ahern
Florian: I am seeing this warning: $ make O=kbuild/perf -j 24 -s In file included from /home/dsa/kernel-3.git/include/linux/kernel.h:10:0, from /home/dsa/kernel-3.git/include/linux/list.h:9, from /home/dsa/kernel-3.git/include/linux/module.h:9,

Re: [PATCH net] net/ipv6: respect rcu grace period before freeing fib6_info

2018-06-18 Thread David Ahern
On 6/18/18 6:24 AM, Eric Dumazet wrote: > syzbot reported use after free that is caused by fib6_info being > freed without a proper RCU grace period. > ... > Fixes: a64efe142f5e ("net/ipv6: introduce fib6_info struct and helpers") > Signed-off-by: Eric Dumazet >

Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-17 Thread David Ahern
On 6/15/18 3:44 AM, Kirill Tkhai wrote: > Hm, but is this a likely case, when real device is moved to net ns, so it > requires moving to init_net back? It seems the most devices moved to !init_net > are virtual and they just destroyed in default_device_exit_batch(). Or we have > more devices to

Re: [PATCH net 1/4] ipv6: Only emit append events for appended routes

2018-06-15 Thread David Ahern
gned-off-by: Ido Schimmel > Acked-by: Jiri Pirko > --- > net/ipv6/ip6_fib.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > Acked-by: David Ahern

Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-14 Thread David Ahern
On 6/14/18 6:38 AM, Kirill Tkhai wrote: > The following script makes kernel to crash since it can't obtain > a name for a device, when the name is occupied by another device: > > #!/bin/bash > ifconfig eth0 down > ifconfig eth1 down > index=`cat /sys/class/net/eth1/ifindex` > ip link set eth1

Re: [PATCH iproute2-next v2] ip-xfrm: Add support for OUTPUT_MARK

2018-06-14 Thread David Ahern
On 6/13/18 11:09 PM, Subash Abhinov Kasiviswanathan wrote: > The output mark differs from the existing xfrm mark in two ways: > > 1. The xfrm mark is used to match xfrm policies and states, while >    the xfrm output mark is used to set the mark (and influence >    the routing) of the packets

Re: [PATCH iproute2-next v2] ip-xfrm: Add support for OUTPUT_MARK

2018-06-13 Thread David Ahern
On 6/12/18 9:14 PM, Lorenzo Colitti wrote: > On Wed, Jun 13, 2018 at 3:48 AM Subash Abhinov Kasiviswanathan > wrote: >> >> src 192.168.1.1 dst 192.168.1.2 >> proto esp spi 0x4321 reqid 0 mode tunnel >> replay-window 0 flag af-unspec >> mark 0x1/0x3 >>

Re: [PATCH net] ipv6: allow PMTU exceptions to local routes

2018-06-11 Thread David Ahern
; Fixes: 45e4fd26683c ("ipv6: Only create RTF_CACHE routes after encountering > pmtu exception") > Fixes: 7343ff31ebf0 ("ipv6: Don't create clones of host routes.") > Signed-off-by: Julian Anastasov > --- > net/ipv6/route.c | 3 --- > 1 file changed, 3 deletions(-) > Acked-by: David Ahern

Re: [bug] cxgb4: vrf stopped working with cxgb4 card

2018-06-09 Thread David Ahern
Ganesh: On 6/4/18 9:03 AM, AMG Zollner Robert wrote: > I have noticed that vrf is not working with kernel v4.15.0 but was > working with v4.13.0 when using cxgb4 Chelsio driver (T520-cr) > > Setup: > Two metal servers with a T520-cr card each, directly connected without a > switch in between. >

Re: [Bug 199637] New: UBSAN: Undefined behaviour in net/ipv4/fib_trie.c:503:6

2018-06-07 Thread David Ahern
On 6/7/18 5:07 PM, Jakub Kicinski wrote: >> After recompiling the 4.16.7 kernel with gcc 8.1, UBSAN reports the >> following: >> >> [ 25.427424] >> >> [ 25.429680] UBSAN: Undefined behaviour in

Re: [Bug 199643] New: UBSAN: Undefined behaviour in ./include/net/route.h:240:2

2018-06-07 Thread David Ahern
On 6/7/18 5:49 PM, Jakub Kicinski wrote: > On Thu, 7 Jun 2018 17:28:59 -0700, Eric Dumazet wrote: >> On 06/07/2018 05:11 PM, David Miller wrote: >>> From: Jakub Kicinski >>> Date: Thu, 7 Jun 2018 17:06:23 -0700 >>> [ 293.213661] ip_send_unicast_reply+0x1b67/0x1d0e >>> >>> This calls

Re: [PATCH iproute2-next v2 1/1] tc: add json support in csum action

2018-06-05 Thread David Ahern
On 6/5/18 1:44 PM, Keara Leibovitz wrote: > Add json output support for checksum action. > ... > > Signed-off-by: Keara Leibovitz > --- > tc/m_csum.c | 16 ++-- > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/tc/m_csum.c b/tc/m_csum.c > index

Re: [PATCH iproute2-next 1/1] tc: add json support in csum action

2018-06-05 Thread David Ahern
On 6/5/18 12:30 PM, Keara Leibovitz wrote: please add some words here. e.g., add example output > Signed-off-by: Keara Leibovitz > --- > tc/m_csum.c | 16 ++-- > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/tc/m_csum.c b/tc/m_csum.c > index

Re: [PATCH net-next 3/3] mlxsw: Add extack messages for port_{un,}split failures?

2018-06-05 Thread David Ahern
On 6/5/18 1:18 AM, Jiri Pirko wrote: > Tue, Jun 05, 2018 at 10:05:28AM CEST, ido...@idosch.org wrote: >> On Tue, Jun 05, 2018 at 09:52:30AM +0200, Jiri Pirko wrote: >>> Tue, Jun 05, 2018 at 12:15:03AM CEST, dsah...@kernel.org wrote: if (!mlxsw_sp_port->split) {

Re: [PATCH net-next] net: metrics: add proper netlink validation

2018-06-04 Thread David Ahern
1da177e4c3f4 ("Linux-2.6.12-rc2") > Signed-off-by: Eric Dumazet > Reported-by: syzbot > Cc: David Ahern > --- > net/ipv4/fib_semantics.c | 2 ++ > net/ipv4/metrics.c | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/net/ipv4/fib_semant

Re: [PATCH bpf-next v3 05/11] bpf: avoid retpoline for lookup/update/delete calls on maps

2018-06-04 Thread David Ahern
On 6/4/18 11:25 AM, Jakub Kicinski wrote: > that, and others can use completions. I personally think Quentin did > an awesome job on the completions, they cover the entire syntax unlike > the iproute2 ones and we intend to keep them that way! iproute2 patches for completions would be welcomed if

Re: [bug] cxgb4: vrf stopped working with cxgb4 card

2018-06-04 Thread David Ahern
On 6/4/18 1:14 PM, AMG Zollner Robert wrote: > Yes, I was enslaving while the interface was up. > > Just tested some of the builds that where not working earlier and they > are working if I keep the interface down when enslaving as you suggested. > > Is this the expected behavior? Not expected

Re: [bug] cxgb4: vrf stopped working with cxgb4 card

2018-06-04 Thread David Ahern
On 6/4/18 8:03 AM, AMG Zollner Robert wrote: > I have noticed that vrf is not working with kernel v4.15.0 but was > working with v4.13.0 when using cxgb4 Chelsio driver (T520-cr) > > Setup: > Two metal servers with a T520-cr card each, directly connected without a > switch in between. > >   

Re: [PATCH bpf-next] bpf: flowlabel in bpf_fib_lookup should be flowinfo

2018-06-03 Thread David Ahern
On 6/3/18 7:41 PM, Alexei Starovoitov wrote: > On Sun, Jun 03, 2018 at 08:15:19AM -0700, dsah...@kernel.org wrote: >> From: David Ahern >> >> As Michal noted the flow struct takes both the flow label and priority. >> Update the bpf_fib_lookup API to note that

Re: [PATCH net] vrf: check the original netdevice for generating redirect

2018-06-03 Thread David Ahern
ipv6/ndisc.c | 6 ++ > 2 files changed, 8 insertions(+), 1 deletion(-) skb->dev in this path is set to the vrf device if applicable, so yes the change is needed. Thanks for the fix. Acked-by: David Ahern

Re: [PATCH net] net: ipv6: prevent use after free in ip6_route_mpath_notify()

2018-06-03 Thread David Ahern
On 6/3/18 8:31 AM, Eric Dumazet wrote: > > > On 06/03/2018 07:01 AM, David Ahern wrote: >> On 6/3/18 7:35 AM, Eric Dumazet wrote: >>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c >>> index >>> f4d61736c41abe8cd7f439c4a37100e90c1eacca..830eefdbdb

Re: [PATCH net] net: ipv6: prevent use after free in ip6_route_mpath_notify()

2018-06-03 Thread David Ahern
On 6/3/18 8:01 AM, David Ahern wrote: > Is there a reproducer for the syzbot case? One reproducer is to insert a route and then add a multipath route that has a duplicate nexthop.e.g,: ip -6 ro add vrf red 2001:db8:101::/64 nexthop via 2001:db8:1::2 ip -6 ro append vrf red 2001:db8:101::

Re: [PATCH net] net: ipv6: prevent use after free in ip6_route_mpath_notify()

2018-06-03 Thread David Ahern
On 6/3/18 7:35 AM, Eric Dumazet wrote: > diff --git a/net/ipv6/route.c b/net/ipv6/route.c > index > f4d61736c41abe8cd7f439c4a37100e90c1eacca..830eefdbdb6734eb81ea0322fb6077ee20be1889 > 100644 > --- a/net/ipv6/route.c > +++ b/net/ipv6/route.c > @@ -4263,7 +4263,9 @@ static int

Re: [PATCH iproute2 net-next] iproute: ip route get support for sport, dport and ipproto match

2018-06-01 Thread David Ahern
On 5/30/18 11:06 AM, Roopa Prabhu wrote: > From: Roopa Prabhu > > Signed-off-by: Roopa Prabhu > --- > ip/iproute.c | 26 +- > man/man8/ip-route.8.in | 20 +++- > 2 files changed, 44 insertions(+), 2 deletions(-) applied to iproute2-next.

Re: [PATCH iproute2-next] ipaddress: Add support for address metric

2018-05-30 Thread David Ahern
On 5/27/18 9:10 AM, dsah...@kernel.org wrote: > From: David Ahern > > Add support for IFA_RT_PRIORITY using the same keywords as iproute for > RTA_PRIORITY. > > Signed-off-by: David Ahern > --- > include/uapi/linux/if_addr.h | 1 + > ip/ipaddress.c

Re: [PATCH net-next] vrf: add CRC32c offload to device features

2018-05-25 Thread David Ahern
gt; > --- > drivers/net/vrf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: David Ahern <d...@cumulusnetworks.com>

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