Re: [RFC PATCH net-next 00/12] selftests: forwarding: Add VRF-based tests

2018-01-15 Thread Ido Schimmel
On Mon, Jan 15, 2018 at 04:48:25PM -0700, David Ahern wrote: > On 1/15/18 4:17 PM, Jiri Pirko wrote: > >> A couple of feature requests: > >> 1. an option to pause on any error to allow inspection of the setup > > > > Good idea. Should be easy to add. > > Here is a snippet from my vrf test

Re: KASAN: slab-out-of-bounds Write in tcp_v6_syn_recv_sock

2018-01-15 Thread Dmitry Vyukov
On Thu, Jan 4, 2018 at 12:31 AM, Cong Wang wrote: > On Wed, Jan 3, 2018 at 12:55 PM, Ozgur wrote: >> >> >> 03.01.2018, 21:57, "Cong Wang" : >>> On Tue, Jan 2, 2018 at 3:58 PM, syzbot >>>

Re: [PATCH] Remove structure passing and assignment to save stack and no coping structures.

2018-01-15 Thread kbuild test robot
Hi Karim, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.15-rc8 next-20180115] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci

Re: [Patch net v3] tun: fix a memory leak for tfile->tx_array

2018-01-15 Thread Cong Wang
On Mon, Jan 15, 2018 at 10:37 PM, Jason Wang wrote: > > > On 2018年01月16日 14:33, Cong Wang wrote: >> But __tun_detach(true) is not a hot path, a memset() doesn't harm >> anything. > > > Yes, but it looks more more like a workaround or trick to me. > I'd blame skb_array API

Re: [PATCH net-next] net: sched: fix use before alloc of per cpu stats

2018-01-15 Thread Cong Wang
On Mon, Jan 15, 2018 at 10:33 PM, Prashant Bhole wrote: > Pardon my ignorance, I think it is necessary to forward d59f5ffa59d8 to > -net. Because previously flags were set during init and checked after init > to allocate memory. static_flags makes the flags

Re: [Patch net v3] tun: fix a memory leak for tfile->tx_array

2018-01-15 Thread Jason Wang
On 2018年01月16日 14:33, Cong Wang wrote: On Mon, Jan 15, 2018 at 10:12 PM, Jason Wang wrote: On 2018年01月16日 14:07, Cong Wang wrote: On Mon, Jan 15, 2018 at 10:00 PM, Jason Wang wrote: I mean we can leave __tun_detach() as is, and just add the

Re: [PATCH net-next] net: sched: fix use before alloc of per cpu stats

2018-01-15 Thread Prashant Bhole
On 1/16/2018 2:57 PM, Cong Wang wrote: On Mon, Jan 15, 2018 at 9:47 PM, Prashant Bhole wrote: On 1/16/2018 2:08 PM, Cong Wang wrote: On Sun, Jan 14, 2018 at 9:52 PM, Prashant Bhole wrote: About bug: During init of

Re: [Patch net v3] tun: fix a memory leak for tfile->tx_array

2018-01-15 Thread Cong Wang
On Mon, Jan 15, 2018 at 10:12 PM, Jason Wang wrote: > > > On 2018年01月16日 14:07, Cong Wang wrote: >> >> On Mon, Jan 15, 2018 at 10:00 PM, Jason Wang wrote: >>> >>> I mean we can leave __tun_detach() as is, and just add the cleanup to >>> tun_detach_all().

Re: [PATCH net-next 2/2] net: sched: add xfrm policy ematch

2018-01-15 Thread Cong Wang
On Fri, Jan 12, 2018 at 4:57 AM, Eyal Birger wrote: > +static void em_policy_destroy(struct tcf_ematch *em) > +{ > + const struct xt_policy_info *info = (const void *)em->data; > + > + if (!info) > + return; > + > + kfree((void *)em->data); >

Re: [PATCH net-next v5 2/4] phy: cp110-comphy: 2.5G SGMII mode

2018-01-15 Thread Kishon Vijay Abraham I
On Friday 12 January 2018 01:21 PM, Antoine Tenart wrote: > This patch allow the CP100 comphy to configure some lanes in the > 2.5G SGMII mode. This mode is quite close to SGMII and uses nearly the > same code path. > > Signed-off-by: Antoine Tenart

Re: [PATCH net-next v5 1/4] phy: add 2.5G SGMII mode to the phy_mode enum

2018-01-15 Thread Kishon Vijay Abraham I
On Tuesday 16 January 2018 12:51 AM, David Miller wrote: > From: Antoine Tenart > Date: Fri, 12 Jan 2018 08:51:27 +0100 > >> This patch adds one more generic PHY mode to the phy_mode enum, to allow >> configuring generic PHYs to the 2.5G SGMII mode by using

Re: [Patch net v3] tun: fix a memory leak for tfile->tx_array

2018-01-15 Thread Jason Wang
On 2018年01月16日 14:07, Cong Wang wrote: On Mon, Jan 15, 2018 at 10:00 PM, Jason Wang wrote: I mean we can leave __tun_detach() as is, and just add the cleanup to tun_detach_all(). This is because in both cases, we're sure skb array has been initialized before. Oh, I

Re: [PATCH net] sctp: return error if the asoc has been peeled off in sctp_wait_for_sndbuf

2018-01-15 Thread Xin Long
On Tue, Jan 16, 2018 at 2:58 AM, Neil Horman wrote: > On Tue, Jan 16, 2018 at 01:20:28AM +0800, Xin Long wrote: >> On Mon, Jan 15, 2018 at 9:06 PM, Neil Horman wrote: >> > On Mon, Jan 15, 2018 at 05:01:36PM +0800, Xin Long wrote: >> >> After commit

Re: [Patch net v3] tun: fix a memory leak for tfile->tx_array

2018-01-15 Thread Cong Wang
On Mon, Jan 15, 2018 at 10:00 PM, Jason Wang wrote: > I mean we can leave __tun_detach() as is, and just add the cleanup to > tun_detach_all(). This is because in both cases, we're sure skb array has > been initialized before. > Oh, I thought the same before sending v3, but

Re: [Patch net v3] tun: fix a memory leak for tfile->tx_array

2018-01-15 Thread Jason Wang
On 2018年01月16日 13:49, Cong Wang wrote: On Mon, Jan 15, 2018 at 9:46 PM, Jason Wang wrote: I think then you don't even need the memset trick since we are sure it has been implemented? It doesn't look like sk_alloc() zero's the memory of tfile. Typo, for "implemented"

Re: [PATCH net-next] net: sched: fix use before alloc of per cpu stats

2018-01-15 Thread Cong Wang
On Mon, Jan 15, 2018 at 9:47 PM, Prashant Bhole wrote: > > > On 1/16/2018 2:08 PM, Cong Wang wrote: >> >> On Sun, Jan 14, 2018 at 9:52 PM, Prashant Bhole >> wrote: >>> >>> About bug: >>> During init of clsact/ingress, it links

Re: [Patch net v3] tun: fix a memory leak for tfile->tx_array

2018-01-15 Thread Cong Wang
On Mon, Jan 15, 2018 at 9:46 PM, Jason Wang wrote: > > > I think then you don't even need the memset trick since we are sure it has > been implemented? It doesn't look like sk_alloc() zero's the memory of tfile.

Re: [PATCH net-next] net: sched: fix use before alloc of per cpu stats

2018-01-15 Thread Prashant Bhole
On 1/16/2018 2:08 PM, Cong Wang wrote: On Sun, Jan 14, 2018 at 9:52 PM, Prashant Bhole wrote: About bug: During init of clsact/ingress, it links qdisc's cpu_bstats,cpu_qstats with mini qdisc. TCQ_F_CPUSTATS is set in qdisc->flags during init and this flag is

Re: [Patch net v3] tun: fix a memory leak for tfile->tx_array

2018-01-15 Thread Jason Wang
On 2018年01月16日 03:37, Cong Wang wrote: tfile->tun could be detached before we close the tun fd, via tun_detach_all(), so it should not be used to check for tfile->tx_array. As Jason suggested, we probably have to clean it up unconditionally both in __tun_deatch() and tun_detach_all(), but

Re: [PATCH] brcmfmac: Make sure CLM downloading is optional

2018-01-15 Thread Bjorn Andersson
On Mon 15 Jan 11:40 PST 2018, Arend van Spriel wrote: > On 1/15/2018 6:10 PM, Bjorn Andersson wrote: > > The presence of a CLM file is described as optional, but missing the clm > > blob causes the preinit to return unsuccessfully. Fix this by ignoring > > the return value of the

Re: [PATCH net-next] net: sched: fix use before alloc of per cpu stats

2018-01-15 Thread Cong Wang
On Sun, Jan 14, 2018 at 9:52 PM, Prashant Bhole wrote: > About bug: > During init of clsact/ingress, it links qdisc's cpu_bstats,cpu_qstats > with mini qdisc. TCQ_F_CPUSTATS is set in qdisc->flags during init and > this flag is checked after init to allocate

linux-next: manual merge of the akpm tree with the net-next tree

2018-01-15 Thread Stephen Rothwell
Hi Andrew, Today's linux-next merge of the akpm-current tree got a conflict in: net/ipv6/route.c between commit: 6802f3adcb3f ("ipv6: Fix build with gcc-4.4.5") from the net-next tree and patch: "net/ipv6/route.c: work around gcc-4.4.4 anon union initializer issue" from the akpm tree.

Re: KASAN: use-after-free Read in tipc_group_is_open

2018-01-15 Thread Cong Wang
On Mon, Jan 15, 2018 at 7:58 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 594831a8aba3fd045c3212a3e3bb9788c77b989d > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master > compiler: gcc (GCC) 7.1.1

Re: iproute2 net-next

2018-01-15 Thread Jakub Kicinski
On Mon, 15 Jan 2018 19:59:05 -0700, David Ahern wrote: > On 1/15/18 6:56 PM, Marcelo Ricardo Leitner wrote: > > On Fri, Dec 29, 2017 at 08:00:28PM -0800, Stephen Hemminger wrote: > >> On Fri, 29 Dec 2017 09:58:23 +0100 > >> Jiri Pirko wrote: > >> > >>> Fri, Dec 29, 2017 at

Re: iproute2 net-next

2018-01-15 Thread David Ahern
On 1/15/18 6:56 PM, Marcelo Ricardo Leitner wrote: > On Fri, Dec 29, 2017 at 08:00:28PM -0800, Stephen Hemminger wrote: >> On Fri, 29 Dec 2017 09:58:23 +0100 >> Jiri Pirko wrote: >> >>> Fri, Dec 29, 2017 at 12:46:31AM CET, dan...@iogearbox.net wrote: On 12/26/2017 10:35 AM,

Re: [PATCH net-next 2/2] cxgb4: speed up on-chip memory read

2018-01-15 Thread kbuild test robot
Hi Rahul, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Rahul-Lakkireddy/cxgb4-rework-on-chip-memory-read/20180116-050826 reproduce: # apt-get install sparse make ARCH=x86_64

[PATCH bpf] bpf, arm64: fix stack_depth tracking in combination with tail calls

2018-01-15 Thread Daniel Borkmann
Using dynamic stack_depth tracking in arm64 JIT is currently broken in combination with tail calls. In prologue, we cache ctx->stack_size and adjust SP reg for setting up function call stack, and tearing it down again in epilogue. Problem is that when doing a tail call, the cached ctx->stack_size

[PATCH bpf-next v2 03/11] net: sched: cls_flower: propagate extack support for filter offload

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Propagate the extack pointer from the `->change()` classifier operation to the function used for filter replacement in cls_flower, and feed it to tc_cls_common_offload_init(). This makes it possible to use netlink extack messages in the future

[PATCH 3/3] openvswitch: drop GSO packets that are too large

2018-01-15 Thread Daniel Axtens
Open vSwitch attempts to detect if a packet is too large to be sent to the destination device. However, this test does not consider GSO packets, and it is possible that a GSO packet, when resegmented, will be larger than the device can send. Add detection for packets which are too large. We use

[PATCH 0/3] Check gso_size of packets when forwarding

2018-01-15 Thread Daniel Axtens
When regular packets are forwarded, we validate their size against the MTU of the destination device. However, when GSO packets are forwarded, we do not validate their size against the MTU. We implicitly assume that when they are segmented, the resultant packets will be correctly sized. This is

[PATCH bpf-next v2 04/11] net: sched: cls_matchall: propagate extack support for filter offload

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Propagate the extack pointer from the `->change()` classifier operation to the function used for filter replacement in cls_matchall, and feed it to tc_cls_common_offload_init(). This makes it possible to use netlink extack messages in the future

[PATCH 1/3] net: move skb_gso_mac_seglen to skbuff.h

2018-01-15 Thread Daniel Axtens
We're about to use this elsewhere, so move it into the header with the other related functions like skb_gso_network_seglen(). Signed-off-by: Daniel Axtens --- include/linux/skbuff.h | 15 +++ net/sched/sch_tbf.c| 10 -- 2 files changed, 15 insertions(+),

[PATCH 2/3] net: is_skb_forwardable: validate length of GSO packet segments

2018-01-15 Thread Daniel Axtens
is_skb_forwardable attempts to detect if a packet is too large to be sent to the destination device. However, this test does not consider GSO packets, and it is possible that a GSO packet, when resegmented, will be larger than the device can transmit. Add detection for packets which will be too

[PATCH bpf-next v2 05/11] net: sched: cls_u32: propagate extack support for filter offload

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Propagate the extack pointer from the `->change()` classifier operation to the function used for filter replacement in cls_u32, and feed it to tc_cls_common_offload_init(). This makes it possible to use netlink extack messages in the future at

[PATCH bpf-next v2 11/11] selftests/bpf: add checks on extack messages for eBPF hw offload tests

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Add checks to test that netlink extack messages are correctly displayed in some expected error cases for eBPF offload to netdevsim with TC and XDP. iproute2 may be built without libmnl support, in which case the extack messages will not be

[PATCH bpf-next v2 06/11] net: sched: cls_bpf: plumb extack support in filter for hardware offload

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Pass the extack pointer obtained in the `->change()` filter operation to cls_bpf_offload() and then to cls_bpf_offload_cmd(), where it can be used to initialize the new field of tc_cls_common_offload passed to the callback for offload. This

[PATCH bpf-next v2 09/11] nfp: bpf: use extack support to improve debugging

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Use the recently added extack support for eBPF offload in the driver. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/bpf/main.c

[PATCH bpf-next v2 02/11] net: sched: prepare extack support for offload via tc_cls_common_offload

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Prepare for extack support for hardware offload of classifiers. In order to achieve this, a pointer to a struct netlink_ext_ack is added to the struct tc_cls_common_offload that is passed to the callback for setting up the classifier. Function

[PATCH bpf-next v2 07/11] net: sched: create tc_can_offload_extack() wrapper

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Create a wrapper around tc_can_offload() that takes an additional extack pointer argument in order to output an error message if TC offload is disabled on the device. In this way, the error message is handled by the core and can be the same for

[PATCH bpf-next v2 08/11] nfp: bpf: plumb extack into functions related to XDP offload

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Pass a pointer to an extack object to nfp_app_xdp_offload() in order to prepare for extack usage in the nfp driver. Next step will be to forward this extack pointer to nfp_net_bpf_offload(), once this function is able to use it for printing

[PATCH bpf-next v2 01/11] net: sched: add extack support to change() classifier operation

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Add an extra argument to `->change()` operation for passing a pointer to a struct netlink_ext_ack. Update the operation for all classifiers accordingly. Extack is not used at this point. Signed-off-by: Quentin Monnet

[PATCH bpf-next v2 10/11] netdevsim: add extack support for TC eBPF offload

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Use the recently added extack support for TC eBPF filters in netdevsim. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- drivers/net/netdevsim/bpf.c | 35

[PATCH bpf-next v2 00/11] net: sched: add extack support for cls offload

2018-01-15 Thread Jakub Kicinski
Hi! This series adds extack to cls offloads, as such it could arguably be targeted at net-next. Unfortunately, git am is not able to deal cleanly with minor conflicts on the nfp patches.. Since the series is really about cls_bpf I hope it's OK if it went via the bpf-next tree. Quentin says:

Re: [PATCH net-next 1/2] cxgb4: rework on-chip memory read

2018-01-15 Thread kbuild test robot
Hi Rahul, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Rahul-Lakkireddy/cxgb4-rework-on-chip-memory-read/20180116-050826 reproduce: # apt-get install sparse make ARCH=x86_64

Re: iproute2 net-next

2018-01-15 Thread Marcelo Ricardo Leitner
On Fri, Dec 29, 2017 at 08:00:28PM -0800, Stephen Hemminger wrote: > On Fri, 29 Dec 2017 09:58:23 +0100 > Jiri Pirko wrote: > > > Fri, Dec 29, 2017 at 12:46:31AM CET, dan...@iogearbox.net wrote: > > >On 12/26/2017 10:35 AM, Leon Romanovsky wrote: > > >> On Mon, Dec 25, 2017

Re: [PATCH bpf-next] bpftool: recognize BPF_PROG_TYPE_CGROUP_DEVICE programs

2018-01-15 Thread Daniel Borkmann
On 01/15/2018 08:49 PM, Roman Gushchin wrote: > On Mon, Jan 15, 2018 at 07:32:01PM +, Quentin Monnet wrote: >> 2018-01-15 19:16 UTC+ ~ Roman Gushchin >>> Bpftool doesn't recognize BPF_PROG_TYPE_CGROUP_DEVICE programs, >>> so the prog show command prints the numeric type

RE: [patch iproute2 v10 0/2] tc: Add batchsize feature to batch mode

2018-01-15 Thread Chris Mi
> -Original Message- > From: David Ahern [mailto:dsah...@gmail.com] > Sent: Tuesday, January 16, 2018 12:41 AM > To: Chris Mi ; netdev@vger.kernel.org > Cc: gerlitz...@gmail.com; step...@networkplumber.org; > marcelo.leit...@gmail.com; p...@nwl.cc > Subject: Re: [patch

Re: [PATCH bpf-next 11/11] selftests/bpf: add checks on extack messages for eBPF hw offload tests

2018-01-15 Thread Jakub Kicinski
On Mon, 15 Jan 2018 18:02:17 -0700, David Ahern wrote: > On 1/15/18 5:55 PM, Jakub Kicinski wrote: > > On Mon, 15 Jan 2018 17:49:07 -0700, David Ahern wrote: > >> On 1/15/18 5:30 PM, Jakub Kicinski wrote: > >>> A new flag ("--skip-extack") is added to the Python script so as to > >>> allow to

Re: [PATCH bpf-next 11/11] selftests/bpf: add checks on extack messages for eBPF hw offload tests

2018-01-15 Thread David Ahern
On 1/15/18 5:55 PM, Jakub Kicinski wrote: > On Mon, 15 Jan 2018 17:49:07 -0700, David Ahern wrote: >> On 1/15/18 5:30 PM, Jakub Kicinski wrote: >>> A new flag ("--skip-extack") is added to the Python script so as to >>> allow to skip these checks. This is because extack messages cannot be >>>

Re: [PATCH bpf-next 11/11] selftests/bpf: add checks on extack messages for eBPF hw offload tests

2018-01-15 Thread Jakub Kicinski
On Mon, 15 Jan 2018 17:49:07 -0700, David Ahern wrote: > On 1/15/18 5:30 PM, Jakub Kicinski wrote: > > A new flag ("--skip-extack") is added to the Python script so as to > > allow to skip these checks. This is because extack messages cannot be > > displayed by tc and ip if tools from iproute2

Re: [PATCH bpf-next 11/11] selftests/bpf: add checks on extack messages for eBPF hw offload tests

2018-01-15 Thread David Ahern
On 1/15/18 5:30 PM, Jakub Kicinski wrote: > A new flag ("--skip-extack") is added to the Python script so as to > allow to skip these checks. This is because extack messages cannot be > displayed by tc and ip if tools from iproute2 package were compiled > without libmnl, but we do not want this to

Re: [PATCH] netfilter: nf_tables: flow_offload depends on flow_table

2018-01-15 Thread Pablo Neira Ayuso
On Fri, Jan 12, 2018 at 04:50:26PM +0100, Arnd Bergmann wrote: > Without CONFIG_NF_FLOW_TABLE, the new nft_flow_offload module produces > a link error: > > net/netfilter/nft_flow_offload.o: In function > `nft_flow_offload_iterate_cleanup': > nft_flow_offload.c:(.text+0xb0): undefined reference

Re: [PATCH net-next 1/2] netfilter: nf_defrag: mark xt_table structures 'const' again

2018-01-15 Thread Pablo Neira Ayuso
On Mon, Jan 15, 2018 at 04:49:05PM +0100, Arnd Bergmann wrote: > As a side-effect of adding the module option, we now get a section > mismatch warning: > > WARNING: net/ipv4/netfilter/iptable_raw.o(.data+0x1c): Section mismatch in > reference from the variable packet_raw to the function >

Re: [PATCH net-next 2/2] netfilter: nf_defrag: move NF_CONNTRACK bits into #ifdef

2018-01-15 Thread Pablo Neira Ayuso
On Mon, Jan 15, 2018 at 04:49:06PM +0100, Arnd Bergmann wrote: > We cannot access the skb->_nfct field when CONFIG_NF_CONNTRACK is > disabled: > > net/ipv4/netfilter/nf_defrag_ipv4.c: In function 'ipv4_conntrack_defrag': > net/ipv4/netfilter/nf_defrag_ipv4.c:83:9: error: 'struct sk_buff' has no

[PATCH bpf-next 03/11] net: sched: cls_flower: propagate extack support for filter offload

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Propagate the extack pointer from the `->change()` classifier operation to the function used for filter replacement in cls_flower, and feed it to tc_cls_common_offload_init(). This makes it possible to use netlink extack messages in the future

[PATCH bpf-next 00/11] net: sched: add extack support for cls offload

2018-01-15 Thread Jakub Kicinski
Hi! This series adds extack to cls offloads, as such it could arguably be targeted at net-next. Unfortunately, git am is not able to deal cleanly with minor conflicts on the nfp patches.. Since the series is really about cls_bpf I hope it's OK if it went via the bpf-next tree. Quentin says:

[PATCH bpf-next 01/11] net: sched: add extack support to change() classifier operation

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Add an extra argument to `->change()` operation for passing a pointer to a struct netlink_ext_ack. Update the operation for all classifiers accordingly. Extack is not used at this point. Signed-off-by: Quentin Monnet

[PATCH bpf-next 11/11] selftests/bpf: add checks on extack messages for eBPF hw offload tests

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Add checks to test that netlink extack messages are correctly displayed in some expected error cases for eBPF offload to netdevsim with TC and XDP. A new flag ("--skip-extack") is added to the Python script so as to allow to skip these checks.

[PATCH bpf-next 04/11] net: sched: cls_matchall: propagate extack support for filter offload

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Propagate the extack pointer from the `->change()` classifier operation to the function used for filter replacement in cls_matchall, and feed it to tc_cls_common_offload_init(). This makes it possible to use netlink extack messages in the future

[PATCH bpf-next 07/11] net: sched: create tc_can_offload_extack() wrapper

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Create a wrapper around tc_can_offload() that takes an additional extack pointer argument in order to output an error message if TC offload is disabled on the device. In this way, the error message is handled by the core and can be the same for

[PATCH bpf-next 02/11] net: sched: prepare extack support for offload via tc_cls_common_offload

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Prepare for extack support for hardware offload of classifiers. In order to achieve this, a pointer to a struct netlink_ext_ack is added to the struct tc_cls_common_offload that is passed to the callback for setting up the classifier. Function

[PATCH bpf-next 09/11] nfp: bpf: use extack support to improve debugging

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Use the recently added extack support for eBPF offload in the driver. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/bpf/main.c

[PATCH bpf-next 05/11] net: sched: cls_u32: propagate extack support for filter offload

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Propagate the extack pointer from the `->change()` classifier operation to the function used for filter replacement in cls_u32, and feed it to tc_cls_common_offload_init(). This makes it possible to use netlink extack messages in the future at

[PATCH bpf-next 06/11] net: sched: cls_bpf: plumb extack support in filter for hardware offload

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Pass the extack pointer obtained in the `->change()` filter operation to cls_bpf_offload() and then to cls_bpf_offload_cmd(), where it can be used to initialize the new field of tc_cls_common_offload passed to the callback for offload. This

[PATCH bpf-next 10/11] netdevsim: add extack support for TC eBPF offload

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Use the recently added extack support for TC eBPF filters in netdevsim. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- drivers/net/netdevsim/bpf.c | 35

[PATCH bpf-next 08/11] nfp: bpf: plumb extack into functions related to XDP offload

2018-01-15 Thread Jakub Kicinski
From: Quentin Monnet Pass a pointer to an extack object to nfp_app_xdp_offload() in order to prepare for extack usage in the nfp driver. Next step will be to forward this extack pointer to nfp_net_bpf_offload(), once this function is able to use it for printing

Re: [PATCH 4.15-rc8] net/core: Increase default optmem_max limit

2018-01-15 Thread Björn 'besser82' Esser
With the new Linux Kernel Crypto API User Space Interface and its underlying socket interface, the current default value for `net.core.optmem_max` can be exhausted pretty quick. On 32 bit systems it is not even enough for sending 16 IOVECs at once to the socket interface. To provide consumers of

Re: [PATCH v2] bnx2x: disable GSO where gso_size is too big for hardware

2018-01-15 Thread Daniel Axtens
David Miller writes: > From: Daniel Axtens > Date: Fri, 12 Jan 2018 10:59:05 +1100 > >> If a bnx2x card is passed a GSO packet with a gso_size larger than >> ~9700 bytes, it will cause a firmware error that will bring the card >> down: >> >> bnx2x:

[PATCH 4.15-rc8] net/core: Increase default optmem_max limit

2018-01-15 Thread Björn 'besser82' Esser
With the new Linux Kernel Crypto API User Space Interface and its underlying socket interface, the current default value for `net.core.optmem_max` can be exhausted pretty quick. On 32 bit systems it is not even enough for sending 16 IOVECs at once to the socket interface. To provide consumers of

[PATCH 4.15-rc8] net/core: Increase default optmem_max limit

2018-01-15 Thread Björn 'besser82' Esser
With the new Linux Kernel Crypto API User Space Interface and its underlying socket interface, the current default value for `net.core.optmem_max` can be exhausted pretty quick. On 32 bit systems it is not even enough for sending 16 IOVECs at once to the socket interface. To provide consumers of

Re: [RFC PATCH net-next 00/12] selftests: forwarding: Add VRF-based tests

2018-01-15 Thread David Ahern
On 1/15/18 4:17 PM, Jiri Pirko wrote: >> A couple of feature requests: >> 1. an option to pause on any error to allow inspection of the setup > > Good idea. Should be easy to add. Here is a snippet from my vrf test script: PAUSE_ON_FAIL=no -p option sets PAUSE_ON_FAIL=yes log_test() {

linux-next: manual merge of the net-next tree with the net tree

2018-01-15 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/ipv6/ip6_output.c between commit: 749439bfac6e ("ipv6: fix udpv6 sendmsg crash caused by too small MTU") from the net tree and commit: 0f6c480f23f4 ("xfrm: Move dst->path into struct xfrm_dst") from the

linux-next: manual merge of the net-next tree with the net tree

2018-01-15 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/openvswitch/flow_netlink.c between commit: 95a332088ecb ("Revert "openvswitch: Add erspan tunnel support."") from the net tree and commit: 1d7e2ed22f8d ("net: erspan: refactor existing erspan code") from the

Re: [RFC PATCH net-next 00/12] selftests: forwarding: Add VRF-based tests

2018-01-15 Thread Jiri Pirko
Mon, Jan 15, 2018 at 09:14:56PM CET, dsah...@gmail.com wrote: >On 1/15/18 12:18 PM, Ido Schimmel wrote: >> One of the nice things about network namespaces is that they allow one >> to easily create and test complex environments. >> >> Unfortunately, these namespaces can not be used with actual

Re: [PATCH v2] net: delete /proc THIS_MODULE references

2018-01-15 Thread Alexey Dobriyan
On Mon, Jan 15, 2018 at 02:18:00PM -0800, Stephen Hemminger wrote: > On Tue, 16 Jan 2018 00:42:40 +0300 > Alexey Dobriyan wrote: > > > /proc has been ignoring struct file_operations::owner field for 10 years. > > Specifically, it started with commit > >

Re: [PATCH net-next 2/2] net: dsa: mv88e6xxx: Free ATU/VTU irq only when there is chip irq

2018-01-15 Thread Andrew Lunn
On Mon, Jan 15, 2018 at 02:54:22PM -0800, Florian Fainelli wrote: > On 01/15/2018 02:45 PM, Andrew Lunn wrote: > > We only register the ATU and VTU irq when we have a chip level IRQ. > > In the error path, we should only attempt to remove the ATU and VTU > > irq if we also have a chip level IRQ. >

Re: [PATCH] net: delete /proc THIS_MODULE references

2018-01-15 Thread Al Viro
On Mon, Jan 15, 2018 at 02:50:12PM -0500, David Miller wrote: > From: Alexey Dobriyan > Date: Sat, 13 Jan 2018 20:11:52 +0300 > > > /proc has been ignoring struct file_operations::owner field for ages. > > > > Signed-off-by: Alexey Dobriyan > > What,

Re: KASAN: use-after-free Write in array_map_update_elem

2018-01-15 Thread Daniel Borkmann
On 01/15/2018 04:07 PM, Dmitry Vyukov wrote: > On Mon, Jan 15, 2018 at 3:58 PM, syzbot > wrote: >> Hello, >> >> syzkaller hit the following crash on >> 8418f88764046d0e8ca6a3c04a69a0e57189aa1e >>

Re: KASAN: slab-out-of-bounds Write in array_map_update_elem

2018-01-15 Thread Daniel Borkmann
On 01/15/2018 04:07 PM, Dmitry Vyukov wrote: > On Mon, Jan 15, 2018 at 3:58 PM, syzbot > wrote: >> Hello, >> >> syzkaller hit the following crash on >> 4147d50978df60f34d444c647dde9e5b34a4315e >> git://git.cmpxchg.org/linux-mmots.git/master

Re: [patch iproute2 net-next v8 2/3] tc: introduce support for block-handle for filter operations

2018-01-15 Thread Jiri Pirko
Mon, Jan 15, 2018 at 06:46:00PM CET, dsah...@gmail.com wrote: >On 1/12/18 8:49 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Signed-off-by: Jiri Pirko >> --- >> tc/tc_filter.c | 127 >> + >> 1 file

Re: [PATCHv3 1/5] net: dsa: Support internal phy on 'cpu' port

2018-01-15 Thread Andrew Lunn
> int dsa_port_fixed_link_register_of(struct dsa_port *dp) > { > struct device_node *dn = dp->dn; > @@ -305,6 +354,10 @@ int dsa_port_fixed_link_register_of(struct dsa_port *dp) > ds->ops->adjust_link(ds, port, phydev); > > put_device(>mdio.dev); > +

Re: [PATCH net-next 2/2] net: dsa: mv88e6xxx: Free ATU/VTU irq only when there is chip irq

2018-01-15 Thread Florian Fainelli
On 01/15/2018 02:45 PM, Andrew Lunn wrote: > We only register the ATU and VTU irq when we have a chip level IRQ. > In the error path, we should only attempt to remove the ATU and VTU > irq if we also have a chip level IRQ. > > Signed-off-by: Andrew Lunn > --- >

Re: [patch net-next v8 08/14] net: sched: add rt netlink message type for block get

2018-01-15 Thread Jiri Pirko
Mon, Jan 15, 2018 at 06:44:41PM CET, dsah...@gmail.com wrote: >On 1/15/18 10:27 AM, Jiri Pirko wrote: >> Mon, Jan 15, 2018 at 06:21:44PM CET, dsah...@gmail.com wrote: >>> On 1/15/18 10:08 AM, David Ahern wrote: On 1/15/18 10:03 AM, Jiri Pirko wrote: > Mon, Jan 15, 2018 at 05:56:31PM CET,

[PATCH net-next 1/2] net: dsa: mv88e6xxx: Return error from irq_find_mapping()

2018-01-15 Thread Andrew Lunn
Fix a cut/paste error. When irq_find_mapping() returns an error for the ATU or VTU interrupt, return that error, not the value of chip->device_irq. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/global1_atu.c | 2 +- drivers/net/dsa/mv88e6xxx/global1_vtu.c | 2 +- 2

[PATCH net-next 2/2] net: dsa: mv88e6xxx: Free ATU/VTU irq only when there is chip irq

2018-01-15 Thread Andrew Lunn
We only register the ATU and VTU irq when we have a chip level IRQ. In the error path, we should only attempt to remove the ATU and VTU irq if we also have a chip level IRQ. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 6 -- 1 file changed, 4

[PATCH net-next 0/2] ATU and VTU irq fixes

2018-01-15 Thread Andrew Lunn
Further testing and core review found two sets of bugs. Core review found a cut/paste error in the irq setup code. A board which does not have an interrupt line from the switch to the SoC, and experiancing an EPROBE_DEFER throw a splat when the ATU irq was freed but never registered. Andrew

Re: DPAA Ethernet problems with mainstream Linux kernels

2018-01-15 Thread Darren Stevens
Hello Madalin-cristian On 15/01/2018, Madalin-cristian Bucur wrote: >> > The device tree that you mention, cyrus_p5020.eth.dts is not found in >> > the Linux kernel sources. The cyrus_p5020.dts file from the fsl ppc >> > device tree folder does not include the PHY information for the DPAA >> >

Re: [PATCH v2] net: delete /proc THIS_MODULE references

2018-01-15 Thread Stephen Hemminger
On Tue, 16 Jan 2018 00:42:40 +0300 Alexey Dobriyan wrote: > /proc has been ignoring struct file_operations::owner field for 10 years. > Specifically, it started with commit 786d7e1612f0b0adb6046f19b906609e4fe8b1ba > ("Fix rmmod/read/write races in /proc entries"). Notice the

[PATCH net] net, sched: fix panic when updating miniq {b,q}stats

2018-01-15 Thread Daniel Borkmann
While working on fixing another bug, I ran into the following panic on arm64 by simply attaching clsact qdisc, adding a filter and running traffic on ingress to it: [...] [ 178.188591] Unable to handle kernel read from unreadable memory at virtual address 810fb501f000 [ 178.197314] Mem

Re: [PATCH v2 net-next 1/5] l2tp: fix switch default error handling in l2tp_nl_cmd_session_create()

2018-01-15 Thread Lorenzo Bianconi
> On 15 January 2018 at 21:18, Lorenzo Bianconi > wrote: >>> On Sun, Jan 14, 2018 at 03:50:54PM +0100, Lorenzo Bianconi wrote: Although this issue is harmless since that code path is protected by the check on

Re: [PATCH net-next v5 0/4] dwmac-meson8b: clock fixes for Meson8b

2018-01-15 Thread Emiliano Ingrassia
On Mon, Jan 15, 2018 at 06:10:11PM +0100, Martin Blumenstingl wrote: > Hi Dave, > > this series is now successfully tested, thus we think it's ready to be > applied to your net-next tree. > > Emiliano reported [0] that he couldn't get dwmac-meson8b to work on his > Odroid-C1. This is the

Re: [PATCH v2 net-next 1/5] l2tp: fix switch default error handling in l2tp_nl_cmd_session_create()

2018-01-15 Thread James Chapman
On 15 January 2018 at 21:18, Lorenzo Bianconi wrote: >> On Sun, Jan 14, 2018 at 03:50:54PM +0100, Lorenzo Bianconi wrote: >>> Although this issue is harmless since that code path is protected by the >>> check on l2tp_nl_cmd_ops[]/l2tp_nl_cmd_ops[]->session_create(),

Re: [PATCH v2 0/2] ipv4: Make neigh lookup keys for loopback/point-to-point devices be INADDR_ANY

2018-01-15 Thread David Miller
From: Jim Westfall Date: Mon, 15 Jan 2018 13:42:38 -0800 > David Miller wrote [01.15.18]: >> From: Jim Westfall >> Date: Sun, 14 Jan 2018 04:18:49 -0800 >> >> > This used to be the previous behavior in older kernels

Re: [PATCH 1/3 net] ibmvnic: Modify buffer size on failover

2018-01-15 Thread John Allen
On 01/15/2018 03:11 PM, John Allen wrote: > Using newer backing devices can cause the required padding at the end of > rx buffers to change. Currently we assume that the size of buffers will > never change, but in the case that we failover from a backing device with > smaller padding requirement

Re: [PATCH v2 0/2] ipv4: Make neigh lookup keys for loopback/point-to-point devices be INADDR_ANY

2018-01-15 Thread Jim Westfall
David Miller wrote [01.15.18]: > From: Jim Westfall > Date: Sun, 14 Jan 2018 04:18:49 -0800 > > > This used to be the previous behavior in older kernels but became broken in > > a263b3093641f (ipv4: Make neigh lookups directly in output packet

[PATCH v2] net: delete /proc THIS_MODULE references

2018-01-15 Thread Alexey Dobriyan
/proc has been ignoring struct file_operations::owner field for 10 years. Specifically, it started with commit 786d7e1612f0b0adb6046f19b906609e4fe8b1ba ("Fix rmmod/read/write races in /proc entries"). Notice the chunk where inode->i_fop is initialized with proxy struct file_operations for regular

Re: DPAA Ethernet traffice troubles with Linux kernel

2018-01-15 Thread mad skateman
Some extra info: When Ubuntu boots, Eth0 (192.168.22.44) is not brought up automaticly.. When i bring up eth0 by hand, its still not active.. root@X5000LNX:/home/skateman# ifconfig eth0 up root@X5000LNX:/home/skateman# ping 192.168.22.44 connect: Network is unreachable When i use mii-tool too

Re: [PATCH v2 net-next 1/5] l2tp: fix switch default error handling in l2tp_nl_cmd_session_create()

2018-01-15 Thread Lorenzo Bianconi
> On Sun, Jan 14, 2018 at 03:50:54PM +0100, Lorenzo Bianconi wrote: >> Although this issue is harmless since that code path is protected by the >> check on l2tp_nl_cmd_ops[]/l2tp_nl_cmd_ops[]->session_create(), fix error >> handling for L2TP_PWTYPE_IP/default case in l2tp_nl_cmd_session_create()

Re: pull-request: can-next 2017-12-01,Re: pull-request: can-nexto 2017-12-01,Re: pull-request: can-next 2017-12-01,Re: pull-request: can-next 2017-12-01

2018-01-15 Thread David Miller
From: Marc Kleine-Budde Date: Mon, 15 Jan 2018 21:54:29 +0100 > On 01/15/2018 06:55 PM, David Miller wrote: >> From: Marc Kleine-Budde >> Date: Mon, 15 Jan 2018 14:02:23 +0100 >> >>> Hello David, >>> >>> >>> On 01/05/2018 12:08 PM, Marc Kleine-Budde

[PATCH 3/3 net] ibmvnic: Allocate and request vpd in init_resources

2018-01-15 Thread John Allen
In reset events in which our memory allocations need to be reallocated, VPD data is being freed, but never reallocated. This can cause issues if we later attempt to access that memory or reset and attempt to free the memory. This patch moves the allocation of the VPD data to init_resources so that

  1   2   3   4   >