Re: [PATCH v2 1/2] x86: make VMware support optional

2020-12-02 Thread Borislav Petkov
On Wed, Dec 02, 2020 at 10:19:48PM +0100, Enrico Weigelt, metux IT consult wrote: > Make it possible to opt-out from VMware support, for minimized kernels > that never will be run under Vmware (eg. high-density virtualization > or embedded systems). > > Average distro kernel will leave it on, the

Re: [PATCH net-next 0/3] i40e, ice, ixgbe: optimize for XDP_REDIRECT in xsk path

2020-12-02 Thread Magnus Karlsson
On Wed, Dec 2, 2020 at 9:49 PM Maciej Fijalkowski wrote: > > On Wed, Dec 02, 2020 at 04:07:21PM +0100, Magnus Karlsson wrote: > > Optimize run_xdp_zc() for the XDP program verdict being XDP_REDIRECT > > in the zsk zero-copy path. This path is only used when having AF_XDP > > zero-copy on and in th

Re: [PATCH v6 bpf-next 2/2] samples/bpf: sample application for eBPF load and socket creation split

2020-12-02 Thread Mariusz Dudek
On Thu, Dec 3, 2020 at 3:50 AM Alexei Starovoitov wrote: > > On Wed, Dec 2, 2020 at 2:39 AM wrote: > > int main(int argc, char **argv) > > { > > + struct __user_cap_header_struct hdr = { > > _LINUX_CAPABILITY_VERSION_3, 0 }; > > + struct __user_cap_data_struct data[2] = { { 0 } };

Re: Long delay on estimation_timer causes packet latency

2020-12-02 Thread dust.li
Hi Yunhong & Julian, any updates ? We've encountered the same problem. With lots of ipvs services plus many CPUs, it's easy to reproduce this issue. I have a simple script to reproduce: First add many ipvs services: for((i=0;i<5;i++)); do     ipvsadm -A -t 10.10.10.10:$((2000+$i)) do

RE: [PATCH iproute2-next] devlink: Extend man page for port function set command

2020-12-02 Thread Parav Pandit
> From: David Ahern > Sent: Thursday, December 3, 2020 9:12 AM > > On 11/30/20 9:47 AM, Parav Pandit wrote: > > Extended devlink-port man page for synopsis, description and example > > for setting devlink port function attribute. > > > > Signed-off-by: Parav Pandit > > Reviewed-by: Jiri Pirko

Re: [PATCH v5 bpf-next 09/14] bpf: remove hard-coded btf_vmlinux assumption from BPF verifier

2020-12-02 Thread kernel test robot
Hi Andrii, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Andrii-Nakryiko/Support-BTF-powered-BPF-tracing-programs-for-kernel-modules/20201203-115515 base: https://git.kernel.org/pub/scm/linux/kernel/git

Re: [PATCH v5 bpf-next 09/14] bpf: remove hard-coded btf_vmlinux assumption from BPF verifier

2020-12-02 Thread kernel test robot
Hi Andrii, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Andrii-Nakryiko/Support-BTF-powered-BPF-tracing-programs-for-kernel-modules/20201203-115515 base: https://git.kernel.org/pub/scm/linux/kernel/git

Re: [PATCH v5 bpf-next 05/14] libbpf: add kernel module BTF support for CO-RE relocations

2020-12-02 Thread Andrii Nakryiko
On Wed, Dec 2, 2020 at 9:30 PM John Fastabend wrote: > > Andrii Nakryiko wrote: > > Teach libbpf to search for candidate types for CO-RE relocations across > > kernel > > modules BTFs, in addition to vmlinux BTF. If at least one candidate type is > > found in vmlinux BTF, kernel module BTFs are n

RE: [PATCH v5 bpf-next 05/14] libbpf: add kernel module BTF support for CO-RE relocations

2020-12-02 Thread John Fastabend
Andrii Nakryiko wrote: > Teach libbpf to search for candidate types for CO-RE relocations across kernel > modules BTFs, in addition to vmlinux BTF. If at least one candidate type is > found in vmlinux BTF, kernel module BTFs are not iterated. If vmlinux BTF has > no matching candidates, then find a

RE: [PATCH v5 bpf-next 04/14] libbpf: refactor CO-RE relocs to not assume a single BTF object

2020-12-02 Thread John Fastabend
Andrii Nakryiko wrote: > Refactor CO-RE relocation candidate search to not expect a single BTF, rather > return all candidate types with their corresponding BTF objects. This will > allow to extend CO-RE relocations to accommodate kernel module BTFs. > > Acked-by: Martin KaFai Lau > Signed-off-by

[PATCH] [v9] wireless: Initial driver submission for pureLiFi STA devices

2020-12-02 Thread Srinivasan Raju
This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC and LiFi-XL USB devices. This driver implementation has been based on the zd1211rw driver. Driver is based on 802.11 softMAC Architecture and uses native 802.11 for configuration and management. The driver is compiled and tested in ARM

RE: [PATCH net-next v3] devlink: Add devlink port documentation

2020-12-02 Thread Parav Pandit
> From: Randy Dunlap > Sent: Thursday, December 3, 2020 7:57 AM > > Hi-- > > On 12/2/20 5:53 AM, Parav Pandit wrote: > > Added documentation for devlink port and port function related commands. > > > > Signed-off-by: Parav Pandit > > Reviewed-by: Jiri Pirko > > Reviewed-by: Jacob Keller > >

RE: [PATCH v5 bpf-next 03/14] libbpf: add internal helper to load BTF data by FD

2020-12-02 Thread John Fastabend
Andrii Nakryiko wrote: > Add a btf_get_from_fd() helper, which constructs struct btf from in-kernel BTF > data by FD. This is used for loading module BTFs. > > Signed-off-by: Andrii Nakryiko > --- Acked-by: John Fastabend

Re: [PATCH] [v7] wireless: Initial driver submission for pureLiFi STA devices

2020-12-02 Thread Srinivasan Raju
Hi Kalle, we will be submitting to linux-firmware repository @ https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git I will share the link once it is accpeted, we have sent another version of the patch v8 , please review and provide your comments Thanks Srini

[net 2/4] net: mlx5e: fix fs_tcp.c build when IPV6 is not enabled

2020-12-02 Thread Saeed Mahameed
From: Randy Dunlap Fix build when CONFIG_IPV6 is not enabled by making a function be built conditionally. Fixes these build errors and warnings: ../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: In function 'accel_fs_tcp_set_ipv6_flow': ../include/net/sock.h:380:34: error: 'struct

[net 3/4] net/mlx5e: kTLS, Enforce HW TX csum offload with kTLS

2020-12-02 Thread Saeed Mahameed
From: Tariq Toukan Checksum calculation cannot be done in SW for TX kTLS HW offloaded packets. Offload it to the device, disregard the declared state of the TX csum offload feature. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Tariq Toukan Reviewed-by: Maxim

[net 4/4] net/mlx5: DR, Proper handling of unsupported Connect-X6DX SW steering

2020-12-02 Thread Saeed Mahameed
From: Yevgeny Kliteynik STEs format for Connect-X5 and Connect-X6DX different. Currently, on Connext-X6DX the SW steering would break at some point when building STEs w/o giving a proper error message. Fix this by checking the STE format of the current device when initializing domain: add mlx5_if

[pull request][net 0/4] mlx5 fixes 2020-12-01

2020-12-02 Thread Saeed Mahameed
Hi Jakub, This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. For the DR steering patch I will need it in net-next as well, I would appreciate it if you will take this small series before your pr to linus. For -stable v5.4: ('net/mlx5: DR, Prop

[net 1/4] net/mlx5: Fix wrong address reclaim when command interface is down

2020-12-02 Thread Saeed Mahameed
From: Eran Ben Elisha When command interface is down, driver to reclaim all 4K page chucks that were hold by the Firmeware. Fix a bug for 64K page size systems, where driver repeatedly released only the first chunk of the page. Define helper function to fill 4K chunks for a given Firmware pages.

[PATCH] [v8] wireless: Initial driver submission for pureLiFi STA devices

2020-12-02 Thread Srinivasan Raju
This introduces the pureLiFi LiFi driver for LiFi-X, LiFi-XC and LiFi-XL USB devices. This driver implementation has been based on the zd1211rw driver. Driver is based on 802.11 softMAC Architecture and uses native 802.11 for configuration and management. The driver is compiled and tested in ARM

RE: [PATCH v5 bpf-next 01/14] bpf: fix bpf_put_raw_tracepoint()'s use of __module_address()

2020-12-02 Thread John Fastabend
Andrii Nakryiko wrote: > __module_address() needs to be called with preemption disabled or with > module_mutex taken. preempt_disable() is enough for read-only uses, which is > what this fix does. Also, module_put() does internal check for NULL, so drop > it as well. > > Fixes: a38d1107f937 ("bpf:

Re: [PATCH v1 bpf-next 06/11] bpf: Introduce two attach types for BPF_PROG_TYPE_SK_REUSEPORT.

2020-12-02 Thread Martin KaFai Lau
On Wed, Dec 02, 2020 at 11:19:02AM -0800, Martin KaFai Lau wrote: > On Tue, Dec 01, 2020 at 06:04:50PM -0800, Andrii Nakryiko wrote: > > On Tue, Dec 1, 2020 at 6:49 AM Kuniyuki Iwashima > > wrote: > > > > > > This commit adds new bpf_attach_type for BPF_PROG_TYPE_SK_REUSEPORT to > > > check if th

[net-next V2 11/15] net/mlx5e: Remove duplicated include

2020-12-02 Thread Saeed Mahameed
From: YueHaibing Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core

[net-next V2 13/15] net/mlx5: Fix passing zero to 'PTR_ERR'

2020-12-02 Thread Saeed Mahameed
From: YueHaibing Fix smatch warnings: drivers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_lgcy.c:105 esw_acl_egress_lgcy_setup() warn: passing zero to 'PTR_ERR' drivers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_ofld.c:177 esw_acl_egress_ofld_setup() warn: passing zero to 'PTR_ERR' driv

[net-next V2 15/15] net/mlx5e: Fill mlx5e_create_cq_param in a function

2020-12-02 Thread Saeed Mahameed
From: Maxim Mikityanskiy Create a function to fill the fields of struct mlx5e_create_cq_param based on a channel. The purpose is code reuse between normal CQs, XSK CQs and the upcoming QoS CQs. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Tariq Toukan Signed-off-

[net-next V2 10/15] net/mlx5e: remove unnecessary memset

2020-12-02 Thread Saeed Mahameed
From: 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 Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eswitc

[net-next V2 12/15] net/mlx5: Arm only EQs with EQEs

2020-12-02 Thread Saeed Mahameed
From: Shay Drory Currently, when more than one EQ is sharing an IRQ, and this IRQ is being interrupted, all the EQs sharing the IRQ will be armed. This is done regardless of whether an EQ has EQE. When multiple EQs are sharing an IRQ, one or more EQs can have valid EQEs. Signed-off-by: Shay Dror

[net-next V2 01/15] net/mlx5e: Free drop RQ in a dedicated function

2020-12-02 Thread Saeed Mahameed
From: Tariq Toukan The drop RQ has very limited objects to be freed, and differs from regular RQs in the context that it is freed from. Add a dedicated function for it, use it where needed, and remove the drop_rq-specific checks in the generic function. Signed-off-by: Tariq Toukan Reviewed-by:

[net-next V2 14/15] net/mlx5e: Split between RX/TX tunnel FW support indication

2020-12-02 Thread Saeed Mahameed
From: Aya Levin Use the new FW caps to advertise for ip-in-ip tunnel support separately for RX and TX. Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en/fs.h | 3 +- .../net/ethernet/mellanox/mlx5/core/en_fs.c |

[net-next V2 09/15] net/mlx5e: Add TX port timestamp support

2020-12-02 Thread Saeed Mahameed
From: Eran Ben Elisha Transmitted packet timestamping accuracy can be improved when using timestamp from the port, instead of packet CQE creation timestamp, as it better reflects the actual time of a packet's transmit. TX port timestamping is supported starting from ConnectX6-DX hardware. Althou

[net-next V2 08/15] net/mlx5e: Add TX PTP port object support

2020-12-02 Thread Saeed Mahameed
From: Eran Ben Elisha Add TX PTP port object support for better TX timestamping accuracy. Currently, driver supports CQE based TX port timestamp. Device also offers TX port timestamp, which has less jitter and better reflects the actual time of a packet's transmit. Define new driver layout calle

[net-next V2 05/15] net/mlx5e: Change skb fifo push/pop API to be used without SQ

2020-12-02 Thread Saeed Mahameed
From: Eran Ben Elisha The skb fifo push/pop API used pre-defined attributes within the mlx5e_txqsq. In order to share the skb fifo API with other non-SQ use cases, change the API input to get newly defined mlx5e_skb_fifo struct. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-o

[net-next V2 06/15] net/mlx5e: Split SW group counters update function

2020-12-02 Thread Saeed Mahameed
From: Eran Ben Elisha SW group counter update function aggregates sw stats out of many mlx5e_*_stats resides in a given mlx5e_channel_stats struct. Split the function into a few helper functions. This will be used later in the series to calculate specific mlx5e_*_stats which are not defined insi

[net-next V2 07/15] net/mlx5e: Move MLX5E_RX_ERR_CQE macro

2020-12-02 Thread Saeed Mahameed
From: Eran Ben Elisha MLX5E_RX_ERR_CQE Macro is used only in data-path, move it to the appropriate header file. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/health.h | 2 -- drivers/net/ethernet/mellanox

[net-next V2 03/15] net/mlx5e: Allow RQ outside of channel context

2020-12-02 Thread Saeed Mahameed
From: Aya Levin In order to be able to create an RQ outside of a channel context, remove rq->channel direct pointer. This requires adding a direct pointer to: ICOSQ and priv in order to support RQs that are part of mlx5e_channel. Use channel_stats from the corresponding CQ. Signed-off-by: Aya Le

[net-next V2 04/15] net/mlx5e: Allow SQ outside of channel context

2020-12-02 Thread Saeed Mahameed
From: Eran Ben Elisha In order to be able to create an SQ outside of a channel context, remove sq->channel direct pointer. This requires adding a direct pointer to: netdevice, priv and mlx5_core in order to support SQs that are part of mlx5e_channel. Use channel_stats from the corresponding CQ.

[pull request][net-next V2 00/15] mlx5 updates 2020-12-01

2020-12-02 Thread Saeed Mahameed
Hi Jakub, v1->v2: Removed merge commit of mlx5-next. This series adds port tx timestamping support and some misc updates. For more information please see tag log below. Please pull and let me know if there is any problem. Thanks, Saeed. --- The following changes since commit cec85994c6b4fa6be

[net-next V2 02/15] net/mlx5e: Allow CQ outside of channel context

2020-12-02 Thread Saeed Mahameed
From: Aya Levin In order to be able to create a CQ outside of a channel context, remove cq->channel direct pointer. This requires adding a direct pointer to channel statistics, netdevice, priv and to mlx5_core in order to support CQs that are a part of mlx5e_channel. In addition, parameters the w

[PATCH iproute2-next] Only compile mnl_utils when HAVE_LIBMNL is defined

2020-12-02 Thread David Ahern
From: David Ahern New lib/mnl_utils.c fails to compile if libmnl is not installed: mnl_utils.c:9:10: fatal error: libmnl/libmnl.h: No such file or directory 9 | #include Make it dependent on HAVE_LIBMNL. Fixes: 72858c7b77d0 ("lib: Extract from devlink/mnlg a helper, mnlu_socket_open(

[PATCH] net: stmmac: implement .set_intf_mode() callback for imx8dxl

2020-12-02 Thread Joakim Zhang
From: Fugang Duan Implement .set_intf_mode() callback for imx8dxl. Signed-off-by: Fugang Duan Signed-off-by: Joakim Zhang --- .../net/ethernet/stmicro/stmmac/dwmac-imx.c | 34 ++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmm

Re: net: macb: fail when there's no PHY

2020-12-02 Thread Andrew Lunn
> So I can avoid my local hack to macb_main.c by doing a doing a local > hack to macb_main.c? User space drivers were never supported in any meaningful way. The IOCTL call is basically there for mii-tool, and nothing much more. The way to avoid your local hack is to move your drivers into the ker

Re: net: macb: fail when there's no PHY

2020-12-02 Thread Andrew Lunn
On Thu, Dec 03, 2020 at 03:03:30AM -, Grant Edwards wrote: > On 2020-12-02, Andrew Lunn wrote: > > >>> So it will access the MDIO bus of the PHY that is attached to the > >>> MAC. > >> > >> If that's the case, wouldn't the ioctl() calls "just work" even when > >> only the fixed-phy mdio bus a

Re: net: macb: fail when there's no PHY

2020-12-02 Thread Grant Edwards
On 2020-12-03, Florian Fainelli wrote: > You would have to have a local hack that intercepts the macb_ioctl() > and instead of calling phylink_mii_ioctl() it would have to > implement a custom ioctl() that does what > drivers/net/phy/phy.c::phy_mii_ioctl does except the mdiobus should > be pointe

[PATCH v5 bpf-next 14/14] selftests/bpf: add fentry/fexit/fmod_ret selftest for kernel module

2020-12-02 Thread Andrii Nakryiko
Add new selftest checking attachment of fentry/fexit/fmod_ret (and raw tracepoint ones for completeness) BPF programs to kernel module function. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/module_attach.c | 53 +++ .../selftests/bpf/progs/test_module_attach.c |

[PATCH v5 bpf-next 13/14] selftests/bpf: add tp_btf CO-RE reloc test for modules

2020-12-02 Thread Andrii Nakryiko
Add another CO-RE relocation test for kernel module relocations. This time for tp_btf with direct memory reads. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/core_reloc.c | 3 +- .../bpf/progs/test_core_reloc_module.c| 32 ++- 2 files changed, 33 in

[PATCH v5 bpf-next 12/14] libbpf: support attachment of BPF tracing programs to kernel modules

2020-12-02 Thread Andrii Nakryiko
Teach libbpf to search for BTF types in kernel modules for tracing BPF programs. This allows attachment of raw_tp/fentry/fexit/fmod_ret/etc BPF program types to tracepoints and functions in kernel modules. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/bpf.c | 5 +- tools/lib/bp

[PATCH v5 bpf-next 11/14] libbpf: factor out low-level BPF program loading helper

2020-12-02 Thread Andrii Nakryiko
Refactor low-level API for BPF program loading to not rely on public API types. This allows painless extension without constant efforts to cleverly not break backwards compatibility. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/bpf.c | 100 ++-- tools/

[PATCH v5 bpf-next 08/14] selftests/bpf: add CO-RE relocs selftest relying on kernel module BTF

2020-12-02 Thread Andrii Nakryiko
Add a self-tests validating libbpf is able to perform CO-RE relocations against the type defined in kernel module BTF. if bpf_testmod.o is not supported by the kernel (e.g., due to version mismatch), skip tests, instead of failing. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/

[PATCH v5 bpf-next 09/14] bpf: remove hard-coded btf_vmlinux assumption from BPF verifier

2020-12-02 Thread Andrii Nakryiko
Remove a permeating assumption thoughout BPF verifier of vmlinux BTF. Instead, wherever BTF type IDs are involved, also track the instance of struct btf that goes along with the type ID. This allows to gradually add support for kernel module BTFs and using/tracking module types across BPF helper ca

[PATCH v5 bpf-next 10/14] bpf: allow to specify kernel module BTFs when attaching BPF programs

2020-12-02 Thread Andrii Nakryiko
Add ability for user-space programs to specify non-vmlinux BTF when attaching BTF-powered BPF programs: raw_tp, fentry/fexit/fmod_ret, LSM, etc. For this, attach_prog_fd (now with the alias name attach_btf_obj_fd) should specify FD of a module or vmlinux BTF object. For backwards compatibility reas

[PATCH v5 bpf-next 06/14] selftests/bpf: add bpf_testmod kernel module for testing

2020-12-02 Thread Andrii Nakryiko
Add bpf_testmod module, which is conceptually out-of-tree module and provides ways for selftests/bpf to test various kernel module-related functionality: raw tracepoint, fentry/fexit/fmod_ret, etc. This module will be auto-loaded by test_progs test runner and expected by some of selftests to be pre

[PATCH v5 bpf-next 07/14] selftests/bpf: add support for marking sub-tests as skipped

2020-12-02 Thread Andrii Nakryiko
Previously skipped sub-tests would be counted as passing with ":OK" appened in the log. Change that to be accounted as ":SKIP". Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/test_progs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/self

[PATCH v5 bpf-next 05/14] libbpf: add kernel module BTF support for CO-RE relocations

2020-12-02 Thread Andrii Nakryiko
Teach libbpf to search for candidate types for CO-RE relocations across kernel modules BTFs, in addition to vmlinux BTF. If at least one candidate type is found in vmlinux BTF, kernel module BTFs are not iterated. If vmlinux BTF has no matching candidates, then find all kernel module BTFs and searc

[PATCH v5 bpf-next 04/14] libbpf: refactor CO-RE relocs to not assume a single BTF object

2020-12-02 Thread Andrii Nakryiko
Refactor CO-RE relocation candidate search to not expect a single BTF, rather return all candidate types with their corresponding BTF objects. This will allow to extend CO-RE relocations to accommodate kernel module BTFs. Acked-by: Martin KaFai Lau Signed-off-by: Andrii Nakryiko --- tools/lib/b

[PATCH v5 bpf-next 03/14] libbpf: add internal helper to load BTF data by FD

2020-12-02 Thread Andrii Nakryiko
Add a btf_get_from_fd() helper, which constructs struct btf from in-kernel BTF data by FD. This is used for loading module BTFs. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/btf.c | 61 +++-- tools/lib/bpf/libbpf_internal.h | 1 + 2 files changed, 36

[PATCH v5 bpf-next 00/14] Support BTF-powered BPF tracing programs for kernel modules

2020-12-02 Thread Andrii Nakryiko
This patch sets extends kernel and libbpf with support for attaching BTF-powered raw tracepoint (tp_btf) and tracing (fentry/fexit/fmod_ret/lsm) BPF programs to BPF hooks defined in kernel modules. As part of that, libbpf now supports performing CO-RE relocations against types in kernel module BTFs

[PATCH v5 bpf-next 01/14] bpf: fix bpf_put_raw_tracepoint()'s use of __module_address()

2020-12-02 Thread Andrii Nakryiko
__module_address() needs to be called with preemption disabled or with module_mutex taken. preempt_disable() is enough for read-only uses, which is what this fix does. Also, module_put() does internal check for NULL, so drop it as well. Fixes: a38d1107f937 ("bpf: support raw tracepoints in modules

[PATCH v5 bpf-next 02/14] bpf: keep module's btf_data_size intact after load

2020-12-02 Thread Andrii Nakryiko
Having real btf_data_size stored in struct module is benefitial to quickly determine which kernel modules have associated BTF object and which don't. There is no harm in keeping this info, as opposed to keeping invalid pointer. Fixes: 607c543f939d ("bpf: Sanitize BTF data pointer after module is l

[net-next] tipc: support 128bit node identity for peer removing

2020-12-02 Thread Hoang Huu Le
From: Hoang Le We add the support to remove a specific node down with 128bit node identifier, as an alternative to legacy 32-bit node address. example: $tipc peer remove identiy <1001002|1677> Acked-by: Jon Maloy Signed-off-by: Hoang Le --- net/tipc/node.c | 21 ++--- 1 f

Re: [PATCH iproute2-next 0/2] Implement action terse dump

2020-12-02 Thread David Ahern
On 11/30/20 12:32 PM, Vlad Buslov wrote: > Refactor action flags according to recommended kernel upstream naming using > TCA_ACT_ prefix. Implement support for new action terse dump flag. > > Vlad Buslov (2): > tc: use TCA_ACT_ prefix for action flags > tc: implement support for action terse d

Re: net: macb: fail when there's no PHY

2020-12-02 Thread Florian Fainelli
On 12/2/2020 7:03 PM, Grant Edwards wrote: > On 2020-12-02, Andrew Lunn wrote: > So it will access the MDIO bus of the PHY that is attached to the MAC. >>> >>> If that's the case, wouldn't the ioctl() calls "just work" even when >>> only the fixed-phy mdio bus and fake PHY are declar

Re: [PATCH iproute2-next] devlink: Extend man page for port function set command

2020-12-02 Thread David Ahern
On 11/30/20 9:47 AM, Parav Pandit wrote: > Extended devlink-port man page for synopsis, description and > example for setting devlink port function attribute. > > Signed-off-by: Parav Pandit > Reviewed-by: Jiri Pirko > --- > man/man8/devlink-port.8 | 21 + > 1 file changed,

Re: [PATCH net-next v2 1/1] ibmvnic: add some debugs

2020-12-02 Thread Sukadev Bhattiprolu
Jakub Kicinski [k...@kernel.org] wrote: > On Mon, 23 Nov 2020 20:34:07 -0800 Sukadev Bhattiprolu wrote: > > 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 wi

Re: [PATCH bpf-next v9 00/34] bpf: switch to memcg-based memory accounting

2020-12-02 Thread Roman Gushchin
On Wed, Dec 02, 2020 at 06:54:46PM -0800, Alexei Starovoitov wrote: > On Tue, Dec 1, 2020 at 1:59 PM Roman Gushchin wrote: > > > > 5) Cryptic -EPERM is returned on exceeding the limit. Libbpf even had > >a function to "explain" this case for users. > ... > > v9: > > - always charge the saved

Re: net: macb: fail when there's no PHY

2020-12-02 Thread Grant Edwards
On 2020-12-02, Andrew Lunn wrote: >>> So it will access the MDIO bus of the PHY that is attached to the >>> MAC. >> >> If that's the case, wouldn't the ioctl() calls "just work" even when >> only the fixed-phy mdio bus and fake PHY are declared in the device >> tree? > > The fixed-link PHY is con

Re: [PATCH bpf-next v9 00/34] bpf: switch to memcg-based memory accounting

2020-12-02 Thread Alexei Starovoitov
On Tue, Dec 1, 2020 at 1:59 PM Roman Gushchin wrote: > > 5) Cryptic -EPERM is returned on exceeding the limit. Libbpf even had >a function to "explain" this case for users. ... > v9: > - always charge the saved memory cgroup, by Daniel, Toke and Alexei > - added bpf_map_kzalloc() > - reb

Re: [PATCH v6 bpf-next 2/2] samples/bpf: sample application for eBPF load and socket creation split

2020-12-02 Thread Alexei Starovoitov
On Wed, Dec 2, 2020 at 2:39 AM wrote: > int main(int argc, char **argv) > { > + struct __user_cap_header_struct hdr = { _LINUX_CAPABILITY_VERSION_3, > 0 }; > + struct __user_cap_data_struct data[2] = { { 0 } }; > struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY}; > bo

Re: [PATCH bpf-next v9 00/34] bpf: switch to memcg-based memory accounting

2020-12-02 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (refs/heads/master): On Tue, 1 Dec 2020 13:58:26 -0800 you wrote: > Currently bpf is using the memlock rlimit for the memory accounting. > This approach has its downsides and over time has created a significant > amount of problems: > > 1) The l

[PATCH] net: stmmac: overwrite the dma_cap.addr64 according to HW design

2020-12-02 Thread Joakim Zhang
From: Fugang Duan The current IP register MAC_HW_Feature1[ADDR64] only defines 32/40/64 bit width, but some SOCs support others like i.MX8MP support 34 bits but it maps to 40 bits width in MAC_HW_Feature1[ADDR64]. So overwrite dma_cap.addr64 according to HW real design. Signed-off-by: Fugang Dua

Re: net: macb: fail when there's no PHY

2020-12-02 Thread Andrew Lunn
On Wed, Dec 02, 2020 at 09:23:40PM -, Grant Edwards wrote: > On 2020-12-02, Andrew Lunn wrote: > >> > So it will access the MDIO bus of the PHY that is attached to the > >> > MAC. > >> > >> If that's the case, wouldn't the ioctl() calls "just work" even when > >> only the fixed-phy mdio bus a

Re: [PATCH net-next v3] devlink: Add devlink port documentation

2020-12-02 Thread Randy Dunlap
Hi-- On 12/2/20 5:53 AM, Parav Pandit wrote: > Added documentation for devlink port and port function related commands. > > Signed-off-by: Parav Pandit > Reviewed-by: Jiri Pirko > Reviewed-by: Jacob Keller > --- > Changelog: > v2->v3: > - rephased many lines rephrased > - first paragr

Re: [PATCH net] vxlan: fix error return code in __vxlan_dev_create()

2020-12-02 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Wed, 2 Dec 2020 17:58:42 +0800 you wrote: > Fix to return a negative error code from the error handling > case instead of 0, as done elsewhere in this function. > > Fixes: 0ce1822c2a08 ("vxlan: add adjacent link to limit dep

Re: [PATCH net] cxgb3: fix error return code in t3_sge_alloc_qset()

2020-12-02 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Wed, 2 Dec 2020 17:56:05 +0800 you wrote: > Fix to return a negative error code from the error handling > case instead of 0, as done elsewhere in this function. > > Fixes: b1fb1f280d09 ("cxgb3 - Fix dma mapping error path")

Re: [PATCH net] net: pasemi: fix error return code in pasemi_mac_open()

2020-12-02 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Wed, 2 Dec 2020 17:57:15 +0800 you wrote: > Fix to return a negative error code from the error handling > case instead of 0, as done elsewhere in this function. > > Fixes: 72b05b9940f0 ("pasemi_mac: RX/TX ring management cle

[PATCH net] iavf: fix double-release of rtnl_lock

2020-12-02 Thread Jakub Kicinski
This code does not jump to exit on an error in iavf_lan_add_device(), so the rtnl_unlock() from the normal path will follow. Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine") Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/intel/iavf/iavf_main.c | 4 +--- 1 file changed, 1 inserti

Re: [PATCH 1/1] bareudp: constify device_type declaration

2020-12-02 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Wed, 2 Dec 2020 13:23:24 +0100 you wrote: > device_type may be declared as const. > > Signed-off-by: Jonas Bonn > --- > drivers/net/bareudp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Here is the summa

Re: [pull request][net-next V2] mlx5 next 2020-12-02

2020-12-02 Thread patchwork-bot+netdevbpf
Hello: This pull request was applied to netdev/net-next.git (refs/heads/master): On Wed, 2 Dec 2020 17:10:10 -0800 you wrote: > Hi Jakub, > > v1->v2: Use a proper tag for the pull request > > This pull request includes [1] low level mlx5 updates required by both netdev > and rdma trees, needed

Re: [PATCH v5 net-next 0/4] nfc: s3fwrn5: Support a UART interface

2020-12-02 Thread Jakub Kicinski
On Wed, 2 Dec 2020 20:47:37 +0900 Bongsu Jeon wrote: > S3FWRN82 is the Samsung's NFC chip that supports the UART communication. > Before adding the UART driver module, I did refactoring the s3fwrn5_i2c > module > to reuse the common blocks. Applied, thanks!

Re: [Patch net] lwt: disable BH too in run_lwt_bpf()

2020-12-02 Thread Alexei Starovoitov
On Wed, Dec 2, 2020 at 5:32 PM Cong Wang wrote: > > On Wed, Dec 2, 2020 at 5:10 PM Jakub Kicinski wrote: > > > > On Tue, 1 Dec 2020 11:44:38 -0800 Cong Wang wrote: > > > From: Dongdong Wang > > > > > > The per-cpu bpf_redirect_info is shared among all skb_do_redirect() > > > and BPF redirect he

Re: [PATCH net-next v1 1/9] ethtool: Add support for configuring frame preemption

2020-12-02 Thread Jakub Kicinski
On Tue, 1 Dec 2020 20:53:17 -0800 Vinicius Costa Gomes wrote: > Frame preemption (described in IEEE 802.3br-2016) defines the concept > of preemptible and express queues. It allows traffic from express > queues to "interrupt" traffic from preemptible queues, which are > "resumed" after the express

Re: [Patch net] lwt: disable BH too in run_lwt_bpf()

2020-12-02 Thread Jakub Kicinski
On Wed, 2 Dec 2020 17:29:53 -0800 Cong Wang wrote: > On Wed, Dec 2, 2020 at 5:10 PM Jakub Kicinski wrote: > > > > On Tue, 1 Dec 2020 11:44:38 -0800 Cong Wang wrote: > > > From: Dongdong Wang > > > > > > The per-cpu bpf_redirect_info is shared among all skb_do_redirect() > > > and BPF redirect

Re: [Patch net] lwt: disable BH too in run_lwt_bpf()

2020-12-02 Thread Cong Wang
On Wed, Dec 2, 2020 at 5:10 PM Jakub Kicinski wrote: > > On Tue, 1 Dec 2020 11:44:38 -0800 Cong Wang wrote: > > From: Dongdong Wang > > > > The per-cpu bpf_redirect_info is shared among all skb_do_redirect() > > and BPF redirect helpers. Callers on RX path are all in BH context, > > disabling pr

Re: [PATCH net v2] net/x25: prevent a couple of overflows

2020-12-02 Thread Jakub Kicinski
On Wed, 02 Dec 2020 10:27:18 +0100 Martin Schiller wrote: > On 2020-12-01 16:15, Dan Carpenter wrote: > > The .x25_addr[] address comes from the user and is not necessarily > > NUL terminated. This leads to a couple problems. The first problem is > > that the strlen() in x25_bind() can read beyon

Re: [PATCH v2 net-next] net: ipa: fix build-time bug in ipa_hardware_config_qsb()

2020-12-02 Thread Jakub Kicinski
On Wed, 2 Dec 2020 08:15:02 -0600 Alex Elder wrote: > Jon Hunter reported observing a build bug in the IPA driver: > > https://lore.kernel.org/netdev/5b5d9d40-94d5-5dad-b861-fd9bef826...@nvidia.com > > The problem is that the QMB0 max read value set for IPA v4.5 (16) is > too large to fit in t

Re: [PATCH v2 00/11] net: dsa: microchip: make ksz8795 driver more versatile

2020-12-02 Thread Jakub Kicinski
On Tue, 1 Dec 2020 21:44:55 +0100 Michael Grzeschik wrote: > This series changes the ksz8795 driver to use more dynamic variables > instead of static defines. The purpose is to prepare the driver to > be used with other microchip switches with a similar layout. Applied, thanks!

Re: [Patch net] lwt: disable BH too in run_lwt_bpf()

2020-12-02 Thread Jakub Kicinski
On Tue, 1 Dec 2020 11:44:38 -0800 Cong Wang wrote: > From: Dongdong Wang > > The per-cpu bpf_redirect_info is shared among all skb_do_redirect() > and BPF redirect helpers. Callers on RX path are all in BH context, > disabling preemption is not sufficient to prevent BH interruption. > > In prod

[pull request][net-next V2] mlx5 next 2020-12-02

2020-12-02 Thread Saeed Mahameed
Hi Jakub, v1->v2: Use a proper tag for the pull request This pull request includes [1] low level mlx5 updates required by both netdev and rdma trees, needed for upcoming mlx5 netdev submission. Please pull and let me know if there's any problem. [1] https://patchwork.kernel.org/project/linux-r

Re: [pull request][net-next] mlx5 next 2020-12-02

2020-12-02 Thread Saeed Mahameed
On Wed, 2020-12-02 at 12:32 -0800, Jakub Kicinski wrote: > On Wed, 2 Dec 2020 12:11:41 -0800 Saeed Mahameed wrote: > > Hi Jakub, > > > > This pull request includes [1] low level mlx5 updates required by > > both netdev > > and rdma trees, needed for upcoming mlx5 netdev submission. > > > > Please

Re: [PATCH net] net: bridge: Fix a warning when del bridge sysfs

2020-12-02 Thread Jakub Kicinski
On Tue, 1 Dec 2020 22:01:14 +0800 Wang Hai wrote: > If adding bridge sysfs fails, br->ifobj will be NULL, there is no > need to delete its non-existent sysfs when deleting the bridge device, > otherwise, it will cause a warning. So, when br->ifobj == NULL, > directly return can fix this bug. > > b

[resend/standalone PATCH v4] Add auxiliary bus support

2020-12-02 Thread Dan Williams
From: Dave Ertman Add support for the Auxiliary Bus, auxiliary_device and auxiliary_driver. It enables drivers to create an auxiliary_device and bind an auxiliary_driver to it. The bus supports probe/remove shutdown and suspend/resume callbacks. Each auxiliary_device has a unique string based id

[PATCH net v3] bonding: fix feature flag setting at init time

2020-12-02 Thread Jarod Wilson
Don't try to adjust XFRM support flags if the bond device isn't yet registered. Bad things can currently happen when netdev_change_features() is called without having wanted_features fully filled in yet. This code runs on post-module-load mode changes, as well as at module init time and new bond cr

Re: [PATCH] netfilter: conntrack: fix -Wformat

2020-12-02 Thread Tom Rix
On 12/2/20 2:34 PM, Nick Desaulniers wrote: > On Tue, Nov 10, 2020 at 2:04 PM Joe Perches wrote: >> On Tue, 2020-11-10 at 14:00 -0800, Nick Desaulniers wrote: >> >>> Yeah, we could go through and remove %h and %hh to solve this, too, right? >> Yup. >> >> I think one of the checkpatch improvement

Re: [PATCH v3 net-next 1/4] net: bonding: Notify ports about their initial state

2020-12-02 Thread Jay Vosburgh
Tobias Waldekranz wrote: >On Wed, Dec 02, 2020 at 11:09, Jay Vosburgh wrote: >> Tobias Waldekranz wrote: >> >>>When creating a static bond (e.g. balance-xor), all ports will always >>>be enabled. This is set, and the corresponding notification is sent >>>out, before the port is linked to the bo

Re: [PATCH net v3] net: fix memory leak in register_netdevice() on error path

2020-12-02 Thread Jakub Kicinski
On Tue, 1 Dec 2020 21:54:57 +0800 Yang Yingliang wrote: > I got a memleak report when doing fault-inject test: > > unreferenced object 0x88810ace9000 (size 1024): > comm "ip", pid 4622, jiffies 4295457037 (age 43.378s) > hex dump (first 32 bytes): > 00 00 00 00 00 00 00 00 00 00 00 00

Re: [PATCH net-next v2] ibmvnic: process HMC disable command

2020-12-02 Thread Jakub Kicinski
On Wed, 02 Dec 2020 15:50:58 -0800 Dany Madden wrote: > On 2020-12-02 12:02, drt wrote: > > On 2020-11-30 10:19, drt wrote: > >> On 2020-11-25 15:55, drt wrote: > >>> On 2020-11-25 13:08, Jakub Kicinski wrote: > On Mon, 23 Nov 2020 18:58:41 -0500 Dany Madden wrote: > > Currently ib

Re: [PATCH v2 net-next 1/2] ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls

2020-12-02 Thread Guillaume Nault
On Tue, Dec 01, 2020 at 11:52:49AM +, Tom Parkin wrote: > This new ioctl pair allows two ppp channels to be bridged together: > frames arriving in one channel are transmitted in the other channel > and vice versa. > > The practical use for this is primarily to support the L2TP Access > Concent

Re: [PATCH bpf V3 0/2] xsk: fix for xsk_poll writeable

2020-12-02 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf.git (refs/heads/master): On Tue, 1 Dec 2020 21:56:56 +0800 you wrote: > V2: >#2 patch made some changes following magnus' opinions. > > V3: >Regarding the function xskq_cons_present_entries, I think daniel are right, >I have modified it. >

Re: [net-next v2 1/8] net-zerocopy: Copy straggler unaligned data for TCP Rx. zerocopy.

2020-12-02 Thread Stephen Hemminger
On Wed, 2 Dec 2020 14:09:38 -0800 Arjun Roy wrote: > diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h > index cfcb10b75483..62db78b9c1a0 100644 > --- a/include/uapi/linux/tcp.h > +++ b/include/uapi/linux/tcp.h > @@ -349,5 +349,7 @@ struct tcp_zerocopy_receive { > __u32 recv

Re: Linux IPV6 TCP egress path device passed for LOCAL_OUT hook is incorrect

2020-12-02 Thread David Ahern
On 12/2/20 4:31 AM, Preethi Ramachandra wrote: > Hi David Ahren, > > In TCP egress path for ipv6 the device passed to NF_INET_LOCAL_OUT hook > should be skb_dst(skb)->dev instead of dst->dev. > > https://elixir.bootlin.com/linux/latest/source/net/ipv6/ip6_output.c#L202 > struct dst_entry *dst =

Re: [PATCH bpf-next V8 6/8] bpf: make it possible to identify BPF redirected SKBs

2020-12-02 Thread Daniel Borkmann
On 11/27/20 7:06 PM, Jesper Dangaard Brouer wrote: This change makes it possible to identify SKBs that have been redirected by TC-BPF (cls_act). This is needed for a number of cases. (1) For collaborating with driver ifb net_devices. (2) For avoiding starting generic-XDP prog on TC ingress redir

  1   2   3   4   >