Re: [GIT] Networking

2020-08-06 Thread John Stultz
On Thu, Aug 6, 2020 at 11:23 PM John Stultz wrote: > > On Thu, Aug 6, 2020 at 5:32 PM John Stultz wrote: > > > > On Thu, Aug 6, 2020 at 4:17 PM Eric Dumazet wrote: > > > On 8/6/20 2:39 PM, John Stultz wrote: > > > > [ 19.709492] Unable to handle kernel access to user memory outside > > > > uac

[PATCH net-next] vmxnet3: use correct tcp hdr length when packet is encapsulated

2020-08-06 Thread Ronak Doshi
'Commit dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support")' added support for encapsulation offload. However, while calculating tcp hdr length, it does not take into account if the packet is encapsulated or not. This patch fixes this issue by using correct reference for inner tc

Re: [GIT] Networking

2020-08-06 Thread John Stultz
On Thu, Aug 6, 2020 at 5:32 PM John Stultz wrote: > > On Thu, Aug 6, 2020 at 4:17 PM Eric Dumazet wrote: > > On 8/6/20 2:39 PM, John Stultz wrote: > > > [ 19.709492] Unable to handle kernel access to user memory outside > > > uaccess routines at virtual address 006f53337070 > > > [ 19.726

Re: [PATCH] epic100: switch from 'pci_' to 'dma_' API

2020-08-06 Thread Christophe JAILLET
Le 06/08/2020 à 23:23, David Miller a écrit : From: Christophe JAILLET Date: Thu, 6 Aug 2020 22:19:35 +0200 The wrappers in include/linux/pci-dma-compat.h should go away. Christophe, the net-next tree is closed so I'd like to ask that you defer submitting these conversion patches until the

Re: Severe performance regression in "net: macsec: preserve ingress frame ordering"

2020-08-06 Thread Scott Dial
On 8/6/2020 5:11 PM, Ryan Cox wrote: > With 5.7 I get: > * 9.90 Gb/s with no macsec at all > * 1.80 Gb/s with macsec WITHOUT encryption > * 1.00 Gb/s (sometimes, but often less) with macsec WITH encryption > > With 5.7 but with ab046a5d4be4c90a3952a0eae75617b49c0cb01b reverted, I get: > * 9.90 Gb/

Re: rtnl_trylock() versus SCHED_FIFO lockup

2020-08-06 Thread Stephen Hemminger
On Thu, 6 Aug 2020 12:46:43 +0300 Nikolay Aleksandrov wrote: > On 06/08/2020 12:17, Rasmus Villemoes wrote: > > On 06/08/2020 01.34, Stephen Hemminger wrote: > >> On Wed, 5 Aug 2020 16:25:23 +0200 > >> Rasmus Villemoes wrote: > >> > >>> Hi, > >>> > >>> We're seeing occasional lockups on an e

[PATCH] kernel: bpf: delete repeated words in comments

2020-08-06 Thread Randy Dunlap
(-) --- linux-next-20200806.orig/kernel/bpf/core.c +++ linux-next-20200806/kernel/bpf/core.c @@ -1966,7 +1966,7 @@ void bpf_prog_array_delete_safe(struct b * @index: the index of the program to replace * * Skips over dummy programs, by not counting them, when calculating - * the the position of the

[PATCH bpf] selftests/bpf: fix silent Makefile output

2020-08-06 Thread Andrii Nakryiko
99aacebecb75 ("selftests: do not use .ONESHELL") removed .ONESHELL, which changes how Makefile "silences" multi-command target recipes. selftests/bpf's Makefile relied (a somewhat unknowingly) on .ONESHELL behavior of silencing all commands within the recipe if the first command contains @ symbol.

WARNING: refcount bug in bt_accept_dequeue

2020-08-06 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:47ec5303 Merge git://git.kernel.org/pub/scm/linux/kernel/g.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1083e7ec90 kernel config: https://syzkaller.appspot.com/x/.config?x=e0c783f658542f35 das

WARNING in compat_do_ebt_get_ctl

2020-08-06 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:47ec5303 Merge git://git.kernel.org/pub/scm/linux/kernel/g.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=17e92e7690 kernel config: https://syzkaller.appspot.com/x/.config?x=7c06047f622c5724 das

Re: [PATCH v3 1/3] driver core: Revert default driver_deferred_probe_timeout value to 0

2020-08-06 Thread John Stultz
On Thu, Aug 6, 2020 at 6:52 AM Thierry Reding wrote: > > On Wed, Apr 22, 2020 at 08:32:43PM +, John Stultz wrote: > > This patch addresses a regression in 5.7-rc1+ > > > > In commit c8c43cee29f6 ("driver core: Fix > > driver_deferred_probe_check_state() logic"), we both cleaned up > > the logi

[PATCH net-next v1] hinic: fix strncpy output truncated compile warnings

2020-08-06 Thread Luo bin
fix the compile warnings of 'strncpy' output truncated before terminating nul copying N bytes from a string of the same length Signed-off-by: Luo bin Reported-by: kernel test robot --- V0~V1: - use the strlen()+1 pattern consistently drivers/net/ethernet/huawei/hinic/hinic_devlink.c | 8 --

[PATCH 4.19] net/mlx5e: Don't support phys switch id if not in switchdev mode

2020-08-06 Thread Saeed Mahameed
From: Roi Dayan Support for phys switch id ndo added for representors and if we do not have representors there is no need to support it. Since each port return different switch id supporting this block support for creating bond over PFs and attaching to bridge in legacy mode. This bug doesn't ex

Re: [PATCH net-next] hinic: fix strncpy output truncated compile warnings

2020-08-06 Thread luobin (L)
On 2020/8/7 8:57, luobin (L) wrote: > On 2020/8/7 3:01, David Miller wrote: >> From: Luo bin >> Date: Thu, 6 Aug 2020 15:48:30 +0800 >> >>> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_devlink.c >>> b/drivers/net/ethernet/huawei/hinic/hinic_devlink.c >>> index c6adc776f3c8..1dc948c07b94 1

Re: [PATCH net] net: qcom/emac: Fix missing clk_disable_unprepare() in error path of emac_probe

2020-08-06 Thread wanghai (M)
在 2020/8/6 22:23, Timur Tabi 写道: On 8/6/20 9:06 AM, Wang Hai wrote: In emac_clks_phase1_init() of emac_probe(), there may be a situation in which some clk_prepare_enable() succeed and others fail. If emac_clks_phase1_init() fails, goto err_undo_clocks to clean up the clk that was successfully

Re: 9p/trans_fd lockup

2020-08-06 Thread Alexey Kardashevskiy
On 06/08/2020 22:38, Dominique Martinet wrote: > Alexey Kardashevskiy wrote on Thu, Aug 06, 2020: >> I am seeing another bug in 9p under syzkaller, the reprocase is: >> >> r0 = open$dir(&(0x7f40)='./file0\x00', 0x88142, 0x182) >> >> r1 = openat$null(0xff9c, &(0x7f000640)=

Re: [PATCH net-next] hinic: fix strncpy output truncated compile warnings

2020-08-06 Thread luobin (L)
On 2020/8/7 3:01, David Miller wrote: > From: Luo bin > Date: Thu, 6 Aug 2020 15:48:30 +0800 > >> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_devlink.c >> b/drivers/net/ethernet/huawei/hinic/hinic_devlink.c >> index c6adc776f3c8..1dc948c07b94 100644 >> --- a/drivers/net/ethernet/huawei/

Re: [GIT] Networking

2020-08-06 Thread John Stultz
On Thu, Aug 6, 2020 at 4:17 PM Eric Dumazet wrote: > On 8/6/20 2:39 PM, John Stultz wrote: > > [ 19.709492] Unable to handle kernel access to user memory outside > > uaccess routines at virtual address 006f53337070 > > [ 19.726539] Mem abort info: > > [ 19.726544] ESR = 0x960f > >

Re: [PATCH v9 bpf-next 10/14] bpf: Add d_path helper

2020-08-06 Thread KP Singh
On Sat, Aug 1, 2020 at 7:04 PM Jiri Olsa wrote: > > Adding d_path helper function that returns full path for [...] > +} > + > +BTF_SET_START(btf_allowlist_d_path) > +BTF_ID(func, vfs_truncate) > +BTF_ID(func, vfs_fallocate) > +BTF_ID(func, dentry_open) > +BTF_ID(func, vfs_getattr) > +BTF_ID(func

Re: [RFC PATCH] bpftool btf: Add prefix option to dump C

2020-08-06 Thread Andrii Nakryiko
On Thu, Aug 6, 2020 at 12:42 PM Ian Rogers wrote: > > On Thu, Aug 6, 2020 at 10:58 AM Andrii Nakryiko > wrote: > > > > On Fri, Jul 31, 2020 at 8:47 PM Andrii Nakryiko > > wrote: > > > > > > On Fri, Jul 31, 2020 at 6:47 PM Ian Rogers wrote: > > > > > > > > On Tue, Jul 21, 2020 at 11:58 PM Andrii

Re: [RFC PATCH bpf-next 7/9] selftests/bpf: add CO-RE relo test for TYPE_ID_LOCAL/TYPE_ID_TARGET

2020-08-06 Thread Andrii Nakryiko
On Thu, Aug 6, 2020 at 5:10 PM Alexei Starovoitov wrote: > > On Thu, Aug 06, 2020 at 04:48:27PM -0700, Andrii Nakryiko wrote: > > On Thu, Aug 6, 2020 at 3:30 PM Alexei Starovoitov > > wrote: > > > > > > On Tue, Aug 04, 2020 at 11:24:07AM -0700, Andrii Nakryiko wrote: > > > > + > > > > +SEC("raw_t

Re: [RFC PATCH bpf-next 7/9] selftests/bpf: add CO-RE relo test for TYPE_ID_LOCAL/TYPE_ID_TARGET

2020-08-06 Thread Alexei Starovoitov
On Thu, Aug 06, 2020 at 04:48:27PM -0700, Andrii Nakryiko wrote: > On Thu, Aug 6, 2020 at 3:30 PM Alexei Starovoitov > wrote: > > > > On Tue, Aug 04, 2020 at 11:24:07AM -0700, Andrii Nakryiko wrote: > > > + > > > +SEC("raw_tracepoint/sys_enter") > > > +int test_core_type_id(void *ctx) > > > +{ > >

Re: [PATCH bpf-next v2] bpf: fix compilation warning of selftests

2020-08-06 Thread Alexei Starovoitov
On Thu, Aug 6, 2020 at 3:46 AM Jianlin Lv wrote: > > Clang compiler version: 12.0.0 > The following warning appears during the selftests/bpf compilation: > > prog_tests/send_signal.c:51:3: warning: ignoring return value of ‘write’, > declared with attribute warn_unused_result [-Wunused-result] >

Re: [PATCH] drivers/net/wan/lapbether: Added needed_headroom and a skb->len check

2020-08-06 Thread David Miller
From: Xie He Date: Wed, 5 Aug 2020 18:50:40 -0700 > 1. Added a skb->len check > > This driver expects upper layers to include a pseudo header of 1 byte > when passing down a skb for transmission. This driver will read this > 1-byte header. This patch added a skb->len check before reading the >

Re: [PATCH bpf] selftests: bpf: switch off timeout

2020-08-06 Thread Alexei Starovoitov
On Thu, Aug 6, 2020 at 11:42 AM Jiri Benc wrote: > > Several bpf tests are interrupted by the default timeout of 45 seconds added > by commit 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second > timeout per test"). In my case it was test_progs, test_tunnel.sh, > test_lwt_ip_encap.sh and t

Re: [PATCH bpf] bpf: remove inline from bpf_do_trace_printk

2020-08-06 Thread Alexei Starovoitov
On Thu, Aug 6, 2020 at 11:26 AM Stanislav Fomichev wrote: > > I get the following error during compilation on my side: > kernel/trace/bpf_trace.c: In function 'bpf_do_trace_printk': > kernel/trace/bpf_trace.c:386:34: error: function 'bpf_do_trace_printk' can > never be inlined because it uses var

Re: [PATCH bpf] bpf: add missing return to resolve_btfids

2020-08-06 Thread Alexei Starovoitov
On Thu, Aug 6, 2020 at 11:22 AM wrote: > > On 08/06, Stanislav Fomichev wrote: > > int sets_patch(struct object *obj) doesn't have a 'return 0' at the end. > > > Signed-off-by: Stanislav Fomichev > > --- > > tools/bpf/resolve_btfids/main.c | 1 + > > 1 file changed, 1 insertion(+) > > > diff -

Re: [PATCH bpf-next] libbf: fix uninitialized pointer at btf__parse_raw()

2020-08-06 Thread Alexei Starovoitov
On Wed, Aug 5, 2020 at 11:22 PM John Fastabend wrote: > > Daniel T. Lee wrote: > > Recently, from commit 94a1fedd63ed ("libbpf: Add btf__parse_raw() and > > generic btf__parse() APIs"), new API has been added to libbpf that > > allows to parse BTF from raw data file (btf__parse_raw()). > > > > The

Re: [RFC PATCH bpf-next 7/9] selftests/bpf: add CO-RE relo test for TYPE_ID_LOCAL/TYPE_ID_TARGET

2020-08-06 Thread Andrii Nakryiko
On Thu, Aug 6, 2020 at 3:30 PM Alexei Starovoitov wrote: > > On Tue, Aug 04, 2020 at 11:24:07AM -0700, Andrii Nakryiko wrote: > > + > > +SEC("raw_tracepoint/sys_enter") > > +int test_core_type_id(void *ctx) > > +{ > > + struct core_reloc_type_id_output *out = (void *)&data.out; > > + > > +

Re: [PATCH bpf v4 0/2] bpf: change uapi for bpf iterator map elements

2020-08-06 Thread Alexei Starovoitov
On Tue, Aug 4, 2020 at 10:51 PM Yonghong Song wrote: > > Andrii raised a concern that current uapi for bpf iterator map > element is a little restrictive and not suitable for future potential > complex customization. This is a valid suggestion, considering people > may indeed add more complex cust

Re: [PATCH bpf] selftests/bpf: prevent runqslower from racing on building bpftool

2020-08-06 Thread Alexei Starovoitov
On Wed, Aug 5, 2020 at 11:27 PM John Fastabend wrote: > > Andrii Nakryiko wrote: > > runqslower's Makefile is building/installing bpftool into > > $(OUTPUT)/sbin/bpftool, which coincides with $(DEFAULT_BPFTOOL). In practice > > this means that often when building selftests from scratch (after `mak

Re: [GIT] Networking

2020-08-06 Thread Eric Dumazet
On 8/6/20 4:17 PM, Eric Dumazet wrote: > > > On 8/6/20 2:39 PM, John Stultz wrote: >> On Wed, Aug 5, 2020 at 6:57 PM David Miller wrote: >>> There is a minor conflict in net/ipv6/ip6_flowlabel.c, it's because of >>> the commit that did the tree-wide removal of uninitialized_var(). The >>> re

Re: [GIT] Networking

2020-08-06 Thread Eric Dumazet
On 8/6/20 2:39 PM, John Stultz wrote: > On Wed, Aug 5, 2020 at 6:57 PM David Miller wrote: >> There is a minor conflict in net/ipv6/ip6_flowlabel.c, it's because of >> the commit that did the tree-wide removal of uninitialized_var(). The >> resolution is simple, kill all of the conflict marker

Re: [PATCH net-next RFC 01/13] devlink: Add reload level option to devlink reload command

2020-08-06 Thread Jacob Keller
On 8/6/2020 11:25 AM, Jakub Kicinski wrote: > On Wed, 5 Aug 2020 13:02:58 +0200 Jiri Pirko wrote: >> Tue, Aug 04, 2020 at 10:39:46PM CEST, k...@kernel.org wrote: >>> AFAIU the per-driver default is needed because we went too low >>> level with what the action constitutes. We need maintain the h

Re: [PATCH v2] net: add support for threaded NAPI polling

2020-08-06 Thread Wei Wang
Nice patch! One question inline. On Thu, Aug 6, 2020 at 2:58 AM Felix Fietkau wrote: > > For some drivers (especially 802.11 drivers), doing a lot of work in the NAPI > poll function does not perform well. Since NAPI poll is bound to the CPU it > was scheduled from, we can easily end up with a fe

Re: [RFC PATCH bpf-next 7/9] selftests/bpf: add CO-RE relo test for TYPE_ID_LOCAL/TYPE_ID_TARGET

2020-08-06 Thread Alexei Starovoitov
On Tue, Aug 04, 2020 at 11:24:07AM -0700, Andrii Nakryiko wrote: > + > +SEC("raw_tracepoint/sys_enter") > +int test_core_type_id(void *ctx) > +{ > + struct core_reloc_type_id_output *out = (void *)&data.out; > + > + out->local_anon_struct = bpf_core_type_id_local(struct { int > marker_fiel

Re: [PATCH 25/26] net: pass a sockptr_t into ->setsockopt

2020-08-06 Thread Eric Dumazet
On 7/22/20 11:09 PM, Christoph Hellwig wrote: > Rework the remaining setsockopt code to pass a sockptr_t instead of a > plain user pointer. This removes the last remaining set_fs(KERNEL_DS) > outside of architecture specific code. > > Signed-off-by: Christoph Hellwig > Acked-by: Stefan Schmid

[PATCH net] net: qcom/emac: Fix missing clk_disable_unprepare() in error path of emac_probe

2020-08-06 Thread Wang Hai
In emac_clks_phase1_init() of emac_probe(), there may be a situation in which some clk_prepare_enable() succeed and others fail. If emac_clks_phase1_init() fails, goto err_undo_clocks to clean up the clk that was successfully clk_prepare_enable(). Fixes: b9b17debc69d ("net: emac: emac gigabit ethe

[RFC PATCH bpf-next 4/4] selftests/bpf: add bpf_trace_btf helper tests

2020-08-06 Thread Alan Maguire
Basic tests verifying various flag combinations for bpf_trace_btf() using a tp_btf program to trace skb data. Signed-off-by: Alan Maguire --- tools/testing/selftests/bpf/prog_tests/trace_btf.c | 45 ++ .../selftests/bpf/progs/netif_receive_skb.c| 43 ++

Re: [GIT] Networking

2020-08-06 Thread John Stultz
On Wed, Aug 5, 2020 at 6:57 PM David Miller wrote: > There is a minor conflict in net/ipv6/ip6_flowlabel.c, it's because of > the commit that did the tree-wide removal of uninitialized_var(). The > resolution is simple, kill all of the conflict markers and content > within, and remove the uniniti

Re: [PATCH] epic100: switch from 'pci_' to 'dma_' API

2020-08-06 Thread David Miller
From: Christophe JAILLET Date: Thu, 6 Aug 2020 22:19:35 +0200 > The wrappers in include/linux/pci-dma-compat.h should go away. Christophe, the net-next tree is closed so I'd like to ask that you defer submitting these conversion patches until the net-next tree opens back up again. Thank you.

Severe performance regression in "net: macsec: preserve ingress frame ordering"

2020-08-06 Thread Ryan Cox
Hello, I have found two performance issues with MACsec on 10 Gb/s links (tested on Intel and Broadcom NICs): 1)  MACsec with encryption is much faster than MACsec without encryption (9.8 vs 7.4 Gb/s) until 5.7, where both have poor performance 2)  5.7 introduced a severe performance impact for

Re: [PATCH v2] net: add support for threaded NAPI polling

2020-08-06 Thread Eric Dumazet
On 8/6/20 12:57 PM, Jakub Kicinski wrote: > On Thu, 6 Aug 2020 12:25:08 -0700 Eric Dumazet wrote: >> On 8/6/20 11:55 AM, Jakub Kicinski wrote: >>> I'm still trying to wrap my head around this. >>> >>> Am I understanding correctly that you have one IRQ and multiple NAPI >>> instances? >>> >>> Are

[PATCH] adm8211: switch from 'pci_' to 'dma_' API

2020-08-06 Thread Christophe JAILLET
The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'adm8211_alloc_rings()', GFP_KERNEL can be used beca

[net-next iproute2 PATCH v4 0/2] iplink: hsr: add support for creating PRP device

2020-08-06 Thread Murali Karicheri
This series enhances the iproute2 iplink module to add support for creating PRP device similar to HSR. The kernel part of this is already merged to net-next and the same can be referenced at https://www.spinics.net/lists/linux-api/msg42615.html v3 of the series is rebased to iproute2-next/master a

[net-next iproute2 PATCH v4 2/2] ip: iplink: prp: update man page for new parameter

2020-08-06 Thread Murali Karicheri
PRP support requires a proto parameter which is 0 for hsr and 1 for prp. Default is hsr and is backward compatible. Signed-off-by: Murali Karicheri --- man/man8/ip-link.8.in | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in

[net-next iproute2 PATCH v4 1/2] iplink: hsr: add support for creating PRP device similar to HSR

2020-08-06 Thread Murali Karicheri
This patch enhances the iplink command to add a proto parameters to create PRP device/interface similar to HSR. Both protocols are quite similar and requires a pair of Ethernet interfaces. So re-use the existing HSR iplink command to create PRP device/interface as well. Use proto parameter to diffe

[PATCH] smsc9420: switch from 'pci_' to 'dma_' API

2020-08-06 Thread Christophe JAILLET
The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'smsc9420_probe()', GFP_KERNEL can be used because i

[RFC PATCH bpf-next 3/4] bpf: add bpf_trace_btf helper

2020-08-06 Thread Alan Maguire
A helper is added to support tracing kernel type information in BPF using the BPF Type Format (BTF). Its signature is long bpf_trace_btf(struct btf_ptr *ptr, u32 btf_ptr_size, u32 trace_id, u64 flags); struct btf_ptr * specifies - a pointer to the data to be traced; - the BTF

Re: [net-next iproute2 PATCH v3 1/2] iplink: hsr: add support for creating PRP device similar to HSR

2020-08-06 Thread Murali Karicheri
On 8/6/20 1:12 PM, David Ahern wrote: On 8/6/20 10:04 AM, Murali Karicheri wrote: that the maintainers are different than the netdev maintainers. My bad. The PRP driver support in kernel is merged by Dave to net-next and this iproute2 change has to go with it. So please review and apply this

[PATCH] epic100: switch from 'pci_' to 'dma_' API

2020-08-06 Thread Christophe JAILLET
The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'epic_init_one()', GFP_KERNEL can be used because it

[RFC PATCH bpf-next 0/4] bpf: add bpf-based bpf_trace_printk()-like support

2020-08-06 Thread Alan Maguire
This series attempts to provide a simple way for BPF programs (and in future other consumers) to utilize BPF Type Format (BTF) information to display kernel data structures in-kernel. The use case this functionality is applied to here is to support a bpf_trace_printk trace event-based method of re

Re: [PATCH] net: Fix potential out of bound write in skb_try_coalesce()

2020-08-06 Thread linmiaohe
Eric Dumazet wrote: >On Tue, Aug 4, 2020 at 4:46 AM linmiaohe wrote: >> >> From: Miaohe Lin >> >> The head_frag of skb would occupy one extra skb_frag_t. Take it into >> account or out of bound write to skb frags may happen. >> > >Please share a stack trace if this was a real bug spotted in the

[PATCH 5/5] net: Use helper function ip_is_fragment()

2020-08-06 Thread linmiaohe
From: Miaohe Lin Use helper function ip_is_fragment() to check ip fragment. Signed-off-by: Miaohe Lin --- net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 8a0c39e4ab0a..fa823405829c 100644 --- a/net/core/skbuff.c

[PATCH 3/5] net: Set fput_needed iff FDPUT_FPUT is set

2020-08-06 Thread linmiaohe
From: Miaohe Lin We should fput() file iff FDPUT_FPUT is set. So we should set fput_needed accordingly. Fixes: 00e188ef6a7e ("sockfd_lookup_light(): switch to fdget^W^Waway from fget_light") Signed-off-by: Miaohe Lin --- net/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 2/5] net: Use helper function fdput()

2020-08-06 Thread linmiaohe
From: Miaohe Lin Use helper function fdput() to fput() the file iff FDPUT_FPUT is set. Signed-off-by: Miaohe Lin --- net/socket.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/socket.c b/net/socket.c index 976426d03f09..6aff5aeb6728 100644 --- a/net/socket.c +++

[PATCH 4/5] net: Remove meaningless jump label out_fs

2020-08-06 Thread linmiaohe
From: Miaohe Lin The out_fs jump label has nothing to do but goto out. Signed-off-by: Miaohe Lin --- net/socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/socket.c b/net/socket.c index ee9c9dac4728..e1a1195ce69e 100644 --- a/net/socket.c +++ b/net/socket.c @@ -

Re: [PATCH v2] net: add support for threaded NAPI polling

2020-08-06 Thread Jakub Kicinski
On Thu, 6 Aug 2020 12:25:08 -0700 Eric Dumazet wrote: > On 8/6/20 11:55 AM, Jakub Kicinski wrote: > > I'm still trying to wrap my head around this. > > > > Am I understanding correctly that you have one IRQ and multiple NAPI > > instances? > > > > Are we not going to end up with pretty terrible c

Re: net: dsa: sja1105: use detected device id instead of DT one on mismatch

2020-08-06 Thread Vladimir Oltean
On Thu, Aug 06, 2020 at 05:27:11PM +0100, Colin Ian King wrote: > Hi, > > Static analysis with Coverity has detected a potential issue with the > following commit: > > commit 0b0e299720bb99428892a23ecbd2b4b7f61ccf6d > Author: Vladimir Oltean > Date: Mon Aug 3 19:48:23 2020 +0300 > > net:

Re: [PATCH v2] net: add support for threaded NAPI polling

2020-08-06 Thread Eric Dumazet
On 8/6/20 11:55 AM, Jakub Kicinski wrote: > On Thu, 6 Aug 2020 11:55:58 +0200 Felix Fietkau wrote: >> For some drivers (especially 802.11 drivers), doing a lot of work in the NAPI >> poll function does not perform well. Since NAPI poll is bound to the CPU it >> was scheduled from, we can easily

Re: [PATCH v5 net-next 0/3] Add PTP support for Octeontx2

2020-08-06 Thread David Miller
net-next is closed, please resubmit these changes when the net-next tree opens back up again. Thank you.

Re: [PATCH] net: hns3: fix spelling mistake "could'nt" -> "couldn't"

2020-08-06 Thread David Miller
From: Colin King Date: Thu, 6 Aug 2020 12:42:56 +0100 > From: Colin Ian King > > There is a spelling mistake in a dev_err message. Fix it. > > Signed-off-by: Colin Ian King Applied, thanks.

Re: [PATCH net-next] hinic: fix strncpy output truncated compile warnings

2020-08-06 Thread David Miller
From: Luo bin Date: Thu, 6 Aug 2020 15:48:30 +0800 > diff --git a/drivers/net/ethernet/huawei/hinic/hinic_devlink.c > b/drivers/net/ethernet/huawei/hinic/hinic_devlink.c > index c6adc776f3c8..1dc948c07b94 100644 > --- a/drivers/net/ethernet/huawei/hinic/hinic_devlink.c > +++ b/drivers/net/ethern

Re: [PATCH v2] net: add support for threaded NAPI polling

2020-08-06 Thread Jakub Kicinski
On Thu, 6 Aug 2020 11:55:58 +0200 Felix Fietkau wrote: > For some drivers (especially 802.11 drivers), doing a lot of work in the NAPI > poll function does not perform well. Since NAPI poll is bound to the CPU it > was scheduled from, we can easily end up with a few very busy CPUs spending > most

[PATCH] selftests: Add VRF icmp error route lookup test

2020-08-06 Thread Michael Jeanson
The objective is to check that the incoming vrf routing table is selected to send an ICMP error back to the source when the ttl of a packet reaches 1 while it is forwarded between different vrfs. The first test sends a ping with a ttl of 1 from h1 to h2 and parses the output of the command to chec

Re: [PATCH v2 net-next] net/tls: allow MSG_CMSG_COMPAT in sendmsg

2020-08-06 Thread Jakub Kicinski
On Thu, 6 Aug 2020 08:49:06 +0200 Rouven Czerwinski wrote: > Trying to use ktls on a system with 32-bit userspace and 64-bit kernel > results in a EOPNOTSUPP message during sendmsg: > > setsockopt(3, SOL_TLS, TLS_TX, …, 40) = 0 > sendmsg(3, …, msg_flags=0}, 0) = -1 EOPNOTSUPP (Operation not s

[RFC PATCH] bpf: user_verifier_ops can be static

2020-08-06 Thread kernel test robot
Signed-off-by: kernel test robot --- bpf_trace.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index cbe789bc1b986..4b8f380694a10 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -1852,12 +18

Re: [PATCH ethtool v2] Add QSFP-DD support

2020-08-06 Thread Adrian Pop
Hi Andrew! Should I resubmit v3 after I delete the code that has to do with page 0x10 and 0x11? Adrian On Thu, 6 Aug 2020 at 21:08, Andrew Lunn wrote: > > Hi Adrian > > > +static void > > +qsfp_dd_parse_diagnostics(const __u8 *id, struct qsfp_dd_diags *const sd) > > +{ > > + __u16 rx_power_

Re: [linux-next:master 13398/13940] drivers/net/ethernet/sfc/ef100_nic.c:610: undefined reference to `__umoddi3'

2020-08-06 Thread Edward Cree
On 06/08/2020 00:48, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > master > head: d15fe4ec043588beee823781602ddb51d0bc84c8 > commit: adcfc3482813fa2c34e5902005853f79c2aa [13398/13940] sfc_ef100: > read Design Parameters at probe tim

Re: [PATCH v2 0/2 net] bitfield.h cleanups

2020-08-06 Thread Jakub Kicinski
On Thu, 6 Aug 2020 11:13:58 -0700 Jakub Kicinski wrote: > please repost the first patch only To be clear the second patch may need to wait for net-next since it's refactoring. That's why I suggest only posting patch 1 now, i.e. the fix.

Re: [PATCH net-next RFC 01/13] devlink: Add reload level option to devlink reload command

2020-08-06 Thread Jakub Kicinski
On Wed, 5 Aug 2020 13:02:58 +0200 Jiri Pirko wrote: > Tue, Aug 04, 2020 at 10:39:46PM CEST, k...@kernel.org wrote: > >AFAIU the per-driver default is needed because we went too low > >level with what the action constitutes. We need maintain the higher > >level actions. > > > >The user clearly did

[PATCH bpf] selftests: bpf: switch off timeout

2020-08-06 Thread Jiri Benc
Several bpf tests are interrupted by the default timeout of 45 seconds added by commit 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second timeout per test"). In my case it was test_progs, test_tunnel.sh, test_lwt_ip_encap.sh and test_xdping.sh. There's not much value in having a timeout f

Re: [PATCH v2 0/2 net] bitfield.h cleanups

2020-08-06 Thread Jakub Kicinski
On Wed, 5 Aug 2020 10:44:30 -0700 Nick Desaulniers wrote: > Hi David, > I read through > https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html#q-how-often-do-changes-from-these-trees-make-it-to-the-mainline-linus-tree > and noticed http://vger.kernel.org/~davem/net-next.html. Since th

Re: Question about TC filter

2020-08-06 Thread Cong Wang
On Thu, Aug 6, 2020 at 10:21 AM satish dhote wrote: > > Hi Cong, > > I tried adding below patch i.e. "return cl == 0 ? q->block : NULL;" > but after this I'm not able to see any output using "tc filter show... " > command. Looks like the filter is not getting configured. What exact command did yo

Re: [PATCH] nfc: enforce CAP_NET_RAW for raw sockets When creating a raw AF_NFC socket, CAP_NET_RAW needs to be checked first.

2020-08-06 Thread Jakub Kicinski
On Thu, 6 Aug 2020 10:28:08 +0800 Qingyu Li wrote: Commit message is required. Perhaps shorten the subject and put more info here. > Signed-off-by: Qingyu Li > --- > net/nfc/rawsock.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/net/nfc/rawsock.c b/net/nfc/rawso

Re: [PATCH bpf-next 1/5] bpf: introduce BPF_PROG_TYPE_USER

2020-08-06 Thread kernel test robot
: x86_64-randconfig-s031-20200806 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.2-117-g8c7aee71-dirty # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-p

Re: [PATCH ethtool v2] Add QSFP-DD support

2020-08-06 Thread Andrew Lunn
Hi Adrian > +static void > +qsfp_dd_parse_diagnostics(const __u8 *id, struct qsfp_dd_diags *const sd) > +{ > + __u16 rx_power_offset; > + __u16 tx_power_offset; > + __u16 tx_bias_offset; > + __u16 temp_offset; > + __u16 volt_offset; > + int i; > + > + for (i = 0; i < QS

Re: [PATCH bpf-next 0/3] Add generic and raw BTF parsing APIs to libbpf

2020-08-06 Thread Alexei Starovoitov
On Thu, Aug 6, 2020 at 10:51 AM Andrii Nakryiko wrote: > > I haven't checked which of the patches, or some in other series caused > > this on Clear Linux: > > > > 21 clearlinux:latest : FAIL gcc (Clear Linux OS for Intel > > Architecture) 10.2.1 20200723 releases/gcc-10.2.0-3-g677b8

Re: [RFC PATCH] bpftool btf: Add prefix option to dump C

2020-08-06 Thread Andrii Nakryiko
On Fri, Jul 31, 2020 at 8:47 PM Andrii Nakryiko wrote: > > On Fri, Jul 31, 2020 at 6:47 PM Ian Rogers wrote: > > > > On Tue, Jul 21, 2020 at 11:58 PM Andrii Nakryiko > > wrote: > > > > > > On Tue, Jul 21, 2020 at 10:44 PM Ian Rogers wrote: > > > > > > > > When bpftool dumps types and enum membe

Re: [PATCH iproute2-next 0/3] Global per-type support for QP counters

2020-08-06 Thread David Ahern
On 8/4/20 2:49 AM, Leon Romanovsky wrote: > From: Leon Romanovsky > > Changelog: > * Update first patch to latest rdma_netlink.h file. > * Drop RFC, the kernel part was accepted. > https://lore.kernel.org/linux-rdma/20200726112011.75905-1-l...@kernel.org > applied to iproute2-next

Re: [PATCH v2] net: add support for threaded NAPI polling

2020-08-06 Thread kernel test robot
Hi Felix, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] [also build test WARNING on linus/master next-20200806] [cannot apply to net/master ipvs/master v5.8] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [PATCH bpf-next 0/3] Add generic and raw BTF parsing APIs to libbpf

2020-08-06 Thread Andrii Nakryiko
On Thu, Aug 6, 2020 at 10:39 AM Arnaldo Carvalho de Melo wrote: > > Em Sat, Aug 01, 2020 at 06:32:16PM -0700, Andrii Nakryiko escreveu: > > It's pretty common for applications to want to parse raw (binary) BTF data > > from file, as opposed to parsing it from ELF sections. It's also pretty > > co

[PATCH v5 net-next 0/3] Add PTP support for Octeontx2

2020-08-06 Thread sundeep . lkml
From: Subbaraya Sundeep Hi, This patchset adds PTP support for Octeontx2 platform. PTP is an independent coprocessor block from which CGX block fetches timestamp and prepends it to the packet before sending to NIX block. Patches are as follows: Patch 1: Patch to enable/disable packet timstampin

Re: [PATCH net 0/4] support multipacket broadcast message

2020-08-06 Thread Oleksij Rempel
Hello, Thank you for your patches! Currently I'm busy, but I'll take a look at it as soon possible. btw. can you tell me about more of your use case/work. I would like to have some feedback about this stack. You can write a personal message, if it is not for public. On Wed, Aug 05, 2020 at 11:50

[PATCH v5 net-next 3/3] octeontx2-pf: Add support for PTP clock

2020-08-06 Thread sundeep . lkml
From: Aleksey Makarov This patch adds PTP clock and uses it in Octeontx2 network device. PTP clock uses mailbox calls to access the hardware counter on the RVU side. Co-developed-by: Subbaraya Sundeep Signed-off-by: Subbaraya Sundeep Signed-off-by: Aleksey Makarov Signed-off-by: Sunil Goutham

[PATCH v5 net-next 1/3] octeontx2-af: Support to enable/disable HW timestamping

2020-08-06 Thread sundeep . lkml
From: Zyta Szpak Four new mbox messages ids and handler are added in order to enable or disable timestamping procedure on tx and rx side. Additionally when PTP is enabled, the packet parser must skip over 8 bytes and start analyzing packet data there. To make NPC profiles work seemlesly PTR_ADVAN

[PATCH v5 net-next 2/3] octeontx2-af: Add support for Marvell PTP coprocessor

2020-08-06 Thread sundeep . lkml
From: Aleksey Makarov This patch adds driver for Precision Time Protocol Clock and Timestamping block found on Octeontx2 platform. The driver does initial configuration and exposes a function to adjust PTP hardware clock. Co-developed-by: Subbaraya Sundeep Signed-off-by: Subbaraya Sundeep Sign

[PATCH net v3 0/2] net: initialize fastreuse on inet_inherit_port

2020-08-06 Thread Tim Froidcoeur
In the case of TPROXY, bind_conflict optimizations for SO_REUSEADDR or SO_REUSEPORT are broken, possibly resulting in O(n) instead of O(1) bind behaviour or in the incorrect reuse of a bind. the kernel keeps track for each bind_bucket if all sockets in the bind_bucket support SO_REUSEADDR or SO_RE

Re: [PATCH bpf-next 0/3] Add generic and raw BTF parsing APIs to libbpf

2020-08-06 Thread Arnaldo Carvalho de Melo
Em Sat, Aug 01, 2020 at 06:32:16PM -0700, Andrii Nakryiko escreveu: > It's pretty common for applications to want to parse raw (binary) BTF data > from file, as opposed to parsing it from ELF sections. It's also pretty common > for tools to not care whether given file is ELF or raw BTF format. This

Re: [PATCH v2] net: add support for threaded NAPI polling

2020-08-06 Thread Eric Dumazet
On 8/6/20 2:55 AM, Felix Fietkau wrote: > For some drivers (especially 802.11 drivers), doing a lot of work in the NAPI > poll function does not perform well. Since NAPI poll is bound to the CPU it > was scheduled from, we can easily end up with a few very busy CPUs spending > most of their time

Re: [PATCH net] net: qcom/emac: Fix missing clk_disable_unprepare() in error path of emac_probe

2020-08-06 Thread Timur Tabi
On 8/6/20 9:06 AM, Wang Hai wrote: In emac_clks_phase1_init() of emac_probe(), there may be a situation in which some clk_prepare_enable() succeed and others fail. If emac_clks_phase1_init() fails, goto err_undo_clocks to clean up the clk that was successfully clk_prepare_enable(). Good catch,

Re: [PATCH net 1/2] ipv6: add ipv6_dev_find()

2020-08-06 Thread David Ahern
On 8/6/20 2:55 AM, Xin Long wrote: > On Thu, Aug 6, 2020 at 10:50 AM Hideaki Yoshifuji > wrote: >> >> Hi, >> >> 2020年8月4日(火) 0:35 Xin Long : >>> >>> This is to add an ip_dev_find like function for ipv6, used to find >>> the dev by saddr. >>> >>> It will be used by TIPC protocol. So also export it.

Re: [PATCH] drivers/net/wan/lapbether: Added needed_headroom and a skb->len check

2020-08-06 Thread Xie He
On Thu, Aug 6, 2020 at 12:47 AM Willem de Bruijn wrote: > > Acked-by: Willem de Bruijn > > The in-band signal byte is required, but stripped by lapbeth_xmit. > Subsequent code will prefix additional headers, including an Ethernet > link layer. The extra space needs to be reserved, but not pulled

[PATCH net v3 2/2] net: initialize fastreuse on inet_inherit_port

2020-08-06 Thread Tim Froidcoeur
In the case of TPROXY, bind_conflict optimizations for SO_REUSEADDR or SO_REUSEPORT are broken, possibly resulting in O(n) instead of O(1) bind behaviour or in the incorrect reuse of a bind. the kernel keeps track for each bind_bucket if all sockets in the bind_bucket support SO_REUSEADDR or SO_RE

Re: [PATCH v4 bpf-next] bpf/selftests: fold test_current_pid_tgid_new_ns into test_progs.

2020-08-06 Thread Carlos Antonio Neira Bustos
On Wed, Aug 05, 2020 at 01:15:05PM -0700, Andrii Nakryiko wrote: > On Wed, Aug 5, 2020 at 1:06 PM Carlos Neira wrote: > > > > Currently tests for bpf_get_ns_current_pid_tgid() are outside test_progs. > > This change folds a test case into test_progs. > > > > Changes from V3: > > - STAT(2) check c

Re: [PATCH 3/5] net: Set fput_needed iff FDPUT_FPUT is set

2020-08-06 Thread Al Viro
On Thu, Aug 06, 2020 at 12:59:16PM +0100, Al Viro wrote: > On Thu, Aug 06, 2020 at 07:53:16PM +0800, linmiaohe wrote: > > From: Miaohe Lin > > > > We should fput() file iff FDPUT_FPUT is set. So we should set fput_needed > > accordingly. > > > > Fixes: 00e188ef6a7e ("sockfd_lookup_light(): switc

Re: 9p/trans_fd lockup

2020-08-06 Thread Dominique Martinet
Alexey Kardashevskiy wrote on Thu, Aug 06, 2020: > I am seeing another bug in 9p under syzkaller, the reprocase is: > > r0 = open$dir(&(0x7f40)='./file0\x00', 0x88142, 0x182) > > r1 = openat$null(0xff9c, &(0x7f000640)='/dev/null\x00', > 0x0, 0x0) > mount$9p_fd(0x0, &(0x7f0

RE: [PATCH v2 0/2] Add Ethernet support for Intel Keem Bay SoC

2020-08-06 Thread G Jaya Kumaran, Vineetha
Hello, May I know if there are any comments regarding this patch-set before I submit a V3? Just would like to check, since so far the feedback obtained for V1 and V2 has been regarding only the DT documentation. Thank you, Vineetha > -Original Message- > From: netdev-ow...@vger.kernel.

Re: Question about TC filter

2020-08-06 Thread satish dhote
Hi Cong, I tried adding below patch i.e. "return cl == 0 ? q->block : NULL;" but after this I'm not able to see any output using "tc filter show... " command. Looks like the filter is not getting configured. If this is a bug, then do I need to file a new ticket for this? Thanks Satish On Thu, A

[RFC PATCH bpf-next 2/4] bpf: make BTF show support generic, apply to seq files/bpf_trace_printk

2020-08-06 Thread Alan Maguire
generalize the "seq_show" seq file support in btf.c to support a generic show callback of which we support three instances; - the current seq file show - a show which triggers the bpf_trace/bpf_trace_printk tracepoint for each portion of the data displayed Both classes of show function call btf

  1   2   >