Re: [PATCH net-next 5/8] net: phy: mscc: 1588 block initialization

2020-05-27 Thread Antoine Tenart
Hello Jakub, Quoting Jakub Kicinski (2020-05-27 19:35:13) > > This doesn't build on my system :S I'll have a look at this and fix it for v2. Thanks for reporting it! Antoine > > In file included from ../drivers/net/phy/mscc/mscc_ptp.c:18: > ../include/linux/unaligned/be_byteshift.h:41:19: err

[PATCH net-next v3 2/3] net: enetc: Initialize SerDes for SGMII and USXGMII protocols

2020-05-27 Thread Michael Walle
ENETC has ethernet MACs capable of SGMII, 2500BaseX and USXGMII. But in order to use these protocols some SerDes configurations need to be performed. The SerDes is configurable via an internal PCS PHY which is connected to an internal MDIO bus at address 0. This patch basically removes the depende

[PATCH net-next v3 0/3] net: enetc: remove bootloader dependency

2020-05-27 Thread Michael Walle
These patches were picked from the following series: https://lore.kernel.org/netdev/1567779344-30965-1-git-send-email-claudiu.man...@nxp.com/ They have never been resent. I've picked them up, addressed Andrews comments, fixed some more bugs and asked Claudiu if I can keep their SOB tags; he agreed.

[PATCH net-next v3 1/3] net: dsa: felix: move USXGMII defines to common place

2020-05-27 Thread Michael Walle
The ENETC has the same PCS PHY and thus needs the same definitions. Move them into the common enetc_mdio.h header which has already the macros for the SGMII PCS. Signed-off-by: Michael Walle --- drivers/net/dsa/ocelot/felix_vsc9959.c | 21 - include/linux/fsl/enetc_mdio.h

[PATCH net-next v3 3/3] net: enetc: Use DT protocol information to set up the ports

2020-05-27 Thread Michael Walle
From: Alex Marginean Use DT information rather than in-band information from bootloader to set up MAC for XGMII. For RGMII use the DT indication in addition to RGMII defaults in hardware. However, this implies that PHY connection information needs to be extracted before netdevice creation, when t

Re: [RFC PATCH] samples:bpf: introduce task detector

2020-05-27 Thread Andrii Nakryiko
On Wed, May 27, 2020 at 7:53 PM 王贇 wrote: > > This is a tool to trace the related schedule events of a > specified task, eg the migration, sched in/out, wakeup and > sleep/block. > > The event was translated into sentence to be more readable, > by execute command 'task_detector -p 49870' we contin

Re: [PATCH net-next] net/tls: Add force_resync for driver resync

2020-05-27 Thread Boris Pismenny
On 28/05/2020 1:32, Jakub Kicinski wrote: > On Wed, 27 May 2020 12:25:26 +0300 Tariq Toukan wrote: >> This patch adds a field to the tls rx offload context which enables >> drivers to force a send_resync call. >> >> This field can be used by drivers to request a resync at the next >> possible tls r

Re: [PATCH bpf-next 8/8] selftests/bpf: Add tests for attaching bpf_link to netns

2020-05-27 Thread Andrii Nakryiko
On Wed, May 27, 2020 at 12:16 PM Jakub Sitnicki wrote: > > Extend the existing test case for flow dissector attaching to cover: > > - link creation, > - link updates, > - link info querying, > - mixing links with direct prog attachment. > > Signed-off-by: Jakub Sitnicki > --- You are not usi

Re: [PATCH net] net/tls: Fix driver request resync

2020-05-27 Thread Boris Pismenny
On 20/05/2020 23:34, Jakub Kicinski wrote: > On Wed, 20 May 2020 18:14:08 +0300 Tariq Toukan wrote: >> From: Boris Pismenny >> >> In driver request resync, the hardware requests a resynchronization >> request at some TCP sequence number. If that TCP sequence number does >> not point to a TLS rec

Re: [PATCH bpf-next 7/8] bpftool: Support link show for netns-attached links

2020-05-27 Thread Andrii Nakryiko
On Wed, May 27, 2020 at 12:16 PM Jakub Sitnicki wrote: > > Make `bpf link show` aware of new link type, that is links attached to > netns. When listing netns-attached links, display netns inode number as its > identifier and link attach type. > > Signed-off-by: Jakub Sitnicki > --- > tools/bpf/b

Re: [PATCH bpf-next 6/8] libbpf: Add support for bpf_link-based netns attachment

2020-05-27 Thread Andrii Nakryiko
On Wed, May 27, 2020 at 12:16 PM Jakub Sitnicki wrote: > > Add bpf_program__attach_nets(), which uses LINK_CREATE subcommand to create > an FD-based kernel bpf_link, for attach types tied to network namespace, > that is BPF_FLOW_DISSECTOR for the moment. > > Signed-off-by: Jakub Sitnicki > --- >

RE: Link down reasons

2020-05-27 Thread Amit Cohen
Andrew Lunn writes: >On Wed, May 27, 2020 at 03:41:22PM +, Amit Cohen wrote: >> Hi Andrew, >> >> We are planning to send a set that exposes link-down reason in ethtool. >> >> It seems that the ability of your set “Ethernet cable test support” >> can be integrated with link-down reason. >>

Re: [PATCH bpf-next 5/8] bpf: Add link-based BPF program attachment to network namespace

2020-05-27 Thread Andrii Nakryiko
On Wed, May 27, 2020 at 12:16 PM Jakub Sitnicki wrote: > > Add support for bpf() syscall subcommands that operate on > bpf_link (LINK_CREATE, LINK_UPDATE, OBJ_GET_INFO) for attach points tied to > network namespaces (that is flow dissector at the moment). > > Link-based and prog-based attachment c

Re: [PATCH v2] sctp: check assoc before SCTP_ADDR_{MADE_PRIM,ADDED} event

2020-05-27 Thread Xin Long
On Wed, May 27, 2020 at 5:57 PM Jonas Falkevik wrote: > > Make sure SCTP_ADDR_{MADE_PRIM,ADDED} are sent only for associations > that have been established. > > These events are described in rfc6458#section-6.1 > SCTP_PEER_ADDR_CHANGE: > This tag indicates that an address that is > part of an exis

Re: [PATCH net-next 2/4] vmxnet3: add support to get/set rx flow hash

2020-05-27 Thread Michal Kubecek
On Wed, May 27, 2020 at 07:07:04PM -0700, Ronak Doshi wrote: > With vmxnet3 version 4, the emulation supports multiqueue(RSS) for > UDP and ESP traffic. A guest can enable/disable RSS for UDP/ESP over > IPv4/IPv6 by issuing commands introduced in this patch. ESP ipv6 is > not yet supported in this

[PATCH bpf-next 3/3] selftests/bpf: basic sleepable tests

2020-05-27 Thread Alexei Starovoitov
From: Alexei Starovoitov Modify few tests to sanity test sleepable bpf functionality. Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/bench.c | 2 ++ .../selftests/bpf/benchs/bench_trigger.c| 17 + tools/testing/selftests/bpf/progs/lsm.c

[PATCH bpf-next 2/3] libbpf: support sleepable progs

2020-05-27 Thread Alexei Starovoitov
From: Alexei Starovoitov Pass request to load program as sleepable via ".s" suffix in the section name. If it happens in the future that all map types and helpers are allowed with BPF_F_SLEEPABLE flag "fmod_ret/" and "lsm/" can be aliased to "fmod_ret.s/" and "lsm.s/" to make all lsm and fmod_ret

[PATCH bpf-next 0/3] bpf: Introduce minimal support for sleepable progs

2020-05-27 Thread Alexei Starovoitov
From: Alexei Starovoitov This patch set introduces the minimal viable support for sleepable bpf programs. In this patch only fentry/fexit/fmod_ret and lsm progs can be sleepable. Only array and pre-allocated hash and lru maps allowed. Here is 'perf report' difference of sleepable vs non-sleepabl

[PATCH bpf-next 1/3] bpf: Introduce sleepable BPF programs

2020-05-27 Thread Alexei Starovoitov
From: Alexei Starovoitov Introduce sleepable BPF programs that can request such property for themselves via BPF_F_SLEEPABLE flag at program load time. In such case they will be able to use helpers like bpf_copy_from_user() that might sleep. At present only fentry/fexit/fmod_ret and lsm programs c

Re: [PATCH v3 0/7] Statsfs: a new ram-based file system for Linux kernel statistics

2020-05-27 Thread Paolo Bonzini
On 28/05/20 00:21, David Ahern wrote: > On 5/27/20 3:07 PM, Paolo Bonzini wrote: >> I see what you meant now. statsfs can also be used to enumerate objects >> if one is so inclined (with the prototype in patch 7, for example, each >> network interface becomes a directory). > > there are many use

remove most callers of kernel_setsockopt v3

2020-05-27 Thread Christoph Hellwig
Hi Dave, this series removes most callers of the kernel_setsockopt functions, and instead switches their users to small functions that implement setting a sockopt directly using a normal kernel function call with type safety and all the other benefits of not having a function call. In some cases

[PATCH 02/28] net: add sock_no_linger

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the SO_LINGER sockopt from kernel space with onoff set to true and a linger time of 0 without going through a fake uaccess. Signed-off-by: Christoph Hellwig Acked-by: Sagi Grimberg --- drivers/nvme/host/tcp.c | 9 + drivers/nvme/target/tcp.c | 6 +-

[PATCH 09/28] net: add sock_set_reuseport

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the SO_REUSEPORT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/sock.h| 1 + net/core/sock.c | 8 net/sunrpc/xprtsock.c | 17 + 3 files changed, 10 insertions(+), 1

[PATCH 07/28] net: add sock_set_keepalive

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the SO_KEEPALIVE sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 6 +- include/net/sock.h| 1 + net/core/sock.c | 10 ++ net/rds/tcp_listen.c | 6 +- net/sunrpc

[PATCH 08/28] net: add sock_set_rcvbuf

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the SO_RCVBUFFORCE sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 7 +- include/net/sock.h | 1 + net/core/sock.c| 59 +- 3 files changed,

[PATCH 12/28] tcp: add tcp_sock_set_quickack

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the TCP_QUICKACK sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_int.h | 7 -- drivers/blo

[PATCH 10/28] tcp: add tcp_sock_set_cork

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the TCP_CORK sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_int.h | 14 drivers/block

[PATCH 11/28] tcp: add tcp_sock_set_nodelay

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the TCP_NODELAY sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig Acked-by: Sagi Grimberg Acked-by: Jason Gunthorpe --- drivers/

[PATCH 22/28] ipv4: add ip_sock_set_pktinfo

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the IP_PKTINFO sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ip.h | 1 + net/ipv4/ip_sockglue.c | 8 net/sunrpc/svcsock.c | 5 ++--- 3 files changed, 11 insertions(+), 3 deletions(-)

[PATCH 21/28] ipv4: add ip_sock_set_mtu_discover

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the IP_MTU_DISCOVER sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig Reviewed-by: David Howells [rxrpc bits] --- include/net/ip.h | 1 + net/ipv4/ip_sockglue.c | 11 +++ net/rxrpc/local_object.c | 8

[PATCH 16/28] tcp: add tcp_sock_set_keepintvl

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the TCP_KEEPINTVL sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/linux/tcp.h | 1 + net/ipv4/tcp.c| 12 net/rds/tcp_listen.c | 4 +--- net/sunrpc/xprtsock.c | 3 +-- 4 files chan

[PATCH 26/28] ipv6: add ip6_sock_set_recvpktinfo

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the IPV6_RECVPKTINFO sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h | 7 +++ net/sunrpc/svcsock.c | 10 ++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/n

[PATCH 23/28] ipv6: add ip6_sock_set_v6only

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the IPV6_V6ONLY sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h| 11 +++ net/ipv6/ip6_udp_tunnel.c | 5 + net/sunrpc/svcsock.c | 6 +- 3 files changed, 13 insertion

[PATCH 27/28] rxrpc: add rxrpc_sock_set_min_security_level

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the RXRPC_MIN_SECURITY_LEVEL sockopt from kernel space without going through a fake uaccess. Thanks to David Howells for the documentation updates. Signed-off-by: Christoph Hellwig Acked-by: David Howells --- Documentation/networking/rxrpc.rst | 13 +++-- f

[PATCH 24/28] ipv6: add ip6_sock_set_recverr

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the IPV6_RECVERR sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig Reviewed-by: David Howells --- include/net/ipv6.h | 7 +++ net/rxrpc/local_object.c | 10 ++ 2 files changed, 9 insertions(+), 8 dele

[PATCH 28/28] tipc: call tsk_set_importance from tipc_topsrv_create_listener

2020-05-27 Thread Christoph Hellwig
Avoid using kernel_setsockopt for the TIPC_IMPORTANCE option when we can just use the internal helper. The only change needed is to pass a struct sock instead of tipc_sock, which is private to socket.c Signed-off-by: Christoph Hellwig --- net/tipc/socket.c | 18 +- net/tipc/sock

[PATCH 25/28] ipv6: add ip6_sock_set_addr_preferences

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the IPV6_ADD_PREFERENCES sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h | 67 net/ipv6/ipv6_sockglue.c | 59 +-- ne

[PATCH 14/28] tcp: add tcp_sock_set_user_timeout

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the TCP_USER_TIMEOUT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/ocfs2/cluster/tcp.c | 22 ++ include/linux/tcp.h| 1 + net/ipv4/tcp.c | 8 net/sunrpc/xprtsock.c |

[PATCH 15/28] tcp: add tcp_sock_set_keepidle

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the TCP_KEEP_IDLE sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/linux/tcp.h | 1 + net/ipv4/tcp.c| 49 ++- net/rds/tcp_listen.c | 5 + net/sunrpc/x

[PATCH 19/28] ipv4: add ip_sock_set_freebind

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the IP_FREEBIND sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- drivers/target/iscsi/iscsi_target_login.c | 13 +++-- include/net/ip.h | 1 + net/ipv4/ip_sockglue.c

[PATCH 20/28] ipv4: add ip_sock_set_recverr

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the IP_RECVERR sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig Reviewed-by: David Howells --- include/net/ip.h | 1 + net/ipv4/ip_sockglue.c | 8 net/rxrpc/local_object.c | 8 +--- 3 files chang

[PATCH 18/28] ipv4: add ip_sock_set_tos

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the IP_TOS sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig Acked-by: Sagi Grimberg --- drivers/nvme/host/tcp.c | 14 +++--- drivers/nvme/target/tcp.c | 10 ++ include/net/ip.h | 2 ++ net/i

[PATCH 17/28] tcp: add tcp_sock_set_keepcnt

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the TCP_KEEPCNT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/linux/tcp.h | 1 + net/ipv4/tcp.c| 12 net/rds/tcp.h | 2 +- net/rds/tcp_listen.c | 17 +++-- ne

[PATCH 06/28] net: add sock_enable_timestamps

2020-05-27 Thread Christoph Hellwig
Add a helper to directly enable timestamps instead of setting the SO_TIMESTAMP* sockopts from kernel space and going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/sock.h | 1 + net/core/sock.c | 47 +--- net/rxrpc/loc

[PATCH 13/28] tcp: add tcp_sock_set_syncnt

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the TCP_SYNCNT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig Acked-by: Sagi Grimberg --- drivers/nvme/host/tcp.c | 9 + include/linux/tcp.h | 1 + net/ipv4/tcp.c | 12 3 files cha

[PATCH 04/28] net: add sock_set_sndtimeo

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the SO_SNDTIMEO_NEW sockopt from kernel space without going through a fake uaccess. The interface is simplified to only pass the seconds value, as that is the only thing needed at the moment. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 8 ++-- inc

[PATCH 05/28] net: add sock_bindtoindex

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the SO_BINDTOIFINDEX sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/sock.h| 1 + net/core/sock.c | 21 +++-- net/ipv4/udp_tunnel.c | 4 +--- net/ipv6/ip6_udp_tun

[PATCH 03/28] net: add sock_set_priority

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the SO_PRIORITY sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig Acked-by: Sagi Grimberg --- drivers/nvme/host/tcp.c | 12 ++-- drivers/nvme/target/tcp.c | 18 -- include/net/sock.h|

[PATCH 01/28] net: add sock_set_reuseaddr

2020-05-27 Thread Christoph Hellwig
Add a helper to directly set the SO_REUSEADDR sockopt from kernel space without going through a fake uaccess. For this the iscsi target now has to formally depend on inet to avoid a mostly theoretical compile failure. For actual operation it already did depend on having ipv4 or ipv6 support. Sig

Re: [PATCH 12/23] bpf: handle the compat string in bpf_trace_copy_string better

2020-05-27 Thread Christoph Hellwig
On Wed, May 27, 2020 at 07:26:30PM -0700, Yonghong Song wrote: >> --- a/kernel/trace/bpf_trace.c~xxx >> +++ a/kernel/trace/bpf_trace.c >> @@ -588,15 +588,22 @@ BPF_CALL_5(bpf_seq_printf, struct seq_fi >> } >> if (fmt[i] == 's') { >> +void *unsafe_ptr; >

The size of ct offoad mlx5_flow_table in mlx5e driver

2020-05-27 Thread wenxu
Hi  Paul, I have a question about the size of ct and ct nat flow table. There are two global mlx5_flow_table tables ct and ct_nat for act_ct offload. The ct and ct_nat flow table create through mlx5_esw_chains_create_global_table and get the size through mlx5_esw_chains_get_avail_sz_from_poo

Re: [PATCH net v2] cxgb4/chcr: Enable ktls settings at run time

2020-05-27 Thread rohit maheshwari
On 28/05/20 2:34 AM, Jakub Kicinski wrote: On Wed, 27 May 2020 10:02:42 +0530 rohit maheshwari wrote: On 27/05/20 4:12 AM, Jakub Kicinski wrote: On Tue, 26 May 2020 19:36:34 +0530 Rohit Maheshwari wrote: Current design enables ktls setting from start, which is not efficient. Now the feature

Re: [RFC PATCH net-next 0/3] TC: Introduce qevents

2020-05-27 Thread Cong Wang
On Wed, May 27, 2020 at 2:56 AM Petr Machata wrote: > > > Cong Wang writes: > > > On Tue, May 26, 2020 at 10:11 AM Petr Machata wrote: > >> > >> The Spectrum hardware allows execution of one of several actions as a > >> result of queue management events: tail-dropping, early-dropping, marking a

[PATCH] drivers/net/wan/lapbether.c: Fixed kernel panic when used with AF_PACKET sockets

2020-05-27 Thread Xie He
When we use "AF_PACKET" sockets to send data directly over LAPB over Ethernet using this driver, the kernel will panic because of insufficient header space allocated in the "sk_buff" struct. The header space needs 18 bytes because: the lapbether driver will remove a pseudo header of 1 byte; th

Re: [PATCH bpf-next 5/8] bpf: Add link-based BPF program attachment to network namespace

2020-05-27 Thread kbuild test robot
528-011159 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config: arm-randconfig-r035-20200527 (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b) reproduce (this is a W=1 build):

[PATCH] bonding: Fix reference count leak in bond_sysfs_slave_add.

2020-05-27 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Previous commit "b8eb718348b8" fixed a similar problem. Fixes: 07699f9a7c8d ("bonding: add sysfs

[RFC PATCH] samples:bpf: introduce task detector

2020-05-27 Thread 王贇
This is a tool to trace the related schedule events of a specified task, eg the migration, sched in/out, wakeup and sleep/block. The event was translated into sentence to be more readable, by execute command 'task_detector -p 49870' we continually tracing the schedule events related to 'top' like:

Re: [PATCH 12/23] bpf: handle the compat string in bpf_trace_copy_string better

2020-05-27 Thread Yonghong Song
On 5/27/20 7:04 PM, Andrew Morton wrote: On Thu, 21 May 2020 17:22:50 +0200 Christoph Hellwig wrote: User the proper helper for kernel or userspace addresses based on TASK_SIZE instead of the dangerous strncpy_from_unsafe function. ... --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf

[PATCH net-next 0/4] vmxnet3: upgrade to version 4

2020-05-27 Thread Ronak Doshi
vmxnet3 emulation has recently added several new features which includes offload support for tunnel packets, support for new commands the driver can issue to emulation, change in descriptor fields, etc. This patch series extends the vmxnet3 driver to leverage these new features. Compatibility is m

[PATCH net-next 2/4] vmxnet3: add support to get/set rx flow hash

2020-05-27 Thread Ronak Doshi
With vmxnet3 version 4, the emulation supports multiqueue(RSS) for UDP and ESP traffic. A guest can enable/disable RSS for UDP/ESP over IPv4/IPv6 by issuing commands introduced in this patch. ESP ipv6 is not yet supported in this patch. This patch implements get_rss_hash_opts and set_rss_hash_opts

[PATCH net-next 3/4] vmxnet3: add geneve and vxlan tunnel offload support

2020-05-27 Thread Ronak Doshi
Vmxnet3 version 3 device supports checksum/TSO offload. Thus, vNIC to pNIC traffic can leverage hardware checksum/TSO offloads. However, vmxnet3 does not support checksum/TSO offload for Geneve/VXLAN encapsulated packets. Thus, for a vNIC configured with an overlay, the guest stack must first segme

[PATCH net-next 1/4] vmxnet3: prepare for version 4 changes

2020-05-27 Thread Ronak Doshi
vmxnet3 is currently at version 3 and this patch initiates the preparation to accommodate changes for version 4. Introduced utility macros for vmxnet3 version 4 comparison and update Copyright information. Signed-off-by: Ronak Doshi --- drivers/net/vmxnet3/Makefile | 2 +- drivers/net/v

[PATCH net-next 4/4] vmxnet3: update to version 4

2020-05-27 Thread Ronak Doshi
With all vmxnet3 version 4 changes incorporated in the vmxnet3 driver, the driver can configure emulation to run at vmxnet3 version 4, provided the emulation advertises support for version 4. Signed-off-by: Ronak Doshi --- drivers/net/vmxnet3/vmxnet3_drv.c | 7 ++- drivers/net/vmxnet3/vmxnet

Re: [PATCH 12/23] bpf: handle the compat string in bpf_trace_copy_string better

2020-05-27 Thread Andrew Morton
On Thu, 21 May 2020 17:22:50 +0200 Christoph Hellwig wrote: > User the proper helper for kernel or userspace addresses based on > TASK_SIZE instead of the dangerous strncpy_from_unsafe function. > > ... > > --- a/kernel/trace/bpf_trace.c > +++ b/kernel/trace/bpf_trace.c > @@ -331,8 +331,11 @@ st

[PATCH net-next 4/4] vmxnet3: update to version 4

2020-05-27 Thread Ronak Doshi
With all vmxnet3 version 4 changes incorporated in the vmxnet3 driver, the driver can configure emulation to run at vmxnet3 version 4, provided the emulation advertises support for version 4. Signed-off-by: Ronak Doshi --- drivers/net/vmxnet3/vmxnet3_drv.c | 7 ++- drivers/net/vmxnet3/vmxnet

[PATCH net-next 2/4] vmxnet3: add support to get/set rx flow hash

2020-05-27 Thread Ronak Doshi
With vmxnet3 version 4, the emulation supports multiqueue(RSS) for UDP and ESP traffic. A guest can enable/disable RSS for UDP/ESP over IPv4/IPv6 by issuing commands introduced in this patch. ESP ipv6 is not yet supported in this patch. This patch implements get_rss_hash_opts and set_rss_hash_opts

[PATCH net-next 3/4] vmxnet3: add geneve and vxlan tunnel offload support

2020-05-27 Thread Ronak Doshi
Vmxnet3 version 3 device supports checksum/TSO offload. Thus, vNIC to pNIC traffic can leverage hardware checksum/TSO offloads. However, vmxnet3 does not support checksum/TSO offload for Geneve/VXLAN encapsulated packets. Thus, for a vNIC configured with an overlay, the guest stack must first segme

[PATCH net-next 0/4] vmxnet3: upgrade to version 4

2020-05-27 Thread Ronak Doshi
vmxnet3 emulation has recently added several new features which includes offload support for tunnel packets, support for new commands the driver can issue to emulation, change in descriptor fields, etc. This patch series extends the vmxnet3 driver to leverage these new features. Compatibility is m

[PATCH net-next 1/4] vmxnet3: prepare for version 4 changes

2020-05-27 Thread Ronak Doshi
vmxnet3 is currently at version 3 and this patch initiates the preparation to accommodate changes for version 4. Introduced utility macros for vmxnet3 version 4 comparison and update Copyright information. Signed-off-by: Ronak Doshi --- drivers/net/vmxnet3/Makefile | 2 +- drivers/net/v

Re: [PATCH v2 net-next 1/4] devlink: Add new "allow_fw_live_reset" generic device parameter.

2020-05-27 Thread Vasundhara Volam
On Thu, May 28, 2020 at 2:46 AM Jakub Kicinski wrote: > > On Wed, 27 May 2020 13:57:11 -0700 Michael Chan wrote: > > On Wed, May 27, 2020 at 1:14 PM Jakub Kicinski wrote: > > > On Wed, 27 May 2020 09:07:09 +0530 Vasundhara Volam wrote: > > > > Here is a sample sequence of commands to do a "live r

Re: [net-next v4 11/12] ASoC: SOF: Create client driver for IPC test

2020-05-27 Thread Ranjani Sridharan
On Wed, 2020-05-27 at 21:12 -0300, Jason Gunthorpe wrote: > On Wed, May 27, 2020 at 01:18:35PM -0700, Ranjani Sridharan wrote: > > On Wed, 2020-05-20 at 09:56 -0300, Jason Gunthorpe wrote: > > > On Wed, May 20, 2020 at 12:02:26AM -0700, Jeff Kirsher wrote: > > > > +static const struct virtbus_dev_i

[PATCH v2 iproute2-next 1/1] tc: report time an action was first used

2020-05-27 Thread Roman Mashak
Have print_tm() dump firstuse value along with install, lastuse and expires. v2: Resubmit after 'master' merged into next Signed-off-by: Roman Mashak --- tc/tc_util.c | 4 1 file changed, 4 insertions(+) diff --git a/tc/tc_util.c b/tc/tc_util.c index fd5fcb242b64..b7ff911b63ed 100644 ---

[net-next V3 09/15] net/mlx5e: Slave representors sharing unique metadata for match

2020-05-27 Thread Saeed Mahameed
From: Vu Pham Bonded slave representors' vports must share a unique metadata for match. On enslaving event of slave representor to lag device, allocate new unique "bond_metadata" for match if this is the first slave. The subsequent enslaved representors will share the same unique "bond_metadata"

[net-next V3 15/15] net/mlx5: DR, Split RX and TX lock for parallel insertion

2020-05-27 Thread Saeed Mahameed
From: Alex Vesker Change the locking flow to support RX and TX locks, splitting the single lock to two will allow inserting rules in parallel for RX and TX parts of the FDB. Locking the dr_domain will be done by locking the RX domain and the TX domain locks, this is mostly used for control opera

[net-next V3 02/15] net/mlx5: E-Switch, Refactor eswitch ingress acl codes

2020-05-27 Thread Saeed Mahameed
From: Vu Pham Restructure the eswitch ingress acl codes into eswitch directory and different files: . Acl ingress helper functions to acl_helper.c/h . Acl ingress functions used in offloads mode to acl_ingress_ofld.c . Acl ingress functions used in legacy mode to acl_ingress_lgy.c This patch doe

[net-next V3 14/15] net/mlx5: DR, Add a spinlock to protect the send ring

2020-05-27 Thread Saeed Mahameed
From: Alex Vesker Adding this lock will allow writing steering entries without locking the dr_domain and allow parallel insertion. Signed-off-by: Alex Vesker Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/steering/dr_send.c | 13 + .../

[net-next V3 13/15] net/mlx5e: Optimize performance for IPv4/IPv6 ethertype

2020-05-27 Thread Saeed Mahameed
From: Eli Britstein The HW is optimized for IPv4/IPv6. For such cases, pending capability, avoid matching on ethertype, and use ip_version field instead. Signed-off-by: Eli Britstein Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/diag/fs_tracepoint.c | 85 +

[net-next V3 12/15] net/mlx5e: Helper function to set ethertype

2020-05-27 Thread Saeed Mahameed
From: Eli Britstein Set ethertype match in a helper function as a pre-step towards optimizing it. Signed-off-by: Eli Britstein Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/en/tc_ct.c| 5 + .../ethernet/mellanox/mlx5/core/en/tc_tun.c | 21

[net-next V3 10/15] net/mlx5e: Use change upper event to setup representors' bond_metadata

2020-05-27 Thread Saeed Mahameed
From: Vu Pham Use change upper event to detect slave representor from enslaving/unslaving to/from lag device. On enslaving event, call mlx5_enslave_rep() API to create, add this slave representor shadow entry to the slaves list of bond_metadata structure representing master lag device and use it

[net-next V3 11/15] net/mlx5: Add missing mutex destroy

2020-05-27 Thread Saeed Mahameed
From: Parav Pandit Add mutex destroy calls to balance with mutex_init() done in the init path. Signed-off-by: Parav Pandit Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 16 ++-- 1 file changed, 14 insertions(+), 2 de

[net-next V3 05/15] net/mlx5e: Support tc block sharing for representors

2020-05-27 Thread Saeed Mahameed
From: Vu Pham Currently offloading a rule over a tc block shared by multiple representors fails because an e-switch global hashtable to keep the mapping from tc cookies to mlx5e flow instances is used, and tc block sharing offloads the same rule/cookie multiple times, each time for different repr

[net-next V3 01/15] net/mlx5: E-Switch, Refactor eswitch egress acl codes

2020-05-27 Thread Saeed Mahameed
From: Vu Pham Refactor the egress acl codes so that offloads and legacy modes can configure specifically their own needs of egress acl table, groups and rules. While at it, restructure the eswitch egress acl codes into eswitch directory and different files: . Acl egress helper functions to acl_he

[net-next V3 08/15] net/mlx5: E-Switch, Alloc and free unique metadata for match

2020-05-27 Thread Saeed Mahameed
From: Vu Pham Introduce infrastructure to create unique metadata for match for vport without depending on vport_num. Vport uses its default metadata for match in standalone configuration but will share a different unique "bond_metadata" for match with other vports in bond configuration. Using id

[net-next V3 03/15] net/mlx5: E-Switch, Introduce APIs to enable egress acl forward-to-vport rule

2020-05-27 Thread Saeed Mahameed
From: Vu Pham By default, e-switch vport's egress acl just forward packets to its counterpart NIC vport using existing egress acl table. During port failover in bonding scenario where two VFs representors are bonded, the egress acl forward-to-vport rule will be added to the existing egress acl t

[net-next V3 04/15] net/mlx5e: Use netdev events to set/del egress acl forward-to-vport rule

2020-05-27 Thread Saeed Mahameed
From: Or Gerlitz Register a notifier block to handle netdev events for bond device of non-uplink representors to support eswitch vports bonding. When a non-uplink representor is a lower dev (slave) of bond and becomes active, adding egress acl forward-to-vport rule of all slave netdevs (active +

[net-next V3 07/15] net/mlx5e: Add bond_metadata and its slave entries

2020-05-27 Thread Saeed Mahameed
From: Vu Pham Adding bond_metadata and its slave entries to represent a lag device and its slaves VF representors. Bond_metadata structure includes a unique metadata shared by slaves VF respresentors, and a list of slaves representors slave entries. On enslaving event, create a bond_metadata str

[pull request][net-next V3 00/15] mlx5 updates 2020-05-26

2020-05-27 Thread Saeed Mahameed
Hi Dave/Jakub. This series adds support for mlx5 switchdev VM failover using FW bonded representor vport and probed VF interface via eswitch vport ACLs. Plus some extra misc updates. v1->v2: - Dropped the suspend/resume support patch, will re-submit it to net and -stable as requested by Dex

[net-next V3 06/15] net/mlx5e: Offload flow rules to active lower representor

2020-05-27 Thread Saeed Mahameed
From: Or Gerlitz When a bond device is created over one or more non uplink representors, and when a flow rule is offloaded to such bond device, offload a rule to the active lower device. Assuming that this is active-backup lag, the rules should be offloaded to the active lower device which is th

Re: [pull request][net-next V2 00/15] mlx5 updates 2020-05-26

2020-05-27 Thread Saeed Mahameed
On Wed, 2020-05-27 at 10:31 -0700, Jakub Kicinski wrote: > On Wed, 27 May 2020 09:21:24 -0700 Saeed Mahameed wrote: > > Hi Dave/Jakub. > > > > This series adds support for mlx5 switchdev VM failover using FW > > bonded > > representor vport and probed VF interface via eswitch vport ACLs. > > Plus

Re: [PATCH 0/9 v2] Remove FMR support from RDMA drivers

2020-05-27 Thread Jason Gunthorpe
On Wed, May 27, 2020 at 12:46:25PM +0300, Max Gurtovoy wrote: > This series removes the support for FMR mode to register memory. This ancient > mode is unsafe (rkeys that are usually exposed for caching purposes and the > API > is limited to page granularity mappings) and not maintained/tested in

Re: [PATCH 10/23] maccess: unify the probe kernel arch hooks

2020-05-27 Thread Andrew Morton
On Thu, 21 May 2020 17:22:48 +0200 Christoph Hellwig wrote: > Currently architectures have to override every routine that probes > kernel memory, which includes a pure read and strcpy, both in strict > and not strict variants. Just provide a single arch hooks instead to > make sure all architect

Re: [RFC PATCH net-next 00/11] Nested VLANs - decimate flags and add another

2020-05-27 Thread Edwin Peer
On Wed, May 27, 2020 at 5:15 PM Michał Mirosław wrote: > Have you considered adding a 'vlan_headroom' field (or another name) > for a netdev instead of a flag? This would submit easily to device > aggregation (just take min from the slaves) and would also handle > nested VLANs gracefully (subtrac

Re: clean up and streamline probe_kernel_* and friends v4

2020-05-27 Thread Andrew Morton
On Tue, 26 May 2020 08:13:09 +0200 Christoph Hellwig wrote: > On Mon, May 25, 2020 at 03:19:12PM -0700, Andrew Morton wrote: > > hm. Applying linux-next to this series generates a lot of rejects against > > powerpc: > > > > -rw-rw-r-- 1 akpm akpm 493 May 25 15:06 arch/powerpc/kernel/kgdb.c.rej

[PATCH v3 net-next] net: dsa: sja1105: offload the Credit-Based Shaper qdisc

2020-05-27 Thread Vladimir Oltean
From: Vladimir Oltean SJA1105, being AVB/TSN switches, provide hardware assist for the Credit-Based Shaper as described in the IEEE 8021Q-2018 document. First generation has 10 shapers, freely assignable to any of the 4 external ports and 8 traffic classes, and second generation has 16 shapers.

RE: [net-next RFC 00/15] Intel Ethernet Common Module and Data

2020-05-27 Thread Skidmore, Donald C
> -Original Message- > From: Kirsher, Jeffrey T > Sent: Wednesday, May 27, 2020 3:33 PM > To: Jakub Kicinski ; Skidmore, Donald C > ; Burra, Phani R > ; Brady, Alan ; Michael, > Alice > Cc: da...@davemloft.net; netdev@vger.kernel.org; > nhor...@redhat.com; sassm...@redhat.com > Subject: R

Re: [RFC PATCH net-next 00/11] Nested VLANs - decimate flags and add another

2020-05-27 Thread Michał Mirosław
On Wed, May 27, 2020 at 02:25:01PM -0700, Edwin Peer wrote: > This series began life as a modest attempt to fix two issues pertaining > to VLANs nested inside Geneve tunnels and snowballed from there. The > first issue, addressed by a simple one-liner, is that GSO is not enabled > for upper VLAN de

[PATCH v2 bpf-next 2/5] bpf: Add support to attach bpf program to a devmap entry

2020-05-27 Thread David Ahern
From: David Ahern Add BPF_XDP_DEVMAP attach type for use with programs associated with a DEVMAP entry. Allow DEVMAPs to associate a program with a device entry by adding a bpf_prog_fd to 'struct devmap_val'. Values read show the program id, so the fd and id are a union. The program associated w

[PATCH v2 bpf-next 4/5] libbpf: Add SEC name for xdp programs attached to device map

2020-05-27 Thread David Ahern
Support SEC("xdp_dm*") as a short cut for loading the program with type BPF_PROG_TYPE_XDP and expected attach type BPF_XDP_DEVMAP. Signed-off-by: David Ahern --- tools/lib/bpf/libbpf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 5d6

[PATCH v2 bpf-next 1/5] devmap: Formalize map value as a named struct

2020-05-27 Thread David Ahern
From: David Ahern Add 'struct devmap_val' to the bpf uapi to formalize the expected values that can be passed in for a DEVMAP. Update devmap code to use the struct. Signed-off-by: David Ahern --- include/uapi/linux/bpf.h | 5 kernel/bpf/devmap.c| 43

[PATCH v2 bpf-next 5/5] selftest: Add tests for XDP programs in devmap entries

2020-05-27 Thread David Ahern
Add tests to verify ability to add an XDP program to a entry in a DEVMAP. Add negative tests to show DEVMAP programs can not be attached to devices as a normal XDP program, and accesses to egress_ifindex require BPF_XDP_DEVMAP attach type. Signed-off-by: David Ahern --- .../bpf/prog_tests/xdp_d

  1   2   3   4   5   >