Re: [PATCH v2 3/3] ath11k: convert tasklets to use new tasklet_setup() API

2020-11-06 Thread Kalle Valo
Allen Pais wrote: > In preparation for unconditionally passing the > struct tasklet_struct pointer to all tasklet > callbacks, switch to using the new tasklet_setup() > and from_tasklet() to pass the tasklet pointer explicitly. > > Signed-off-by: Romain Perier > Signed-off-by: Allen Pais > Sig

[PATCH v3 bpf] trace: bpf: Fix passing zero to PTR_ERR()

2020-11-06 Thread Wang Qing
There is a bug when passing zero to PTR_ERR() and return. Fix smatch err. Signed-off-by: Wang Qing --- kernel/trace/bpf_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index 4517c8b..5113fd4 --- a/kernel/trace/bpf_tr

Re: [V2] trace: Fix passing zero to PTR_ERR()

2020-11-06 Thread Yonghong Song
On 11/6/20 10:34 PM, Wang Qing wrote: There is a bug when passing zero to PTR_ERR() and return. Fix smatch err. Signed-off-by: Wang Qing For clarity, the subject probably should be bpf: Fix passing zero to PTR_ERR() to indicate this is a bpf related fix. The tag should be something like

[PATCH] net/mlx4: Assign boolean values to a bool variable

2020-11-06 Thread xiakaixu1987
From: Kaixu Xia Fix the following coccinelle warnings: ./drivers/net/ethernet/mellanox/mlx4/en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable Reported-by: Tosk Robot Signed-off-by: Kaixu Xia --- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- 1 file changed, 1 insertion(+), 1

[V2] trace: Fix passing zero to PTR_ERR()

2020-11-06 Thread Wang Qing
There is a bug when passing zero to PTR_ERR() and return. Fix smatch err. Signed-off-by: Wang Qing --- kernel/trace/bpf_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index 4517c8b..5113fd4 --- a/kernel/trace/bpf_tr

[PATCH net-next 06/11] net: hns3: add ethtool priv-flag for DIM

2020-11-06 Thread Huazhong Tan
Add a control private flag in ethtool for enable/disable DIM feature. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 7 +++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 1 + drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 71 ++

[PATCH net-next 08/11] net: hns3: add a check for ethtool priv-flag interface

2020-11-06 Thread Huazhong Tan
Add a check for hns3_set_priv_flags() since if the capability is unsupported its private flags should not be modified as well. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 1 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 1 + drivers/net/etherne

[PATCH net-next 04/11] net: hns3: rename gl_adapt_enable in struct hns3_enet_coalesce

2020-11-06 Thread Huazhong Tan
Besides GL(Gap Limiting), QL(Quantity Limiting) can be modified dynamically when DIM is supported. So rename gl_adapt_enable as adapt_enable in struct hns3_enet_coalesce. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 12 ++-- drivers/net/ethernet/hi

[PATCH net-next 01/11] net: hns3: add support for configuring interrupt quantity limiting

2020-11-06 Thread Huazhong Tan
QL(quantity limiting) means that hardware supports the interrupt coalesce based on the frame quantity. QL can be configured when int_ql_max in device's specification is non-zero, so add support to configure it. Also, rename two coalesce init function to fit their purpose. Signed-off-by: Huazhong

[PATCH net-next 07/11] net: hns3: add hns3_state_init() to do state initialization

2020-11-06 Thread Huazhong Tan
To improve the readability and maintainability, add hns3_state_init() to initialize the state. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/h

[PATCH net-next 03/11] net: hns3: add support for querying maximum value of GL

2020-11-06 Thread Huazhong Tan
For maintainability and compatibility, add support for querying the maximum value of GL. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c| 1 + drivers/net/ethernet/hisilicon/hns3/hns3_en

[PATCH net-next 00/11] net: hns3: updates for -next

2020-11-06 Thread Huazhong Tan
There are several updates relating to the interrupt coalesce for the HNS3 ethernet driver. #1 adds support for QL(quantity limiting, interrupt coalesce based on the frame quantity). #2 adds support for 1us unit GL(gap limiting, interrupt coalesce based on the gap time). #3 queries the maximu

[PATCH net-next 10/11] net: hns3: add ethtool priv-flag for EQ/CQ

2020-11-06 Thread Huazhong Tan
Add a control private flag in ethtool for switching EQ/CQ mode. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 19 -- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h| 2 ++ driv

[PATCH net-next 11/11] net: hns3: add debugfs support for interrupt coalesce

2020-11-06 Thread Huazhong Tan
Since user may need to check the current configuration of the interrupt coalesce, so add debugfs support for query this info, which includes DIM profile, coalesce configuration of both software and hardware. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 124

[PATCH net-next 05/11] net: hns3: add support for dynamic interrupt moderation

2020-11-06 Thread Huazhong Tan
Add dynamic interrupt moderation support for the HNS3 driver. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/Kconfig | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 87 - drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 4 ++ 3 files c

[PATCH net-next 09/11] net: hns3: add support for EQ/CQ mode configuration

2020-11-06 Thread Huazhong Tan
For device whose version is above V3(include V3), the GL can select EQ or CQ mode, so adds support for it. In CQ mode, the coalesced timer will restart upon new completion, while in EQ mode, the timer will not restart. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h

[PATCH net-next 02/11] net: hns3: add support for 1us unit GL configuration

2020-11-06 Thread Huazhong Tan
For device whose version is above V3(include V3), the GL configuration can set as 1us unit, so adds support for configuring this field. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 26 ++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.h

[RFC PATCH] powerpc/vnic: Add some debugs

2020-11-06 Thread Sukadev Bhattiprolu
We sometimes run into situations where a soft/hard reset of the adapter takes a long time or fails to complete. Having additional messages that include important adapter state info will hopefully help understand what is happening, reduce the guess work and minimize requests to reproduce problems wi

Re: pull-request: bpf 2020-11-06

2020-11-06 Thread Jakub Kicinski
On Fri, 6 Nov 2020 14:17:59 -0800 Alexei Starovoitov wrote: > 1) Pre-allocated per-cpu hashmap needs to zero-fill reused element, from > David. > > 2) Tighten bpf_lsm function check, from KP. > > 3) Fix bpftool attaching to flow dissector, from Lorenz. > > 4) Use -fno-gcse for the whole kernel

[PATCH 1/1] net/mlx5e: remove unnecessary memset

2020-11-06 Thread Zhu Yanjun
Since kvzalloc will initialize the allocated memory, it is not necessary to initialize it once again. Fixes: 11b717d61526 ("net/mlx5: E-Switch, Get reg_c0 value on CQE") Signed-off-by: Zhu Yanjun --- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c |1 - 1 files changed, 0 insertions(+), 1

[V2] [PATCH] net/ethernet: update ret when ptp_clock is ERROR

2020-11-06 Thread Wang Qing
We always have to update the value of ret, otherwise the error value may be the previous one. And ptp_clock_register() never return NULL when PTP_1588_CLOCK enable, so we use IS_ERR here. Signed-off-by: Wang Qing --- drivers/net/ethernet/ti/am65-cpts.c | 5 ++--- 1 file changed, 2 insertions(+

[PATCH] pcp_clock: return EOPNOTSUPP if !CONFIG_PTP_1588_CLOCK

2020-11-06 Thread Wang Qing
pcp_clock_register() is checked with IS_ERR(), and will crash if !PTP, change return value to ERR_PTR(-EOPNOTSUPP) for the !CONFIG_PTP_1588_CLOCK and so question resolved. Signed-off-by: Wang Qing --- include/linux/ptp_clock_kernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

Re: [PATCH net-next v4 0/5] bonding: rename bond components

2020-11-06 Thread Jakub Kicinski
On Fri, 6 Nov 2020 15:04:31 -0500 Jarod Wilson wrote: > The bonding driver's use of master and slave, while largely understood > in technical circles, poses a barrier for inclusion to some potential > members of the development and user community, due to the historical > context of masters and sla

Re: [PATCHv2 net 2/2] samples/bpf: remove unused test_ipip.sh

2020-11-06 Thread Martin KaFai Lau
On Fri, Nov 06, 2020 at 05:01:17PM +0800, Hangbin Liu wrote: > The tcbpf2_kern.o and related kernel sections are moved to bpf > selftest folder since b05cd7404323 ("samples/bpf: remove the bpf tunnel > testsuite."). Remove this one as well. > > Fixes: b05cd7404323 ("samples/bpf: remove the bpf tun

Re: [PATCHv2 net 1/2] selftest/bpf: add missed ip6ip6 test back

2020-11-06 Thread Martin KaFai Lau
On Fri, Nov 06, 2020 at 05:01:16PM +0800, Hangbin Liu wrote: > In comment 173ca26e9b51 ("samples/bpf: add comprehensive ipip, ipip6, > ip6ip6 test") we added ip6ip6 test for bpf tunnel testing. But in commit > 933a741e3b82 ("selftests/bpf: bpf tunnel test.") when we moved it to > the current folder

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-06 Thread Martin KaFai Lau
On Fri, Nov 06, 2020 at 05:14:14PM -0800, Andrii Nakryiko wrote: > On Fri, Nov 6, 2020 at 2:08 PM Martin KaFai Lau wrote: > > > > This patch enables the FENTRY/FEXIT/RAW_TP tracing program to use > > the bpf_sk_storage_(get|delete) helper, so those tracing programs > > can access the sk's bpf_loca

Re: [PATCH v2 bpf-next 1/5] bpf: add in-kernel split BTF support

2020-11-06 Thread Andrii Nakryiko
On Fri, Nov 6, 2020 at 5:28 PM Song Liu wrote: > > > > > On Nov 6, 2020, at 3:02 PM, Andrii Nakryiko wrote: > > > > Adjust in-kernel BTF implementation to support a split BTF mode of > > operation. > > Changes are mostly mirroring libbpf split BTF changes, with the exception of > > start_id bein

[PATCH net-next] bridge: mrp: Use hlist_head instead of list_head for mrp

2020-11-06 Thread Horatiu Vultur
Replace list_head with hlist_head for MRP list under the bridge. There is no need for a circular list when a linear list will work. This will also decrease the size of 'struct net_bridge'. Signed-off-by: Horatiu Vultur --- net/bridge/br_device.c | 2 +- net/bridge/br_mrp.c | 26 +++

Re: [PATCH net-next] Revert ibmvnic merge do_change_param_reset into do_reset

2020-11-06 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Fri, 6 Nov 2020 14:17:45 -0500 you wrote: > This reverts commit 16b5f5ce351f8709a6b518cc3cbf240c378305bf > where it restructures do_reset. There are patches being tested that > would require major rework if this is comm

Re: [PATCH net-next] Revert ibmvnic merge do_change_param_reset into do_reset

2020-11-06 Thread Jakub Kicinski
On Fri, 6 Nov 2020 14:17:45 -0500 Dany Madden wrote: > This reverts commit 16b5f5ce351f8709a6b518cc3cbf240c378305bf > where it restructures do_reset. There are patches being tested that > would require major rework if this is committed first. > > We will resend this after the other patches have

Re: [PATCH v2 bpf-next 1/5] bpf: add in-kernel split BTF support

2020-11-06 Thread Song Liu
> On Nov 6, 2020, at 3:02 PM, Andrii Nakryiko wrote: > > Adjust in-kernel BTF implementation to support a split BTF mode of operation. > Changes are mostly mirroring libbpf split BTF changes, with the exception of > start_id being 0 for in-kernel implementation due to simpler read-only mode. >

Re: [PATCHv2 net 0/2] Remove unused test_ipip.sh test and add missed ip6ip6 test

2020-11-06 Thread Hangbin Liu
On Fri, Nov 06, 2020 at 10:56:00AM -0800, Jakub Kicinski wrote: > On Fri, 6 Nov 2020 17:01:15 +0800 Hangbin Liu wrote: > > In comment 173ca26e9b51 ("samples/bpf: add comprehensive ipip, ipip6, > > ip6ip6 test") we added some bpf tunnel tests. In commit 933a741e3b82 > > ("selftests/bpf: bpf tunnel

Re: [PATCH v2 net-next 6/8] ionic: flatten calls to ionic_lif_rx_mode

2020-11-06 Thread Shannon Nelson
On 11/6/20 1:33 PM, Saeed Mahameed wrote: On Thu, 2020-11-05 at 16:12 -0800, Shannon Nelson wrote: The _ionic_lif_rx_mode() is only used once and really doesn't need to be broken out. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 38 - --

Re: [PATCH 4/9 next] fs/io_uring Don't use the return value from import_iovec().

2020-11-06 Thread Pavel Begunkov
On 15/09/2020 15:55, David Laight wrote: > > This is the only code that relies on import_iovec() returning > iter.count on success. > This allows a better interface to import_iovec(). Seems this got nowhere. I'll pick it and send with some other patches to Jens. > Signed-off-by: David Laight >

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-06 Thread Andrii Nakryiko
On Fri, Nov 6, 2020 at 2:08 PM Martin KaFai Lau wrote: > > This patch enables the FENTRY/FEXIT/RAW_TP tracing program to use > the bpf_sk_storage_(get|delete) helper, so those tracing programs > can access the sk's bpf_local_storage and the later selftest > will show some examples. > > The bpf_sk_

Re: [PATCHv3 iproute2-next 0/5] iproute2: add libbpf support

2020-11-06 Thread Andrii Nakryiko
On Fri, Nov 6, 2020 at 4:41 PM Stephen Hemminger wrote: > > On Fri, 6 Nov 2020 15:30:38 -0800 > Andrii Nakryiko wrote: > > > On Fri, Nov 6, 2020 at 3:25 PM Stephen Hemminger > > wrote: > > > > > > On Fri, 6 Nov 2020 13:04:16 -0800 > > > Alexei Starovoitov wrote: > > > > > > > On Fri, Nov 6, 202

Re: [PATCHv3 iproute2-next 0/5] iproute2: add libbpf support

2020-11-06 Thread Stephen Hemminger
On Fri, 6 Nov 2020 15:30:38 -0800 Andrii Nakryiko wrote: > On Fri, Nov 6, 2020 at 3:25 PM Stephen Hemminger > wrote: > > > > On Fri, 6 Nov 2020 13:04:16 -0800 > > Alexei Starovoitov wrote: > > > > > On Fri, Nov 6, 2020 at 12:58 PM Andrii Nakryiko > > > wrote: > > > > > > > > On Fri, Nov 6,

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-06 Thread Song Liu
> On Nov 6, 2020, at 3:18 PM, Martin Lau wrote: > > On Fri, Nov 06, 2020 at 02:59:14PM -0800, Song Liu wrote: >> >> >>> On Nov 6, 2020, at 2:08 PM, Martin KaFai Lau wrote: >>> [...] >>> +static bool bpf_sk_storage_tracing_allowed(const struct bpf_prog *prog) >>> +{ >>> + const struct b

[PATCH bpf] libbpf: don't attempt to load unused subprog as an entry-point BPF program

2020-11-06 Thread Andrii Nakryiko
If BPF code contains unused BPF subprogram and there are no other subprogram calls (which can realistically happen in real-world applications given sufficiently smart Clang code optimizations), libbpf will erroneously assume that subprograms are entry-point programs and will attempt to load them wi

Re: [PATCHv3 iproute2-next 0/5] iproute2: add libbpf support

2020-11-06 Thread David Ahern
On 11/6/20 4:25 PM, Stephen Hemminger wrote: >> >> I think bumping the minimal version of libbpf with every iproute2 release >> is necessary as well. >> Today iproute2-next should require 0.2.0. The cycle after it should be 0.3.0 >> and so on. >> This way at least some correlation between iproute2

Re: [PATCHv3 iproute2-next 0/5] iproute2: add libbpf support

2020-11-06 Thread Andrii Nakryiko
On Fri, Nov 6, 2020 at 3:25 PM Stephen Hemminger wrote: > > On Fri, 6 Nov 2020 13:04:16 -0800 > Alexei Starovoitov wrote: > > > On Fri, Nov 6, 2020 at 12:58 PM Andrii Nakryiko > > wrote: > > > > > > On Fri, Nov 6, 2020 at 12:44 AM Jiri Benc wrote: > > > > > > > > On Thu, 5 Nov 2020 12:19:00 -08

Re: [PATCHv3 iproute2-next 0/5] iproute2: add libbpf support

2020-11-06 Thread Stephen Hemminger
On Fri, 6 Nov 2020 13:04:16 -0800 Alexei Starovoitov wrote: > On Fri, Nov 6, 2020 at 12:58 PM Andrii Nakryiko > wrote: > > > > On Fri, Nov 6, 2020 at 12:44 AM Jiri Benc wrote: > > > > > > On Thu, 5 Nov 2020 12:19:00 -0800, Andrii Nakryiko wrote: > > > > I'll just quote myself here for your

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-06 Thread Martin KaFai Lau
On Fri, Nov 06, 2020 at 02:59:14PM -0800, Song Liu wrote: > > > > On Nov 6, 2020, at 2:08 PM, Martin KaFai Lau wrote: > > > > This patch enables the FENTRY/FEXIT/RAW_TP tracing program to use > > the bpf_sk_storage_(get|delete) helper, so those tracing programs > > can access the sk's bpf_local

Re: [PATCH iproute2-next] tc: implement support for action terse dump

2020-11-06 Thread Vlad Buslov
On Tue 03 Nov 2020 at 23:59, Jamal Hadi Salim wrote: > On 2020-11-03 10:07 a.m., Vlad Buslov wrote: >> >> On Tue 03 Nov 2020 at 03:48, David Ahern wrote: >>> On 10/31/20 2:25 PM, Vlad Buslov wrote: diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h inde

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-06 Thread Song Liu
> On Nov 6, 2020, at 2:08 PM, Martin KaFai Lau wrote: > > This patch enables the FENTRY/FEXIT/RAW_TP tracing program to use > the bpf_sk_storage_(get|delete) helper, so those tracing programs > can access the sk's bpf_local_storage and the later selftest > will show some examples. > > The bpf

[PATCH bpf-next] bpf: selftest: Use static globals in tcp_hdr_options and btf_skc_cls_ingress

2020-11-06 Thread Martin KaFai Lau
Some globals in the tcp_hdr_options test and btf_skc_cls_ingress test are not using static scope. This patch fixes it. Targeting bpf-next branch as an improvement since it currently does not break the build. Fixes: ad2f8eb0095e ("bpf: selftests: Tcp header options") Fixes: 9a856cae2217 ("bpf: se

Re: [PATCH net-next v3 0/4] remove compat_alloc_user_space()

2020-11-06 Thread Jakub Kicinski
On Fri, 6 Nov 2020 22:48:18 +0100 Arnd Bergmann wrote: > On Fri, Nov 6, 2020 at 6:32 PM Arnd Bergmann wrote: > > > > From: Arnd Bergmann > > > > This is the third version of my seires, now spanning four patches > > instead of two, with a new approach for handling struct ifreq > > compatibility af

Re: [PATCH bpf-next 1/3] bpf: Folding omem_charge() into sk_storage_charge()

2020-11-06 Thread Song Liu
> On Nov 6, 2020, at 2:07 PM, Martin KaFai Lau wrote: > > sk_storage_charge() is the only user of omem_charge(). > This patch simplifies it by folding omem_charge() into > sk_storage_charge(). > > Signed-off-by: Martin KaFai Lau Acked-by: Song Liu > --- > net/core/bpf_sk_storage.c | 23 ++

Re: [PATCH v2 net-next 09/13] octeontx2-pf: Implement ingress/egress VLAN offload

2020-11-06 Thread Saeed Mahameed
On Thu, 2020-11-05 at 14:58 +0530, Naveen Mamindlapalli wrote: > From: Hariprasad Kelam > > This patch implements egress VLAN offload by appending NIX_SEND_EXT_S > header to NIX_SEND_HDR_S. The VLAN TCI information is specified > in the NIX_SEND_EXT_S. The VLAN offload in the ingress path is > im

Re: [PATCH] compiler-clang: remove version check for BPF Tracing

2020-11-06 Thread Jarkko Sakkinen
On Fri, Nov 06, 2020 at 10:52:50AM -0800, Nick Desaulniers wrote: > On Thu, Nov 5, 2020 at 8:16 PM Alexei Starovoitov > wrote: > > > > I can take it through the bpf tree if no one objects. > > Doesn't matter to me. You'll need to coordinate with Andrew though, > since I got the email that this wa

Re: [GIT PULL] Networking

2020-11-06 Thread patchwork-bot+netdevbpf
Hello: This pull request was applied to netdev/net.git (refs/heads/master): On Thu, 5 Nov 2020 11:25:08 -0800 you wrote: > The following changes since commit 07e0887302450a62f51dba72df6afb5fabb23d1c: > > Merge tag 'fallthrough-fixes-clang-5.10-rc2' of > git://git.kernel.org/pub/scm/linux/ker

[RFC net-next 05/28] wireless: remove old ioctls

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann Commit 8bfb36766064 ("wireless: wext: remove ndo_do_ioctl fallback") removed the ability to have private wireless ioctl commands implemented in the normal ndo_do_ioctl handler, under the assumption that no remaining drivers used that. This turned out to be incorrect, as both

pull-request: bpf 2020-11-06

2020-11-06 Thread Alexei Starovoitov
Hi David, The following pull-request contains BPF updates for your *net* tree. We've added 15 non-merge commits during the last 14 day(s) which contain a total of 25 files changed, 346 insertions(+), 49 deletions(-). The main changes are: 1) Pre-allocated per-cpu hashmap needs to zero-fill reus

[RFC net-next 01/28] net: split out SIOCDEVPRIVATE handling from dev_ioctl

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann SIOCDEVPRIVATE ioctl commands are mainly used in really old drivers, and they have a number of problems: - They hide behind the normal .ndo_do_ioctl function that is also used for other things in modern drivers, so it's hard to spot a driver that actually uses one of thes

[RFC net-next 02/28] staging: rtlwifi: use siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann rtl8188eu has an "android private" ioctl command multiplexer that is not currently safe for use in compat mode because of its triple-indirect pointer. rtl8723bs uses a different interface on the SIOCDEVPRIVATE command, based on the iwpriv data structure Both also have normal

[RFC net-next 06/28] bridge: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann The bridge driver has an old set of ioctls using the SIOCDEVPRIVATE namespace that have never worked in compat mode and are explicitly forbidden already. Move them over to ndo_siocdevprivate and fix compat mode for these, because we can. Signed-off-by: Arnd Bergmann --- ne

[RFC net-next 07/28] phonet: use siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann phonet has a single private ioctl that is broken in compat mode on big-endian machines today because the data returned from it is never copied back to user space. Move it over to the ndo_siocdevprivate callback, which also fixes the compat issue. Signed-off-by: Arnd Bergmann

[RFC net-next 10/28] appletalk: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann appletalk has three SIOCDEVPRIVATE ioctl commands that are broken in compat mode because the passed structure contains a pointer. Change it over to ndo_siocdevprivate for consistency and make it return an error when called in compat mode. This could be fixed if there are stil

[RFC net-next 16/28] slip/plip: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann slip and plip both use a couple of SIOCDEVPRIVATE ioctl commands that overload the ifreq layout in a way that is incompatible with compat mode. Convert to use ndo_siocdevprivate to allow passing the data this way, but return an error in compat mode anyway because the private

[RFC net-next 14/28] fddi: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann The skfddi driver has a private ioctl and passes the data correctly through ifr_data, but the use of a pointer in s_skfp_ioctl is broken in compat mode. Change the driver to use ndo_siocdevprivate and disallow calling it in compat mode until a conversion handler is added. Si

[RFC net-next 17/28] qeth: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann qeth has both standard MII ioctls and custom SIOCDEVPRIVATE ones, all of which work correctly with compat user space. Move the private ones over to the new ndo_siocdevprivate callback. Signed-off-by: Arnd Bergmann --- drivers/s390/net/qeth_core.h | 2 ++ drivers/s390

[RFC net-next 09/28] bonding: use siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann The bonding driver supports two command codes for each operation: one in the SIOCDEVPRIVATE range and another one with the same definition but a unique command code. Only the second set currently works in compat mode, as the ifr_data expansion overwrites part of the ifr_slave

[RFC net-next 22/28] hamradio: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann hamradio uses a set of private ioctls that do seem to work correctly in compat mode, as they only rely on the ifr_data pointer. Move them over to the ndo_siocdevprivate callback as a cleanup. Signed-off-by: Arnd Bergmann --- drivers/net/hamradio/baycom_epp.c | 9 +

[RFC net-next 23/28] airo: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann The airo driver overloads SIOCDEVPRIVATE ioctls with another set based on SIOCIWFIRSTPRIV. Only the first ones actually work (also in compat mode) as the others do not get passed down any more. Change it over to ndo_siocdevprivate for clarification. Signed-off-by: Arnd Bergm

[RFC net-next 25/28] hippi: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann The rr_ioctl uses private ioctl commands that correctly pass all data through ifr_data, which works fine in compat mode. Change it to use ndo_siocdevprivate as a cleanup. Signed-off-by: Arnd Bergmann --- drivers/net/hippi/rrunner.c | 11 ++- drivers/net/hippi/rrunn

[RFC net-next 20/28] dev_ioctl: split out ndo_eth_ioctl

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann Most users of ndo_do_ioctl are ethernet drivers that implement the MII commands SIOCGMIIPHY/SIOCGMIIREG/SIOCSMIIREG, or hardware timestamping with SIOCSHWTSTAMP/SIOCGHWTSTAMP. Separate these from the few drivers that use ndo_do_ioctl to implement SIOCBOND, SIOCBR and SIOCWAND

[RFC net-next 21/28] wan: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann The wan drivers each support some custom SIOCDEVPRIVATE ioctls, plus the common SIOCWANDEV command. Split these so the ioctl callback only deals with SIOCWANDEV and the rest is handled by ndo_siocdevprivate. It might make sense to also split out SIOCWANDEV into a separate ca

[RFC net-next 27/28] ppp: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann ppp has a custom statistics interface using SIOCDEVPRIVATE ioctl commands that works correctly in compat mode. Convert it to use ndo_siocdevprivate as a cleanup. Signed-off-by: Arnd Bergmann --- drivers/net/ppp/ppp_generic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 d

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

2020-11-06 Thread Andrii Nakryiko
On Fri, Nov 6, 2020 at 1:50 PM Joe Perches wrote: > > On Fri, 2020-11-06 at 13:32 -0800, Andrii Nakryiko wrote: > > On Thu, Nov 5, 2020 at 11:12 PM wrote: > > > Fix following warning from coccinelle: > > > ./tools/lib/bpf/libbpf.c:1478:43-48: WARNING: conversion to bool not > > > needed here > [

[RFC net-next 28/28] net: socket: return changed ifreq from SIOCDEVPRIVATE

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann Some drivers that use SIOCDEVPRIVATE ioctl commands modify the ifreq structure and expect it to be passed back to user space, which has never really happened for compat mode because the calling these drivers through ndo_do_ioctl requires overwriting the ifr_data pointer. Now

[RFC net-next 24/28] ip_tunnel: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann The various ipv4 and ipv6 tunnel drivers each implement a set of 12 SIOCDEVPRIVATE commands for managing tunnels. These all work correctly in compat mode. Move them over to the new .ndo_siocdevprivate operation. Signed-off-by: Arnd Bergmann --- include/net/ip_tunnels.h |

[RFC net-next 26/28] sb1000: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann The private sb1000 ioctl commands all work correctly in compat mode. Change the to ndo_siocdevprivate as a cleanup. Signed-off-by: Arnd Bergmann --- drivers/net/sb1000.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/net/sb

[RFC net-next 18/28] cxgb3: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann cxgb3 has a private multiplexor that works correctly in compat mode, split out the siocdevprivate callback from do_ioctl for simplification. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 12 1 file changed, 8 insertions(+),

[RFC net-next 13/28] eql: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann The private ioctls in eql pass the arguments correctly through ifr_data, but the slaving_request_t and slave_config_t structures are incompatible with compat mode and need special conversion code in the driver. Convert to siocdevprivate for now, and return an error when calle

[RFC net-next 04/28] hostap: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann hostap has a combination of iwpriv ioctls that do not work at all, and two SIOCDEVPRIVATE commands that work natively but lack a compat conversion handler. For the moment, move them over to the new ndo_siocdevprivate interface and return an error for compat mode. Signed-off-

[RFC net-next 15/28] net: usb: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann The pegasus and rtl8150 drivers use SIOCDEVPRIVATE ioctls to access their MII registers, in place of the normal commands. This is broken for all compat ioctls today. Change to ndo_siocdevprivate to fix it. Signed-off-by: Arnd Bergmann --- drivers/net/usb/pegasus.c | 4 ++--

[RFC net-next 19/28] dev_ioctl: pass SIOCDEVPRIVATE data separately

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann The compat handlers for SIOCDEVPRIVATE are incorrect for any driver that passes data as part of struct ifreq rather than as an ifr_data pointer, or that passes data back this way, since the compat_ifr_data_ioctl() helper overwrites the ifr_data pointer and does not copy anythi

[RFC net-next 12/28] tehuti: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann Tehuti only implements private ioctl commands, and implements them by overriding the ifreq layout, which is broken in compat mode. Move it to the ndo_siocdevprivate callback in order to fix this. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/tehuti/tehuti.c | 18 ++

[RFC net-next 08/28] tulip: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann The tulip driver has a debugging method over ioctl built-in, but it does not actually check the command type, which may end up leading to random behavior when trying to run other ioctls on it. Change the driver to use ndo_siocdevprivate and limit the execution further to the

[RFC net-next 03/28] staging: wlan-ng: use siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann wlan-ng has two private ioctls that correctly work in compat mode. Move these over to the new ndo_siocdevprivate mechanism. The p80211netdev_ethtool() function is commented out and has no use here, so this can be removed Signed-off-by: Arnd Bergmann --- drivers/staging/wla

[RFC net-next 11/28] hamachi: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann hamachi has one command that overloads the ifreq argument and requires a conversion to ndo_siocdevprivate in order to make compat mode work, so split it from ndo_ioctl. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/packetengines/hamachi.c | 63

[RFC net-next 00/28] ndo_ioctl rework

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann This series is some fallout from the series I sent earlier today to get rid of compat_alloc_user_space() and copy_in_user(). I wanted to be sure I address all the ways that 'struct ifreq' is used in device drivers through .ndo_do_ioctl, originally to prove that my approach of

Re: [PATCH bpf-next 4/5] bpf: load and verify kernel module BTFs

2020-11-06 Thread Andrii Nakryiko
On Thu, Nov 5, 2020 at 10:44 PM Greg Kroah-Hartman wrote: > > On Thu, Nov 05, 2020 at 09:51:09PM -0800, Andrii Nakryiko wrote: > > Add kernel module listener that will load/validate and unload module BTF. > > Module BTFs gets ID generated for them, which makes it possible to iterate > > them with

Re: [PATCH v2 net-next 06/13] octeontx2-pf: Add support for unicast MAC address filtering

2020-11-06 Thread Saeed Mahameed
On Thu, 2020-11-05 at 14:58 +0530, Naveen Mamindlapalli wrote: > From: Hariprasad Kelam > > Add unicast MAC address filtering support using install flow > message. Total of 8 MCAM entries are allocated for adding > unicast mac filtering rules. If the MCAM allocation fails, > the unicast filtering

[PATCH bpf-next 3/3] bpf: selftest: Use bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-06 Thread Martin KaFai Lau
This patch tests storing the task's related info into the bpf_sk_storage by fentry/fexit tracing at listen, accept, and connect. It also tests the raw_tp at inet_sock_set_state. A negative test is done by tracing the bpf_sk_storage_free() and using bpf_sk_storage_get() at the same time. It ensur

[PATCH bpf-next 0/3] bpf: Enable bpf_sk_storage for FENTRY/FEXIT/RAW_TP

2020-11-06 Thread Martin KaFai Lau
This set is to allow the FENTRY/FEXIT/RAW_TP tracing program to use bpf_sk_storage. The first patch is a cleanup. The last patch is tests. The second patch has the required kernel changes to enable bpf_sk_storage for FENTRY/FEXIT/RAW_TP. Please see individual patch for details. Martin KaFai La

[PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-06 Thread Martin KaFai Lau
This patch enables the FENTRY/FEXIT/RAW_TP tracing program to use the bpf_sk_storage_(get|delete) helper, so those tracing programs can access the sk's bpf_local_storage and the later selftest will show some examples. The bpf_sk_storage is currently used in bpf-tcp-cc, tc, cg sockops...etc which i

[PATCH bpf-next 1/3] bpf: Folding omem_charge() into sk_storage_charge()

2020-11-06 Thread Martin KaFai Lau
sk_storage_charge() is the only user of omem_charge(). This patch simplifies it by folding omem_charge() into sk_storage_charge(). Signed-off-by: Martin KaFai Lau --- net/core/bpf_sk_storage.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/net/core/

Re: [PATCH] net/sunrpc: Fix return value from proc_do_xprt()

2020-11-06 Thread J. Bruce Fields
Whoops, got 3 independent patches for this and overlooked this one. See https://lore.kernel.org/linux-nfs/20201106205959.gb26...@fieldses.org/T/#t --b. On Sat, Oct 24, 2020 at 03:52:40PM +0100, Alex Dewar wrote: > Commit c09f56b8f68d ("net/sunrpc: Fix return value for sysctl > sunrpc.transports"

RE: [PATCH V2] fsl/fman: add missing put_devcie() call in fman_port_probe()

2020-11-06 Thread Madalin Bucur (OSS)
> -Original Message- > From: Jakub Kicinski > Sent: 05 November 2020 03:31 > To: Yu Kuai > Cc: Madalin Bucur ; da...@davemloft.net; Florinel > Iordache ; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org; yi.zh...@huawei.com > Subject: Re: [PATCH V2] fsl/fman: add missing put_devcie

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

2020-11-06 Thread Joe Perches
On Fri, 2020-11-06 at 13:32 -0800, Andrii Nakryiko wrote: > On Thu, Nov 5, 2020 at 11:12 PM wrote: > > Fix following warning from coccinelle: > > ./tools/lib/bpf/libbpf.c:1478:43-48: WARNING: conversion to bool not needed > > here [] > > diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.

Re: [PATCH net-next v3 0/4] remove compat_alloc_user_space()

2020-11-06 Thread Arnd Bergmann
On Fri, Nov 6, 2020 at 6:32 PM Arnd Bergmann wrote: > > From: Arnd Bergmann > > This is the third version of my seires, now spanning four patches > instead of two, with a new approach for handling struct ifreq > compatibility after I realized that my earlier approach introduces > additional probl

Re: [PATCH v2 net-next 0/8] ionic updates

2020-11-06 Thread Saeed Mahameed
On Thu, 2020-11-05 at 16:12 -0800, Shannon Nelson wrote: > These updates are a bit of code cleaning and a minor > bit of performance tweaking. > > v2: added void cast on call to ionic_lif_quiesce() > lowered batching threshold > added patch to flatten calls to ionic_lif_rx_mode > added

Re: [PATCH v2 net-next 6/8] ionic: flatten calls to ionic_lif_rx_mode

2020-11-06 Thread Saeed Mahameed
On Thu, 2020-11-05 at 16:12 -0800, Shannon Nelson wrote: > The _ionic_lif_rx_mode() is only used once and really doesn't > need to be broken out. > > Signed-off-by: Shannon Nelson > --- > .../net/ethernet/pensando/ionic/ionic_lif.c | 38 - > -- > 1 file changed, 16 insertions(+

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

2020-11-06 Thread Andrii Nakryiko
On Thu, Nov 5, 2020 at 11:12 PM wrote: > > From: Kaixu Xia > > Fix following warning from coccinelle: > > ./tools/lib/bpf/libbpf.c:1478:43-48: WARNING: conversion to bool not needed > here > > Signed-off-by: Kaixu Xia > --- > tools/lib/bpf/libbpf.c | 2 +- > 1 file changed, 1 insertion(+), 1 d

Re: [PATCHv3 iproute2-next 0/5] iproute2: add libbpf support

2020-11-06 Thread Andrii Nakryiko
On Fri, Nov 6, 2020 at 7:27 AM Jamal Hadi Salim wrote: > > On 2020-11-05 4:01 p.m., Andrii Nakryiko wrote: > > On Thu, Nov 5, 2020 at 6:05 AM Jamal Hadi Salim wrote: > >> > >> On 2020-11-04 10:19 p.m., David Ahern wrote: > >> > >> [..] > > [..] > > >> 2cents feedback from a dabbler in ebpf on use

Re: [GIT PULL] Networking

2020-11-06 Thread pr-tracker-bot
The pull request you sent on Thu, 5 Nov 2020 11:25:08 -0800: > git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git tags/net-5.10-rc3 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/41f16530241405819ae5644b6544965ab124bbda Thank you! -- Deet-doot-dot, I am a

Re: [PATCH v2 net-next 3/8] ionic: add lif quiesce

2020-11-06 Thread Saeed Mahameed
On Thu, 2020-11-05 at 16:12 -0800, Shannon Nelson wrote: > After the queues are stopped, expressly quiesce the lif. > This assures that even if the queues were in an odd state, > the firmware will close up everything cleanly. > > Signed-off-by: Shannon Nelson > --- > .../net/ethernet/pensando/io

Re: [PATCHv3 iproute2-next 0/5] iproute2: add libbpf support

2020-11-06 Thread Andrii Nakryiko
On Fri, Nov 6, 2020 at 1:00 AM Jiri Benc wrote: > > On Thu, 5 Nov 2020 12:45:39 -0800, Andrii Nakryiko wrote: > > That's not true. If you need new functionality like BTF, CO-RE, > > function-by-function verification, etc., then yes, you have to update > > kernel, compiler, libbpf, sometimes pahole

Re: [Linux-kernel-mentees] [PATCH v2 net] rose: Fix Null pointer dereference in rose_send_frame()

2020-11-06 Thread Saeed Mahameed
On Thu, 2020-11-05 at 21:26 +0530, Anmol Karn wrote: > rose_send_frame() dereferences `neigh->dev` when called from > rose_transmit_clear_request(), and the first occurance of the `neigh` > is in rose_loopback_timer() as `rose_loopback_neigh`, and it is > initialized > in rose_add_loopback_neigh()

  1   2   3   >