Re: [PATCH bpf-next] selftests/bpf: Fix test_attach_probe for powerpc uprobes

2021-03-02 Thread Yonghong Song
On 3/1/21 11:04 AM, Jiri Olsa wrote: When testing uprobes we the test gets GEP (Global Entry Point) address from kallsyms, but then the function is called locally so the uprobe is not triggered. Fixing this by adjusting the address to LEP (Local Entry Point) for powerpc arch. Signed-off-by:

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

2021-03-02 Thread Matthias Schiffer
On 2/23/21 10:47 AM, Tom Parkin wrote: On Mon, Feb 22, 2021 at 14:31:38 -0800, Jakub Kicinski wrote: 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 pack

Re: [PATCH net] net: expand textsearch ts_state to fit skb_seq_state

2021-03-02 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Mon, 1 Mar 2021 15:09:44 + you wrote: > From: Willem de Bruijn > > The referenced commit expands the skb_seq_state used by > skb_find_text with a 4B frag_off field, growing it to 48B. > > This exceeds container ts_sta

Re: [PATCH net] tcp: add sanity tests to TCP_QUEUE_SEQ

2021-03-02 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Mon, 1 Mar 2021 10:29:17 -0800 you wrote: > From: Eric Dumazet > > Qingyu Li reported a syzkaller bug where the repro > changes RCV SEQ _after_ restoring data in the receive queue. > > mprotect(0x4aa000, 12288, PROT_READ)

Re: [PATCH net] hv_netvsc: Fix validation in netvsc_linkstatus_callback()

2021-03-02 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Mon, 1 Mar 2021 19:25:30 +0100 you wrote: > Contrary to the RNDIS protocol specification, certain (pre-Fe) > implementations of Hyper-V's vSwitch did not account for the status > buffer field in the length of an RNDIS packet

Re: [PATCH net] net: dsa: tag_mtk: fix 802.1ad VLAN egress

2021-03-02 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Tue, 2 Mar 2021 00:01:59 +0800 you wrote: > A different TPID bit is used for 802.1ad VLAN frames. > > Reported-by: Ilario Gelmetti > Fixes: f0af34317f4b ("net: dsa: mediatek: combine MediaTek tag with VLAN tag") > Signed-o

Re: [net 01/15] net/mlx5e: E-switch, Fix rate calculation for overflow

2021-03-02 Thread Saeed Mahameed
On Sat, 2021-02-27 at 13:14 +0100, Arnd Bergmann wrote: > On Fri, Feb 12, 2021 at 3:59 AM Saeed Mahameed > wrote: > > > > From: Parav Pandit > > > > rate_bytes_ps is a 64-bit field. It passed as 32-bit field to > > apply_police_params(). Due to this when police rate is higher > > than 4Gbps, 32

Re: [PATCH 0/5] Use obj_cgroup APIs to change kmem pages

2021-03-02 Thread Roman Gushchin
Hi Muchun! On Mon, Mar 01, 2021 at 02:22:22PM +0800, Muchun Song wrote: > Since Roman series "The new cgroup slab memory controller" applied. All > slab objects are changed via the new APIs of obj_cgroup. This new APIs > introduce a struct obj_cgroup instead of using struct mem_cgroup directly > t

Re: [PATCH bpf-next] selftests/bpf: Fix test_attach_probe for powerpc uprobes

2021-03-02 Thread Andrii Nakryiko
On Mon, Mar 1, 2021 at 11:11 AM Jiri Olsa wrote: > > When testing uprobes we the test gets GEP (Global Entry Point) > address from kallsyms, but then the function is called locally > so the uprobe is not triggered. > > Fixing this by adjusting the address to LEP (Local Entry Point) > for powerpc a

Re: [PATCH 4/5] mm: memcontrol: move remote memcg charging APIs to CONFIG_MEMCG_KMEM

2021-03-02 Thread Roman Gushchin
On Mon, Mar 01, 2021 at 02:22:26PM +0800, Muchun Song wrote: > The remote memcg charing APIs is a mechanism to charge kernel memory > to a given memcg. So we can move the infrastructure to the scope of > the CONFIG_MEMCG_KMEM. This is not a good idea, because there is nothing kmem-specific in the

[PATCH net v3] net: fix race between napi kthread mode and busy poll

2021-03-02 Thread Wei Wang
Currently, napi_thread_wait() checks for NAPI_STATE_SCHED bit to determine if the kthread owns this napi and could call napi->poll() on it. However, if socket busy poll is enabled, it is possible that the busy poll thread grabs this SCHED bit (after the previous napi->poll() invokes napi_complete_d

Re: [PATCH bpf-next] bpf: fix missing * in bpf.h

2021-03-02 Thread Joe Stringer
On Fri, Feb 26, 2021 at 8:51 AM Quentin Monnet wrote: > > 2021-02-24 10:59 UTC-0800 ~ Andrii Nakryiko > > On Wed, Feb 24, 2021 at 7:55 AM Daniel Borkmann > > wrote: > >> > >> On 2/23/21 3:43 PM, Jesper Dangaard Brouer wrote: > >>> On Tue, 23 Feb 2021 20:45:54 +0800 > >>> Hangbin Liu wrote: > >

[PATCH] iwlwifi: fix ARCH=i386 compilation warnings

2021-03-02 Thread Pierre-Louis Bossart
An unsigned long variable should rely on '%lu' format strings, not '%zd' Fixes: a1a6a4cf49ece ("iwlwifi: pnvm: implement reading PNVM from UEFI") Signed-off-by: Pierre-Louis Bossart --- warnings found with v5.12-rc1 and next-20210301 drivers/net/wireless/intel/iwlwifi/fw/pnvm.c | 4 ++-- 1 file

Re: [PATCH] e1000e: use proper #include guard name in hw.h

2021-03-02 Thread Nguyen, Anthony L
On Sat, 2021-02-27 at 10:58 +0100, Greg Kroah-Hartman wrote: > The include guard for the e1000e and e1000 hw.h files are the same, > so > add the proper "E" term to the hw.h file for the e1000e driver. There's a patch in process that addresses this issue [1]. > This resolves some static analyzer

Re: [PATCH net 1/3] net: dsa: rtl4_a: Pad using __skb_put_padto()

2021-03-02 Thread Florian Fainelli
On 3/1/2021 5:32 AM, Linus Walleij wrote: > The eth_skb_pad() function will cause a double free > on failure since dsa_slave_xmit() will try to free > the frame if we return NULL. Fix this by using > __skb_put_padto() instead. > > Fixes: 86dd9868b878 ("net: dsa: tag_rtl4_a: Support also egress

Re: [PATCH net 2/3] net: dsa: rtl4_a: Drop skb_cow_head()

2021-03-02 Thread Florian Fainelli
On 3/1/2021 5:32 AM, Linus Walleij wrote: > The DSA core already provides the tag headroom, drop this. > > Fixes: 86dd9868b878 ("net: dsa: tag_rtl4_a: Support also egress tags") > Reported-by: Andrew Lunn > Reported-by: DENG Qingfang > Cc: Mauri Sandberg > Signed-off-by: Linus Walleij Revi

Re: [PATCH v3] ath10k: skip the wait for completion to recovery in shutdown path

2021-03-02 Thread Abhishek Kumar
This patch seems to address the comments on v2. Overall this patch LGTM. Reviewed-by: Abhishek Kumar On Tue, Feb 23, 2021 at 6:29 AM Youghandhar Chintala wrote: > > Currently in the shutdown callback we wait for recovery to complete > before freeing up the resources. This results in additional

Re: [PATCH net 3/3] net: dsa: rtl4_a: Syntax fixes

2021-03-02 Thread Florian Fainelli
On 3/1/2021 5:32 AM, Linus Walleij wrote: > Some errors spotted in the initial patch: use reverse > christmas tree for nice code looks and fix a spelling > mistake. > > Reported-by: Andrew Lunn > Reported-by: DENG Qingfang > Cc: Mauri Sandberg > Signed-off-by: Linus Walleij Reviewed-by: Fl

Re: [PATCH v1 3/7] net: ipa: gsi: Avoid some writes during irq setup for older IPA

2021-03-02 Thread Alex Elder
On 2/11/21 11:50 AM, AngeloGioacchino Del Regno wrote: > On some IPA versions (v3.1 and older), writing to registers > GSI_INTER_EE_SRC_CH_IRQ_OFFSET and GSI_INTER_EE_SRC_EV_CH_IRQ_OFFSET > will generate a fault and the SoC will lockup. > > Avoid clearing CH and EV_CH interrupts on GSI probe to fi

Re: [PATCH v1 0/7] Add support for IPA v3.1, GSI v1.0, MSM8998 IPA

2021-03-02 Thread Alex Elder
On 2/11/21 11:50 AM, AngeloGioacchino Del Regno wrote: > Hey all! > > This time around I thought that it would be nice to get some modem > action going on. We have it, it's working (ish), so just.. why not. > > This series adds support for IPA v3.1 (featuring GSI v1.0) and also > takes account fo

Re: [PATCH v1 5/7] net: ipa: Add support for IPA on MSM8998

2021-03-02 Thread Alex Elder
On 2/11/21 11:50 AM, AngeloGioacchino Del Regno wrote: > MSM8998 features IPA v3.1 (GSI v1.0): add the required configuration > data for it. > > Signed-off-by: AngeloGioacchino Del Regno > As of today, I have not looked at this file in detail. You probably see that the intent is to have this f

Re: [PATCH v1 6/7] dt-bindings: net: qcom-ipa: Document qcom,sc7180-ipa compatible

2021-03-02 Thread Alex Elder
On 2/11/21 11:50 AM, AngeloGioacchino Del Regno wrote: > The driver supports SC7180, but the binding was not documented. > Just add it. I hadn't noticed that! I'm trying to get through reviewing your series today and this will take another hour or so to go validate to my satisfaction. Would you

Re: [PATCH v1 7/7] dt-bindings: net: qcom-ipa: Document qcom,msm8998-ipa compatible

2021-03-02 Thread Alex Elder
On 2/11/21 11:50 AM, AngeloGioacchino Del Regno wrote: > MSM8998 support has been added: document the new compatible. > > Signed-off-by: AngeloGioacchino Del Regno > With the previous patch in place, this becomes almost automatic. But I don't want to claim support for a platform until things a

Re: [PATCH v1 1/7] net: ipa: Add support for IPA v3.1 with GSI v1.0

2021-03-02 Thread Alex Elder
On 2/11/21 11:50 AM, AngeloGioacchino Del Regno wrote: > In preparation for adding support for the MSM8998 SoC's IPA, > add the necessary bits for IPA version 3.1 featuring GSI 1.0, > found on at least MSM8998. > > Signed-off-by: AngeloGioacchino Del Regno > Overall, this looks good. As I ment

Re: [PATCH v1 4/7] net: ipa: gsi: Use right masks for GSI v1.0 channels hw param

2021-03-02 Thread Alex Elder
On 2/11/21 11:50 AM, AngeloGioacchino Del Regno wrote: > In GSI v1.0 the register GSI_HW_PARAM_2_OFFSET has different layout > so the number of channels and events per EE are, of course, laid out > in 8 bits each (0-7, 8-15 respectively). > > Signed-off-by: AngeloGioacchino Del Regno > > --- >

Re: [PATCH v1 2/7] net: ipa: endpoint: Don't read unexistant register on IPAv3.1

2021-03-02 Thread Alex Elder
On 2/11/21 11:50 AM, AngeloGioacchino Del Regno wrote: > On IPAv3.1 there is no such FLAVOR_0 register so it is impossible > to read tx/rx channel masks and we have to rely on the correctness > on the provided configuration. This works, and is simple. I think I would rather populate the available

RE: [PATCH net v4 1/1] can: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership

2021-03-02 Thread Joakim Zhang
> -Original Message- > From: Joakim Zhang > Sent: 2021年3月1日 18:57 > To: Oleksij Rempel ; m...@pengutronix.de; David S. > Miller ; Jakub Kicinski ; Oliver > Hartkopp ; Robin van der Gracht > > Cc: Andre Naujoks ; Eric Dumazet > ; ker...@pengutronix.de; linux-...@vger.kernel.org; > netdev@

[Patch bpf-next v2 0/9] sockmap: introduce BPF_SK_SKB_VERDICT and support UDP

2021-03-02 Thread Cong Wang
From: Cong Wang We have thousands of services connected to a daemon on every host via AF_UNIX dgram sockets, after they are moved into VM, we have to add a proxy to forward these communications from VM to host, because rewriting thousands of them is not practical. This proxy uses an AF_UNIX socke

[Patch bpf-next v2 3/9] udp: implement ->sendmsg_locked()

2021-03-02 Thread Cong Wang
From: Cong Wang UDP already has udp_sendmsg() which takes lock_sock() inside. We have to build ->sendmsg_locked() on top of it, by adding a new parameter for whether the sock has been locked. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang

[Patch bpf-next v2 1/9] sock_map: introduce BPF_SK_SKB_VERDICT

2021-03-02 Thread Cong Wang
From: Cong Wang Reusing BPF_SK_SKB_STREAM_VERDICT is possible but its name is confusing and more importantly we still want to distinguish them from user-space. So we can just reuse the stream verdict code but introduce a new type of eBPF program, skb_verdict. Users are not allowed to set stream_v

[Patch bpf-next v2 2/9] sock: introduce sk_prot->update_proto()

2021-03-02 Thread Cong Wang
From: Cong Wang Currently sockmap calls into each protocol to update the struct proto and replace it. This certainly won't work when the protocol is implemented as a module, for example, AF_UNIX. Introduce a new ops sk->sk_prot->update_proto(), so each protocol can implement its own way to repla

[Patch bpf-next v2 4/9] udp: implement ->read_sock() for sockmap

2021-03-02 Thread Cong Wang
From: Cong Wang Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- include/net/udp.h | 2 ++ net/ipv4/af_inet.c | 1 + net/ipv4/udp.c | 34 ++ 3 files changed, 37 insertions(+) diff --git a/include/

[Patch bpf-next v2 5/9] udp: add ->read_sock() and ->sendmsg_locked() to ipv6

2021-03-02 Thread Cong Wang
From: Cong Wang Similarly, udpv6_sendmsg() takes lock_sock() inside too, we have to build ->sendmsg_locked() on top of it. For ->read_sock(), we can just use udp_read_sock(). Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- include/ne

[Patch bpf-next v2 6/9] skmsg: extract __tcp_bpf_recvmsg() and tcp_bpf_wait_data()

2021-03-02 Thread Cong Wang
From: Cong Wang Although these two functions are only used by TCP, they are not specific to TCP at all, both operate on skmsg and ingress_msg, so fit in net/core/skmsg.c very well. And we will need them for non-TCP, so rename and move them to skmsg.c and export them to modules. Cc: John Fastabe

[Patch bpf-next v2 7/9] udp: implement udp_bpf_recvmsg() for sockmap

2021-03-02 Thread Cong Wang
From: Cong Wang We have to implement udp_bpf_recvmsg() to replace the ->recvmsg() to retrieve skmsg from ingress_msg. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- net/ipv4/udp_bpf.c | 64

[Patch bpf-next v2 9/9] selftests/bpf: add a test case for udp sockmap

2021-03-02 Thread Cong Wang
From: Cong Wang Add a test case to ensure redirection between two UDP sockets work. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- .../selftests/bpf/prog_tests/sockmap_listen.c | 140 ++ .../selftests/bpf/progs/test_s

[Patch bpf-next v2 8/9] sock_map: update sock type checks for UDP

2021-03-02 Thread Cong Wang
From: Cong Wang Now UDP supports sockmap and redirection, we can safely update the sock type checks for it accordingly. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- net/core/sock_map.c | 5 - 1 file changed, 4 insertions(+), 1

Re: [External] Re: [PATCH 0/5] Use obj_cgroup APIs to change kmem pages

2021-03-02 Thread Muchun Song
On Tue, Mar 2, 2021 at 9:12 AM Roman Gushchin wrote: > > Hi Muchun! > > On Mon, Mar 01, 2021 at 02:22:22PM +0800, Muchun Song wrote: > > Since Roman series "The new cgroup slab memory controller" applied. All > > slab objects are changed via the new APIs of obj_cgroup. This new APIs > > introduce

[PATCH v2] can: c_can: move runtime PM enable/disable to c_can_platform

2021-03-02 Thread Tong Zhang
Currently doing modprobe c_can_pci will make kernel complain "Unbalanced pm_runtime_enable!", this is caused by pm_runtime_enable() called before pm is initialized. This fix is similar to 227619c3ff7c, move those pm_enable/disable code to c_can_platform. Signed-off-by: Tong Zhang --- drivers/net

Re: [PATCH] can: c_can: move runtime PM enable/disable to c_can_platform

2021-03-02 Thread Tong Zhang
On Mon, Mar 1, 2021 at 2:49 PM Marc Kleine-Budde wrote: > > On 28.02.2021 23:15:48, Tong Zhang wrote: > > Currently doing modprobe c_can_pci will make kernel complain > > "Unbalanced pm_runtime_enable!", this is caused by pm_runtime_enable() > > called before pm is initialized in register_candev()

Re: [External] Re: [PATCH 2/5] mm: memcontrol: make page_memcg{_rcu} only applicable for non-kmem page

2021-03-02 Thread Muchun Song
On Tue, Mar 2, 2021 at 2:11 AM Shakeel Butt wrote: > > On Sun, Feb 28, 2021 at 10:25 PM Muchun Song wrote: > > > > We want to reuse the obj_cgroup APIs to reparent the kmem pages when > > the memcg offlined. If we do this, we should store an object cgroup > > pointer to page->memcg_data for the k

Re: [External] Re: [PATCH 2/5] mm: memcontrol: make page_memcg{_rcu} only applicable for non-kmem page

2021-03-02 Thread Shakeel Butt
On Mon, Mar 1, 2021 at 7:03 PM Muchun Song wrote: > > On Tue, Mar 2, 2021 at 2:11 AM Shakeel Butt wrote: > > > > On Sun, Feb 28, 2021 at 10:25 PM Muchun Song > > wrote: > > > > > > We want to reuse the obj_cgroup APIs to reparent the kmem pages when > > > the memcg offlined. If we do this, we s

[PATCH] net: ethernet: mtk-star-emac: fix wrong unmap in RX handling

2021-03-02 Thread Biao Huang
mtk_star_dma_unmap_rx() should unmap the dma_addr of old skb rather than that of new skb. Assign new_dma_addr to desc_data.dma_addr after all handling of old skb ends to avoid unexpected receive side error. Fixes: f96e9641e92b ("net: ethernet: mtk-star-emac: fix error path in RX handling") Signed

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-02 Thread DENG Qingfang
On Mon, Mar 1, 2021 at 9:55 PM Linus Walleij wrote: > > BTW where did you find this register? It's not in any of my > vendor driver code dumps. DD-WRT https://svn.dd-wrt.com/browser/src/linux/universal/linux-4.14/drivers/net/ethernet/ag7100/RTL8366RB_DRIVER/rtl8368s_reg.h#L581 > > Curious! > > Y

Re: [External] Re: [PATCH 2/5] mm: memcontrol: make page_memcg{_rcu} only applicable for non-kmem page

2021-03-02 Thread Muchun Song
On Tue, Mar 2, 2021 at 3:09 AM Johannes Weiner wrote: > > Muchun, can you please reduce the CC list to mm/memcg folks only for > the next submission? I think probably 80% of the current recipients > don't care ;-) At first, I just used scripts/get_maintainer.pl to get the CC list. I will reduce t

Re: [External] Re: [PATCH 4/5] mm: memcontrol: move remote memcg charging APIs to CONFIG_MEMCG_KMEM

2021-03-02 Thread Muchun Song
On Tue, Mar 2, 2021 at 9:15 AM Roman Gushchin wrote: > > On Mon, Mar 01, 2021 at 02:22:26PM +0800, Muchun Song wrote: > > The remote memcg charing APIs is a mechanism to charge kernel memory > > to a given memcg. So we can move the infrastructure to the scope of > > the CONFIG_MEMCG_KMEM. > > This

Re: [External] Re: [PATCH 2/5] mm: memcontrol: make page_memcg{_rcu} only applicable for non-kmem page

2021-03-02 Thread Muchun Song
On Tue, Mar 2, 2021 at 11:36 AM Shakeel Butt wrote: > > On Mon, Mar 1, 2021 at 7:03 PM Muchun Song wrote: > > > > On Tue, Mar 2, 2021 at 2:11 AM Shakeel Butt wrote: > > > > > > On Sun, Feb 28, 2021 at 10:25 PM Muchun Song > > > wrote: > > > > > > > > We want to reuse the obj_cgroup APIs to rep

Re: [PATCH 4/5] mm: memcontrol: move remote memcg charging APIs to CONFIG_MEMCG_KMEM

2021-03-02 Thread Roman Gushchin
On Mon, Mar 01, 2021 at 07:43:27PM -0800, Shakeel Butt wrote: > On Mon, Mar 1, 2021 at 5:16 PM Roman Gushchin wrote: > > > > On Mon, Mar 01, 2021 at 02:22:26PM +0800, Muchun Song wrote: > > > The remote memcg charing APIs is a mechanism to charge kernel memory > > > to a given memcg. So we can mov

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-02 Thread DENG Qingfang
On Mon, Mar 1, 2021 at 9:48 PM Linus Walleij wrote: > With my minor changes: > Tested-by: Linus Walleij How about using a mutex lock in port_bridge_{join,leave} ? In my opinion all functions that access multiple registers should be synchronized. > Yours, > Linus Walleij

Re: [PATCH] net: 9p: free what was emitted when read count is 0

2021-03-02 Thread Dominique Martinet
Jisheng Zhang wrote on Mon, Mar 01, 2021 at 11:01:57AM +0800: > Per my understanding of iov_iter, we need to call iov_iter_advance() > even when the read out count is 0. I believe we can see this common style > in other fs. I'm not sure where you see this style, but I don't see exceptions for 0-si

Re: [PATCH 4/5] mm: memcontrol: move remote memcg charging APIs to CONFIG_MEMCG_KMEM

2021-03-02 Thread Shakeel Butt
On Mon, Mar 1, 2021 at 5:16 PM Roman Gushchin wrote: > > On Mon, Mar 01, 2021 at 02:22:26PM +0800, Muchun Song wrote: > > The remote memcg charing APIs is a mechanism to charge kernel memory > > to a given memcg. So we can move the infrastructure to the scope of > > the CONFIG_MEMCG_KMEM. > > This

icmpv6.h:70:2: error: implicit declaration of function '__icmpv6_send'; did you mean 'icmpv6_send'? [-Werror=implicit-function-declaration]

2021-03-02 Thread Naresh Kamboju
Stable rc builds failed on arm64, arm, arc, mips, parisc, ppc, riscv, sh, s390 and x86_64. Build failed branches list: - Stable-rc Linux 5.4.102-rc2 - Stable-rc Linux 4.19.178-rc2 - Stable-rc Linux 4.14.223-rc2 - Stable-rc Linux 4.9.259-rc1 Failed build set list: - arm64 (allnoconfig) wi

Re: [PATCH] vdpa/mlx5: Fix wrong use of bit numbers

2021-03-02 Thread Eli Cohen
On Mon, Mar 01, 2021 at 10:33:14AM -0500, Michael S. Tsirkin wrote: > On Mon, Mar 01, 2021 at 03:52:45PM +0800, Jason Wang wrote: > > > > On 2021/3/1 2:28 下午, Eli Cohen wrote: > > > VIRTIO_F_VERSION_1 is a bit number. Use BIT_ULL() with mask > > > conditionals. > > > > > > Also, in mlx5_vdpa_is_l

Re: [PATCH] e1000e: use proper #include guard name in hw.h

2021-03-02 Thread gre...@linuxfoundation.org
On Tue, Mar 02, 2021 at 01:37:59AM +, Nguyen, Anthony L wrote: > On Sat, 2021-02-27 at 10:58 +0100, Greg Kroah-Hartman wrote: > > The include guard for the e1000e and e1000 hw.h files are the same, > > so > > add the proper "E" term to the hw.h file for the e1000e driver. > > There's a patch i

dsa_master_find_slave()'s time complexity and potential performance hit

2021-03-02 Thread DENG Qingfang
Since commit 7b9a2f4bac68 ("net: dsa: use ports list to find slave"), dsa_master_find_slave() has been iterating over a linked list instead of accessing arrays, making its time complexity O(n). The said function is called frequently in DSA RX path, so it may cause a performance hit, especially for

[PATCH net] net: tcp: don't allocate fast clones for fastopen SYN

2021-03-02 Thread Jakub Kicinski
When receiver does not accept TCP Fast Open it will only ack the SYN, and not the data. We detect this and immediately queue the data for (re)transmission in tcp_rcv_fastopen_synack(). In DC networks with very low RTT and without RFS the SYN-ACK may arrive before NIC driver reported Tx completion

Re: [PATCH] iwlwifi: fix ARCH=i386 compilation warnings

2021-03-02 Thread Kalle Valo
Pierre-Louis Bossart writes: > An unsigned long variable should rely on '%lu' format strings, not '%zd' > > Fixes: a1a6a4cf49ece ("iwlwifi: pnvm: implement reading PNVM from UEFI") > Signed-off-by: Pierre-Louis Bossart > --- > warnings found with v5.12-rc1 and next-20210301 Luca, can I take thi

[PATCH 14/44] net: caif: inline register_ldisc

2021-03-02 Thread Jiri Slaby
register_ldisc only calls tty_register_ldisc. Inline register_ldisc into the only caller of register_ldisc, i.e. caif_ser_init. Now, caif_ser_init is symmetric to caif_ser_exit in this regard. Signed-off-by: Jiri Slaby Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org --- dri

[PATCH 15/44] net: nfc: nci: remove memset of nci_uart_drivers

2021-03-02 Thread Jiri Slaby
nci_uart_drivers is a global definition, so there is no need to initialize its memory to zero during module load. Signed-off-by: Jiri Slaby Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org --- net/nfc/nci/uart.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/nfc/nci/

[PATCH 17/44] net: nfc: nci: drop nci_uart_default_recv

2021-03-02 Thread Jiri Slaby
nci_uart_register returns -EINVAL immediately when nu->ops.recv is not set. So the same 'if' later never triggers so nci_uart_default_recv is never used. Drop it. Signed-off-by: Jiri Slaby Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org --- net/nfc/nci/uart.c | 10 -

[PATCH 16/44] net: nfc: nci: drop nci_uart_ops::recv_buf

2021-03-02 Thread Jiri Slaby
There is noone setting nci_uart_ops::recv_buf, so the default one (nci_uart_default_recv_buf) is always used. So drop this hook, move nci_uart_default_recv_buf before the use in nci_uart_tty_receive and remove unused parameter flags. Signed-off-by: Jiri Slaby Cc: "David S. Miller" Cc: Jakub Kici

[RFC net-next 0/9] net: hns3: refactor and new features for flow director

2021-03-02 Thread Huazhong Tan
This patchset refactor some functions and add some new features for flow director. patch 1~3: refactor large functions patch 4, 7: add traffic class and user-def field support for ethtool patch 5: use asynchronously configuration patch 6: clean up for hns3_del_all_fd_entries() patch 8, 9: add supp

[RFC net-next 1/9] net: hns3: refactor out hclge_add_fd_entry()

2021-03-02 Thread Huazhong Tan
From: Jian Shen The process of function hclge_add_fd_entry() is complex and prolix. To make it more readable, extract the process of fs->ring_cookie to a single function. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 67 +

[RFC net-next 6/9] net: hns3: refine for hns3_del_all_fd_entries()

2021-03-02 Thread Huazhong Tan
From: Jian Shen For only PF driver can configure flow director rule, it's better to call hclge_del_all_fd_entries() directly in hclge layer, rather than call hns3_del_all_fd_entries() in hns3 layer. Then we can remove the ae_algo->ops.del_all_fd_entries. Signed-off-by: Jian Shen Signed-off-by:

[RFC net-next 8/9] net: hns3: add support for queue bonding mode of flow director

2021-03-02 Thread Huazhong Tan
From: Jian Shen For device version V3, it supports queue bonding, which can identify the tuple information of TCP stream, and create flow director rules automatically, in order to keep the tx and rx packets are in the same queue pair. The driver set FD_ADD field of TX BD for TCP SYN packet, and s

[RFC net-next 7/9] net: hns3: add support for user-def data of flow director

2021-03-02 Thread Huazhong Tan
From: Jian Shen For DEVICE_VERSION_V3, the hardware supports to match specified data in the specified offset of packet payload. Each layer can have one offset, and can't be masked when configure flow director rule by ethtool command. The layer is choosed according to the flow-type, ether for L2,

[RFC net-next 9/9] net: hns3: add queue bonding mode support for VF

2021-03-02 Thread Huazhong Tan
From: Jian Shen For device version V3, the hardware supports queue bonding mode. VF can not enable queue bond mode unless PF enables it. So VF needs to query whether PF support queue bonding mode when initializing, and query whether PF enables queue bonding mode periodically. For the resource lim

[RFC net-next 3/9] net: hns3: refactor for function hclge_fd_convert_tuple

2021-03-02 Thread Huazhong Tan
From: Jian Shen Currently, there are too many branches for hclge_fd_convert_tuple(). And it may be more when add new tuples. Refactor it by sorting the tuples according to their length. So it only needs several KEY_OPT now, and being flexible to add new tuples. Signed-off-by: Jian Shen Signed-o

[RFC net-next 2/9] net: hns3: refactor out hclge_fd_get_tuple()

2021-03-02 Thread Huazhong Tan
From: Jian Shen The process of function hclge_fd_get_tuple() is complex and prolix. To make it more readable, extract the process of each flow-type tuple to a single function. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 220 +++

Re: [PATCH] net/mlx5e: fix mlx5e_tc_tun_update_header_ipv6 dummy definition

2021-03-02 Thread Saeed Mahameed
On Mon, 2021-03-01 at 11:57 +0200, Vlad Buslov wrote: > On Thu 25 Feb 2021 at 14:54, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > The alternative implementation of this function in a header file > > is declared as a global symbol, and gets added to every .c file > > that includes it, whi

[RFC net-next 5/9] net: hns3: refactor flow director configuration

2021-03-02 Thread Huazhong Tan
From: Jian Shen Currently, there are 3 flow director work modes in HNS3 driver, include EP(ethtool), tc flower and aRFS. The flow director rules are configured synchronously and need holding spin lock. With this limitation, all the commands with firmware are also needed to use spin lock. To elim

Re: [RFC v4 01/11] eventfd: Increase the recursion depth of eventfd_signal()

2021-03-02 Thread Jason Wang
On 2021/2/23 7:50 下午, Xie Yongji wrote: Increase the recursion depth of eventfd_signal() to 1. This is the maximum recursion depth we have found so far. Signed-off-by: Xie Yongji Acked-by: Jason Wang It might be useful to explain how/when we can reach for this condition. Thanks ---

Re: [RFC v4 02/11] vhost-vdpa: protect concurrent access to vhost device iotlb

2021-03-02 Thread Jason Wang
On 2021/2/23 7:50 下午, Xie Yongji wrote: Use vhost_dev->mutex to protect vhost device iotlb from concurrent access. Fixes: 4c8cf318("vhost: introduce vDPA-based backend") Signed-off-by: Xie Yongji --- drivers/vhost/vdpa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/vhost/v

Re: [RFC v4 04/11] vdpa: Add an opaque pointer for vdpa_config_ops.dma_map()

2021-03-02 Thread Jason Wang
On 2021/2/23 7:50 下午, Xie Yongji wrote: Add an opaque pointer for DMA mapping. Suggested-by: Jason Wang Signed-off-by: Xie Yongji Acked-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 6 +++--- drivers/vhost/vdpa.c | 2 +- include/linux/vdpa.h | 2 +-

Re: [PATCH net-next RFC v4] net: hdlc_x25: Queue outgoing LAPB frames

2021-03-02 Thread Martin Schiller
On 2021-03-01 09:56, Xie He wrote: On Sun, Feb 28, 2021 at 10:56 PM Martin Schiller wrote: >> Also, I have a hard time assessing if such a wrap is really >> enforceable. > > Sorry. I don't understand what you mean. What "wrap" are you referring > to? I mean the change from only one hdlc inter

Re: [PATCH] iwlwifi: fix ARCH=i386 compilation warnings

2021-03-02 Thread Coelho, Luciano
On Tue, 2021-03-02 at 07:58 +0200, Kalle Valo wrote: > Pierre-Louis Bossart writes: > > > An unsigned long variable should rely on '%lu' format strings, not '%zd' > > > > Fixes: a1a6a4cf49ece ("iwlwifi: pnvm: implement reading PNVM from UEFI") > > Signed-off-by: Pierre-Louis Bossart > > --- > >

Re: [PATCH v2] can: c_can: move runtime PM enable/disable to c_can_platform

2021-03-02 Thread Marc Kleine-Budde
On 3/2/21 3:55 AM, Tong Zhang wrote: > Currently doing modprobe c_can_pci will make kernel complain > "Unbalanced pm_runtime_enable!", this is caused by pm_runtime_enable() > called before pm is initialized. > This fix is similar to 227619c3ff7c, move those pm_enable/disable code to > c_can_platfor

Re: [PATCH] net: 9p: free what was emitted when read count is 0

2021-03-02 Thread Jisheng Zhang
On Tue, 2 Mar 2021 13:38:08 +0900 Dominique Martinet wrote: > > > Jisheng Zhang wrote on Mon, Mar 01, 2021 at 11:01:57AM +0800: > > Per my understanding of iov_iter, we need to call iov_iter_advance() > > even when the read out count is 0. I believe we can see this common style > > in other fs.

[RFC net-next 4/9] net: hns3: add support for traffic class tuple support for flow director by ethtool

2021-03-02 Thread Huazhong Tan
From: Jian Shen The hardware supports to parse and match the traffic class field of IPv6 packet for flow director, uses the same tuple as ip tos. So removes the limitation of configure 'tclass' by driver. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns

Re: [RFC v4 03/11] vhost-iotlb: Add an opaque pointer for vhost IOTLB

2021-03-02 Thread Jason Wang
On 2021/2/23 7:50 下午, Xie Yongji wrote: Add an opaque pointer for vhost IOTLB. And introduce vhost_iotlb_add_range_ctx() to accept it. Suggested-by: Jason Wang Signed-off-by: Xie Yongji Acked-by: Jason Wang --- drivers/vhost/iotlb.c | 20 include/linux/vh

Re: [Intel-wired-lan] [PATCH net 1/2] e1000e: Fix duplicate include guard

2021-03-02 Thread Dvora Fuxbrumer
On 22/02/2021 06:00, Tom Seewald wrote: The include guard "_E1000_HW_H_" is used by header files in three different drivers (e1000/e1000_hw.h, e1000e/hw.h, and igb/e1000_hw.h). Using the same include guard macro in more than one header file may cause unexpected behavior from the compiler. Fix the

Re: [PATCH bpf-next 1/2] xsk: update rings for load-acquire/store-release semantics

2021-03-02 Thread Björn Töpel
On 2021-03-01 17:08, Toke Høiland-Jørgensen wrote: Björn Töpel writes: From: Björn Töpel Currently, the AF_XDP rings uses smp_{r,w,}mb() fences on the kernel-side. By updating the rings for load-acquire/store-release semantics, the full barrier on the consumer side can be replaced with i

Re: [PATCH bpf-next 2/2] libbpf, xsk: add libbpf_smp_store_release libbpf_smp_load_acquire

2021-03-02 Thread Björn Töpel
On 2021-03-01 17:10, Toke Høiland-Jørgensen wrote: Björn Töpel writes: From: Björn Töpel Now that the AF_XDP rings have load-acquire/store-release semantics, move libbpf to that as well. The library-internal libbpf_smp_{load_acquire,store_release} are only valid for 32-bit words on ARM64.

Re: [PATCH] net: 9p: free what was emitted when read count is 0

2021-03-02 Thread Dominique Martinet
Jisheng Zhang wrote on Tue, Mar 02, 2021 at 03:39:40PM +0800: > > Rather than make an exception for 0, how about just removing the if as > > follow ? > > IMHO, we may need to keep the "if" in current logic. When count > reaches zero, we need to break the "while(iov_iter_count(to))" loop, so > rem

Re: BUG: soft lockup in ieee80211_tasklet_handler

2021-03-02 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:7a7fd0de Merge branch 'kmap-conversion-for-5.12' of git://.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=14df34ead0 kernel config: https://syzkaller.appspot.com/x/.config?x=e0da2d0

Re: [Intel-wired-lan] [PATCH net 1/2] e1000e: Fix duplicate include guard

2021-03-02 Thread Neftin, Sasha
On 2/22/2021 06:00, Tom Seewald wrote: The include guard "_E1000_HW_H_" is used by header files in three different drivers (e1000/e1000_hw.h, e1000e/hw.h, and igb/e1000_hw.h). Using the same include guard macro in more than one header file may cause unexpected behavior from the compiler. Fix the

Re: [PATCH] net: ethernet: mtk-star-emac: fix wrong unmap in RX handling

2021-03-02 Thread Bartosz Golaszewski
On Tue, Mar 2, 2021 at 4:33 AM Biao Huang wrote: > > mtk_star_dma_unmap_rx() should unmap the dma_addr of old skb rather than > that of new skb. > Assign new_dma_addr to desc_data.dma_addr after all handling of old skb > ends to avoid unexpected receive side error. > > Fixes: f96e9641e92b ("net: e

Re: [PATCH] netdevsim: init u64 stats for 32bit hardware

2021-03-02 Thread Dmitry Vyukov
On Fri, Jan 29, 2021 at 6:36 AM Hillf Danton wrote: > > On 29 Jan 2021 2:58:22 Jakub Kicinski wrpte: > > >On Thu, 28 Jan 2021 10:43:16 +0800 Hillf Danton wrote: > > >> Init the u64 stats in order to avoid the lockdep prints on the 32bit > > >> hardware like > > > > > >Thanks for the fix! > > > > H

Re: [PATCH] iwlwifi: fix ARCH=i386 compilation warnings

2021-03-02 Thread Kalle Valo
"Coelho, Luciano" writes: > On Tue, 2021-03-02 at 07:58 +0200, Kalle Valo wrote: >> Pierre-Louis Bossart writes: >> >> > An unsigned long variable should rely on '%lu' format strings, not '%zd' >> > >> > Fixes: a1a6a4cf49ece ("iwlwifi: pnvm: implement reading PNVM from UEFI") >> > Signed-off-b

[PATCH net 1/1] stmmac: intel: Fix mdio bus registration issue for TGL-H/ADL-S

2021-03-02 Thread Wong Vee Khee
On Intel platforms which consist of two Ethernet Controllers such as TGL-H and ADL-S, a unique MDIO bus id is required for MDIO bus to be successful registered: [ 13.076133] sysfs: cannot create duplicate filename '/class/mdio_bus/stmmac-1' [ 13.083404] CPU: 8 PID: 1898 Comm: systemd-udevd Ta

Re: [net 01/15] net/mlx5e: E-switch, Fix rate calculation for overflow

2021-03-02 Thread Arnd Bergmann
On Tue, Mar 2, 2021 at 1:52 AM Saeed Mahameed wrote: > On Sat, 2021-02-27 at 13:14 +0100, Arnd Bergmann wrote: > > On Fri, Feb 12, 2021 at 3:59 AM Saeed Mahameed > > wrote: > > > > > > From: Parav Pandit > > > > > > rate_bytes_ps is a 64-bit field. It passed as 32-bit field to > > > apply_police

Re: [PATCH bpf-next 2/2] libbpf, xsk: add libbpf_smp_store_release libbpf_smp_load_acquire

2021-03-02 Thread Daniel Borkmann
On 3/2/21 9:05 AM, Björn Töpel wrote: On 2021-03-01 17:10, Toke Høiland-Jørgensen wrote: Björn Töpel writes: From: Björn Töpel Now that the AF_XDP rings have load-acquire/store-release semantics, move libbpf to that as well. The library-internal libbpf_smp_{load_acquire,store_release} are o

[PATCH] vhost-vdpa: honor CAP_IPC_LOCK

2021-03-02 Thread Jason Wang
When CAP_IPC_LOCK is set we should not check locked memory against rlimit as what has been implemented in mlock(). Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index ef688c8c0e

Re: [PATCH bpf-next 2/2] libbpf, xsk: add libbpf_smp_store_release libbpf_smp_load_acquire

2021-03-02 Thread Björn Töpel
On 2021-03-02 10:13, Daniel Borkmann wrote: On 3/2/21 9:05 AM, Björn Töpel wrote: On 2021-03-01 17:10, Toke Høiland-Jørgensen wrote: Björn Töpel writes: From: Björn Töpel Now that the AF_XDP rings have load-acquire/store-release semantics, move libbpf to that as well. The library-internal

[PATCH v2] net: 9p: advance iov on empty read

2021-03-02 Thread Jisheng Zhang
I met below warning when cating a small size(about 80bytes) txt file on 9pfs(msize=2097152 is passed to 9p mount option), the reason is we miss iov_iter_advance() if the read count is 0 for zerocopy case, so we didn't truncate the pipe, then iov_iter_pipe() thinks the pipe is full. Fix it by removi

Re: [PATCH] net: 9p: free what was emitted when read count is 0

2021-03-02 Thread Jisheng Zhang
On Tue, 2 Mar 2021 17:08:13 +0900 Dominique Martinet wrote: > > > Jisheng Zhang wrote on Tue, Mar 02, 2021 at 03:39:40PM +0800: > > > Rather than make an exception for 0, how about just removing the if as > > > follow ? > > > > IMHO, we may need to keep the "if" in current logic. When count >

Re: [PATCH bpf-next 2/2] libbpf, xsk: add libbpf_smp_store_release libbpf_smp_load_acquire

2021-03-02 Thread Daniel Borkmann
On 3/2/21 10:16 AM, Björn Töpel wrote: On 2021-03-02 10:13, Daniel Borkmann wrote: On 3/2/21 9:05 AM, Björn Töpel wrote: On 2021-03-01 17:10, Toke Høiland-Jørgensen wrote: Björn Töpel writes: From: Björn Töpel Now that the AF_XDP rings have load-acquire/store-release semantics, move libbpf

KMSAN: uninit-value in ieee802154_hdr_push

2021-03-02 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:29ad81a1 arch/x86: add missing include to sparsemem.h git tree: https://github.com/google/kmsan.git master console output: https://syzkaller.appspot.com/x/log.txt?x=1756eff2d0 kernel config: https://syzkaller.appspot.com/x/.co

Re: [PATCH ipsec 0/2] vti(6): fix ipv4 pmtu check to honor ip header df

2021-03-02 Thread Sabrina Dubroca
2021-02-26, 23:35:04 +0200, Eyal Birger wrote: > This series aligns vti(6) handling of non-df IPv4 packets exceeding > the size of the tunnel MTU to avoid sending "Frag needed" and instead > fragment the packets after encapsulation. > > Eyal Birger (2): > vti: fix ipv4 pmtu check to honor ip hea

Triggering WARN in net/wireless/nl80211.c

2021-03-02 Thread Christian Brauner
Hey everyone, I get the following WARN triggered in net/wireless/nl80211.c during boot on v5.12-rc1: [ 36.749643] [ cut here ] [ 36.749645] WARNING: CPU: 7 PID: 829 at net/wireless/nl80211.c:7746 nl80211_get_reg_do+0x215/0x250 [cfg80211] [ 36.749683] Modules linked

  1   2   3   >