Re: [PATCH bpf-next 0/8] PROG_TEST_RUN support for sk_lookup programs

2021-02-22 Thread Andrii Nakryiko
On Tue, Feb 16, 2021 at 2:58 AM Lorenz Bauer wrote: > > We don't have PROG_TEST_RUN support for sk_lookup programs at the > moment. So far this hasn't been a problem, since we can run our > tests in a separate network namespace. For benchmarking it's nice > to have PROG_TEST_RUN, so I've gone and

Re: [PATCH v4 bpf-next 2/6] bpf: prevent deadlock from recursive bpf_task_storage_[get|delete]

2021-02-22 Thread Andrii Nakryiko
On Mon, Feb 22, 2021 at 11:16 PM Song Liu wrote: > > > > > On Feb 22, 2021, at 10:21 PM, Andrii Nakryiko > > wrote: > > > > On Mon, Feb 22, 2021 at 5:23 PM Song Liu wrote: > >> > >> BPF helpers bpf_task_storage_[get|delete] could hold two locks: > >> bpf_local_storage_map_bucket->lock and bpf_l

RE: [PATCH V4 net 5/5] net: stmmac: re-init rx buffers when mac resume back

2021-02-22 Thread Joakim Zhang
> -Original Message- > From: Jakub Kicinski > Sent: 2021年2月23日 3:48 > To: Joakim Zhang > Cc: peppe.cavall...@st.com; alexandre.tor...@st.com; > joab...@synopsys.com; da...@davemloft.net; netdev@vger.kernel.org; > dl-linux-imx > Subject: Re: [PATCH V4 net 5/5] net: stmmac: re-init rx buf

Re: [PATCH v4 bpf-next 2/6] bpf: prevent deadlock from recursive bpf_task_storage_[get|delete]

2021-02-22 Thread Song Liu
> On Feb 22, 2021, at 10:21 PM, Andrii Nakryiko > wrote: > > On Mon, Feb 22, 2021 at 5:23 PM Song Liu wrote: >> >> BPF helpers bpf_task_storage_[get|delete] could hold two locks: >> bpf_local_storage_map_bucket->lock and bpf_local_storage->lock. Calling >> these helpers from fentry/fexit pr

[PATCH net-next v2] net/sched: cls_flower: validate ct_state for invalid and reply flags

2021-02-22 Thread wenxu
From: wenxu Add invalid and reply flags validate in the fl_validate_ct_state. This makes the checking complete if compared to ovs' validate_ct_state(). Signed-off-by: wenxu --- net/sched/cls_flower.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/net/sched/cls_flower.c b/

RE: [PATCH V4 net 3/5] net: stmmac: fix dma physical address of descriptor when display ring

2021-02-22 Thread Joakim Zhang
> -Original Message- > From: Jakub Kicinski > Sent: 2021年2月23日 3:46 > To: Joakim Zhang > Cc: peppe.cavall...@st.com; alexandre.tor...@st.com; > joab...@synopsys.com; da...@davemloft.net; netdev@vger.kernel.org; > dl-linux-imx > Subject: Re: [PATCH V4 net 3/5] net: stmmac: fix dma physic

Re: [PATCH v2] rtw88: 8822ce: fix wifi disconnect after S3/S4 on HONOR laptop

2021-02-22 Thread Kalle Valo
Pkshih writes: >> > --- a/drivers/net/wireless/realtek/rtw88/rtw8822ce.c >> > +++ b/drivers/net/wireless/realtek/rtw88/rtw8822ce.c >> > @@ -25,7 +25,6 @@ static struct pci_driver rtw_8822ce_driver = { >> >   .id_table = rtw_8822ce_id_table, >> >   .probe = rtw_pci_probe, >> >   .remove = rtw_p

[PATCH net v4 1/1] net: introduce CAN specific pointer in the struct net_device

2021-02-22 Thread Oleksij Rempel
Since 20dd3850bcf8 ("can: Speed up CAN frame receiption by using ml_priv") the CAN framework uses per device specific data in the AF_CAN protocol. For this purpose the struct net_device->ml_priv is used. Later the ml_priv usage in CAN was extended for other users, one of them being CAN_J1939. Late

Re: [PATCH] arp: Remove the arp_hh_ops structure

2021-02-22 Thread Yejune Deng
Thank you for the clarification. On Tue, Feb 23, 2021 at 12:07 AM David Ahern wrote: > > On 2/22/21 1:37 AM, Eric Dumazet wrote: > > > > > > On 2/22/21 4:15 AM, Yejune Deng wrote: > >> The arp_hh_ops structure is similar to the arp_generic_ops structure. > >> but the latter is more general,so rem

usb: lan78xx: Problem with ERR_STS

2021-02-22 Thread Sven Schuchmann
Hello, I am currently working on a project where we use a LAN7801 together with a DP83TC811R phy. The Problem is that if we change link state of the phy to down and up again the LAN7801 is not receiving anything anymore, while sending still works. I already discussed this on the TI Forums https:/

Re: [PATCH net v3] net: introduce CAN specific pointer in the struct net_device

2021-02-22 Thread Oleksij Rempel
Hi Jakub, On Mon, Feb 22, 2021 at 05:30:12PM -0800, Jakub Kicinski wrote: > On Mon, 22 Feb 2021 16:02:51 +0100 Oleksij Rempel wrote: > > Since 20dd3850bcf8 ("can: Speed up CAN frame receiption by using > > ml_priv") the CAN framework uses per device specific data in the AF_CAN > > protocol. For th

Re: [PATCH v4 bpf-next] Add CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES check to bpftool feature command

2021-02-22 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (refs/heads/master): On Mon, 22 Feb 2021 19:58:46 + you wrote: > This adds both the CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES > kernel compile option to output of the bpftool feature command. > This is relevant for developers tha

Re: [PATCH v4 bpf-next] Add CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES check to bpftool feature command

2021-02-22 Thread Andrii Nakryiko
On Mon, Feb 22, 2021 at 11:59 AM grantseltzer wrote: > > This adds both the CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES > kernel compile option to output of the bpftool feature command. > This is relevant for developers that want to account for data structure > definition differences b

Re: [PATCH v4 bpf-next 5/6] bpf: runqslower: prefer using local vmlimux to generate vmlinux.h

2021-02-22 Thread Andrii Nakryiko
On Mon, Feb 22, 2021 at 5:24 PM Song Liu wrote: > > Update the Makefile to prefer using $(O)/mvlinux, $(KBUILD_OUTPUT)/vmlinux > (for selftests) or ../../../vmlinux. These two files should have latest > definitions for vmlinux.h. > > Signed-off-by: Song Liu > --- Acked-by: Andrii Nakryiko > t

Re: [PATCH v4 bpf-next 2/6] bpf: prevent deadlock from recursive bpf_task_storage_[get|delete]

2021-02-22 Thread Andrii Nakryiko
On Mon, Feb 22, 2021 at 5:23 PM Song Liu wrote: > > BPF helpers bpf_task_storage_[get|delete] could hold two locks: > bpf_local_storage_map_bucket->lock and bpf_local_storage->lock. Calling > these helpers from fentry/fexit programs on functions in bpf_*_storage.c > may cause deadlock on either lo

[PATCH net v2 2/2] can: fix ref count warning if socket was closed before skb was cloned

2021-02-22 Thread Oleksij Rempel
There are two ref count variables controlling the free()ing of a socket: - struct sock::sk_refcnt - which is changed by sock_hold()/sock_put() - struct sock::sk_wmem_alloc - which accounts the memory allocated by the skbs in the send path. If the socket is closed the struct sock::sk_refcnt will

[PATCH net v2 1/2] skbuff: skb_clone_sk_optional(): add function to always clone a skb and increase refcount on sk if valid

2021-02-22 Thread Oleksij Rempel
There already the function skb_clone_sk(), which clones the skb, but only if the sk is valid. There are several users in the networking stack, which always need a clone of a skb with the sk refcount incremented (but only if the sk is valid). This patch adds such a function. Signed-off-by: Oleksij

[PATCH net v2 0/2] add support for skb with sk ref cloning

2021-02-22 Thread Oleksij Rempel
changes v2: - drop mac80211 patch for now, it can go separately if needed Hello, this series tries to fix a long standing problem in the CAN echo SKB handling. The problem shows up if an echo SKB for a SKB that references an already closed socket is created. It looks like the mac80211/tx.c has t

Re: [PATCH v4 bpf-next 1/6] bpf: enable task local storage for tracing programs

2021-02-22 Thread kernel test robot
master config: xtensa-randconfig-r034-20210222 (attached as .config) compiler: xtensa-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https

Re: [PATCH net v2 0/8][pull request] Intel Wired LAN Driver Updates 2021-02-19

2021-02-22 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (refs/heads/master): On Fri, 19 Feb 2021 13:35:58 -0800 you wrote: > This series contains updates to i40e driver only. > > Slawomir resolves an issue with the IPv6 extension headers being > processed incorrectly. > > Keita Suzuki fixes a memory l

Re: [PATCH] net/mlx4_core: Add missed mlx4_free_cmd_mailbox()

2021-02-22 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Sun, 21 Feb 2021 22:35:59 +0800 you wrote: > mlx4_do_mirror_rule() forgets to call mlx4_free_cmd_mailbox() to > free the memory region allocated by mlx4_alloc_cmd_mailbox() before > an exit. > Add the missed call to fix it. >

Re: [PATCH net 1/1] net: stmmac: fix CBS idleslope and sendslope calculation

2021-02-22 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 18 Feb 2021 21:40:53 +0800 you wrote: > From: "Song, Yoong Siang" > > When link speed is not 100 Mbps, port transmit rate and speed divider > are set to 8 and 100 respectively. These values are incorrect for > CBS

Re: [PATCH net 0/4] mptcp: a bunch of fixes

2021-02-22 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (refs/heads/master): On Fri, 19 Feb 2021 18:35:36 +0100 you wrote: > This series bundle a few MPTCP fixes for the current net tree. > They have been detected via syzkaller and packetdrill > > Patch 1 fixes a slow close for orphaned sockets > > Pa

Re: [PATCH v4 bpf-next 1/6] bpf: enable task local storage for tracing programs

2021-02-22 Thread kernel test robot
master config: m68k-randconfig-r031-20210222 (attached as .config) compiler: m68k-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https

Re: [PATCH net] net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ8081

2021-02-22 Thread Jakub Kicinski
On Thu, 18 Feb 2021 22:09:32 +0100 Christian Melki wrote: > Following a similar reinstate for the KSZ9031. > > Older kernels would use the genphy_soft_reset if the PHY did not > implement a .soft_reset. > > Bluntly removing that default may expose a lot of situations where > various PHYs/board

Re: [PATCH 1/1] net: fec: ptp: avoid register access when ipg clock is disabled

2021-02-22 Thread Jakub Kicinski
On Sat, 20 Feb 2021 07:56:55 +0100 Heiko Thiery wrote: > When accessing the timecounter register on an i.MX8MQ the kernel hangs. > This is only the case when the interface is down. This can be reproduced > by reading with 'phc_ctrl eth0 get'. > > Like described in the change in 91c0d987a9788dcc5fe

Re: [PATCH v2 net-next] net: phy: icplus: call phy_restore_page() when phy_select_page() fails

2021-02-22 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Fri, 19 Feb 2021 13:10:44 +0300 you wrote: > The comments to phy_select_page() say that "phy_restore_page() must > always be called after this, irrespective of success or failure of this > call." If we don't call phy_restore

Re: [PATCH net-next] net: dsa: Fix dependencies with HSR

2021-02-22 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Fri, 19 Feb 2021 21:12:21 -0800 you wrote: > The core DSA framework uses hsr_is_master() which would not resolve to a > valid symbol if HSR is built-into the kernel and DSA is a module. > > Fixes: 18596f504a3e ("net: dsa: ad

Re: [net-next] net: mvpp2: skip RSS configurations on loopback port

2021-02-22 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 18 Feb 2021 14:42:03 +0200 you wrote: > From: Stefan Chulski > > PPv2 loopback port doesn't support RSS, so we should > skip RSS configurations for this port. > > Signed-off-by: Stefan Chulski > > [...] Here is the

Re: [PATCH net] dpaa_eth: fix the access method for the dpaa_napi_portal

2021-02-22 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 18 Feb 2021 20:21:06 +0200 you wrote: > The current use of container_of is flawed and unnecessary. Obtain > the dpaa_napi_portal reference from the private percpu data instead. > > Fixes: a1e031ffb422 ("dpaa_eth: add XD

Re: [PATCH net v4] net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending

2021-02-22 Thread Jakub Kicinski
On Fri, 19 Feb 2021 03:25:32 +0100 Jason A. Donenfeld wrote: > This commit fixes the issue by passing an empty IPCB or IP6CB along to > the functions that actually do the work. For the icmp_send, this was > already trivial, thanks to __icmp_send providing the plumbing function. > For icmpv6_send, t

Re: [PATCH net-next 2/2] net: ipv6: don't generate link local address on PUREIP device

2021-02-22 Thread Jakub Kicinski
On Tue, 23 Feb 2021 10:03:11 +0800 rocco.yue wrote: > On Thu, 2021-02-04 at 14:06 +0800, rocco.yue wrote: > > On Fri, 2021-01-29 at 19:07 -0800, Jakub Kicinski wrote: > > > On Thu, 28 Jan 2021 13:58:09 +0800 Rocco Yue wrote: > [...] > > > > > > There is no ccmni driver in the tree - is this

Re: [PATCH 2/2 v1] vdpa/mlx5: Enable user to add/delete vdpa device

2021-02-22 Thread Jason Wang
On 2021/2/17 7:31 下午, Eli Cohen wrote: Allow to control vdpa device creation and destruction using the vdpa management tool. Examples: 1. List the management devices $ vdpa mgmtdev show pci/:3b:00.1: supported_classes net 2. Create vdpa instance $ vdpa dev add mgmtdev pci/:3b:00.1

[PATCH v2] netdevsim: fib: remove unneeded semicolon

2021-02-22 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./drivers/net/netdevsim/fib.c:564:2-3: Unneeded semicolon. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- Changes in v2: - Remove the braces. drivers/net/netdevsim/fib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/d

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-22 Thread Jason Wang
On 2021/2/23 1:09 上午, Si-Wei Liu wrote: On 2/21/2021 8:14 PM, Jason Wang wrote: On 2021/2/19 7:54 下午, Si-Wei Liu wrote: Commit 452639a64ad8 ("vdpa: make sure set_features is invoked for legacy") made an exception for legacy guests to reset features to 0, when config space is accessed befor

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-22 Thread Jason Wang
On 2021/2/23 9:12 上午, Si-Wei Liu wrote: On 2/21/2021 11:34 PM, Michael S. Tsirkin wrote: On Mon, Feb 22, 2021 at 12:14:17PM +0800, Jason Wang wrote: On 2021/2/19 7:54 下午, Si-Wei Liu wrote: Commit 452639a64ad8 ("vdpa: make sure set_features is invoked for legacy") made an exception for lega

Re: [PATCH net] net: ag71xx: remove unnecessary MTU reservation

2021-02-22 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 18 Feb 2021 11:45:14 +0800 you wrote: > 2 bytes of the MTU are reserved for Atheros DSA tag, but DSA core > has already handled that since commit dc0fe7d47f9f. > Remove the unnecessary reservation. > > Fixes: d51b6ce441

Re: [PATCH] libbpf: Remove unnecessary conversion to bool

2021-02-22 Thread Andrii Nakryiko
On Sat, Feb 20, 2021 at 1:11 AM Jiapeng Chong wrote: > > Fix the following coccicheck warnings: > > ./tools/lib/bpf/libbpf.c:1487:43-48: WARNING: conversion to bool not > needed here. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- I think this came up before already. I did th

Re: [PATCH net v3] net: introduce CAN specific pointer in the struct net_device

2021-02-22 Thread Jakub Kicinski
On Mon, 22 Feb 2021 16:02:51 +0100 Oleksij Rempel wrote: > Since 20dd3850bcf8 ("can: Speed up CAN frame receiption by using > ml_priv") the CAN framework uses per device specific data in the AF_CAN > protocol. For this purpose the struct net_device->ml_priv is used. Later > the ml_priv usage in CAN

[PATCH v4 bpf-next 3/6] selftests/bpf: add non-BPF_LSM test for task local storage

2021-02-22 Thread Song Liu
Task local storage is enabled for tracing programs. Add two tests for task local storage without CONFIG_BPF_LSM. The first test stores a value in sys_enter and read it back in sys_exit. The second test checks whether the kernel allows allocating task local storage in exit_creds() (which it should

[PATCH v4 bpf-next 4/6] selftests/bpf: test deadlock from recursive bpf_task_storage_[get|delete]

2021-02-22 Thread Song Liu
Add a test with recursive bpf_task_storage_[get|delete] from fentry programs on bpf_local_storage_lookup and bpf_local_storage_update. Without proper deadlock prevent mechanism, this test would cause deadlock. Signed-off-by: Song Liu --- .../bpf/prog_tests/task_local_storage.c | 23 ++

[PATCH v4 bpf-next 6/6] bpf: runqslower: use task local storage

2021-02-22 Thread Song Liu
Replace hashtab with task local storage in runqslower. This improves the performance of these BPF programs. The following table summarizes average runtime of these programs, in nanoseconds: task-local hash-prealloc hash-no-prealloc handle__sched_wakeup 125

[PATCH v4 bpf-next 5/6] bpf: runqslower: prefer using local vmlimux to generate vmlinux.h

2021-02-22 Thread Song Liu
Update the Makefile to prefer using $(O)/mvlinux, $(KBUILD_OUTPUT)/vmlinux (for selftests) or ../../../vmlinux. These two files should have latest definitions for vmlinux.h. Signed-off-by: Song Liu --- tools/bpf/runqslower/Makefile | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH v4 bpf-next 2/6] bpf: prevent deadlock from recursive bpf_task_storage_[get|delete]

2021-02-22 Thread Song Liu
BPF helpers bpf_task_storage_[get|delete] could hold two locks: bpf_local_storage_map_bucket->lock and bpf_local_storage->lock. Calling these helpers from fentry/fexit programs on functions in bpf_*_storage.c may cause deadlock on either locks. Prevent such deadlock with a per cpu counter, bpf_tas

[PATCH v4 bpf-next 1/6] bpf: enable task local storage for tracing programs

2021-02-22 Thread Song Liu
To access per-task data, BPF programs usually creates a hash table with pid as the key. This is not ideal because: 1. The user need to estimate the proper size of the hash table, which may be inaccurate; 2. Big hash tables are slow; 3. To clean up the data properly during task terminations,

[PATCH v4 bpf-next 0/6] bpf: enable task local storage for tracing programs

2021-02-22 Thread Song Liu
This set enables task local storage for non-BPF_LSM programs. It is common for tracing BPF program to access per-task data. Currently, these data are stored in hash tables with pid as the key. In bcc/libbpftools [1], 9 out of 23 tools use such hash tables. However, hash table is not ideal for many

Re: WARNING in init_timer_key

2021-02-22 Thread syzbot
syzbot has bisected this issue to: commit b9df4fd7e99cb8bfd80c4143f3045d63b1754ad0 Author: Heiner Kallweit Date: Sun Oct 6 16:19:54 2019 + net: core: change return type of pskb_may_pull to bool bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=11b4545cd0 start commit:

Re: [PATCH bpf-next 1/3] libbpf: xsk: use bpf_link

2021-02-22 Thread Andrii Nakryiko
On Tue, Feb 16, 2021 at 2:37 AM Toke Høiland-Jørgensen wrote: > > John Fastabend writes: > > > Toke Høiland-Jørgensen wrote: > >> John Fastabend writes: > >> > >> >> > However, in libxdp we can solve the original problem in a different > >> >> > way, > >> >> > and in fact I already suggested to

Re: [PATCH bpf-next 4/8] bpf: add PROG_TEST_RUN support for sk_lookup programs

2021-02-22 Thread Alexei Starovoitov
On Tue, Feb 16, 2021 at 10:57:09AM +, Lorenz Bauer wrote: > + user_ctx = bpf_ctx_init(kattr, sizeof(*user_ctx)); > + if (IS_ERR(user_ctx)) > + return PTR_ERR(user_ctx); > + > + if (!user_ctx) > + return -EINVAL; > + > + if (user_ctx->sk) > + g

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-22 Thread Si-Wei Liu
On 2/21/2021 11:34 PM, Michael S. Tsirkin wrote: On Mon, Feb 22, 2021 at 12:14:17PM +0800, Jason Wang wrote: On 2021/2/19 7:54 下午, Si-Wei Liu wrote: Commit 452639a64ad8 ("vdpa: make sure set_features is invoked for legacy") made an exception for legacy guests to reset features to 0, when con

Re: [PATCH 03/20] devlink: Manual replacement of the deprecated strlcpy() with return values

2021-02-22 Thread Jakub Kicinski
On Mon, 22 Feb 2021 16:12:14 +0100 Romain Perier wrote: > diff --git a/net/core/devlink.c b/net/core/devlink.c > index 737b61c2976e..7eb445460c92 100644 > --- a/net/core/devlink.c > +++ b/net/core/devlink.c > @@ -9461,10 +9461,10 @@ EXPORT_SYMBOL_GPL(devlink_port_param_value_changed); > void devli

Re: [PATCH] net: tap: remove redundant assignments

2021-02-22 Thread Jakub Kicinski
On Mon, 22 Feb 2021 22:57:48 +0800 Tang Bin wrote: > In the function tap_get_user, the assignment of 'err' at both places > is redundant, so remove one. > > Signed-off-by: Tang Bin > --- > drivers/net/tap.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/net/

Re: [PATCH] ethernet/microchip:remove unneeded variable: "ret"

2021-02-22 Thread Jakub Kicinski
On Mon, 22 Feb 2021 10:58:18 +0800 dingsen...@163.com wrote: > From: dingsenjie > > remove unneeded variable: "ret". > > Signed-off-by: dingsenjie # Form letter - net-next is closed We have already sent the networking pull request for 5.12 and therefore net-next is closed for new drivers, fea

Re: [PATCH net v2 2/2] net: dsa: b53: Support setting learning on port

2021-02-22 Thread Vladimir Oltean
On Mon, Feb 22, 2021 at 03:44:21PM -0800, Florian Fainelli wrote: > > In sf2, CORE_DIS_LEARN is at address 0xf0, while in b53, B53_DIS_LEARN > > is at 0x3c. Are they even configuring the same thing? > > They are the SF2 switch was integrated with a bridge that would flatten > its address space suc

[PATCH net 5/5] ice: update the number of available RSS queues

2021-02-22 Thread Tony Nguyen
From: Henry Tieman It was possible to have Rx queues that were not available for use by RSS. This would happen when increasing the number of Rx queues while there was a user defined RSS LUT. Always update the number of available RSS queues when changing the number of Rx queues. Fixes: 87324e747

[PATCH net 0/5][pull request] Intel Wired LAN Driver Updates 2021-02-22

2021-02-22 Thread Tony Nguyen
This series contains updates to ice driver only. Dave corrects reporting of max TCs to use the value from hardware capabilities and setting of DCBx capability bits when changing between SW and FW LLDP. Brett fixes trusted VF multicast promiscuous not receiving expected packets and corrects VF max

[PATCH net 3/5] ice: Account for port VLAN in VF max packet size calculation

2021-02-22 Thread Tony Nguyen
From: Brett Creeley Currently if an AVF driver doesn't account for the possibility of a port VLAN when determining its max packet size then packets at MTU will be dropped. It is not the VF driver's responsibility to account for a port VLAN so fix this. To fix this, do the following: 1. Add a fun

[PATCH net 2/5] ice: Set trusted VF as default VSI when setting allmulti on

2021-02-22 Thread Tony Nguyen
From: Brett Creeley Currently the PF will only set a trusted VF as the default VSI when it requests FLAG_VF_UNICAST_PROMISC over VIRTCHNL. However, when FLAG_VF_MULTICAST_PROMISC is set it's expected that the trusted VF will see multicast packets that don't have a matching destination MAC in the

[PATCH net 4/5] ice: Fix state bits on LLDP mode switch

2021-02-22 Thread Tony Nguyen
From: Dave Ertman DCBX_CAP bits were not being adjusted when switching between SW and FW controlled LLDP. Adjust bits to correctly indicate which mode the LLDP logic is in. Fixes: b94b013eb626 ("ice: Implement DCBNL support") Signed-off-by: Dave Ertman Tested-by: Tony Brelinski Signed-off-by:

[PATCH net 1/5] ice: report correct max number of TCs

2021-02-22 Thread Tony Nguyen
From: Dave Ertman In the driver currently, we are reporting max number of TCs to the DCBNL callback as a kernel define set to 8. This is preventing userspace applications performing DCBx to correctly down map the TCs from requested to actual values. Report the actual max TC value to userspace f

Re: [RFC PATCH net-next 09/12] Documentation: networking: dsa: add paragraph for the MRP offload

2021-02-22 Thread Horatiu Vultur
The 02/21/2021 23:33, Vladimir Oltean wrote: > > From: Vladimir Oltean > > Add a short summary of the methods that a driver writer must implement > for getting an MRP instance to work on top of a DSA switch. > > Cc: Horatiu Vultur > Signed-off-by: Vladimir Oltean Hi Vladimir, > > Horatiu:

Re: [PATCH net v2 2/2] net: dsa: b53: Support setting learning on port

2021-02-22 Thread Florian Fainelli
On 2/22/2021 3:18 PM, Vladimir Oltean wrote: > On Mon, Feb 22, 2021 at 02:30:10PM -0800, Florian Fainelli wrote: >> diff --git a/drivers/net/dsa/b53/b53_regs.h b/drivers/net/dsa/b53/b53_regs.h >> index c90985c294a2..b2c539a42154 100644 >> --- a/drivers/net/dsa/b53/b53_regs.h >> +++ b/drivers/net

Data race on dev->mtu betwen __dev_set_mtu() and rawv6_send_hdrinc()

2021-02-22 Thread Gong, Sishuai
Hello, We found a data race on dev->mtu between function __dev_set_mtu() and rawv6_send_hdrinc(). It happens with the following interleaving. writer: __dev_set_mtu() reader: rawv6_send_hdrinc()

Re: [Patch bpf-next v6 1/8] bpf: clean up sockmap related Kconfigs

2021-02-22 Thread Cong Wang
On Mon, Feb 22, 2021 at 12:52 AM Jakub Sitnicki wrote: > > On Sat, Feb 20, 2021 at 06:29 AM CET, Cong Wang wrote: > > From: Cong Wang > > > > As suggested by John, clean up sockmap related Kconfigs: > > > > Reduce the scope of CONFIG_BPF_STREAM_PARSER down to TCP stream > > parser, to reflect its

Re: [PATCH net v2 2/2] net: dsa: b53: Support setting learning on port

2021-02-22 Thread Vladimir Oltean
On Mon, Feb 22, 2021 at 02:30:10PM -0800, Florian Fainelli wrote: > diff --git a/drivers/net/dsa/b53/b53_regs.h b/drivers/net/dsa/b53/b53_regs.h > index c90985c294a2..b2c539a42154 100644 > --- a/drivers/net/dsa/b53/b53_regs.h > +++ b/drivers/net/dsa/b53/b53_regs.h > @@ -115,6 +115,7 @@ > #define B

Re: [PATCH net v2 1/2] net: dsa: bcm_sf2: Wire-up br_flags_pre, br_flags and set_mrouter

2021-02-22 Thread Vladimir Oltean
On Mon, Feb 22, 2021 at 02:30:09PM -0800, Florian Fainelli wrote: > Because bcm_sf2 implements its own dsa_switch_ops we need to export the > b53_br_flags_pre(), b53_br_flags() and b53_set_mrouter so we can wire-up > them up like they used to be with the former b53_br_egress_floods(). > > Fixes: a

Re: [PATCH net] net: l2tp: reduce log level when passing up invalid packets

2021-02-22 Thread Jakub Kicinski
On Mon, 22 Feb 2021 17:40:16 +0100 Matthias Schiffer wrote: > >> This will not be sufficient for my usecase: To stay compatible with older > >> versions of fastd, I can't set the T flag in the first packet of the > >> handshake, as it won't be known whether the peer has a new enough fastd > >> vers

[PATCH net v2 2/2] net: dsa: b53: Support setting learning on port

2021-02-22 Thread Florian Fainelli
Add support for being able to set the learning attribute on port, and make sure that the standalone ports start up with learning disabled. We can remove the code in bcm_sf2 that configured the ports learning attribute because we want the standalone ports to have learning disabled by default and po

[PATCH net v2 0/2] net: dsa: Learning fixes for b53/bcm_sf2

2021-02-22 Thread Florian Fainelli
Hi David, Jakub, This patch series contains a couple of fixes for the b53/bcm_sf2 drivers with respect to configuring learning. The first patch is wiring-up the necessary dsa_switch_ops operations in order to support the offloading of bridge flags. The second patch corrects the switch driver's d

[PATCH net v2 1/2] net: dsa: bcm_sf2: Wire-up br_flags_pre, br_flags and set_mrouter

2021-02-22 Thread Florian Fainelli
Because bcm_sf2 implements its own dsa_switch_ops we need to export the b53_br_flags_pre(), b53_br_flags() and b53_set_mrouter so we can wire-up them up like they used to be with the former b53_br_egress_floods(). Fixes: a8b659e7ff75 ("net: dsa: act as passthrough for bridge port flags") Signed-of

Re: [PATCH v4 bpf-next] Add CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES check to bpftool feature command

2021-02-22 Thread Martin KaFai Lau
On Mon, Feb 22, 2021 at 07:58:46PM +, grantseltzer wrote: > This adds both the CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES > kernel compile option to output of the bpftool feature command. > This is relevant for developers that want to account for data structure > definition differe

Re: [PATCH net] net: dsa: b53: Support setting learning on port

2021-02-22 Thread Florian Fainelli
On 2/22/2021 1:46 PM, Florian Fainelli wrote: > Add support for being able to set the learning attribute on port, and > make sure that the standalone ports start up with learning disabled. > > We can remove the code in bcm_sf2 that configured the ports learning > attribute because we want the s

[PATCH net] net: dsa: b53: Support setting learning on port

2021-02-22 Thread Florian Fainelli
Add support for being able to set the learning attribute on port, and make sure that the standalone ports start up with learning disabled. We can remove the code in bcm_sf2 that configured the ports learning attribute because we want the standalone ports to have learning disabled by default and po

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

2021-02-22 Thread Stephen Rothwell
Hi Grygorii, On Mon, 22 Feb 2021 12:35:10 +0200 Grygorii Strashko wrote: > > Sorry for inconvenience, is there anything I can do to help resolve it? > (Changes went through a different trees) No, it is fine. -- Cheers, Stephen Rothwell pgpF0k0K_zLOS.pgp Description: OpenPGP digital signatur

Re: [PATCH 1/2] lockdep: add lockdep_assert_not_held()

2021-02-22 Thread Shuah Khan
On 2/15/21 9:10 AM, Johannes Berg wrote: On Mon, 2021-02-15 at 17:04 +0100, Peter Zijlstra wrote: On Mon, Feb 15, 2021 at 02:12:30PM +0100, Johannes Berg wrote: On Mon, 2021-02-15 at 11:44 +0100, Peter Zijlstra wrote: I think something like so will work, but please double check. Yeah, that l

[PATCH iproute2] tc: m_gate: use SPRINT_BUF when needed

2021-02-22 Thread Andrea Claudi
sprint_time64() uses SPRINT_BSIZE-1 as a constant buffer lenght in its implementation, however m_gate uses shorter buffers when calling it. Fix this using SPRINT_BUF macro to get the buffer, thus getting a SPRINT_BSIZE-long buffer. Fixes: 07d5ee70b5b3 ("iproute2-next:tc:action: add a gate control

[PATCH iproute2] ip: lwtunnel: seg6: bail out if table ids are invalid

2021-02-22 Thread Andrea Claudi
When table and vrftable are used in SRv6, ip should bail out if table ids are not valid, and return a proper error message to the user. Achieve this simply checking rtnl_rttable_a2n return value, as we already do in the rest of iproute. Fixes: 0486388a877a ("add support for table name in SRv6 End

Re: alloc_pages_bulk()

2021-02-22 Thread Jesper Dangaard Brouer
On Mon, 15 Feb 2021 12:06:09 + Mel Gorman wrote: > On Thu, Feb 11, 2021 at 04:20:31PM +, Chuck Lever wrote: > > > On Feb 11, 2021, at 4:12 AM, Mel Gorman > > > wrote: > > > > > > > > > > > > Parameters to __rmqueue_pcplist are garbage as the parameter order > > > changed. > > > I'm

Re: [RFC PATCH net-next 09/12] Documentation: networking: dsa: add paragraph for the MRP offload

2021-02-22 Thread Vladimir Oltean
Hi Horatiu, On Mon, Feb 22, 2021 at 08:46:26PM +0100, Horatiu Vultur wrote: > > - Why does ocelot support a single MRP ring if all it does is trap the > > MRP PDUs to the CPU? What is stopping it from supporting more than > > one ring? > > So the HW can support to run multiple rings. But to ha

Re: [PATCH v3 bpf-next] Add CONFIG_DEBUG_INFO_BTF check to bpftool feature command

2021-02-22 Thread Grant Seltzer Richman
I submitted a new patch that includes CONFIG_DEBUG_INFO_BTF_MODULES. I renamed the patch to include this change so it's showing up as a new thread, I also fixed the time issue, apologies for the confusion! On Mon, Feb 22, 2021 at 2:22 PM Andrii Nakryiko wrote: > > On Mon, Feb 22, 2021 at 7:34 AM

[PATCH v4 bpf-next] Add CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES check to bpftool feature command

2021-02-22 Thread grantseltzer
This adds both the CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES kernel compile option to output of the bpftool feature command. This is relevant for developers that want to account for data structure definition differences between kernels. Signed-off-by: Grant Seltzer --- tools/bpf/bp

[PATCH RFC net-next] mlx5: fix for crash on net-next

2021-02-22 Thread Jesper Dangaard Brouer
Net-next at commit d310ec03a34e ("Merge tag 'perf-core-2021-02-17') There is a divide error in drivers/net/ethernet/mellanox/mlx5/core/en_tx.c where it seems that num_tc_x_num_ch can become zero in a modulo operation: if (unlikely(txq_ix >= num_tc_x_num_ch)) txq_ix %= num_

Re: [PATCH net-next v2 2/3] net: ethernet: rmnet: Support for downlink MAPv5 checksum offload

2021-02-22 Thread kernel test robot
Hi Sharath, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Sharath-Chandra-Vurukala/net-qualcomm-rmnet-Enable-Mapv5/20210223-010109 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-n

Re: [PATCH V4 net 5/5] net: stmmac: re-init rx buffers when mac resume back

2021-02-22 Thread Jakub Kicinski
On Sat, 20 Feb 2021 07:52:46 + Joakim Zhang wrote: > > I'm not sure why you recycle and reallocate every buffer. Isn't it enough to > > reinitialize the descriptors with the buffers which are already allocated? > > As I know, the receive buffer address is not fixed after allocated, > it will

Re: [PATCH V4 net 3/5] net: stmmac: fix dma physical address of descriptor when display ring

2021-02-22 Thread Jakub Kicinski
On Sat, 20 Feb 2021 07:43:33 + Joakim Zhang wrote: > > > pr_info("%s descriptor ring:\n", rx ? "RX" : "TX"); > > > > > > for (i = 0; i < size; i++) { > > > - pr_info("%03d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n", > > > - i, (unsigned int)virt_to_phys(p), > > > + pr_in

Re: [Patch bpf-next v6 5/8] sock_map: rename skb_parser and skb_verdict

2021-02-22 Thread Cong Wang
On Mon, Feb 22, 2021 at 4:28 AM Jakub Sitnicki wrote: > > skb_parser also appears in: > > tools/testing/selftests/bpf/test_sockmap.c:int txmsg_omit_skb_parser; > tools/testing/selftests/bpf/test_sockmap.c: {"txmsg_omit_skb_parser", > no_argument, &txmsg_omit_skb_parser, 1}, > tools/testi

Re: [Patch bpf-next v6 4/8] skmsg: move sk_redir from TCP_SKB_CB to skb

2021-02-22 Thread Cong Wang
On Mon, Feb 22, 2021 at 4:20 AM Jakub Sitnicki wrote: > > On Sat, Feb 20, 2021 at 06:29 AM CET, Cong Wang wrote: > > From: Cong Wang > > > > Currently TCP_SKB_CB() is hard-coded in skmsg code, it certainly > > does not work for any other non-TCP protocols. We can move them to > > skb ext, but it

Re: [PATCHSET] making unix_bind() undo mknod on failure

2021-02-22 Thread Al Viro
On Mon, Feb 22, 2021 at 07:12:29PM +, Al Viro wrote: > On Mon, Feb 22, 2021 at 07:06:00PM +, Al Viro wrote: > > On Sat, Feb 20, 2021 at 09:08:56PM +, Al Viro wrote: > > > > > *shrug* > > > > > > If anything, __unix_complete_bind() might make a better name for that, > > > with dropping

Re: [PATCH v3 bpf-next] Add CONFIG_DEBUG_INFO_BTF check to bpftool feature command

2021-02-22 Thread Andrii Nakryiko
On Mon, Feb 22, 2021 at 7:34 AM grantseltzer wrote: > > This adds the CONFIG_DEBUG_INFO_BTF kernel compile option to output of > the bpftool feature command. This is relevant for developers that want > to use libbpf to account for data structure definition differences > between kernels. > > Signed

Re: [PATCH iproute2-rc] rdma: Fix statistics bind/unbing argument handling

2021-02-22 Thread Stephen Hemminger
On Thu, 18 Feb 2021 10:44:16 +0200 Leon Romanovsky wrote: > On Tue, Feb 16, 2021 at 08:48:24AM -0700, David Ahern wrote: > > On 2/15/21 11:16 PM, Leon Romanovsky wrote: > > > On Mon, Feb 15, 2021 at 06:56:26PM -0700, David Ahern wrote: > > >> On 2/14/21 10:40 PM, Leon Romanovsky wrote: > >

[PATCH 4/8] unix_bind(): take BSD and abstract address cases into new helpers

2021-02-22 Thread Al Viro
unix_bind_bsd() and unix_bind_abstract() respectively. Signed-off-by: Al Viro --- net/unix/af_unix.c | 147 +++-- 1 file changed, 74 insertions(+), 73 deletions(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 496b069c99fe..56443f05ed

[PATCH 5/8] fold unix_mknod() into unix_bind_bsd()

2021-02-22 Thread Al Viro
Signed-off-by: Al Viro --- net/unix/af_unix.c | 39 +++ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 56443f05ed9d..5e04e16e6b88 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -983,45

[PATCH 8/8] __unix_find_socket_byname(): don't pass hash and type separately

2021-02-22 Thread Al Viro
We only care about exclusive or of those, so pass that directly. Makes life simpler for callers as well... Signed-off-by: Al Viro --- net/unix/af_unix.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 8bb

Re: [PATCHSET] making unix_bind() undo mknod on failure

2021-02-22 Thread Al Viro
On Mon, Feb 22, 2021 at 07:06:00PM +, Al Viro wrote: > On Sat, Feb 20, 2021 at 09:08:56PM +, Al Viro wrote: > > > *shrug* > > > > If anything, __unix_complete_bind() might make a better name for that, > > with dropping ->bindlock also pulled in, but TBH I don't have sufficiently > > stron

[PATCH 1/8] af_unix: take address assignment/hash insertion into a new helper

2021-02-22 Thread Al Viro
Duplicated logics in all bind variants (autobind, bind-to-path, bind-to-abstract) gets taken into a common helper. Signed-off-by: Al Viro --- net/unix/af_unix.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.

[PATCH 6/8] unix_bind_bsd(): move done_path_create() call after dealing with ->bindlock

2021-02-22 Thread Al Viro
Final preparations for doing unlink on failure past the successful mknod. We can't hold ->bindlock over ->mknod() or ->unlink(), since either might do sb_start_write() (e.g. on overlayfs). However, we can do it while holding filesystem and VFS locks - doing kern_path_create() vfs_

[PATCH 2/8] unix_bind(): allocate addr earlier

2021-02-22 Thread Al Viro
makes it easier to massage; we do pay for that by extra work (kmalloc+memcpy+kfree) in some error cases, but those are not on the hot paths anyway. Signed-off-by: Al Viro --- net/unix/af_unix.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/net

[PATCH 7/8] unix_bind_bsd(): unlink if we fail after successful mknod

2021-02-22 Thread Al Viro
We can do that more or less safely, since the parent is held locked all along. Yes, somebody might observe the object via dcache, only to have it disappear afterwards, but there's really no good way to prevent that. It won't race with other bind(2) or attempts to move the sucker elsewhere, or put

[PATCH 3/8] unix_bind(): separate BSD and abstract cases

2021-02-22 Thread Al Viro
We do get some duplication that way, but it's minor compared to parts that are different. What we get is an ability to change locking in BSD case without making failure exits very hard to follow. Signed-off-by: Al Viro --- net/unix/af_unix.c | 55 +---

Re: [PATCH v3 bpf-next] Add CONFIG_DEBUG_INFO_BTF check to bpftool feature command

2021-02-22 Thread Martin KaFai Lau
On Sat, Feb 20, 2021 at 05:13:07PM +, grantseltzer wrote: > This adds the CONFIG_DEBUG_INFO_BTF kernel compile option to output of > the bpftool feature command. This is relevant for developers that want > to use libbpf to account for data structure definition differences > between kernels. Ack

  1   2   3   >