Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Alexei Starovoitov
On Fri, Jul 06, 2018 at 06:44:24PM -0700, Jakub Kicinski wrote: > On Fri, 6 Jul 2018 17:53:18 -0700, Alexei Starovoitov wrote: > > On Fri, Jul 06, 2018 at 05:08:47PM -0700, Jakub Kicinski wrote: > > > On Fri, 6 Jul 2018 16:42:51 -0700, Alexei Starovoitov wrote: > > > > On Fri, Jul 06, 2018 at

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Alexei Starovoitov
On Fri, Jul 06, 2018 at 06:20:47PM -0700, Jakub Kicinski wrote: > On Fri, 6 Jul 2018 18:00:13 -0700, Alexei Starovoitov wrote: > > On Fri, Jul 06, 2018 at 05:40:43PM -0700, Jakub Kicinski wrote: > > > > > > Could we just say that at the start we expose only existing SKB fields > > > (csum, hash,

Re: [PATCH V2 net-next] liquidio: fix kernel panic when NIC firmware is older than 1.7.2

2018-07-06 Thread David Miller
From: Felix Manlunas Date: Fri, 6 Jul 2018 11:27:07 -0700 > From: Rick Farrington > > Pre-1.7.2 NIC firmware does not support (and does not respond to) the "get > speed" command which is sent by the 1.7.2 driver (for CN23XX-225 cards > only) during modprobe. Due to a bug in older firmware

Re: [PATCH net-next 0/6] sock cookie initializers

2018-07-06 Thread David Miller
From: Willem de Bruijn Date: Fri, 6 Jul 2018 10:12:53 -0400 > From: Willem de Bruijn > > Recent UDP GSO and SO_TXTIME features added new fields to cookie > structs. > > When adding a field, all sites where a struct is initialized have to > be updated, which is a lot of boilerplate.

Re: [PATCH net-next 0/3] fix use-after-free bugs in skb list processing

2018-07-06 Thread David Miller
From: Edward Cree Date: Fri, 6 Jul 2018 18:01:04 +0100 > A couple of bugs in skb list handling were spotted by Dan Carpenter, with > the help of Smatch; following up on them I found a couple more similar > cases. This series fixes them by changing the relevant loops to use the >

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Jakub Kicinski
On Fri, 6 Jul 2018 17:53:18 -0700, Alexei Starovoitov wrote: > On Fri, Jul 06, 2018 at 05:08:47PM -0700, Jakub Kicinski wrote: > > On Fri, 6 Jul 2018 16:42:51 -0700, Alexei Starovoitov wrote: > > > On Fri, Jul 06, 2018 at 02:33:58PM -0700, Jakub Kicinski wrote: > > > > On Fri, 6 Jul 2018

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread David Miller
From: Alexei Starovoitov Date: Fri, 6 Jul 2018 17:53:18 -0700 > I'd like to push back on firmware folks that should be listening > to feedback from driver folks and kernel stack instead of saying > 'here is hw spec that firmware provides'. Firmware is software. > It can change and should be open

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread David Miller
From: Alexei Starovoitov Date: Fri, 6 Jul 2018 09:30:42 -0700 > Like doing offset rewriting at program load time similar to what we plan > to do for tracing. Tracing programs will be doing 'task->pid' access > and the kernel will adjust offsetof(struct task_struct, pid) during program > load >

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Jakub Kicinski
On Fri, 6 Jul 2018 18:00:13 -0700, Alexei Starovoitov wrote: > On Fri, Jul 06, 2018 at 05:40:43PM -0700, Jakub Kicinski wrote: > > > > Could we just say that at the start we expose only existing SKB fields > > (csum, hash, mark) and the meaning of the is the same as in the SKB? > > what would

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Alexei Starovoitov
On Fri, Jul 06, 2018 at 05:40:43PM -0700, Jakub Kicinski wrote: > > Could we just say that at the start we expose only existing SKB fields > (csum, hash, mark) and the meaning of the is the same as in the SKB? what would be the meaning of 'hash' ? Over which fields? Does it support inner and

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Alexei Starovoitov
On Fri, Jul 06, 2018 at 05:08:47PM -0700, Jakub Kicinski wrote: > On Fri, 6 Jul 2018 16:42:51 -0700, Alexei Starovoitov wrote: > > On Fri, Jul 06, 2018 at 02:33:58PM -0700, Jakub Kicinski wrote: > > > On Fri, 6 Jul 2018 09:30:42 -0700, Alexei Starovoitov wrote: > > > > On Thu, Jul 05, 2018 at

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Alexei Starovoitov
On Fri, Jul 06, 2018 at 11:49:55PM +, Waskiewicz Jr, Peter wrote: > On Fri, 2018-07-06 at 16:38 -0700, Alexei Starovoitov wrote: > > On Fri, Jul 06, 2018 at 08:44:24PM +, Waskiewicz Jr, Peter wrote: > > > On Fri, 2018-07-06 at 09:30 -0700, Alexei Starovoitov wrote: > > > > On Thu, Jul 05,

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Jakub Kicinski
On Fri, 6 Jul 2018 23:49:55 +, Waskiewicz Jr, Peter wrote: > On Fri, 2018-07-06 at 16:38 -0700, Alexei Starovoitov wrote: > > On Fri, Jul 06, 2018 at 08:44:24PM +, Waskiewicz Jr, Peter wrote: > > > On Fri, 2018-07-06 at 09:30 -0700, Alexei Starovoitov wrote: > > > > On Thu, Jul 05,

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Jakub Kicinski
On Fri, 6 Jul 2018 16:42:51 -0700, Alexei Starovoitov wrote: > On Fri, Jul 06, 2018 at 02:33:58PM -0700, Jakub Kicinski wrote: > > On Fri, 6 Jul 2018 09:30:42 -0700, Alexei Starovoitov wrote: > > > On Thu, Jul 05, 2018 at 10:18:23AM -0700, Jakub Kicinski wrote: > > > > > > > > I'm also not

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Waskiewicz Jr, Peter
On Fri, 2018-07-06 at 16:38 -0700, Alexei Starovoitov wrote: > On Fri, Jul 06, 2018 at 08:44:24PM +, Waskiewicz Jr, Peter wrote: > > On Fri, 2018-07-06 at 09:30 -0700, Alexei Starovoitov wrote: > > > On Thu, Jul 05, 2018 at 10:18:23AM -0700, Jakub Kicinski wrote: > > > > > > > > I'm also not

Re: [PATCH bpf-next v2 0/6] nfp: bpf: add multiplication and divide support on NFP JIT

2018-07-06 Thread Daniel Borkmann
On 07/07/2018 12:13 AM, Jakub Kicinski wrote: > Jiong says: > > NFP supports u16 and u32 multiplication. Multiplication is done 8-bits per > step, therefore we need 2 steps for u16 and 4 steps for u32. > > We also need one start instruction to initialize the sequence and one or > two

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Alexei Starovoitov
On Fri, Jul 06, 2018 at 02:33:58PM -0700, Jakub Kicinski wrote: > On Fri, 6 Jul 2018 09:30:42 -0700, Alexei Starovoitov wrote: > > On Thu, Jul 05, 2018 at 10:18:23AM -0700, Jakub Kicinski wrote: > > > > > > I'm also not 100% on board with the argument that "future" FW can > > > reshuffle things

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Alexei Starovoitov
On Fri, Jul 06, 2018 at 08:44:24PM +, Waskiewicz Jr, Peter wrote: > On Fri, 2018-07-06 at 09:30 -0700, Alexei Starovoitov wrote: > > On Thu, Jul 05, 2018 at 10:18:23AM -0700, Jakub Kicinski wrote: > > > > > > I'm also not 100% on board with the argument that "future" FW can > > > reshuffle

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: Crash due to destroying TCP request sockets using SOCK_DESTROY

2018-07-06 Thread Subash Abhinov Kasiviswanathan
Looks like for a TCP_NEW_SYN_RECV socket, sock_diag_destroy essentially ends up doing: struct request_sock *req = inet_reqsk(sk); local_bh_disable(); inet_csk_reqsk_queue_drop_and_put(req->rsk_listener,

Re: [PATCH v12 01/10] dt-bindings: Add Cavium Octeon Common Ethernet Interface.

2018-07-06 Thread Andrew Lunn
On Fri, Jul 06, 2018 at 05:10:39PM -0500, Steven J. Hill wrote: > On 06/28/2018 03:35 AM, Andrew Lunn wrote: > > > >> +- cavium,rx-clk-delay-bypass: Set to <1> to bypass the rx clock delay > >> setting. > >> + Needed by the Micrel PHY. > > > > Could you explain this some more. Is it anything

[PATCH bpf-next v2 6/6] nfp: bpf: migrate to advanced reciprocal divide in reciprocal_div.h

2018-07-06 Thread Jakub Kicinski
From: Jiong Wang As we are doing JIT, we would want to use the advanced version of the reciprocal divide (reciprocal_value_adv) to trade performance with host. We could reduce the required ALU instructions from 4 to 2 or 1. Signed-off-by: Jiong Wang Reviewed-by: Jakub Kicinski ---

[PATCH bpf-next v2 3/6] nfp: bpf: copy range info for all operands of all ALU operations

2018-07-06 Thread Jakub Kicinski
From: Jiong Wang NFP verifier hook is coping range information of the shift amount for indirect shift operation so optimized shift sequences could be generated. We want to use range info to do more things. For example, to decide whether multiplication and divide are supported on the given

[PATCH bpf-next v2 5/6] nfp: bpf: support u32 divide using reciprocal_div.h

2018-07-06 Thread Jakub Kicinski
From: Jiong Wang NFP doesn't have integer divide instruction, this patch use reciprocal algorithm (the basic one, reciprocal_div) to emulate it. For each u32 divide, we would need 11 instructions to finish the operation. 7 (for multiplication) + 4 (various ALUs) = 11 Given NFP only supports

[PATCH bpf-next v2 4/6] nfp: bpf: support u16 and u32 multiplications

2018-07-06 Thread Jakub Kicinski
From: Jiong Wang NFP supports u16 and u32 multiplication. Multiplication is done 8-bits per step, therefore we need 2 steps for u16 and 4 steps for u32. We also need one start instruction to initialize the sequence and one or two instructions to fetch the result depending on either you need the

[PATCH bpf-next v2 1/6] lib: reciprocal_div: implement the improved algorithm on the paper mentioned

2018-07-06 Thread Jakub Kicinski
From: Jiong Wang The new added "reciprocal_value_adv" implements the advanced version of the algorithm described in Figure 4.2 of the paper except when "divisor > (1U << 31)" whose ceil(log2(d)) result will be 32 which then requires u128 divide on host. The exception case could be easily handled

[PATCH bpf-next v2 0/6] nfp: bpf: add multiplication and divide support on NFP JIT

2018-07-06 Thread Jakub Kicinski
Jiong says: NFP supports u16 and u32 multiplication. Multiplication is done 8-bits per step, therefore we need 2 steps for u16 and 4 steps for u32. We also need one start instruction to initialize the sequence and one or two instructions to fetch the result depending on either you need the high

[PATCH bpf-next v2 2/6] nfp: bpf: rename umin/umax to umin_src/umax_src

2018-07-06 Thread Jakub Kicinski
From: Jiong Wang The two fields are a copy of umin and umax info of bpf_insn->src_reg generated by verifier. Rename to make their meaning clear. Signed-off-by: Jiong Wang Reviewed-by: Jakub Kicinski Acked-by: Song Liu --- drivers/net/ethernet/netronome/nfp/bpf/jit.c | 12 ++--

Re: [PATCH v12 01/10] dt-bindings: Add Cavium Octeon Common Ethernet Interface.

2018-07-06 Thread Steven J. Hill
On 06/28/2018 03:35 AM, Andrew Lunn wrote: > >> +- cavium,rx-clk-delay-bypass: Set to <1> to bypass the rx clock delay >> setting. >> + Needed by the Micrel PHY. > > Could you explain this some more. Is it anything to do with RGMII delays? > Andrew, One of my colleagues tracked this down for

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

2018-07-06 Thread Jesus Sanchez-Palencia
Hi Stephen, On 07/06/2018 02:32 PM, Stephen Hemminger wrote: > >> diff --git a/tc/q_etf.c b/tc/q_etf.c >> new file mode 100644 >> index ..5db1dd6f >> --- /dev/null >> +++ b/tc/q_etf.c >> @@ -0,0 +1,168 @@ >> +/* >> + * q_etf.c Earliest TxTime First (ETF). >> + * >> + *

Re: Fw: [Bug 200215] New: UBSAN: Undefined behaviour in net/core/sock.c:LINE

2018-07-06 Thread Eric Dumazet
On 07/06/2018 02:24 PM, Stephen Hemminger wrote: > > > Begin forwarded message: > > Date: Sat, 23 Jun 2018 00:00:25 + > From: bugzilla-dae...@bugzilla.kernel.org > To: step...@networkplumber.org > Subject: [Bug 200215] New: UBSAN: Undefined behaviour in net/core/sock.c:LINE > > >

Re: [PATCH v2 net-next 00/14] Scheduled packet Transmission: ETF

2018-07-06 Thread Stephen Hemminger
On Tue, 3 Jul 2018 15:42:46 -0700 Jesus Sanchez-Palencia wrote: > Changes since v1: > - moved struct sock_txtime from socket.h to uapi net_tstamp.h; > - sk_clockid was changed from u16 to u8; > - sk_txtime_flags was changed from u16 to a u8 bit field in struct sock; > - the socket

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Jakub Kicinski
On Fri, 6 Jul 2018 09:30:42 -0700, Alexei Starovoitov wrote: > On Thu, Jul 05, 2018 at 10:18:23AM -0700, Jakub Kicinski wrote: > > > > I'm also not 100% on board with the argument that "future" FW can > > reshuffle things whatever way it wants to. Is the assumption that > > future ASICs/FW will

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

2018-07-06 Thread Stephen Hemminger
> diff --git a/tc/q_etf.c b/tc/q_etf.c > new file mode 100644 > index ..5db1dd6f > --- /dev/null > +++ b/tc/q_etf.c > @@ -0,0 +1,168 @@ > +/* > + * q_etf.c Earliest TxTime First (ETF). > + * > + * This program is free software; you can redistribute it and/or > + *

Fw: [Bug 200315] New: [Regression] Wired network does not come back after reboot

2018-07-06 Thread Stephen Hemminger
Begin forwarded message: Date: Thu, 28 Jun 2018 01:59:30 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 200315] New: [Regression] Wired network does not come back after reboot https://bugzilla.kernel.org/show_bug.cgi?id=200315 Bug

Fw: [Bug 200215] New: UBSAN: Undefined behaviour in net/core/sock.c:LINE

2018-07-06 Thread Stephen Hemminger
Begin forwarded message: Date: Sat, 23 Jun 2018 00:00:25 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 200215] New: UBSAN: Undefined behaviour in net/core/sock.c:LINE https://bugzilla.kernel.org/show_bug.cgi?id=200215 Bug ID: 200215

Re: [PATCH v1 net-next 9/9] lan743x: Add PTP support

2018-07-06 Thread Richard Cochran
On Thu, Jul 05, 2018 at 12:39:26PM -0400, Bryan Whitehead wrote: > Signed-off-by: Bryan Whitehead 1. You forgot the commit message. 2. You forgot to add the PTP maintainer on CC. Thanks, Richard

Fw: [Bug 200239] New: RTL8211E lockup when having heavy tx traffic

2018-07-06 Thread Stephen Hemminger
Begin forwarded message: Date: Sun, 24 Jun 2018 10:26:02 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 200239] New: RTL8211E lockup when having heavy tx traffic https://bugzilla.kernel.org/show_bug.cgi?id=200239 Bug ID: 200239

Fw: [Bug 200033] stack-out-of-bounds in __xfrm_dst_hash net/xfrm/xfrm_hash.h

2018-07-06 Thread Stephen Hemminger
Begin forwarded message: Date: Sat, 23 Jun 2018 14:24:30 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 200033] stack-out-of-bounds in __xfrm_dst_hash net/xfrm/xfrm_hash.h https://bugzilla.kernel.org/show_bug.cgi?id=200033 --- Comment #1 from

Fw: [Bug 200195] New: [Regression] Network does not come back after suspend

2018-07-06 Thread Stephen Hemminger
Begin forwarded message: Date: Fri, 22 Jun 2018 18:04:00 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 200195] New: [Regression] Network does not come back after suspend https://bugzilla.kernel.org/show_bug.cgi?id=200195 Bug ID:

Fw: [Bug 200187] New: UBSAN: Undefined behaviour in net/sunrpc/xprt.c:568

2018-07-06 Thread Stephen Hemminger
Begin forwarded message: Date: Fri, 22 Jun 2018 15:09:48 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 200187] New: UBSAN: Undefined behaviour in net/sunrpc/xprt.c:568 https://bugzilla.kernel.org/show_bug.cgi?id=200187 Bug ID:

Re: [PATCH v1 net-next 9/9] lan743x: Add PTP support

2018-07-06 Thread kbuild test robot
Hi Bryan, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Bryan-Whitehead/lan743x-Add-features-to-lan743x-driver/20180706-051812 config: i386-allmodconfig (attached as .config) compiler: gcc-7 (Debian

Re: [PATCH v1 iproute2 1/2] uapi pkt_sched: Add etf info - DO NOT COMMIT

2018-07-06 Thread Stephen Hemminger
On Wed, 27 Jun 2018 15:09:11 -0700 Jesus Sanchez-Palencia wrote: > This should come from the next uapi headers update. > Sending it now just as a convenience so anyone can build tc with etf > and taprio support. > > Signed-off-by: Jesus Sanchez-Palencia This should be targeted at

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Waskiewicz Jr, Peter
On Fri, 2018-07-06 at 09:30 -0700, Alexei Starovoitov wrote: > On Thu, Jul 05, 2018 at 10:18:23AM -0700, Jakub Kicinski wrote: > > > > I'm also not 100% on board with the argument that "future" FW can > > reshuffle things whatever way it wants to. Is the assumption that > > future ASICs/FW will

[PATCH net 1/2] net/sched: act_csum: fix NULL dereference when 'goto chain' is used

2018-07-06 Thread Davide Caratti
the control action in the common member of struct tcf_csum must be a valid value, as it can contain the chain index when 'goto chain' is used. Ensure that the control action can be read as x->tcfa_action, when x is a pointer to struct tc_action and x->ops->type is TCA_ACT_CSUM, to prevent the

[PATCH net 2/2] net/sched: act_tunnel_key: fix NULL dereference when 'goto chain' is used

2018-07-06 Thread Davide Caratti
the control action in the common member of struct tcf_tunnel_key must be a valid value, as it can contain the chain index when 'goto chain' is used. Ensure that the control action can be read as x->tcfa_action, when x is a pointer to struct tc_action and x->ops->type is TCA_ACT_TUNNEL_KEY, to

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

2018-07-06 Thread Davide Caratti
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 the above actions. Since this race condition is tolerated on the

[PATCH V2 net-next] liquidio: fix kernel panic when NIC firmware is older than 1.7.2

2018-07-06 Thread Felix Manlunas
From: Rick Farrington Pre-1.7.2 NIC firmware does not support (and does not respond to) the "get speed" command which is sent by the 1.7.2 driver (for CN23XX-225 cards only) during modprobe. Due to a bug in older firmware (with respect to unknown commands), this unsupported command causes a

Re: [PATCH net-next 0/6] sock cookie initializers

2018-07-06 Thread Willem de Bruijn
On Fri, Jul 6, 2018 at 1:24 PM Jesus Sanchez-Palencia wrote: > > > > On 07/06/2018 07:12 AM, Willem de Bruijn wrote: > > From: Willem de Bruijn > > > > Recent UDP GSO and SO_TXTIME features added new fields to cookie > > structs. > > > > When adding a field, all sites where a struct is

Re: [PATCH v2 net-next 1/3] rds: Changing IP address internal representation to struct in6_addr

2018-07-06 Thread Santosh Shilimkar
Hi Ka-Cheong, On 7/6/2018 8:25 AM, Sowmini Varadhan wrote: On (07/06/18 23:08), Ka-Cheong Poon wrote: As mentioned in a previous mail, it is unclear why the port number is transport specific. Most Internet services use the same port number running over TCP/UDP as shown in the IANA database.

Re: [PATCH net-next 0/6] sock cookie initializers

2018-07-06 Thread Jesus Sanchez-Palencia
On 07/06/2018 07:12 AM, Willem de Bruijn wrote: > From: Willem de Bruijn > > Recent UDP GSO and SO_TXTIME features added new fields to cookie > structs. > > When adding a field, all sites where a struct is initialized have to > be updated, which is a lot of boilerplate. Alternatively, a

[PATCH net-next 3/3] net: refactor dequeue-model list processing

2018-07-06 Thread Edward Cree
New macro list_for_each_entry_dequeue loops over a list by popping entries from the head, allowing a more concise expression of the dequeue-enqueue model of list processing and avoiding the need for a 'next' pointer (as used in list_for_each_entry_safe). Signed-off-by: Edward Cree ---

[PATCH net-next 1/3] net: core: fix uses-after-free in list processing

2018-07-06 Thread Edward Cree
In netif_receive_skb_list_internal(), all of skb_defer_rx_timestamp(), do_xdp_generic() and enqueue_to_backlog() can lead to kfree(skb). Thus, we cannot wait until after they return to remove the skb from the list; instead, we remove it first and, in the pass case, add it to a sublist

[PATCH net-next 2/3] netfilter: fix use-after-free in NF_HOOK_LIST

2018-07-06 Thread Edward Cree
nf_hook() can free the skb, so we need to remove it from the list before calling, and add passed skbs to a sublist afterwards. Fixes: 17266ee93984 ("net: ipv4: listified version of ip_rcv") Reported-by: Dan Carpenter Signed-off-by: Edward Cree --- include/linux/netfilter.h | 10 +++--- 1

[PATCH net-next 0/3] fix use-after-free bugs in skb list processing

2018-07-06 Thread Edward Cree
A couple of bugs in skb list handling were spotted by Dan Carpenter, with the help of Smatch; following up on them I found a couple more similar cases. This series fixes them by changing the relevant loops to use the dequeue-enqueue model (rather than in-place list modification), and then

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-06 Thread Alexei Starovoitov
On Thu, Jul 05, 2018 at 10:18:23AM -0700, Jakub Kicinski wrote: > > I'm also not 100% on board with the argument that "future" FW can > reshuffle things whatever way it wants to. Is the assumption that > future ASICs/FW will be designed to always use the "blessed" BTF > format? Or will it be

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 net 1/3] net/ipv6: fix addrconf_sysctl_addr_gen_mode

2018-07-06 Thread Sabrina Dubroca
2018-07-06, 09:28:48 -0600, David Ahern wrote: > 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 >

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 bpf-next 11/11] tools: bpftool: allow reuse of maps with bpftool prog load

2018-07-06 Thread Jakub Kicinski
On Fri, 6 Jul 2018 09:16:24 +0200, Daniel Borkmann wrote: > On 07/06/2018 12:57 AM, Jakub Kicinski wrote: > > On Thu, 5 Jul 2018 10:35:24 +0200, Daniel Borkmann wrote: > >> On 07/04/2018 04:54 AM, Jakub Kicinski wrote: > >>> Add map parameter to prog load which will allow reuse of existing >

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/addrconf.c >>> +++ b/net/ipv6/addrconf.c

Re: [PATCH v2 net-next 1/3] rds: Changing IP address internal representation to struct in6_addr

2018-07-06 Thread Sowmini Varadhan
On (07/06/18 23:08), Ka-Cheong Poon wrote: > > As mentioned in a previous mail, it is unclear why the > port number is transport specific. Most Internet services > use the same port number running over TCP/UDP as shown > in the IANA database. And the IANA RDS registration is > the same. What

Re: [PATCH v2 net-next 0/3] rds: IPv6 support

2018-07-06 Thread Sowmini Varadhan
On (07/06/18 22:36), Ka-Cheong Poon wrote: > This patch series does not change existing behavior. But > I think this is a strange RDS semantics as it differs from > other types of socket. But this is not about IPv6 support > and can be dealt with later. sure, > > Since we are choosing to

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

2018-07-06 Thread Jakub Kicinski
On Fri, Jul 6, 2018 at 6:32 AM, Roman Mashak wrote: > Jakub Kicinski writes: > >> 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

Re: [PATCH v2 net-next 1/3] rds: Changing IP address internal representation to struct in6_addr

2018-07-06 Thread Ka-Cheong Poon
On 07/06/2018 06:15 PM, Sowmini Varadhan wrote: On (07/06/18 17:08), Ka-Cheong Poon wrote: Hmm. Why do you need to include tcp header in ib transport code ? If there is any common function just move to core common file and use it. I think it can be removed as it is left over from earlier

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

2018-07-06 Thread Sabrina Dubroca
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/addrconf.c > > +++ b/net/ipv6/addrconf.c > > @@ -5892,32 +5892,31 @@ static int

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 v2 net-next 1/3] rds: Changing IP address internal representation to struct in6_addr

2018-07-06 Thread santosh.shilim...@oracle.com
On 7/6/18 2:08 AM, Ka-Cheong Poon wrote: On 07/06/2018 01:58 AM, Santosh Shilimkar wrote: diff --git a/net/rds/connection.c b/net/rds/connection.c index abef75d..ca72563 100644 --- a/net/rds/connection.c +++ b/net/rds/connection.c @@ -142,9 +151,12 @@ static void

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

2018-07-06 Thread David Ahern
On 7/6/18 7:49 AM, Sabrina Dubroca wrote: > inet6_ifla6_size() is called to check how much space is needed by > inet6_fill_link_af() and inet6_fill_ifinfo(), both of which include > the IFLA_INET6_ADDR_GEN_MODE attribute. Reserve some room for it. > > Fixes: bc91b0f07ada ("ipv6: addrconf:

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
On 7/6/18 7:49 AM, Sabrina Dubroca wrote: > The value has already been copied from this netns's devconf_dflt, it > shouldn't be reset to the global kernel default. > > Fixes: d35a00b8e33d ("net/ipv6: allow sysctl to change link-local address > generation mode") > Signed-off-by: Sabrina Dubroca

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: [RFC PATCH] ip: re-introduce fragments cache worker

2018-07-06 Thread Eric Dumazet
On 07/06/2018 06:56 AM, Paolo Abeni wrote: > With: > > schedule_work_on(smp_processor_id(), #... ) > > We can be sure to run exclusively on the cpu handling the RX queue even with > the worker. > Make sure to test your patch with 16 RX queues (16 cpus) feeding the defrag unit. In this

Re: [PATCH v2 net-next 0/3] rds: IPv6 support

2018-07-06 Thread Ka-Cheong Poon
On 07/06/2018 01:44 AM, Sowmini Varadhan wrote: - rds_getname(): one of the existing properties of PF_RDS is that a connect() does not involve an implicit bind(). Note that you are basing the changes in rds_bind() on this behavior, thus I guess we make the choice of treating this as a

Re: [RFC PATCH] ip: re-introduce fragments cache worker

2018-07-06 Thread Eric Dumazet
On 07/06/2018 06:56 AM, Paolo Abeni wrote: > On Fri, 2018-07-06 at 05:09 -0700, Eric Dumazet wrote: >> On 07/06/2018 04:56 AM, Paolo Abeni wrote: >>> With your setting, you need a bit more concurrent connections (400 ?) >>> to saturate the ipfrag cache. Above that number, performances will >>>

[PATCH net-next 5/6] ip: remove tx_flags from ipcm_cookie and use same logic for v4 and v6

2018-07-06 Thread Willem de Bruijn
From: Willem de Bruijn skb_shinfo(skb)->tx_flags is derived from sk->sk_tsflags, possibly after modification by __sock_cmsg_send, by calling sock_tx_timestamp. The IPv4 and IPv6 paths do this conversion differently. In IPv4, the individual protocols that support tx timestamps call this function

[PATCH net-next 4/6] ipv6: fold sockcm_cookie into ipcm6_cookie

2018-07-06 Thread Willem de Bruijn
From: Willem de Bruijn ipcm_cookie includes sockcm_cookie. Do the same for ipcm6_cookie. This reduces the number of arguments that need to be passed around, applies ipcm6_init to all cookie fields at once and reduces code differentiation between ipv4 and ipv6. Signed-off-by: Willem de Bruijn

[PATCH net-next 1/6] ipv4: ipcm_cookie initializers

2018-07-06 Thread Willem de Bruijn
From: Willem de Bruijn Initialize the cookie in one location to reduce code duplication and avoid bugs from inconsistent initialization, such as that fixed in commit 9887cba19978 ("ip: limit use of gso_size to udp"). Signed-off-by: Willem de Bruijn --- include/net/ip.h | 15

[PATCH net-next 2/6] ipv6: ipcm6_cookie initializer

2018-07-06 Thread Willem de Bruijn
From: Willem de Bruijn Initialize the cookie in one location to reduce code duplication and avoid bugs from inconsistent initialization, such as that fixed in commit 9887cba19978 ("ip: limit use of gso_size to udp"). Signed-off-by: Willem de Bruijn --- include/net/ipv6.h | 19

[PATCH net-next 6/6] ip: unconditionally set cork gso_size

2018-07-06 Thread Willem de Bruijn
From: Willem de Bruijn Now that ipc(6)->gso_size is correctly initialized in all callers of ip(6)_setup_cork, it is safe to unconditionally pass it to the cork. Link: http://lkml.kernel.org/r/20180619164752.143249-1-willemdebruijn.ker...@gmail.com Signed-off-by: Willem de Bruijn ---

[PATCH net-next 3/6] sock: sockc cookie initializer

2018-07-06 Thread Willem de Bruijn
From: Willem de Bruijn Initialize the cookie in one location to reduce code duplication and avoid bugs from inconsistent initialization, such as that fixed in commit 9887cba19978 ("ip: limit use of gso_size to udp"). Signed-off-by: Willem de Bruijn --- include/net/sock.h | 6 ++

[PATCH net-next 0/6] sock cookie initializers

2018-07-06 Thread Willem de Bruijn
From: Willem de Bruijn Recent UDP GSO and SO_TXTIME features added new fields to cookie structs. When adding a field, all sites where a struct is initialized have to be updated, which is a lot of boilerplate. Alternatively, a field can be initialized selectively, but this is fragile. I

Re: [PATCH v1 net-next 6/9] lan743x: Add power management support

2018-07-06 Thread kbuild test robot
Hi Bryan, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Bryan-Whitehead/lan743x-Add-features-to-lan743x-driver/20180706-051812 config: alpha-allmodconfig (attached as .config) compiler: alpha-linux

Re: [RFC PATCH] ip: re-introduce fragments cache worker

2018-07-06 Thread Paolo Abeni
On Fri, 2018-07-06 at 05:09 -0700, Eric Dumazet wrote: > On 07/06/2018 04:56 AM, Paolo Abeni wrote: > > With your setting, you need a bit more concurrent connections (400 ?) > > to saturate the ipfrag cache. Above that number, performances will > > still sink. > > Maybe, but IP defrag can not be

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

2018-07-06 Thread Sabrina Dubroca
The value has already been copied from this netns's devconf_dflt, it shouldn't be reset to the global kernel default. Fixes: d35a00b8e33d ("net/ipv6: allow sysctl to change link-local address generation mode") Signed-off-by: Sabrina Dubroca --- net/ipv6/addrconf.c | 2 -- 1 file changed, 2

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

2018-07-06 Thread Sabrina Dubroca
addrconf_sysctl_addr_gen_mode() has multiple problems. First, it ignores the errors returned by proc_dointvec(). addrconf_sysctl_addr_gen_mode() calls proc_dointvec() directly, which writes the value to memory, and then checks if it's valid and may return EINVAL. If a bad value is given, the

[PATCH net 0/3] net/ipv6: addr_gen_mode fixes

2018-07-06 Thread Sabrina Dubroca
This series fixes bugs in handling of the addr_gen_mode option, mainly related to the sysctl. A minor netlink issue was also present in the initial commit introducing the option on a per-netdevice basis. Sabrina Dubroca (3): net/ipv6: fix addrconf_sysctl_addr_gen_mode net/ipv6: don't

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

2018-07-06 Thread Sabrina Dubroca
inet6_ifla6_size() is called to check how much space is needed by inet6_fill_link_af() and inet6_fill_ifinfo(), both of which include the IFLA_INET6_ADDR_GEN_MODE attribute. Reserve some room for it. Fixes: bc91b0f07ada ("ipv6: addrconf: implement address generation modes") Signed-off-by: Sabrina

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

2018-07-06 Thread Roman Mashak
Jakub Kicinski writes: > 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 external > # tc qdisc

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

2018-07-06 Thread Georg Kohmann
When a ICMPV6_PKT_TOOBIG is received from a link local address the pmtu will be updated on a route with an arbitrary interface index. Subsequent packets sent back to the same link local address may therefore end up not considering the updated pmtu. Current behavior breaks TAHI v6LC4.1.4

Re: [RFC PATCH] ip: re-introduce fragments cache worker

2018-07-06 Thread Eric Dumazet
On 07/06/2018 04:56 AM, Paolo Abeni wrote: > Hi, > > On Fri, 2018-07-06 at 04:23 -0700, Eric Dumazet wrote: >> Ho hum. No please. >> >> I do not think adding back a GC is wise, since my patches were going in the >> direction >> of allowing us to increase limits on current hardware. >> >>

Re: [RFC PATCH] ip: re-introduce fragments cache worker

2018-07-06 Thread Paolo Abeni
Hi, On Fri, 2018-07-06 at 04:23 -0700, Eric Dumazet wrote: > Ho hum. No please. > > I do not think adding back a GC is wise, since my patches were going in the > direction > of allowing us to increase limits on current hardware. > > Meaning that the amount of frags to evict would be quite big

Re: [RFC PATCH] ip: re-introduce fragments cache worker

2018-07-06 Thread Eric Dumazet
On 07/06/2018 03:10 AM, Paolo Abeni wrote: > Currently, the ip frag cache is fragile to overload. With > flow control disabled: > > ./super_netperf.sh 10 -H 192.168.101.2 -t UDP_STREAM -l 60 > 9618.08 > ./super_netperf.sh 200 -H 192.168.101.2 -t UDP_STREAM -l 60 > 28.66 > > Once that the

[PATCH net-next 2/2] net/sched: act_skbedit: don't use spinlock in the data path

2018-07-06 Thread Davide Caratti
use RCU instead of spin_{,un}lock_bh, to protect concurrent read/write on act_skbedit configuration. This reduces the effects of contention in the data path, in case multiple readers are present. Signed-off-by: Davide Caratti --- include/net/tc_act/tc_skbedit.h | 37 ---

[PATCH net-next 1/2] net/sched: skbedit: use per-cpu counters

2018-07-06 Thread Davide Caratti
use per-CPU counters, instead of sharing a single set of stats with all cores: this removes the need of spinlocks when stats are read/updated. Signed-off-by: Davide Caratti --- net/sched/act_skbedit.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH net-next 0/2] net/sched: act_skbedit: lockless data path

2018-07-06 Thread Davide Caratti
the data path of act_skbedit can be faster if we avoid using spinlocks: - patch 1 converts act_skbedit statistics to use per-cpu counters - patch 2 lets act_skbedit use RCU to read/update its configuration test procedure (using pktgen from https://github.com/netoptimizer): # ip link add name

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

2018-07-06 Thread Paolo Abeni
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, such assignment had a different role: prevent concurrent eviction

[PATCH net-next 03/10] net: hns3: Fix for waterline not setting correctly

2018-07-06 Thread Salil Mehta
From: Yunsheng Lin The HCLGE_RX_PRIV_EN_B is used to tell the firmware whether to update the specific waterline value, if the is not set, the firmware will ignore the value. This patch fixes by setting the HCLGE_RX_PRIV_EN_B even if the updated value is zero. Fixes: 46a3df9f9718 ("net: hns3:

Re: Crash due to destroying TCP request sockets using SOCK_DESTROY

2018-07-06 Thread Eric Dumazet
On 07/05/2018 09:46 PM, Lorenzo Colitti wrote: > On Fri, Jul 6, 2018 at 11:37 AM Subash Abhinov Kasiviswanathan > wrote: >> >> From the call stack, a TCP socket is being destroyed using netlink_diag. >> The memory dump showed that the socket was an inet request socket (in >> state

Re: [PATCH v2 net-next 1/3] rds: Changing IP address internal representation to struct in6_addr

2018-07-06 Thread Sowmini Varadhan
On (07/06/18 17:08), Ka-Cheong Poon wrote: > >Hmm. Why do you need to include tcp header in ib transport > >code ? If there is any common function just move to core > >common file and use it. > > I think it can be removed as it is left over from earlier > changes when the IB IPv6 listener port

[RFC PATCH] ip: re-introduce fragments cache worker

2018-07-06 Thread Paolo Abeni
Currently, the ip frag cache is fragile to overload. With flow control disabled: ./super_netperf.sh 10 -H 192.168.101.2 -t UDP_STREAM -l 60 9618.08 ./super_netperf.sh 200 -H 192.168.101.2 -t UDP_STREAM -l 60 28.66 Once that the overload condition is reached, the system does not recover until

  1   2   >