[PATCHv2 net-next 2/2] Revert "bareudp: Fixed bareudp receive handling"

2021-01-14 Thread Xin Long
As udp_encap_enable() is already called in udp_tunnel_encap_enable() since the last patch, and we don't need it any more. So remove it by reverting commit 81f954a44567567c7d74a97b1db78fb43afc253d. --- drivers/net/bareudp.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/bareud

[PATCHv2 net-next 1/2] udp: call udp_encap_enable for v6 sockets when enabling encap

2021-01-14 Thread Xin Long
When enabling encap for a ipv6 socket without udp_encap_needed_key increased, UDP GRO won't work for v4 mapped v6 address packets as sk will be NULL in udp4_gro_receive(). This patch is to enable it by increasing udp_encap_needed_key for v6 sockets in udp_tunnel_encap_enable(), and correspondingly

[PATCHv2 net-next 0/2] net: enable udp v6 sockets receiving v4 packets with UDP GRO

2021-01-14 Thread Xin Long
Currently, udp v6 socket can not process v4 packets with UDP GRO, as udp_encap_needed_key is not increased when udp_tunnel_encap_enable() is called for v6 socket. This patchset is to increase it and remove the unnecessary code in bareudp. v1->v2: - see Patch 1/2. Xin Long (2): udp: call udp_e

Re: [PATCH v10 1/1] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces

2021-01-14 Thread Marc Kleine-Budde
On 1/15/21 1:41 AM, Vincent MAILHOL wrote: > On Fri. 15 Jan 2021 at 02:23, Oliver Hartkopp wrote: >> >> Hi Vincent, >> >> On 12.01.21 14:05, Vincent Mailhol wrote: >>> This driver supports the ES581.4, ES582.1 and ES584.1 interfaces from >>> ETAS GmbH (https://www.etas.com/en/products/es58x.php).

Re: [PATCH net-next] net: dsa: set configure_vlan_while_not_filtering to true by default

2021-01-14 Thread Kurt Kanzenbach
On Thu Jan 14 2021, Vladimir Oltean wrote: > From: Vladimir Oltean > > As explained in commit 54a0ed0df496 ("net: dsa: provide an option for > drivers to always receive bridge VLANs"), DSA has historically been > skipping VLAN switchdev operations when the bridge wasn't in > vlan_filtering mode, b

[PATCH net-next] net: hns3: debugfs add dump tm info of nodes, priority and qset

2021-01-14 Thread Huazhong Tan
From: Guangbin Huang To increase methods to dump more tm info, adds three debugfs commands to dump tm info of nodes, priority and qset. And a new tm file of debugfs is created for only dumping tm info. Unlike previous debugfs commands, to dump each tm information, user needs to enter two command

Re: [RPC PATCH bpf-next] bpf: implement new BPF_CGROUP_INET_SOCK_POST_CONNECT

2021-01-14 Thread kernel test robot
Hi Stanislav, Thank you for the patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Stanislav-Fomichev/bpf-implement-new-BPF_CGROUP_INET_SOCK_POST_CONNECT/20210115-112524 base: https://git.kernel.org/pub/scm/linux/kernel

Re: cBPF socket filters failing - inexplicably?

2021-01-14 Thread Alexei Starovoitov
Adding appropriate mailing list to cc... My wild guess is that as soon as socket got created: socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); the packets were already queued to it. So later setsockopt() is too late to filter. Eric, thoughts? On Wed, Jan 6, 2021 at 6:55 AM Tom Cook wrote: > > Ano

Re: [PATCH v3 1/3] bpf,x64: pad NOPs to make images converge more easily

2021-01-14 Thread Alexei Starovoitov
On Thu, Jan 14, 2021 at 1:54 AM Gary Lin wrote: > * pass to emit the final image. > */ > - for (pass = 0; pass < 20 || image; pass++) { > - proglen = do_jit(prog, addrs, image, oldproglen, &ctx); > + for (pass = 0; pass < MAX_PASSES || image; pass++) { >

RE: [PATCH linux-next v3 6/6] vdpa_sim_net: Add support for user supported devices

2021-01-14 Thread Parav Pandit
> From: Jason Wang > Sent: Friday, January 15, 2021 11:09 AM > > > On 2021/1/14 下午3:58, Parav Pandit wrote: > > > >> From: Jason Wang > >> Sent: Thursday, January 14, 2021 9:48 AM > >> > >> On 2021/1/7 上午11:48, Parav Pandit wrote: > From: Michael S. Tsirkin > Sent: Tuesday, January

[PATCHv7 bpf-next] samples/bpf: add xdp program on egress for xdp_redirect_map

2021-01-14 Thread Hangbin Liu
This patch add a xdp program on egress to show that we can modify the packet on egress. In this sample we will set the pkt's src mac to egress's mac address. The xdp_prog will be attached when -X option supplied. Signed-off-by: Hangbin Liu --- v7: a) use bpf_object__find_program_by_name() instad

[PATCH net] udp: ipv4: manipulate network header of NATed UDP GRO fraglist

2021-01-14 Thread Dongseok Yi
UDP/IP header of UDP GROed frag_skbs are not updated even after NAT forwarding. Only the header of head_skb from ip_finish_output_gso -> skb_gso_segment is updated but following frag_skbs are not updated. A call path skb_mac_gso_segment -> inet_gso_segment -> udp4_ufo_fragment -> __udp_gso_segment

Re: [PATCH net-next v7] vhost_net: avoid tx queue stuck when sendmsg fails

2021-01-14 Thread Jason Wang
On 2021/1/15 下午12:46, wangyunjian wrote: From: Yunjian Wang Currently the driver doesn't drop a packet which can't be sent by tun (e.g bad packet). In this case, the driver will always process the same packet lead to the tx queue stuck. To fix this issue: 1. in the case of persistent failure

[RFC PATCH v2 13/13] vsock_test: add SOCK_SEQPACKET tests.

2021-01-14 Thread Arseny Krasnov
This adds two tests of SOCK_SEQPACKET socket: both transfer data and then test MSG_EOR and MSG_TRUNC flags. Cases for connect(), bind(), etc. are not tested, because it is same as for stream socket. Signed-off-by: Arseny Krasnov --- tools/testing/vsock/util.c | 32 ++-- tools/testing

[RFC PATCH v2 12/13] vhost/vsock: support for SOCK_SEQPACKET socket.

2021-01-14 Thread Arseny Krasnov
This adds transport ops and removes ignore of non-stream type of packets. Signed-off-by: Arseny Krasnov --- drivers/vhost/vsock.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index 5e78fb719602..4d60a99aed14 100644 --- a

[RFC PATCH v2 10/13] virtio/vsock: update receive logic

2021-01-14 Thread Arseny Krasnov
This modifies current receive logic for SEQPACKET support: 1) Add 'SEQ_BEGIN' packet to socket's rx queue. 2) Add 'RW' packet to rx queue, but without merging inside buffer of last packet in queue. 3) Perform check for packet type and socket type on receive(if mismatch, then reset connection)

[RFC PATCH v2 11/13] virtio/vsock: rest of SOCK_SEQPACKET support

2021-01-14 Thread Arseny Krasnov
This adds rest of logic for SEQPACKET: 1) Shared functions for packet sending now set valid type of packet according socket type. 2) SEQPACKET specific function like SEQ_BEGIN send and data dequeue. 3) Ops for virtio transport. 4) TAP support for SEQPACKET is not so easy if it is necessary to se

[RFC PATCH v2 08/13] virtio/vsock: dequeue callback for SOCK_SEQPACKET.

2021-01-14 Thread Arseny Krasnov
This adds transport callback and it's logic for SEQPACKET dequeue. Callback fetches RW packets from rx queue of socket until whole record is copied(if user's buffer is full, user is not woken up). This is done to not stall sender, because if we wake up user and it leaves syscall, nobody will send c

[RFC PATCH v2 09/13] virtio/vsock: implement fetch of record length

2021-01-14 Thread Arseny Krasnov
This adds transport callback which tries to fetch record begin marker from socket's rx queue. It is called from af_vsock.c before reading data packets of record. Signed-off-by: Arseny Krasnov --- include/linux/virtio_vsock.h| 1 + net/vmw_vsock/virtio_transport_common.c | 33 +++

[RFC PATCH v2 07/13] af_vsock: update comments for stream sockets.

2021-01-14 Thread Arseny Krasnov
This replaces 'stream' to 'connect oriented' in comments as SEQPACKET is also connect oriented. Signed-off-by: Arseny Krasnov --- net/vmw_vsock/af_vsock.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsoc

[RFC PATCH v2 06/13] af_vsock: general support of SOCK_SEQPACKET type.

2021-01-14 Thread Arseny Krasnov
This adds socket operations for SOCK_SEQPACKET and adds this type of socket for conditions where SOCK_STREAM is involved because both type of sockets are connect oriented. Signed-off-by: Arseny Krasnov --- net/vmw_vsock/af_vsock.c | 108 +-- 1 file changed, 92

[RFC PATCH v2 05/13] af_vsock: implement send logic for SOCK_SEQPACKET

2021-01-14 Thread Arseny Krasnov
This adds some logic to current stream enqueue function for SEQPACKET support: 1) Send record begin marker with length of record. 2) Return value from enqueue function is wholevrecord length or error for SOCK_SEQPACKET. Signed-off-by: Arseny Krasnov --- include/net/af_vsock.h | 1 + net/vm

[RFC PATCH v2 04/13] af_vsock: replace previous stream rx loop.

2021-01-14 Thread Arseny Krasnov
This removes previous 'vsock_stream_recvmsg()' and uses newly implemented receive loops. Moved to separate patch to make review easier. Signed-off-by: Arseny Krasnov --- net/vmw_vsock/af_vsock.c | 184 +++ 1 file changed, 12 insertions(+), 172 deletions(-) di

[RFC PATCH v2 03/13] af_vsock: implement rx loops entry point

2021-01-14 Thread Arseny Krasnov
This adds entry point for STREAM/SEQPACKET rx loops. As both types are connect oriented, so there are same checks before reading data from socket. All this checks are performed in this entry point, then specific rx loop is called. Signed-off-by: Arseny Krasnov --- net/vmw_vsock/af_vsock.c | 55 +

[RFC PATCH v2 02/13] af_vsock: separate rx loops for STREAM/SEQPACKET.

2021-01-14 Thread Arseny Krasnov
This adds two receive loops: for SOCK_STREAM and SOCK_SEQPACKET. Both are look like twins, but SEQPACKET is a little bit different from STREAM: 1) It doesn't call notify callbacks. 2) It doesn't care about 'SO_SNDLOWAT' and 'SO_RCVLOWAT' values, because there is no sense for these values in SEQP

[RFC PATCH v2 01/13] af_vsock: implement 'vsock_wait_data()'.

2021-01-14 Thread Arseny Krasnov
This adds 'vsock_wait_data()' function which is called from user's read syscall and waits until new socket data is arrived. It was based on code from stream dequeue logic and moved to separate function because it will be called both from SOCK_STREAM and SOCK_SEQPACKET receive loops. Signed-off-by:

Re: [net] net: feature check mandating HW_CSUM is wrong

2021-01-14 Thread rohit maheshwari
On 13/01/21 10:37 PM, Tariq Toukan wrote: On 1/13/2021 5:35 AM, Alexander Duyck wrote: On Tue, Jan 12, 2021 at 6:43 PM rohit maheshwari wrote: On 07/01/21 12:47 AM, Jakub Kicinski wrote: On Wed,  6 Jan 2021 23:23:27 +0530 Rohit Maheshwari wrote: Mandating NETIF_F_HW_CSUM to enable TLS

Re: [PATCH linux-next v3 6/6] vdpa_sim_net: Add support for user supported devices

2021-01-14 Thread Jason Wang
On 2021/1/14 下午3:58, Parav Pandit wrote: From: Jason Wang Sent: Thursday, January 14, 2021 9:48 AM On 2021/1/7 上午11:48, Parav Pandit wrote: From: Michael S. Tsirkin Sent: Tuesday, January 5, 2021 6:53 PM On Tue, Jan 05, 2021 at 12:30:15PM +, Parav Pandit wrote: From: Michael S. Tsir

[RFC PATCH v2 00/13] virtio/vsock: introduce SOCK_SEQPACKET support.

2021-01-14 Thread Arseny Krasnov
This patchset impelements support of SOCK_SEQPACKET for virtio transport. As SOCK_SEQPACKET guarantees to save record boundaries, so to do it, new packet operation was added: it marks start of record (with record length in header), such packet doesn't carry any data. To send record

[PATCH net-next v7] vhost_net: avoid tx queue stuck when sendmsg fails

2021-01-14 Thread wangyunjian
From: Yunjian Wang Currently the driver doesn't drop a packet which can't be sent by tun (e.g bad packet). In this case, the driver will always process the same packet lead to the tx queue stuck. To fix this issue: 1. in the case of persistent failure (e.g bad packet), the driver can skip thi

[PATCH v3 net-next] net: bridge: check vlan with eth_type_vlan() method

2021-01-14 Thread menglong8 . dong
From: Menglong Dong Replace some checks for ETH_P_8021Q and ETH_P_8021AD with eth_type_vlan(). Signed-off-by: Menglong Dong --- v3: - fix compile warning in br_vlan_set_proto() by casting 'val' to be16. v2: - use eth_type_vlan() in br_validate() and __br_vlan_set_proto() too. --- net/brid

Ktls RX offload in CX6 of mellanox

2021-01-14 Thread wenxu
Hi Mellanox team. I test the ktls offload feature with CX6 dx with net-next tree. I found the driver already support the KTLS rx offload function My firmware version is the latest one 22.29.1016   According to the document: https://docs.mellanox.com/display/OFEDv521040/Kernel+Transport+Layer+Sec

Re: [RPC PATCH bpf-next] bpf: implement new BPF_CGROUP_INET_SOCK_POST_CONNECT

2021-01-14 Thread Yonghong Song
On 1/14/21 7:59 PM, Alexei Starovoitov wrote: On Thu, Jan 14, 2021 at 7:51 PM Stanislav Fomichev wrote: lock_sock(sock->sk); err = __inet_stream_connect(sock, uaddr, addr_len, flags, 0); Similarly here, attaching fexit to __inet_stream_connect would execute your BPF prog

Re: [PATCHv6 bpf-next] samples/bpf: add xdp program on egress for xdp_redirect_map

2021-01-14 Thread Hangbin Liu
Hi Yonghong, On Thu, Jan 14, 2021 at 01:01:28PM -0800, Yonghong Song wrote: > > +/* map to stroe egress interface mac address */ > > s/stroe/store Thanks, I will fix it. > > - struct bpf_program *prog, *dummy_prog; > > + struct bpf_program *prog, *dummy_prog, *devmap_prog; > > + int devmap_

[PATCH net-next] nfc: netlink: use &w->w in nfc_genl_rcv_nl_event

2021-01-14 Thread Geliang Tang
Use the struct member w of the struct urelease_work directly instead of casting it. Signed-off-by: Geliang Tang --- net/nfc/netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c index 573b38ad2f8e..640906359c22 100644 --- a/net/nf

Re: [PATCH v2 net-next] net: bridge: check vlan with eth_type_vlan() method

2021-01-14 Thread Jakub Kicinski
On Thu, 14 Jan 2021 18:23:44 -0800 menglong8.d...@gmail.com wrote: > From: Menglong Dong > > Replace some checks for ETH_P_8021Q and ETH_P_8021AD with > eth_type_vlan(). > > Signed-off-by: Menglong Dong This adds a new warning when built with W=1 C=1: net/bridge/br_vlan.c:920:28: warning: inc

Re: [PATCH] scsi: qedf: style: Simplify bool comparison

2021-01-14 Thread Martin K. Petersen
On Mon, 11 Jan 2021 17:29:28 +0800, YANG LI wrote: > Fix the following coccicheck warning: > ./drivers/scsi/qedf/qedf_main.c:3716:5-31: WARNING: Comparison to bool Applied to 5.12/scsi-queue, thanks! [1/1] scsi: qedf: style: Simplify bool comparison https://git.kernel.org/mkp/scsi/c/ac341c

Re: [PATCH bpf-next v8 1/3] bpf: remove extra lock_sock for TCP_ZEROCOPY_RECEIVE

2021-01-14 Thread Alexei Starovoitov
On Thu, Jan 14, 2021 at 8:05 PM Stanislav Fomichev wrote: > > On Thu, Jan 14, 2021 at 7:57 PM Alexei Starovoitov > wrote: > > > > On Thu, Jan 14, 2021 at 7:40 PM Stanislav Fomichev wrote: > > > > > > On Thu, Jan 14, 2021 at 7:27 PM Alexei Starovoitov > > > wrote: > > > > > > > > On Wed, Jan 13,

Re: [RPC PATCH bpf-next] bpf: implement new BPF_CGROUP_INET_SOCK_POST_CONNECT

2021-01-14 Thread Alexei Starovoitov
On Thu, Jan 14, 2021 at 7:51 PM Stanislav Fomichev wrote: > > > > > > lock_sock(sock->sk); > > > err = __inet_stream_connect(sock, uaddr, addr_len, flags, 0); > > > > Similarly here, attaching fexit to __inet_stream_connect would execute > > your BPF program at exactly the same tim

Re: [PATCH bpf-next v8 1/3] bpf: remove extra lock_sock for TCP_ZEROCOPY_RECEIVE

2021-01-14 Thread Alexei Starovoitov
On Thu, Jan 14, 2021 at 7:40 PM Stanislav Fomichev wrote: > > On Thu, Jan 14, 2021 at 7:27 PM Alexei Starovoitov > wrote: > > > > On Wed, Jan 13, 2021 at 1:33 PM Stanislav Fomichev wrote: > > > > > > Add custom implementation of getsockopt hook for TCP_ZEROCOPY_RECEIVE. > > > We skip generic hoo

Re: [RFC PATCH bpf-next 1/2] bpf: share BTF "show" implementation between kernel and libbpf

2021-01-14 Thread Andrii Nakryiko
On Thu, Jan 14, 2021 at 7:37 AM Alan Maguire wrote: > > On Mon, 11 Jan 2021, Andrii Nakryiko wrote: > > > On Mon, Jan 11, 2021 at 9:34 AM Alan Maguire > > wrote: > > > Currently the only "show" function for userspace is to write the > > > representation of the typed data to a string via > > > >

Re: [PATCH net-next v6 2/3] net: implement threaded-able napi poll loop support

2021-01-14 Thread Alexander Duyck
On Thu, Jan 14, 2021 at 7:14 PM Alexander Duyck wrote: > > On Thu, Jan 14, 2021 at 4:33 PM Wei Wang wrote: > > > > +void napi_enable(struct napi_struct *n) > > +{ > > + BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state)); > > + smp_mb__before_atomic(); > > + clear_bit(NAPI_STATE_S

Re: [PATCH net-next v6 3/3] net: add sysfs attribute to control napi threaded mode

2021-01-14 Thread Alexander Duyck
On Thu, Jan 14, 2021 at 4:34 PM Wei Wang wrote: > > This patch adds a new sysfs attribute to the network device class. > Said attribute provides a per-device control to enable/disable the > threaded mode for all the napi instances of the given network device. > > Co-developed-by: Paolo Abeni > Si

Re: [PATCH bpf-next v8 1/3] bpf: remove extra lock_sock for TCP_ZEROCOPY_RECEIVE

2021-01-14 Thread Alexei Starovoitov
On Wed, Jan 13, 2021 at 1:33 PM Stanislav Fomichev wrote: > > Add custom implementation of getsockopt hook for TCP_ZEROCOPY_RECEIVE. > We skip generic hooks for TCP_ZEROCOPY_RECEIVE and have a custom > call in do_tcp_getsockopt using the on-stack data. This removes > 3% overhead for locking/unlock

Re: [PATCH net-next v6 2/3] net: implement threaded-able napi poll loop support

2021-01-14 Thread Alexander Duyck
On Thu, Jan 14, 2021 at 4:33 PM Wei Wang wrote: > > This patch allows running each napi poll loop inside its own > kernel thread. > The threaded mode could be enabled through napi_set_threaded() > api, and does not require a device up/down. The kthread gets > created on demand when napi_set_thread

Re: [PATCH net] tcp: fix TCP_SKB_CB(skb)->tcp_tw_isn not being used

2021-01-14 Thread Pengcheng Yang
On Fri, Jan 15, 2021 at 1:12 AM Eric Dumazet wrote: > > On Thu, Jan 14, 2021 at 5:53 PM Jakub Kicinski wrote: > > > > On Tue, 29 Dec 2020 05:59:20 +0800 Pengcheng Yang wrote: > > > TCP_SKB_CB(skb)->tcp_tw_isn contains an ISN, chosen by > > > tcp_timewait_state_process() , when SYN is received in

Re: [RPC PATCH bpf-next] bpf: implement new BPF_CGROUP_INET_SOCK_POST_CONNECT

2021-01-14 Thread Andrii Nakryiko
On Thu, Jan 14, 2021 at 4:19 PM Stanislav Fomichev wrote: > > We are playing with doing hybrid conntrack where BPF generates > connect/disconnect/etc events and puts them into perfbuf (or, later, > new ringbuf). We can get most of the functionality out of > existing hooks: > - BPF_CGROUP_SOCK_OPS

[PATCH v2 net-next] net: tap: check vlan with eth_type_vlan() method

2021-01-14 Thread menglong8 . dong
From: Menglong Dong Replace some checks for ETH_P_8021Q and ETH_P_8021AD in drivers/net/tap.c with eth_type_vlan. Signed-off-by: Menglong Dong --- v2: - use eth_type_vlan() in tap_get_user_xdp() too. --- drivers/net/tap.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

Re: [PATCH net-next v4 0/2] Dissect PTP L2 packet header

2021-01-14 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Tue, 12 Jan 2021 21:07:11 +0200 you wrote: > Hi Jakub, Dave, > > This series adds support for dissecting PTP L2 packet > header (EtherType 0x88F7). > > For packet header dissecting, skb->protocol is needed. Add protoc

Re: [PATCH v1 net-next 1/1] Allow user to set metric on default route learned via Router Advertisement.

2021-01-14 Thread David Ahern
On 1/12/21 6:50 PM, Praveen Chaudhary wrote: > For IPv4, default route is learned via DHCPv4 and user is allowed to change > metric using config etc/network/interfaces. But for IPv6, default route can > be learned via RA, for which, currently a fixed metric value 1024 is used. > > Ideally, user sh

[PATCH v2 net-next] net: bridge: check vlan with eth_type_vlan() method

2021-01-14 Thread menglong8 . dong
From: Menglong Dong Replace some checks for ETH_P_8021Q and ETH_P_8021AD with eth_type_vlan(). Signed-off-by: Menglong Dong --- v2: - use eth_type_vlan() in br_validate() and __br_vlan_set_proto() too. --- net/bridge/br_forward.c | 3 +-- net/bridge/br_netlink.c | 11 +++ net/bridge

Re: [PATCH net-next] net: core: use eth_type_vlan in tap_get_user_xdp

2021-01-14 Thread Jakub Kicinski
On Wed, 13 Jan 2021 23:44:36 -0800 menglong8.d...@gmail.com wrote: > From: Menglong Dong > > Replace the check for ETH_P_8021Q and ETH_P_8021AD in > tap_get_user_xdp with eth_type_vlan. > > Signed-off-by: Menglong Dong Similarly to bridge, please convert all the instances in tap in one patch.

Re: [PATCH net] ch_ipsec: Remove initialization of rxq related data

2021-01-14 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Wed, 13 Jan 2021 10:13:02 +0530 you wrote: > Removing initialization of nrxq and rxq_size in uld_info. As > ipsec uses nic queues only, there is no need to create uld > rx queues for ipsec. > > Fixes: 1b77be463929e ("cr

Re: [PATCH v2 1/4] Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle

2021-01-14 Thread Miao-chen Chou
Hi Marcel, On Fri, Dec 18, 2020 at 1:39 PM Marcel Holtmann wrote: > > Hi Miao-chen, > > > This moves msft_do_close() from hci_dev_do_close() to > > hci_unregister_dev() to avoid clearing MSFT extension info. This also > > avoids retrieving MSFT info upon every msft_do_open() if MSFT extension > >

[PATCH v6 net-next 02/10] net: mscc: ocelot: add ops for decoding watermark threshold and occupancy

2021-01-14 Thread Vladimir Oltean
From: Vladimir Oltean We'll need to read back the watermark thresholds and occupancy from hardware (for devlink-sb integration), not only to write them as we did so far in ocelot_port_set_maxlen. So introduce 2 new functions in struct ocelot_ops, similar to wm_enc, and implement them for the 3 su

[PATCH v6 net-next 01/10] net: mscc: ocelot: auto-detect packet buffer size and number of frame references

2021-01-14 Thread Vladimir Oltean
From: Vladimir Oltean Instead of reading these values from the reference manual and writing them down into the driver, it appears that the hardware gives us the option of detecting them dynamically. The number of frame references corresponds to what the reference manual notes, however it seems t

[PATCH v6 net-next 05/10] net: dsa: felix: perform teardown in reverse order of setup

2021-01-14 Thread Vladimir Oltean
From: Vladimir Oltean In general it is desirable that cleanup is the reverse process of setup. In this case I am not seeing any particular issue, but with the introduction of devlink-sb for felix, a non-obvious decision had to be made as to where to put its cleanup method. When there's a conventi

[PATCH v6 net-next 08/10] net: mscc: ocelot: register devlink ports

2021-01-14 Thread Vladimir Oltean
From: Vladimir Oltean Add devlink integration into the mscc_ocelot switchdev driver. All physical ports (i.e. the unused ones as well) except the CPU port module at ocelot->num_phys_ports are registered with devlink, and that requires keeping the devlink_port structure outside struct ocelot_port_

[PATCH v6 net-next 10/10] net: mscc: ocelot: configure watermarks using devlink-sb

2021-01-14 Thread Vladimir Oltean
From: Vladimir Oltean Using devlink-sb, we can configure 12/16 (the important 75%) of the switch's controlling watermarks for congestion drops, and we can monitor 50% of the watermark occupancies (we can monitor the reservation watermarks, but not the sharing watermarks, which are exposed as pool

[PATCH v6 net-next 07/10] net: mscc: ocelot: delete unused ocelot_set_cpu_port prototype

2021-01-14 Thread Vladimir Oltean
From: Vladimir Oltean This is a leftover of commit 69df578c5f4b ("net: mscc: ocelot: eliminate confusion between CPU and NPI port") which renamed that function. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- Changes in v6: None. Changes in v5: None. Changes in v4: None. Ch

[PATCH v6 net-next 09/10] net: mscc: ocelot: initialize watermarks to sane defaults

2021-01-14 Thread Vladimir Oltean
From: Vladimir Oltean This is meant to be a gentle introduction into the world of watermarks on ocelot. The code is placed in ocelot_devlink.c because it will be integrated with devlink, even if it isn't right now. My first step was intended to be to replicate the default configuration of the co

[PATCH v6 net-next 06/10] net: mscc: ocelot: export NUM_TC constant from felix to common switch lib

2021-01-14 Thread Vladimir Oltean
From: Vladimir Oltean We should be moving anything that isn't DSA-specific or SoC-specific out of the felix DSA driver, and into the common mscc_ocelot switch library. The number of traffic classes is one of the aspects that is common between all ocelot switches, so it belongs in the library. T

[PATCH v6 net-next 03/10] net: dsa: add ops for devlink-sb

2021-01-14 Thread Vladimir Oltean
From: Vladimir Oltean Switches that care about QoS might have hardware support for reserving buffer pools for individual ports or traffic classes, and configuring their sizes and thresholds. Through devlink-sb (shared buffers), this is all configurable, as well as their occupancy being viewable.

[PATCH v6 net-next 00/10] Configuring congestion watermarks on ocelot switch using devlink-sb

2021-01-14 Thread Vladimir Oltean
From: Vladimir Oltean In some applications, it is important to create resource reservations in the Ethernet switches, to prevent background traffic, or deliberate attacks, from inducing denial of service into the high-priority traffic. These patches give the user some knobs to turn. The ocelot s

[PATCH v6 net-next 04/10] net: dsa: felix: reindent struct dsa_switch_ops

2021-01-14 Thread Vladimir Oltean
From: Vladimir Oltean The devlink function pointer names are super long, and they would break the alignment. So reindent the existing ops now by adding one tab. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- Changes in v6: None. Changes in v5: Rebase on top of recent series

Re: [PATCH net-next 0/6] net: ipa: GSI interrupt updates

2021-01-14 Thread Jakub Kicinski
On Thu, 14 Jan 2021 15:22:54 -0800 Saeed Mahameed wrote: > On Wed, 2021-01-13 at 11:15 -0600, Alex Elder wrote: > > This series implements some updates for the GSI interrupt code, > > buliding on some bug fixes implemented last month. > > > > The first two are simple changes made to improve readab

question about bonding mode 4

2021-01-14 Thread moyufeng
Hi Team, I have a question about bonding. During testing bonding mode 4 scenarios, I find that there is a very low probability that the pointer is null. The following information is displayed: [99359.795934] bond0: (slave eth13.2001): Port 2 did not find a suitable aggregator [99359.796960] Unab

Re: [PATCH net] ch_ipsec: Remove initialization of rxq related data

2021-01-14 Thread Ayush Sawal
Hi Jakub, On 1/15/2021 12:12 AM, Jakub Kicinski wrote: On Wed, 13 Jan 2021 10:13:02 +0530 Ayush Sawal wrote: Removing initialization of nrxq and rxq_size in uld_info. As ipsec uses nic queues only, there is no need to create uld rx queues for ipsec. Why is this a fix? Does it break something o

Re: [net-next 09/17] can: length: can_fd_len2dlc(): simplify length calculcation

2021-01-14 Thread Vincent MAILHOL
On Fri. 15 Jan 2021 at 02:03, Oliver Hartkopp wrote: > On 14.01.21 10:16, Vincent MAILHOL wrote: > > On Tue. 14 Jan 2021 at 17:23, Oliver Hartkopp > > wrote: > >> On 14.01.21 02:59, Vincent MAILHOL wrote: > >>> On Tue. 14 Jan 2021 at 06:14, Marc Kleine-Budde > >>> wrote: > > If the l

Re: [PATCH mlx5-next v1 2/5] PCI: Add SR-IOV sysfs entry to read number of MSI-X vectors

2021-01-14 Thread Alexander Duyck
On Thu, Jan 14, 2021 at 3:28 PM Alex Williamson wrote: > > On Thu, 14 Jan 2021 13:43:57 -0800 > Alexander Duyck wrote: > > > On Thu, Jan 14, 2021 at 12:08 PM Jason Gunthorpe wrote: > > > > > > On Thu, Jan 14, 2021 at 11:24:12AM -0800, Alexander Duyck wrote: > > > > > > > > As you say BAR and MSI

[PATCH wireless v2] scsi: megaraid: Remove unnecessary memset

2021-01-14 Thread Zheng Yongjun
memcpy operation is next to memset code, and the size to copy is equals to the size to memset, so the memset operation is unnecessary, remove it. Signed-off-by: Zheng Yongjun --- drivers/net/wireless/ath/wcn36xx/smd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/ath/wc

Re: [PATCH v5 net-next 10/10] net: mscc: ocelot: configure watermarks using devlink-sb

2021-01-14 Thread Jakub Kicinski
drivers/net/ethernet/mscc/ocelot_net.c:141:33: warning: ‘ocelot_devlink_ops’ defined but not used [-Wunused-const-variable=] 141 | static const struct devlink_ops ocelot_devlink_ops = { | ^~

Re: [PATCH] mlxsw: pci: switch from 'pci_' to 'dma_' API

2021-01-14 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Thu, 14 Jan 2021 09:47:57 +0100 you wrote: > The wrappers in include/linux/pci-dma-compat.h should go away. > > The patch has been generated with the coccinelle script below and has been > hand modified to replace GFP_

Re: [PATCH v5 net-next 0/5] net: dsa: Link aggregation support

2021-01-14 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Wed, 13 Jan 2021 09:42:50 +0100 you wrote: > Start of by adding an extra notification when adding a port to a bond, > this allows static LAGs to be offloaded using the bonding driver. > > Then add the generic support r

Re: pull-request: can-next 2021-01-14

2021-01-14 Thread Jakub Kicinski
On Thu, 14 Jan 2021 08:56:00 +0100 Marc Kleine-Budde wrote: > The first two patches update the MAINTAINERS file, Lukas Bulwahn's patch fixes > the files entry for the tcan4x5x driver, which was broken by me in net-next. > A patch by me adds the a missing header file to the CAN Networking Layer. >

Re: [PATCH net-next] net: openvswitch: add log message for error case

2021-01-14 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Wed, 13 Jan 2021 14:50:00 +0100 you wrote: > As requested by upstream OVS, added some error messages in the > validate_and_copy_dec_ttl function. > > Includes a small cleanup, which removes an unnecessary parameter > fr

Re: [PATCH net-next] net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add

2021-01-14 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Thu, 14 Jan 2021 10:35:56 +0200 you wrote: > From: Vladimir Oltean > > prestera_bridge_port_vlan_add should have been called with vlan->vid, > however this was masked by the presence of the local vid variable and I > d

Re: [PATCH v10 1/1] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces

2021-01-14 Thread Vincent MAILHOL
On Fri. 15 Jan 2021 at 02:23, Oliver Hartkopp wrote: > > Hi Vincent, > > On 12.01.21 14:05, Vincent Mailhol wrote: > > This driver supports the ES581.4, ES582.1 and ES584.1 interfaces from > > ETAS GmbH (https://www.etas.com/en/products/es58x.php). > > (..) > > > diff --git a/drivers/net/can/usb/e

Re: [PATCH net-next 1/1] ice: Improve MSI-X vector enablement fallback logic

2021-01-14 Thread Jakub Kicinski
On Wed, 13 Jan 2021 15:42:26 -0800 Tony Nguyen wrote: > From: Brett Creeley > > The current MSI-X enablement logic either tries to enable best-case > MSI-X vectors and if that fails we only support a bare-minimum set. > This is not very flexible and the current logic is broken when actually > all

Re: [PATCH net] team: fix deadlock during setting of MTU

2021-01-14 Thread Saeed Mahameed
On Thu, 2021-01-14 at 12:55 +0100, Ivan Vecera wrote: > Team driver protects port list traversal in team_change_mtu() > by its team->lock mutex. This causes a deadlock with certain > devices that calls netdev_update_features() during their > .ndo_change_mtu() callback. In this case netdev_update_fe

Re: [PATCH net-next v4 00/13] selftests: Updates to allow single instance of nettest for client and server

2021-01-14 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Wed, 13 Jan 2021 20:09:36 -0700 you wrote: > Update nettest to handle namespace change internally to allow a > single instance to run both client and server modes. Device validation > needs to be moved after the namespa

Re: [PATCH net-next v2 0/2] Add 100 base-x mode

2021-01-14 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Wed, 13 Jan 2021 12:56:24 +0100 you wrote: > Adding support for 100 base-x in phylink. > The Sparx5 switch supports 100 base-x pcs (IEEE 802.3 Clause 24) 4b5b encoded. > These patches adds phylink support for that mode.

Re: [PATCH mlx5-next v2 1/5] PCI: Add sysfs callback to allow MSI-X table size change of SR-IOV VFs

2021-01-14 Thread Alex Williamson
On Thu, 14 Jan 2021 12:31:36 +0200 Leon Romanovsky wrote: > From: Leon Romanovsky > > Extend PCI sysfs interface with a new callback that allows configure > the number of MSI-X vectors for specific SR-IO VF. This is needed > to optimize the performance of newly bound devices by allocating > the

Re: [PATCH mlx5-next v2 2/5] PCI: Add SR-IOV sysfs entry to read total number of dynamic MSI-X vectors

2021-01-14 Thread Alex Williamson
On Thu, 14 Jan 2021 12:31:37 +0200 Leon Romanovsky wrote: > From: Leon Romanovsky > > Some SR-IOV capable devices provide an ability to configure specific > number of MSI-X vectors on their VF prior driver is probed on that VF. > > In order to make management easy, provide new read-only sysfs

Re: [PATCH net-next,3/3] octeontx2-af: Handle CPT function level reset

2021-01-14 Thread Saeed Mahameed
On Wed, 2021-01-13 at 20:50 +0530, Srujana Challa wrote: > When FLR is initiated for a VF (PCI function level reset), > the parent PF gets a interrupt. PF then sends a message to > admin function (AF), which then cleans up all resources > attached to that VF. This patch adds support to handle > CPT

Re: [PATCH net] net: dsa: mv88e6xxx: do not allow inband AN for 2500base-x mode

2021-01-14 Thread Marek Behún
On Fri, 15 Jan 2021 00:00:33 +0100 Andrew Lunn wrote: > > diff --git a/drivers/net/dsa/mv88e6xxx/serdes.c > > b/drivers/net/dsa/mv88e6xxx/serdes.c > > index 3195936dc5be..b8241820679e 100644 > > --- a/drivers/net/dsa/mv88e6xxx/serdes.c > > +++ b/drivers/net/dsa/mv88e6xxx/serdes.c > > @@ -55,9 +5

[PATCH net] skbuff: back tiny skbs with kmalloc() in __netdev_alloc_skb() too

2021-01-14 Thread Alexander Lobakin
Commit 3226b158e67c ("net: avoid 32 x truesize under-estimation for tiny skbs") ensured that skbs with data size lower than 1025 bytes will be kmalloc'ed to avoid excessive page cache fragmentation and memory consumption. However, the same issue can still be achieved manually via __netdev_alloc_skb

Re: [PATCH net-next,2/3] octeontx2-af: Add support for CPT1 in debugfs

2021-01-14 Thread Saeed Mahameed
On Wed, 2021-01-13 at 20:50 +0530, Srujana Challa wrote: > Adds support to display block CPT1 stats at > "/sys/kernel/debug/octeontx2/cpt1". > > Signed-off-by: Mahipal Challa > Signed-off-by: Srujana Challa > --- > .../marvell/octeontx2/af/rvu_debugfs.c| 45 +++ > > 1 f

List corruption from ipv6_route_seq_start

2021-01-14 Thread stranche
Hi everyone, We've had a list corruption reported to us when using the /proc/net/ipv6_route file to read the routing information on the system on the 5.4.61 kernel. From the list pointers, it seems that the list_head in the fib6_walker has been reinitialized with INIT_LIST_HEAD() in ipv6_rout

Re: [PATCH net-next,1/3] octeontx2-af: Mailbox changes for 98xx CPT block

2021-01-14 Thread Saeed Mahameed
On Wed, 2021-01-13 at 20:50 +0530, Srujana Challa wrote: > This patch changes CPT mailbox message format to > support new block CPT1 in 98xx silicon. > > cpt_rd_wr_reg -> > Modify cpt_rd_wr_reg mailbox and its handler to > accommodate new block CPT1. > cpt_lf_alloc -> > Modify cpt_lf_a

Re: [PATCH net-next] net: phy: ar803x: disable extended next page bit

2021-01-14 Thread Jakub Kicinski
On Thu, 14 Jan 2021 23:49:02 +0100 Andrew Lunn wrote: > On Tue, Jan 12, 2021 at 10:59:43PM +, Russell King wrote: > > This bit is enabled by default and advertises support for extended > > next page support. XNP is only needed for 10GBase-T and MultiGig > > support which is not supported. Addi

Re: [patch net-next RFC 00/10] introduce line card support for modular switch

2021-01-14 Thread Jakub Kicinski
On Thu, 14 Jan 2021 08:48:04 +0100 Jiri Pirko wrote: > Thu, Jan 14, 2021 at 03:27:16AM CET, k...@kernel.org wrote: > >On Wed, 13 Jan 2021 13:12:12 +0100 Jiri Pirko wrote: > >> This patchset introduces support for modular switch systems. > >> NVIDIA Mellanox SN4800 is an example of such. It contai

Re: [PATCH mlx5-next v1 2/5] PCI: Add SR-IOV sysfs entry to read number of MSI-X vectors

2021-01-14 Thread Alex Williamson
On Thu, 14 Jan 2021 13:43:57 -0800 Alexander Duyck wrote: > On Thu, Jan 14, 2021 at 12:08 PM Jason Gunthorpe wrote: > > > > On Thu, Jan 14, 2021 at 11:24:12AM -0800, Alexander Duyck wrote: > > > > > > As you say BAR and MSI vector table are not so different, it seems > > > > perfectly in line

Re: [PATCH net-next 0/6] net: ipa: GSI interrupt updates

2021-01-14 Thread Saeed Mahameed
On Wed, 2021-01-13 at 11:15 -0600, Alex Elder wrote: > This series implements some updates for the GSI interrupt code, > buliding on some bug fixes implemented last month. > > The first two are simple changes made to improve readability and > consistency. The third replaces all msleep() calls wit

Re: [patch net-next RFC 00/10] introduce line card support for modular switch

2021-01-14 Thread Jakub Kicinski
On Thu, 14 Jan 2021 14:58:33 -0800 Jacob Keller wrote: > > There is no way to tell a breakout cable from normal one, so the > > system has no chance to magically configure itself. Besides SFP > > is just plugging a cable, not a module of the system.. > > > If you're able to tell what is plugged

Re: [PATCH v2] net: phy: realtek: Add support for RTL9000AA/AN

2021-01-14 Thread Andrew Lunn
On Thu, Jan 14, 2021 at 08:38:12AM +, ashid...@fujitsu.com wrote: > Hi Andrew > > > For T1, it seems like Master is pretty important. Do you have > > information to be able to return the current Master/slave > > configuration, or allow it to be configured? See the nxp-tja11xx.c for > > an exam

Re: [PATCH net] net: dsa: mv88e6xxx: do not allow inband AN for 2500base-x mode

2021-01-14 Thread Andrew Lunn
> diff --git a/drivers/net/dsa/mv88e6xxx/serdes.c > b/drivers/net/dsa/mv88e6xxx/serdes.c > index 3195936dc5be..b8241820679e 100644 > --- a/drivers/net/dsa/mv88e6xxx/serdes.c > +++ b/drivers/net/dsa/mv88e6xxx/serdes.c > @@ -55,9 +55,20 @@ static int mv88e6xxx_serdes_pcs_get_state(struct > mv88e6xx

Re: [PATCH net-next 0/4] i40e: small improvements on XDP path

2021-01-14 Thread Saeed Mahameed
On Thu, 2021-01-14 at 14:33 +, Cristian Dumitrescu wrote: > This patchset introduces some small and straightforward improvements > to the Intel i40e driver XDP path. Each improvement is fully > described > in its associated patch. > > Cristian Dumitrescu (4): > i40e: remove unnecessary memor

Re: [patch net-next RFC 00/10] introduce line card support for modular switch

2021-01-14 Thread Jacob Keller
On 1/13/2021 6:27 PM, Jakub Kicinski wrote: > On Wed, 13 Jan 2021 13:12:12 +0100 Jiri Pirko wrote: >> This patchset introduces support for modular switch systems. >> NVIDIA Mellanox SN4800 is an example of such. It contains 8 slots >> to accomodate line cards. Available line cards include: >> 16

Re: [Patch net v3] cls_flower: call nla_ok() before nla_next()

2021-01-14 Thread Jakub Kicinski
On Thu, 14 Jan 2021 14:50:04 -0800 Cong Wang wrote: > > static int fl_set_vxlan_opt(const struct nlattr *nla, struct fl_flow_key > > *key, > > int depth, int option_len, > > struct netlink_ext_ack *extack) > > { > > struct nlattr *tb[

  1   2   3   4   >