Re: [PATCH v2] rhashtable: add restart routine in rhashtable_free_and_destroy()

2018-07-07 Thread David Miller
From: Taehee Yoo Date: Sun, 8 Jul 2018 11:55:51 +0900 > @@ -1143,13 +1143,14 @@ void rhashtable_free_and_destroy(struct rhashtable > *ht, >void (*free_fn)(void *ptr, void *arg), >void *arg) > { > - struct bucket_table *tbl; >

Re: pull-request: bpf 2018-07-07

2018-07-07 Thread David Miller
From: Alexei Starovoitov Date: Sat, 7 Jul 2018 20:58:26 -0700 > The following pull-request contains BPF updates for your *net* tree. > > Plenty of fixes for different components: > > 1) A set of critical fixes for sockmap and sockhash, from John Fastabend. > > 2) fixes for several race

Re: [PATCH net] ipfrag: really prevent allocation on netns exit

2018-07-07 Thread David Miller
From: Paolo Abeni Date: Fri, 6 Jul 2018 12:30:20 +0200 > Setting the low threshold to 0 has no effect on frags allocation, > we need to clear high_thresh instead. > > The code was pre-existent to commit 648700f76b03 ("inet: frags: > use rhashtables for reassembly units"), but before the above,

Re: [PATCH][net-next] net: replace num_possible_cpus with nr_cpu_ids

2018-07-07 Thread David Miller
From: Li RongQing Date: Fri, 6 Jul 2018 17:33:36 +0800 > The return of num_possible_cpus() is same as nr_cpu_ids, but > nr_cpu_ids can reduce cpu computation > > Signed-off-by: Li RongQing These two numbers are not the same, in fact num_possible_cpus() can be and often is smaller than

pull-request: bpf 2018-07-07

2018-07-07 Thread Alexei Starovoitov
Hi David, The following pull-request contains BPF updates for your *net* tree. Plenty of fixes for different components: 1) A set of critical fixes for sockmap and sockhash, from John Fastabend. 2) fixes for several race conditions in af_xdp, from Magnus Karlsson. 3) hash map refcnt fix, from

Re: [PATCH net-next v6 00/11] Modify action API for implementing lockless actions

2018-07-07 Thread David Miller
From: Vlad Buslov Date: Thu, 5 Jul 2018 17:24:22 +0300 > Currently, all netlink protocol handlers for updating rules, actions and > qdiscs are protected with single global rtnl lock which removes any > possibility for parallelism. This patch set is a first step to remove > rtnl lock dependency

[PATCH v2] rhashtable: add restart routine in rhashtable_free_and_destroy()

2018-07-07 Thread Taehee Yoo
rhashtable_free_and_destroy() cancels re-hash deferred work then walks and destroys elements. at this moment, some elements can be still in future_tbl. that elements are not destroyed. test case: nft_rhash_destroy() calls rhashtable_free_and_destroy() to destroy all elements of sets before

Re: [PATCH v2 net-next] openvswitch: kernel datapath clone action

2018-07-07 Thread David Miller
From: Yifeng Sun Date: Mon, 2 Jul 2018 08:18:03 -0700 > Add 'clone' action to kernel datapath by using existing functions. > When actions within clone don't modify the current flow, the flow > key is not cloned before executing clone actions. > > This is a follow up patch for this incomplete

Re: [PATCH] isdn/capi: fix defined but not used warnings

2018-07-07 Thread David Miller
From: Randy Dunlap Date: Sat, 7 Jul 2018 08:31:15 -0700 > From: Randy Dunlap > > Fix build warnings in drivers/isdn/capi/ when CONFIG_PROC_FS is not > enabled by marking the unused functions as __maybe_unused. > > ../drivers/isdn/capi/capi.c:1324:12: warning: 'capi20_proc_show' defined but >

Re: [PATCH] connector: fix defined but not used warning

2018-07-07 Thread David Miller
From: Randy Dunlap Date: Sat, 7 Jul 2018 08:27:53 -0700 > From: Randy Dunlap > > Fix a build warning in connector.c when CONFIG_PROC_FS is not enabled > by marking the unused function as __maybe_unused. > > ../drivers/connector/connector.c:242:12: warning: 'cn_proc_show' defined but > not

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

2018-07-07 Thread David Miller
From: Lorenzo Colitti Date: Sat, 7 Jul 2018 16:31:40 +0900 > When tcp_diag_destroy closes a TCP_NEW_SYN_RECV socket, it first > frees it by calling inet_csk_reqsk_queue_drop_and_and_put in > tcp_abort, and then frees it again by calling sock_gen_put. > > Since tcp_abort only has one caller,

Re: [PATCH net] net/ipv4: Set oif in fib_compute_spec_dst

2018-07-07 Thread David Miller
From: dsah...@kernel.org Date: Sat, 7 Jul 2018 16:15:26 -0700 > From: David Ahern > > Xin reported that icmp replies may not use the address on the device the > echo request is received if the destination address is broadcast. Instead > a route lookup is done without considering VRF context.

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

2018-07-07 Thread David Miller
From: David Ahern Date: Sat, 7 Jul 2018 19:23:16 -0600 > 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

Re: [PATCH][net-next][v2] net: limit each hash list length to MAX_GRO_SKBS

2018-07-07 Thread David Miller
From: Eric Dumazet Date: Sat, 7 Jul 2018 17:22:01 -0700 > Maybe gro_count should be replaced by a bitmask, so that we can > speed up napi_gro_flush(), since it now has to use 3 cache lines > (gro_hash[] size is 192 bytes) Something like this? diff --git a/include/linux/netdevice.h

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 v2 net-next 02/14] net: Add a new socket option for a future transmit time.

2018-07-07 Thread Eric Dumazet
On 07/03/2018 03:42 PM, Jesus Sanchez-Palencia wrote: > From: Richard Cochran > > This patch introduces SO_TXTIME. User space enables this option in > order to pass a desired future transmit time in a CMSG when calling > sendmsg(2). The argument to this socket option is a 8-bytes long struct

Re: [PATCH][net-next][v2] net: limit each hash list length to MAX_GRO_SKBS

2018-07-07 Thread Eric Dumazet
On 07/05/2018 03:20 AM, David Miller wrote: > From: Li RongQing > Date: Thu, 5 Jul 2018 14:34:32 +0800 > >> After commit 07d78363dcff ("net: Convert NAPI gro list into a small hash >> table.")' there is 8 hash buckets, which allows more flows to be held for >> merging. but MAX_GRO_SKBS, the

[PATCH net] net/ipv4: Set oif in fib_compute_spec_dst

2018-07-07 Thread dsahern
From: David Ahern Xin reported that icmp replies may not use the address on the device the echo request is received if the destination address is broadcast. Instead a route lookup is done without considering VRF context. Fix by setting oif in flow struct to the master device if it is enslaved.

Re: [PATCH bpf] xdp: XDP_REDIRECT should check IFF_UP and MTU

2018-07-07 Thread Alexei Starovoitov
On Fri, Jul 06, 2018 at 11:49:00AM +0900, Toshiaki Makita wrote: > Otherwise we end up with attempting to send packets from down devices > or to send oversized packets, which may cause unexpected driver/device > behaviour. Generic XDP has already done this check, so reuse the logic > in native

Re: [bpf PATCH v2 0/4] sockhash/sockmap fixes

2018-07-07 Thread Alexei Starovoitov
On Thu, Jul 05, 2018 at 08:49:54AM -0700, John Fastabend wrote: > First three patches resolve issues found while testing sockhash and > reviewing code. Syzbot also found them about the same time as I was > working on fixes. The main issue is in the sockhash path we reduced > the scope of

Re: [bpf PATCH v2 0/2] sockmap, syzbot fix error path and RCU fix

2018-07-07 Thread Alexei Starovoitov
On Thu, Jul 05, 2018 at 08:05:51AM -0700, John Fastabend wrote: > I missed fixing the error path in the sockhash code to align with > supporting socks in multiple maps. Simply checking if the psock is > present does not mean we can decrement the reference count because > it could be part of

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 1:31 AM, Lorenzo Colitti wrote: > When tcp_diag_destroy closes a TCP_NEW_SYN_RECV socket, it first > frees it by calling inet_csk_reqsk_queue_drop_and_and_put in > tcp_abort, and then frees it again by calling sock_gen_put. > > Since tcp_abort only has one caller, and all the other

Re: [PATCH iproute2] tc: Fix the bug not to display prio and quantum options of htb

2018-07-07 Thread Stephen Hemminger
On Wed, 4 Jul 2018 12:32:33 +0900 fumihiko kakuma wrote: > A commandline like 'tc -d class show dev dev-name' does not > display value of prio and quantum option when we use htb qdisc. > This patch fixes the bug. > > Signed-off-by: Fumihiko Kakuma Applied

Re: [PATCH iproute2] tc: Fix output of ip attributes

2018-07-07 Thread Stephen Hemminger
On Tue, 3 Jul 2018 15:54:32 +0300 Roi Dayan wrote: > Example output is of tos and ttl. > Befoe this fix the format used %x caused output of the pointer > instead of the intended string created in the out variable. > > Fixes: e28b88a464c4 ("tc: jsonify flower filter") > Signed-off-by: Roi Dayan

Re: [PATCH v2 iproute2] man: Fix typos on tc-cbs

2018-07-07 Thread Stephen Hemminger
On Thu, 5 Jul 2018 08:20:09 -0700 Jesus Sanchez-Palencia wrote: > Fix 2 typos on the man page of the CBS qdisc. > > Signed-off-by: Jesus Sanchez-Palencia > Reviewed-by: Simon Horman Applied

Re: [PATCH v2 iproute2] net:sched: add action inheritdsfield to skbedit

2018-07-07 Thread Stephen Hemminger
On Sat, 7 Jul 2018 12:40:01 -0400 Qiaobin Fu wrote: > The new action inheritdsfield copies the field DS of > IPv4 and IPv6 packets into skb->priority. This enables > later classification of packets based on the DS field. > > v2: > *Use optional flags, so that it won't break old versions of tc.

[PATCH v2 iproute2] net:sched: add action inheritdsfield to skbedit

2018-07-07 Thread Qiaobin Fu
The new action inheritdsfield copies the field DS of IPv4 and IPv6 packets into skb->priority. This enables later classification of packets based on the DS field. v2: *Use optional flags, so that it won't break old versions of tc. Original idea by Jamal Hadi Salim Signed-off-by: Qiaobin Fu

Re: [PATCH net-next 0/4] vxlan: fix default fdb entry user-space notify ordering/race

2018-07-07 Thread Roopa Prabhu
On Sat, Jul 7, 2018 at 4:23 AM, David Miller wrote: > From: Roopa Prabhu > Date: Wed, 4 Jul 2018 16:46:28 -0700 > >> From: Roopa Prabhu >> >> Problem: >> In vxlan_newlink, a default fdb entry is added before register_netdev. >> The default fdb creation function notifies user-space of the >>

Re: [PATCH net-next 1/5 v2] net: gemini: Look up L3 maxlen from table

2018-07-07 Thread Michał Mirosław
On Wed, Jul 04, 2018 at 08:33:20PM +0200, Linus Walleij wrote: > The code to calculate the hardware register enumerator > for the maximum L3 length isn't entirely simple to read. > Use the existing defines and rewrite the function into a > table look-up. A matter of habit. ;-) I think that if you

[PATCH] isdn/capi: fix defined but not used warnings

2018-07-07 Thread Randy Dunlap
From: Randy Dunlap Fix build warnings in drivers/isdn/capi/ when CONFIG_PROC_FS is not enabled by marking the unused functions as __maybe_unused. ../drivers/isdn/capi/capi.c:1324:12: warning: 'capi20_proc_show' defined but not used [-Wunused-function] ../drivers/isdn/capi/capi.c:1347:12:

[PATCH] connector: fix defined but not used warning

2018-07-07 Thread Randy Dunlap
From: Randy Dunlap Fix a build warning in connector.c when CONFIG_PROC_FS is not enabled by marking the unused function as __maybe_unused. ../drivers/connector/connector.c:242:12: warning: 'cn_proc_show' defined but not used [-Wunused-function] Signed-off-by: Randy Dunlap Cc: Evgeniy

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 Eric Dumazet
On 07/07/2018 07:16 AM, Eric Dumazet wrote: > > > On 07/07/2018 06:56 AM, David Ahern wrote: > >> >> So I have to either learn how to use packetdrill or install a web server >> and put load on it. If the Android tests are not publicly available then >> the reference should be removed from

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

2018-07-07 Thread Eric Dumazet
On 07/07/2018 06:56 AM, David Ahern wrote: > > So I have to either learn how to use packetdrill or install a web server > and put load on it. If the Android tests are not publicly available then > the reference should be removed from the commit log. We see many Change-Id tags in changelogs,

Re: [PATCH net-next v3 0/2] tcp: fix high tail latencies in DCTCP

2018-07-07 Thread Neal Cardwell
On Sat, Jul 7, 2018 at 7:15 AM David Miller wrote: > > From: Lawrence Brakmo > Date: Tue, 3 Jul 2018 09:26:13 -0700 > > > When have observed high tail latencies when using DCTCP for RPCs as > > compared to using Cubic. For example, in one setup there are 2 hosts > > sending to a 3rd one, with

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

2018-07-07 Thread Eric Dumazet
On 07/07/2018 06:29 AM, Eric Dumazet wrote: > > > On 07/07/2018 06: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,

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, 7 Jul 2018 16:31:40 +0900 > Tested: passes Android

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

2018-07-07 Thread Eric Dumazet
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, 7 Jul 2018 16:31:40 +0900 >>> Tested: passes Android sock_diag_test.py, which exercises this codepath >>> >>>

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

2018-07-07 Thread Eric Dumazet
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, 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

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] net: diag: Don't double-free TCP_NEW_SYN_RECV sockets in tcp_abort

2018-07-07 Thread Eric Dumazet
On 07/07/2018 06: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

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

2018-07-07 Thread Eric Dumazet
On 07/07/2018 12:31 AM, Lorenzo Colitti wrote: > When tcp_diag_destroy closes a TCP_NEW_SYN_RECV socket, it first > frees it by calling inet_csk_reqsk_queue_drop_and_and_put in > tcp_abort, and then frees it again by calling sock_gen_put. > > Since tcp_abort only has one caller, and all the

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

2018-07-07 Thread Ido Schimmel
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 it not necessary and therefore should not be

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

2018-07-07 Thread David Miller
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 to be found much sooner? Just curious.

Re: [PATCH net 0/2] net/sched: fix NULL dereference in 'goto chain' control action

2018-07-07 Thread David Miller
From: Davide Caratti Date: Fri, 6 Jul 2018 21:01:04 +0200 > in a couple of TC actions (i.e. csum and tunnel_key), the control action > is stored together with the action-specific configuration data. > This avoids a race condition (see [1]), but it causes a crash when 'goto > chain' is used with

Re: [PATCH] ipv6: icmp: Updating pmtu for link local route

2018-07-07 Thread David Miller
From: Georg Kohmann Date: Fri, 6 Jul 2018 14:59:56 +0200 > @@ -92,7 +92,7 @@ static void icmpv6_err(struct sk_buff *skb, struct > inet6_skb_parm *opt, >     struct net *net = dev_net(skb->dev); > >     if (type == ICMPV6_PKT_TOOBIG) > -   ip6_update_pmtu(skb, net, info, 0,

Re: [PATCH v2 net-next 0/5] Introduce matching on double vlan/QinQ headers for TC flower

2018-07-07 Thread David Miller
From: Jianbo Liu Date: Fri, 6 Jul 2018 05:38:11 + > Currently TC flower supports only one vlan tag, it doesn't match on both outer > and inner vlan headers for QinQ. To do this, we add support to get both outer > and inner vlan headers for flow dissector, and then TC flower do matching on >

Re: [PATCH net-next v6 00/11] Modify action API for implementing lockless actions

2018-07-07 Thread David Miller
From: Vlad Buslov Date: Thu, 5 Jul 2018 17:24:22 +0300 > Currently, all netlink protocol handlers for updating rules, actions and > qdiscs are protected with single global rtnl lock which removes any > possibility for parallelism. This patch set is a first step to remove > rtnl lock dependency

Re: [PATCH net-next 0/2] Add a mlxsw-specific test for mirror-to-gretap

2018-07-07 Thread David Miller
From: Petr Machata Date: Thu, 05 Jul 2018 21:10:53 +0200 > Some configurations of mirror-to-gretap are impossible for mlxsw to > offload. Add a test that checks that these out-of-domain conditions are > handled properly by mlxsw. > > In patch #1, fix mirror_gre_lib.sh and mirror_gre_topo_lib.sh

Re: [PATCH net-next 0/4] vxlan: fix default fdb entry user-space notify ordering/race

2018-07-07 Thread David Miller
From: Roopa Prabhu Date: Wed, 4 Jul 2018 16:46:28 -0700 > From: Roopa Prabhu > > Problem: > In vxlan_newlink, a default fdb entry is added before register_netdev. > The default fdb creation function notifies user-space of the > fdb entry on the vxlan device which user-space does not know

Re: [PATCH net-next v3 0/2] tcp: fix high tail latencies in DCTCP

2018-07-07 Thread David Miller
From: Lawrence Brakmo Date: Tue, 3 Jul 2018 09:26:13 -0700 > When have observed high tail latencies when using DCTCP for RPCs as > compared to using Cubic. For example, in one setup there are 2 hosts > sending to a 3rd one, with each sender having 3 flows (1 stream, > 1 1MB back-to-back RPCs and

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

2018-07-07 Thread David Miller
From: Chas Williams <3ch...@gmail.com> Date: Mon, 2 Jul 2018 18:35:28 -0400 > 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

[PATCH v3 net-next] net/sched: add skbprio scheduler

2018-07-07 Thread Nishanth Devarajan
net/sched: add skbprio scheduer Skbprio (SKB Priority Queue) is a queueing discipline that prioritizes packets according to their skb->priority field. Under congestion, already-enqueued lower priority packets will be dropped to make space available for higher priority packets. Skbprio was

Re: Crash due to destroying TCP request sockets using SOCK_DESTROY

2018-07-07 Thread Lorenzo Colitti
On Fri, Jul 6, 2018 at 7:24 PM Eric Dumazet wrote: > > Your patch makes sense to me, please submit it formally with : > > Fixes: d7226c7a4dd1 ("net: diag: Fix refcnt leak in error path destroying > socket") > Cc: David Ahern Submitted a patch against net:

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

2018-07-07 Thread Lorenzo Colitti
When tcp_diag_destroy closes a TCP_NEW_SYN_RECV socket, it first frees it by calling inet_csk_reqsk_queue_drop_and_and_put in tcp_abort, and then frees it again by calling sock_gen_put. Since tcp_abort only has one caller, and all the other codepaths in tcp_abort don't free the socket, just

[PATH net] cxgb4: assume flash part size to be 4MB, if it can't be determined

2018-07-07 Thread Ganesh Goudar
From: Casey Leedom t4_get_flash_params() fails in a fatal fashion if the FLASH part isn't one of the recognized parts. But this leads to desperate efforts to update drivers when various FLASH parts which we are using suddenly become unavailable and we need to substitute new FLASH parts. This