[PATCH net-next] net: xilinx: drivers need/depend on HAS_IOMEM

2021-04-16 Thread Randy Dunlap
re Przywara Cc: sta...@vger.kernel.org Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org --- drivers/net/ethernet/xilinx/Kconfig |3 +++ 1 file changed, 3 insertions(+) --- linux-next-20210416.orig/drivers/net/ethernet/xilinx/Kconfig +++ linux

[GIT PULL] Networking for 5.12-rc8

2021-04-16 Thread Jakub Kicinski
The following changes since commit 4e04e7513b0fa2fe8966a1c83fb473f1667e2810: Merge tag 'net-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (2021-04-09 15:26:51 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git

Re: [PATCH bpf-next 11/15] bpf: Add bpf_sys_close() helper.

2021-04-16 Thread Alexei Starovoitov
On Fri, Apr 16, 2021 at 9:04 PM Al Viro wrote: > > On Fri, Apr 16, 2021 at 08:46:05PM -0700, Alexei Starovoitov wrote: > > On Fri, Apr 16, 2021 at 8:42 PM Al Viro wrote: > > > > > > On Fri, Apr 16, 2021 at 08:32:20PM -0700, Alexei Starovoitov wrote: > > > > From: Alexei Starovoitov > > > > > > >

Re: [PATCH bpf-next 11/15] bpf: Add bpf_sys_close() helper.

2021-04-16 Thread Al Viro
On Fri, Apr 16, 2021 at 08:46:05PM -0700, Alexei Starovoitov wrote: > On Fri, Apr 16, 2021 at 8:42 PM Al Viro wrote: > > > > On Fri, Apr 16, 2021 at 08:32:20PM -0700, Alexei Starovoitov wrote: > > > From: Alexei Starovoitov > > > > > > Add bpf_sys_close() helper to be used by the syscall/loader p

Re: [PATCH bpf-next 11/15] bpf: Add bpf_sys_close() helper.

2021-04-16 Thread Alexei Starovoitov
On Fri, Apr 16, 2021 at 8:42 PM Al Viro wrote: > > On Fri, Apr 16, 2021 at 08:32:20PM -0700, Alexei Starovoitov wrote: > > From: Alexei Starovoitov > > > > Add bpf_sys_close() helper to be used by the syscall/loader program to close > > intermediate FDs and other cleanup. > > Conditional NAK. In

Re: [PATCH net] net: fix use-after-free when UDP GRO with shared fraglist

2021-04-16 Thread Yunsheng Lin
On 2021/1/6 11:32, Dongseok Yi wrote: > On 2021-01-06 12:07, Willem de Bruijn wrote: >> >> On Tue, Jan 5, 2021 at 8:29 PM Dongseok Yi wrote: >>> >>> On 2021-01-05 06:03, Willem de Bruijn wrote: On Mon, Jan 4, 2021 at 4:00 AM Dongseok Yi wrote: > > skbs in frag_list could be shar

Re: [PATCH bpf-next 11/15] bpf: Add bpf_sys_close() helper.

2021-04-16 Thread Al Viro
On Fri, Apr 16, 2021 at 08:32:20PM -0700, Alexei Starovoitov wrote: > From: Alexei Starovoitov > > Add bpf_sys_close() helper to be used by the syscall/loader program to close > intermediate FDs and other cleanup. Conditional NAK. In a lot of contexts close_fd() is very much unsafe. In particul

[PATCH bpf-next 15/15] selftests/bpf: Convert few tests to light skeleton.

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov Convert few tests that don't use CO-RE to light skeleton. Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/.gitignore| 1 + tools/testing/selftests/bpf/Makefile | 15 ++- .../selftests/bpf/prog_tests/fentry_fexit.c

[PATCH bpf-next 11/15] bpf: Add bpf_sys_close() helper.

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov Add bpf_sys_close() helper to be used by the syscall/loader program to close intermediate FDs and other cleanup. Signed-off-by: Alexei Starovoitov --- include/uapi/linux/bpf.h | 7 +++ kernel/bpf/syscall.c | 14 ++ tools/include/uapi/li

[PATCH bpf-next 12/15] libbpf: Change the order of data and text relocations.

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov In order to be able to generate loader program in the later patches change the order of data and text relocations. Also improve the test to include data relos. Signed-off-by: Alexei Starovoitov --- tools/lib/bpf/libbpf.c| 82 ++-

[PATCH bpf-next 14/15] bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command.

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov Add -L flag to bpftool to use libbpf gen_trace facility and syscall/loader program for skeleton generation and program loading. "bpftool gen skeleton -L" command will generate a "light skeleton" or "loader skeleton" that is similar to existing skeleton, but has one maj

[PATCH bpf-next 08/15] bpf: Introduce fd_idx

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov Typical program loading sequence involves creating bpf maps and applying map FDs into bpf instructions in various places in the bpf program. This job is done by libbpf that is using compiler generated ELF relocations to patch certain instruction after maps are created and

[PATCH bpf-next 09/15] libbpf: Support for fd_idx

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov Add support for FD_IDX make libbpf prefer that approach to loading programs. Signed-off-by: Alexei Starovoitov --- tools/lib/bpf/bpf.c | 1 + tools/lib/bpf/libbpf.c | 70 + tools/lib/bpf/libbpf_internal.h | 1 + 3

[PATCH bpf-next 13/15] libbpf: Generate loader program out of BPF ELF file.

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov The BPF program loading process performed by libbpf is quite complex and consists of the following steps: "open" phase: - parse elf file and remember relocations, sections - collect externs and ksyms including their btf_ids in prog's BTF - patch BTF datasec (since llvm co

[PATCH bpf-next 07/15] selftests/bpf: Test for btf_load command.

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov Improve selftest to check that btf_load is working from bpf program. Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/progs/syscall.c | 48 + 1 file changed, 48 insertions(+) diff --git a/tools/testing/selftests/bpf/progs/syscall.c

[PATCH bpf-next 06/15] bpf: Make btf_load command to be bpfptr_t compatible.

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov Similar to prog_load make btf_load command to be availble to bpf_prog_type_syscall program. Signed-off-by: Alexei Starovoitov --- include/linux/btf.h | 2 +- kernel/bpf/btf.c | 8 kernel/bpf/syscall.c | 7 --- 3 files changed, 9 insertions(+), 8 delet

[PATCH bpf-next 10/15] bpf: Add bpf_btf_find_by_name_kind() helper.

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov Add bpf_btf_find_by_name_kind() helper. Signed-off-by: Alexei Starovoitov --- include/linux/bpf.h| 1 + include/uapi/linux/bpf.h | 8 ++ kernel/bpf/btf.c | 51 ++ kernel/bpf/syscall.c | 2

[PATCH bpf-next 05/15] selftests/bpf: Test for syscall program type

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov bpf_prog_type_syscall is a program that creates a bpf map, updates it, and loads another bpf program using bpf_sys_bpf() helper. Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/Makefile | 1 + .../selftests/bpf/prog_tests/syscall.c|

[PATCH bpf-next 03/15] bpf: Prepare bpf syscall to be used from kernel and user space.

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov With the help from bpfptr_t prepare relevant bpf syscall commands to be used from kernel and user space. Signed-off-by: Alexei Starovoitov --- include/linux/bpf.h | 8 +-- kernel/bpf/bpf_iter.c | 13 ++--- kernel/bpf/syscall.c | 110 +++---

[PATCH bpf-next 04/15] libbpf: Support for syscall program type

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov Trivial support for syscall program type. Signed-off-by: Alexei Starovoitov --- tools/lib/bpf/libbpf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 9cc2d45b0080..254a0c9aa6cf 100644 --- a/tools/lib/bpf/libbpf

[PATCH bpf-next 02/15] bpf: Introduce bpfptr_t user/kernel pointer.

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov Similar to sockptr_t introduce bpfptr_t with few additions: make_bpfptr() creates new user/kernel pointer in the same address space as existing user/kernel pointer. bpfptr_add() advances the user/kernel pointer. Signed-off-by: Alexei Starovoitov --- include/linux/bpfpt

[PATCH bpf-next 00/15] bpf: syscall program, FD array, loader program, light skeleton.

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov This is a first step towards signed bpf programs and the third approach of that kind. The first approach was to bring libbpf into the kernel as a user-mode-driver. The second approach was to invent a new file format and let kernel execute that format as a sequence of sys

[PATCH bpf-next 01/15] bpf: Introduce bpf_sys_bpf() helper and program type.

2021-04-16 Thread Alexei Starovoitov
From: Alexei Starovoitov Add placeholders for bpf_sys_bpf() helper and new program type. Signed-off-by: Alexei Starovoitov --- include/linux/bpf.h| 10 include/linux/bpf_types.h | 2 ++ include/uapi/linux/bpf.h | 8 ++ kernel/bpf/syscall.c | 46 +

Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-16 Thread Matthew Wilcox
On Fri, Apr 16, 2021 at 07:08:23PM +0200, Jesper Dangaard Brouer wrote: > On Fri, 16 Apr 2021 16:27:55 +0100 > Matthew Wilcox wrote: > > > On Thu, Apr 15, 2021 at 08:08:32PM +0200, Jesper Dangaard Brouer wrote: > > > See below patch. Where I swap32 the dma address to satisfy > > > page->compound

Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-16 Thread Matthew Wilcox
Replacement patch to fix compiler warning. From: "Matthew Wilcox (Oracle)" Date: Fri, 16 Apr 2021 16:34:55 -0400 Subject: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems To: bro...@redhat.com Cc: linux-ker...@vger.kernel.org, linux...@kvack.org, netdev@vger.kernel.org, linu

Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-16 Thread kernel test robot
Hi "Matthew, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linux/master] [also build test WARNING on linus/master v5.12-rc7] [cannot apply to hnaz-linux-mm/master next-20210416] [If your patch is applied to the wrong git tree, kindly drop us a note. And

Re: [PATCH][next] sctp: Fix out-of-bounds warning in sctp_process_asconf_param()

2021-04-16 Thread Gustavo A. R. Silva
Dave, On 4/16/21 19:00, patchwork-bot+netdev...@kernel.org wrote: > Hello: > > This patch was applied to netdev/net-next.git (refs/heads/master): > > On Fri, 16 Apr 2021 14:12:36 -0500 you wrote: >> Fix the following out-of-bounds warning: >> >> net/sctp/sm_make_chunk.c:3150:4: warning: 'memcpy'

Re: PROBLEM: DoS Attack on Fragment Cache

2021-04-16 Thread David Ahern
[ cc author of 648700f76b03b7e8149d13cc2bdb3355035258a9 ] On 4/16/21 3:58 PM, Keyu Man wrote: > Hi, > >   > >     My name is Keyu Man. We are a group of researchers from University > of California, Riverside. Zhiyun Qian is my advisor. We found the code > in processing IPv4/IPv6 fragments will p

Re: [PATCHv7 bpf-next 1/4] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-04-16 Thread Paul E. McKenney
On Fri, Apr 16, 2021 at 11:22:52AM -0700, Martin KaFai Lau wrote: > On Fri, Apr 16, 2021 at 03:45:23PM +0200, Jesper Dangaard Brouer wrote: > > On Thu, 15 Apr 2021 17:39:13 -0700 > > Martin KaFai Lau wrote: > > > > > On Thu, Apr 15, 2021 at 10:29:40PM +0200, Toke Høiland-Jørgensen wrote: > > > >

Re: [PATCH net-next 0/6][pull request] 1GbE Intel Wired LAN Driver Updates 2021-04-16

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Fri, 16 Apr 2021 13:44:54 -0700 you wrote: > This series contains updates to igb and igc drivers. > > Ederson adjusts Tx buffer distributions in Qav mode to improve > TSN-aware traffic for igb. He also enable PPS suppo

Re: [PATCH net-next 0/8] mptcp: Fixes and tracepoints from the mptcp tree

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Fri, 16 Apr 2021 15:38:00 -0700 you wrote: > Here's one more batch of changes that we've tested out in the MPTCP tree. > > > Patch 1 makes the MPTCP KUnit config symbol more consistent with other > subsystems. > > Pa

Re: [PATCH net-next 00/10] Fixups for XDP on NXP ENETC

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Sat, 17 Apr 2021 00:22:15 +0300 you wrote: > From: Vladimir Oltean > > After some more XDP testing on the NXP LS1028A, this is a set of 10 bug > fixes, simplifications and tweaks, ranging from addressing Toke's feedba

Re: [PATCH net] netlink: don't call ->netlink_bind with table lock held

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Fri, 16 Apr 2021 21:29:13 +0200 you wrote: > When I added support to allow generic netlink multicast groups to be > restricted to subscribers with CAP_NET_ADMIN I was unaware that a > genl_bind implementation already existed

[PATCH net] net/core/dev.c: Ensure pfmemalloc skbs are correctly handled when receiving

2021-04-16 Thread Xie He
When an skb is allocated by "__netdev_alloc_skb" in "net/core/skbuff.c", if "sk_memalloc_socks()" is true, and if there's not sufficient memory, the skb would be allocated using emergency memory reserves. This kind of skbs are called pfmemalloc skbs. pfmemalloc skbs must be specially handled in "n

Re: [net-next 01/14] net/mlx5e: Remove non-essential TLS SQ state bit

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Fri, 16 Apr 2021 11:54:17 -0700 you wrote: > From: Tariq Toukan > > Maintaining an SQ state bit to indicate TLS support > has no real need, a simple and fast test [1] for the SKB is > almost equally good. > > [1] !sk

Re: [PATCH net-next 0/2] net: gianfar: Drop GFAR_MQ_POLLING support

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Fri, 16 Apr 2021 20:11:21 +0300 you wrote: > Drop long time obsolete "per NAPI multi-queue" support in gianfar, > and related (and undocumented) device tree properties. > > Claudiu Manoil (2): > gianfar: Drop GFAR_MQ

[PATCH net-next 5/5] net: enetc: add support for flow control

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean In the ENETC receive path, a frame received by the MAC is first stored in a 256KB 'FIFO' memory, then transferred to DRAM when enqueuing it to the RX ring. The FIFO is a shared resource for all ENETC ports, but every port keeps track of its own memory utilization, on RX and

[PATCH net-next 4/5] arm64: dts: ls1028a: declare the Integrated Endpoint Register Block node

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean Add a node describing the address in the SoC memory space for the IERB. Signed-off-by: Vladimir Oltean --- arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi b/arch/arm64

[PATCH net-next 3/5] net: enetc: add a mini driver for the Integrated Endpoint Register Block

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean The NXP ENETC is a 4-port Ethernet controller which 'smells' to operating systems like 4 distinct PCIe PFs with SR-IOV, each PF having its own driver instance, but in fact there are some hardware resources which are shared between all ports, like for example the 256 KB SRAM

[PATCH net-next 2/5] dt-bindings: net: fsl: enetc: add the IERB documentation

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean Mention the required compatible string and base address for the Integrated Endpoint Register Block node. Signed-off-by: Vladimir Oltean --- .../devicetree/bindings/net/fsl-enetc.txt | 15 +++ 1 file changed, 15 insertions(+) diff --git a/Documentation

[PATCH net-next 1/5] net: enetc: create a common enetc_pf_to_port helper

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean Even though ENETC interfaces are exposed as individual PCIe PFs with their own driver instances, the ENETC is still fundamentally a multi-port Ethernet controller, and some parts of the IP take a port number (as can be seen in the PSFP implementation). Create a common helpe

[PATCH net-next 0/5] Flow control for NXP ENETC

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean This patch series contains logic for enabling the lossless mode on the RX rings of the ENETC, and the PAUSE thresholds on the internal FIFO memory. During testing it was found that, with the default FIFO configuration, a sender which isn't persuaded by our PAUSE frames and

Re: [PATCH v3] net: sched: tapr: prevent cycle_time == 0 in parse_taprio_schedule

2021-04-16 Thread Du Cheng
Le Fri, Apr 16, 2021 at 10:14:52AM -0700, Cong Wang a écrit : > On Thu, Apr 15, 2021 at 4:17 PM Du Cheng wrote: > > diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c > > index 8287894541e3..abd6b176383c 100644 > > --- a/net/sched/sch_taprio.c > > +++ b/net/sched/sch_taprio.c > > @@ -901

[PATCH v4] net: sched: tapr: prevent cycle_time == 0 in parse_taprio_schedule

2021-04-16 Thread Du Cheng
There is a reproducible sequence from the userland that will trigger a WARN_ON() condition in taprio_get_start_time, which causes kernel to panic if configured as "panic_on_warn". Catch this condition in parse_taprio_schedule to prevent this condition. Reported as bug on syzkaller: https://syzkall

[PATCH RESEND net-next] net: marvell: prestera: add support for AC3X 98DX3265 device

2021-04-16 Thread Vadym Kochan
From: Vadym Kochan Add PCI match for AC3X 98DX3265 device which is supported by the current driver and firmware. Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/prestera/prestera_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/marvell/prestera/preste

Re: [PATCH] net: marvell: prestera: add support for AC3X 98DX3265 device

2021-04-16 Thread Vadym Kochan
On Sat, Apr 17, 2021 at 02:02:02AM +0300, Vadym Kochan wrote: > From: Vadym Kochan > > Add PCI match for AC3X 98DX3265 device which is supported by the current > driver and firmware. > > Signed-off-by: Vadym Kochan > --- > drivers/net/ethernet/marvell/prestera/prestera_pci.c | 1 + > 1 file ch

PROBLEM: DoS Attack on Fragment Cache

2021-04-16 Thread Keyu Man
Hi, My name is Keyu Man. We are a group of researchers from University of California, Riverside. Zhiyun Qian is my advisor. We found the code in processing IPv4/IPv6 fragments will potentially lead to DoS Attacks. Specifically, after the latest kernel receives an IPv4 fragment, it will try to

[PATCH 2/2] mm: Indicate pfmemalloc pages in compound_head

2021-04-16 Thread Matthew Wilcox (Oracle)
The net page_pool wants to use a magic value to identify page pool pages. The best place to put it is in the first word where it can be clearly a non-pointer value. That means shifting dma_addr up to alias with ->index, which means we need to find another way to indicate page_is_pfmemalloc(). Sinc

[PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-16 Thread Matthew Wilcox (Oracle)
32-bit architectures which expect 8-byte alignment for 8-byte integers and need 64-bit DMA addresses (arc, arm, mips, ppc) had their struct page inadvertently expanded in 2019. When the dma_addr_t was added, it forced the alignment of the union to 8 bytes, which inserted a 4 byte gap between 'flag

[PATCH 0/2] Change struct page layout for page_pool

2021-04-16 Thread Matthew Wilcox (Oracle)
The first patch here fixes two bugs on ppc32, and mips32. It fixes one bug on arc and arm32 (in certain configurations). It probably makes sense to get it in ASAP through the networking tree. I'd like to see testing on those four architectures if possible? The second patch enables new functiona

[PATCH] net: marvell: prestera: add support for AC3X 98DX3265 device

2021-04-16 Thread Vadym Kochan
From: Vadym Kochan Add PCI match for AC3X 98DX3265 device which is supported by the current driver and firmware. Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/prestera/prestera_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/marvell/prestera/preste

Re: [PATCH v8 bpf-next 00/14] mvneta: introduce XDP multi-buffer support

2021-04-16 Thread Daniel Borkmann
On 4/16/21 11:29 PM, Lorenzo Bianconi wrote: Took your patches for a test run with the AF_XDP sample xdpsock on an i40e card and the throughput degradation is between 2 to 6% depending on the setup and microbenchmark within xdpsock that is executed. And this is without sending any multi frame pa

Re: [PATCH net-next 0/2] net: ipa: allow different firmware names

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Fri, 16 Apr 2021 08:08:48 -0500 you wrote: > Add the ability to define a "firmware-name" property in the IPA DT > node, specifying an alternate name to use for the firmware file. > Used only if the AP (Trust Zone) does

Re: [PATCH net-next] veth: check for NAPI instead of xdp_prog before xmit of XDP frame

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Fri, 16 Apr 2021 17:47:45 +0200 you wrote: > The recent patch that tied enabling of veth NAPI to the GRO flag also has > the nice side effect that a veth device can be the target of an > XDP_REDIRECT without an XDP progr

Re: [PATCH net-next] mld: fix suspicious RCU usage in __ipv6_dev_mc_dec()

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Fri, 16 Apr 2021 14:16:06 + you wrote: > __ipv6_dev_mc_dec() internally uses sleepable functions so that caller > must not acquire atomic locks. But caller, which is addrconf_verify_rtnl() > acquires rcu_read_lock_bh

Re: [External] Re: [PATCH] tcp: fix silent loss when syncookie is trigered

2021-04-16 Thread 赵亚
On Fri, Apr 16, 2021 at 7:52 PM Eric Dumazet wrote: > > On Fri, Apr 16, 2021 at 12:52 PM zhaoya wrote: > > > > When syncookie is triggered, since $MSSID is spliced into cookie and > > the legal index of msstab is 0,1,2,3, this gives client 3 bytes > > of freedom, resulting in at most 3 bytes of

Re: [PATCH net-next v2 0/3] introduce skb_for_each_frag()

2021-04-16 Thread Matteo Croce
On Tue, Apr 13, 2021 at 9:53 AM David Laight wrote: > > From: Matteo Croce > > Sent: 12 April 2021 01:38 > > > > Introduce skb_for_each_frag, an helper macro to iterate over the SKB frags. > > The real question is why, the change is: > > - for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { >

Re: [PATCH V2 net-next] net: mvpp2: Add parsing support for different IPv4 IHL values

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Fri, 16 Apr 2021 11:15:17 +0300 you wrote: > From: Stefan Chulski > > Add parser entries for different IPv4 IHL values. > Each entry will set the L4 header offset according to the IPv4 IHL field. > L3 header offset wil

Re: [PATCH net-next 0/6] r8152: support new chips

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Fri, 16 Apr 2021 16:04:31 +0800 you wrote: > Support new RTL8153 and RTL8156 series. > > Hayes Wang (6): > r8152: set inter fram gap time depending on speed > r8152: adjust rtl8152_check_firmware function > r8152

Re: [PATCH net-next v11 1/2] net: Add a WWAN subsystem

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Fri, 16 Apr 2021 10:36:33 +0200 you wrote: > This change introduces initial support for a WWAN framework. Given the > complexity and heterogeneity of existing WWAN hardwares and interfaces, > there is no strict definiti

[PATCH net-next 5/8] mptcp: add tracepoint in get_mapping_status

2021-04-16 Thread Mat Martineau
From: Geliang Tang This patch added a tracepoint in the mapping status function get_mapping_status() to dump every mpext field. Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau --- include/trace/events/mptcp.h | 52

[PATCH net-next 4/8] mptcp: add tracepoint in mptcp_subflow_get_send

2021-04-16 Thread Mat Martineau
From: Geliang Tang This patch added a tracepoint in the packet scheduler function mptcp_subflow_get_send(). Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau --- MAINTAINERS | 1 + include/trace/events/mptcp.h | 60 +++

[PATCH net-next 6/8] mptcp: add tracepoint in ack_update_msk

2021-04-16 Thread Mat Martineau
From: Geliang Tang This patch added a tracepoint in ack_update_msk() to track the incoming data_ack and window/snd_una updates. Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau --- include/trace/events/mptcp.h | 32

[PATCH net-next 8/8] mptcp: use mptcp_for_each_subflow in mptcp_close

2021-04-16 Thread Mat Martineau
From: Geliang Tang This patch used the macro helper mptcp_for_each_subflow() instead of list_for_each_entry() in mptcp_close. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau --- net/mptcp/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mptcp/protoco

[PATCH net-next 7/8] mptcp: add tracepoint in subflow_check_data_avail

2021-04-16 Thread Mat Martineau
From: Geliang Tang This patch added a tracepoint in subflow_check_data_avail() to show the mapping status. Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau --- include/trace/events/mptcp.h | 29 + net/mptcp/

[PATCH net-next 1/8] kunit: mptcp: adhere to KUNIT formatting standard

2021-04-16 Thread Mat Martineau
From: Nico Pache Drop 'S' from end of CONFIG_MPTCP_KUNIT_TESTS in order to adhere to the KUNIT *_KUNIT_TEST config name format. Fixes: a00a582203db (mptcp: move crypto test to KUNIT) Reviewed-by: David Gow Reviewed-by: Matthieu Baerts Signed-off-by: Nico Pache Signed-off-by: Mat Martineau --

[PATCH net-next 3/8] mptcp: export mptcp_subflow_active

2021-04-16 Thread Mat Martineau
From: Geliang Tang This patch moved the static function mptcp_subflow_active to protocol.h as an inline one. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau --- net/mptcp/protocol.c | 12 net/mptcp/protocol.h | 12 2 files changed, 12

[PATCH net-next 2/8] mptcp: fix format specifiers for unsigned int

2021-04-16 Thread Mat Martineau
From: Geliang Tang Some of the sequence numbers are printed as the negative ones in the debug log: [ 46.250932] MPTCP: DSS [ 46.250940] MPTCP: data_fin=0 dsn64=0 use_map=0 ack64=1 use_ack=1 [ 46.250948] MPTCP: data_ack=2344892449471675613 [ 46.251012] MPTCP: msk=6e157e3f status=1

[PATCH net-next 0/8] mptcp: Fixes and tracepoints from the mptcp tree

2021-04-16 Thread Mat Martineau
Here's one more batch of changes that we've tested out in the MPTCP tree. Patch 1 makes the MPTCP KUnit config symbol more consistent with other subsystems. Patch 2 fixes a couple of format specifiers in pr_debug()s Patches 3-7 add four helpful tracepoints for MPTCP. Patch 8 is a one-line refa

pull-request: bpf 2021-04-17

2021-04-16 Thread Daniel Borkmann
Hi David, hi Jakub, The following pull-request contains BPF updates for your *net* tree. We've added 10 non-merge commits during the last 9 day(s) which contain a total of 8 files changed, 175 insertions(+), 111 deletions(-). The main changes are: 1) Fix a potential NULL pointer dereference in

Re: [PATCH net-next,v3] net: ethernet: mediatek: ppe: fix busy wait loop

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Thu, 15 Apr 2021 17:37:48 -0700 you wrote: > The intention is for the loop to timeout if the body does not succeed. > The current logic calls time_is_before_jiffies(timeout) which is false > until after the timeout, so t

Re: [PATCH net-next v6] atl1c: move tx cleanup processing out of interrupt

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Wed, 14 Apr 2021 22:09:20 +0300 you wrote: > Tx queue cleanup happens in interrupt handler on same core as rx queue > processing. Both can take considerable amount of processing in high > packet-per-second scenarios. >

Re: [PATCH net-next 00/13] mptcp: Improve socket option handling

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Thu, 15 Apr 2021 16:44:49 -0700 you wrote: > MPTCP sockets have previously had limited socket option support. The > architecture of MPTCP sockets (one userspace-facing MPTCP socket that > manages one or more in-kernel T

Re: [PATCH net] MAINTAINERS: update my email

2021-04-16 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 15 Apr 2021 23:18:13 -0500 you wrote: > Update my email and change myself to Reviewer. > > Signed-off-by: Lijun Pan > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Here is the summary with

Re: [PATCH net-next 4/6] r8152: support new chips

2021-04-16 Thread Jakub Kicinski
On Fri, 16 Apr 2021 16:04:35 +0800 Hayes Wang wrote: > Support RTL8153C, RTL8153D, RTL8156A, and RTL8156B. The RTL8156A > and RTL8156B are the 2.5G ethernet. > > Signed-off-by: Hayes Wang > + switch (tp->version) { > + case RTL_VER_10: > + data = ocp_reg_read(tp, 0xad40); > +

Re: [PATCH bpf-next v4 0/3] add batched ops for percpu array

2021-04-16 Thread Martin KaFai Lau
On Thu, Apr 15, 2021 at 02:46:16PM -0300, Pedro Tammela wrote: > This patchset introduces batched operations for the per-cpu variant of > the array map. > > It also removes the percpu macros from 'bpf_util.h'. This change was > suggested by Andrii in a earlier iteration of this patchset. > > The

Re: [PATCH v8 bpf-next 00/14] mvneta: introduce XDP multi-buffer support

2021-04-16 Thread Lorenzo Bianconi
> > Took your patches for a test run with the AF_XDP sample xdpsock on an > i40e card and the throughput degradation is between 2 to 6% depending > on the setup and microbenchmark within xdpsock that is executed. And > this is without sending any multi frame packets. Just single frame > ones. Tirt

Re: [PATCH net-next 09/10] net: sparx5: add ethtool configuration and statistics support

2021-04-16 Thread Jakub Kicinski
On Fri, 16 Apr 2021 15:16:56 +0200 Steen Hegelund wrote: > + "rx_in_bytes", > + "rx_symbol_err", > + "rx_pause", > + "rx_unsup_opcode", > + "rx_ok_bytes", > + "rx_bad_bytes", > + "rx_unicast", > + "rx_multicast", > + "rx_broadcast", > + "rx_crc_err", > +

[PATCH net-next 10/10] net: enetc: apply the MDIO workaround for XDP_REDIRECT too

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean Described in fd5736bf9f23 ("enetc: Workaround for MDIO register access issue") is a workaround for a hardware bug that requires a register access of the MDIO controller to never happen concurrently with a register access of a port PF. To avoid that, a mutual exclusion scheme

[PATCH net-next 09/10] net: enetc: fix buffer leaks with XDP_TX enqueue rejections

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean If the TX ring is congested, enetc_xdp_tx() returns false for the current XDP frame (represented as an array of software BDs). This array of software TX BDs is constructed in enetc_rx_swbd_to_xdp_tx_swbd from software BDs freshly cleaned from the RX ring. The issue is that

[PATCH net-next 08/10] net: enetc: handle the invalid XDP action the same way as XDP_DROP

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean When the XDP program returns an invalid action, we should free the RX buffer. Signed-off-by: Vladimir Oltean --- drivers/net/ethernet/freescale/enetc/enetc.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/freescale/enetc/en

[PATCH net-next 07/10] net: enetc: use dedicated TX rings for XDP

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean It is possible for one CPU to perform TX hashing (see netdev_pick_tx) between the 8 ENETC TX rings, and the TX hashing to select TX queue 1. At the same time, it is possible for the other CPU to already use TX ring 1 for XDP (either XDP_TX or XDP_REDIRECT). Since there is n

[PATCH net-next 05/10] net: enetc: remove unneeded xdp_do_flush_map()

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean xdp_do_redirect already contains: -> dev_map_enqueue -> __xdp_enqueue -> bq_enqueue -> bq_xmit_all // if we have more than 16 frames So the logic from enetc will never be hit, because ENETC_DEFAULT_TX_WORK is 128. Signed-off-by: Vladimir Oltean --- driv

[PATCH net-next 06/10] net: enetc: increase TX ring size

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean Now that commit d6a2829e82cf ("net: enetc: increase RX ring default size") has increased the RX ring size, it is quite easy to congest the TX rings when the traffic is predominantly XDP_TX, as the RX ring is quite a bit larger than the TX one. Since we bit the bullet and di

[PATCH net-next 04/10] net: enetc: stop XDP NAPI processing when build_skb() fails

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean When the code path below fails: enetc_clean_rx_ring_xdp // XDP_PASS -> enetc_build_skb -> enetc_map_rx_buff_to_skb -> build_skb enetc_clean_rx_ring_xdp will 'break', but that 'break' instruction isn't strong enough to actually break the NAPI poll loop, just the sw

[PATCH net-next 03/10] net: enetc: recycle buffers for frames with RX errors

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean When receiving a frame with errors, currently we do nothing with it (we don't construct an skb or an xdp_buff), we just exit the NAPI poll loop. Let's put the buffer back into the RX ring (similar to XDP_DROP). Signed-off-by: Vladimir Oltean --- drivers/net/ethernet/free

[PATCH net-next 02/10] net: enetc: rename the buffer reuse helpers

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean enetc_put_xdp_buff has nothing to do with XDP, frankly, it is just a helper to populate the recycle end of the shadow RX BD ring (next_to_alloc) with a given buffer. On the other hand, enetc_put_rx_buff plays more tricks than its name would suggest. So let's rename enetc_p

[PATCH net-next 01/10] net: enetc: remove redundant clearing of skb/xdp_frame pointer in TX conf path

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean Later in enetc_clean_tx_ring we have: /* Scrub the swbd here so we don't have to do that * when we reuse it during xmit */ memset(tx_swbd, 0, sizeof(*tx_swbd)); So these assignments are unnecessary. Signed-

[PATCH net-next 00/10] Fixups for XDP on NXP ENETC

2021-04-16 Thread Vladimir Oltean
From: Vladimir Oltean After some more XDP testing on the NXP LS1028A, this is a set of 10 bug fixes, simplifications and tweaks, ranging from addressing Toke's feedback (the network stack can run concurrently with XDP on the same TX rings) to fixing some OOM conditions seen under TX congestion.

Re: [PATCH net-next 03/10] net: sparx5: add hostmode with phylink support

2021-04-16 Thread Jakub Kicinski
On Fri, 16 Apr 2021 15:16:50 +0200 Steen Hegelund wrote: > +static int sparx5_set_mac_address(struct net_device *dev, void *p) > +{ > + const struct sockaddr *addr = p; > + > + /* Record the address */ > + ether_addr_copy(dev->dev_addr, addr->sa_data); I think you need to validate that

Re: [PATCH][next] sctp: Fix out-of-bounds warning in sctp_process_asconf_param()

2021-04-16 Thread Marcelo Ricardo Leitner
On Fri, Apr 16, 2021 at 02:12:36PM -0500, Gustavo A. R. Silva wrote: > Fix the following out-of-bounds warning: > > net/sctp/sm_make_chunk.c:3150:4: warning: 'memcpy' offset [17, 28] from the > object at 'addr' is out of the bounds of referenced subobject 'v4' with type > 'struct sockaddr_in' at

Re: [PATCH net-next 2/6] igb: Add double-check MTA_REGISTER for i210 and i211

2021-04-16 Thread Jakub Kicinski
On Fri, 16 Apr 2021 13:44:56 -0700 Tony Nguyen wrote: > + bool is_failed; > + int i; > + > + do { > + is_failed = false; > + for (i = hw->mac.mta_reg_count - 1; i >= 0; i--) { > + if (array_rd32(E1000_MTA, i) != hw->mac.mta_shadow[i]) { > +

[PATCH net-next 4/6] igc: enable auxiliary PHC functions for the i225

2021-04-16 Thread Tony Nguyen
From: Ederson de Souza The i225 device offers a number of special PTP Hardware Clock features on the Software Defined Pins (SDPs) - much like i210, which is used as inspiration for this patch. It enables two possible functions, namely time stamping external events and periodic output signals. Th

[PATCH net-next 6/6] igc: Expose LPI counters

2021-04-16 Thread Tony Nguyen
From: Sasha Neftin Expose EEE Tx and Rx low power idle counters via ethtool A EEE TX or RX LPI event occurs when the transmitter or the receiver enters EEE (IEEE802.3az) LPI state. ethtool --statistics Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen --- dri

[PATCH net-next 0/6][pull request] 1GbE Intel Wired LAN Driver Updates 2021-04-16

2021-04-16 Thread Tony Nguyen
This series contains updates to igb and igc drivers. Ederson adjusts Tx buffer distributions in Qav mode to improve TSN-aware traffic for igb. He also enable PPS support and auxiliary PHC functions for igc. Grzegorz checks that the MTA register was properly written and retries if not for igb. Sa

[PATCH net-next 5/6] igc: Fix overwrites return value

2021-04-16 Thread Tony Nguyen
From: Sasha Neftin drivers/net/ethernet/intel/igc/igc_i225.c:235 igc_write_nvm_srwr() warn: loop overwrites return value 'ret_val' Reported-by: Dan Carpenter Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_i225.c | 4 +

[PATCH net-next 3/6] igc: Enable internal i225 PPS

2021-04-16 Thread Tony Nguyen
From: Ederson de Souza The i225 device can produce one interrupt on the full second, much like i210 - from where this patch is inspired. This patch sets up the full second interruption on the i225 and when receiving it, it sends a PPS event to PTP (Precision Time Protocol) kernel subsystem. The

[PATCH net-next 1/6] igb: Redistribute memory for transmit packet buffers when in Qav mode

2021-04-16 Thread Tony Nguyen
From: Ederson de Souza i210 has a total of 24KB of transmit packet buffer. When in Qav mode, this buffer is divided into four pieces, one for each Tx queue. Currently, 8KB are given to each of the two SR queues and 4KB are given to each of the two SP queues. However, it was noticed that such dis

[PATCH net-next 2/6] igb: Add double-check MTA_REGISTER for i210 and i211

2021-04-16 Thread Tony Nguyen
From: Grzegorz Siwik Add new function which checks MTA_REGISTER if its filled correctly. If not then writes again to same register. There is possibility that i210 and i211 could not accept MTA_REGISTER settings, specially when you add and remove many of multicast addresses in short time. Without

[PATCH net] net/sched: sch_frag: fix OOB read while processing IPv4 fragments

2021-04-16 Thread Davide Caratti
when the Linux kernel fragments a packet that was previously re-assembled by the 'act_ct' action, the following splat can be seen on KASAN kernels: BUG: KASAN: stack-out-of-bounds in ip_do_fragment+0x1b03/0x1f60 Read of size 1 at addr 7f209574 by task ping/5640 CPU: 29 PID: 5640 Comm:

  1   2   3   >