[PATCH net-next 6/6] net: ixgbevf: use skb_csum_is_sctp instead of protocol check

2021-01-15 Thread Xin Long
Using skb_csum_is_sctp is a easier way to validate it's a SCTP CRC checksum offload packet, and yet it also makes ixgbevf support SCTP CRC checksum offload for UDP and GRE encapped packets, just as it does in igb driver. Signed-off-by: Xin Long --- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main

[PATCH net-next 3/6] net: igbvf: use skb_csum_is_sctp instead of protocol check

2021-01-15 Thread Xin Long
Using skb_csum_is_sctp is a easier way to validate it's a SCTP CRC checksum offload packet, and yet it also makes igbvf support SCTP CRC checksum offload for UDP and GRE encapped packets, just as it does in igb driver. Signed-off-by: Xin Long --- drivers/net/ethernet/intel/igbvf/netdev.c | 14 +-

[PATCH net-next 4/6] net: igc: use skb_csum_is_sctp instead of protocol check

2021-01-15 Thread Xin Long
Using skb_csum_is_sctp is a easier way to validate it's a SCTP CRC checksum offload packet, and yet it also makes igc support SCTP CRC checksum offload for UDP and GRE encapped packets, just as it does in igb driver. Signed-off-by: Xin Long --- drivers/net/ethernet/intel/igc/igc_main.c | 14 +---

[PATCH net-next 5/6] net: ixgbe: use skb_csum_is_sctp instead of protocol check

2021-01-15 Thread Xin Long
Using skb_csum_is_sctp is a easier way to validate it's a SCTP CRC checksum offload packet, and yet it also makes ixgbe support SCTP CRC checksum offload for UDP and GRE encapped packets, just as it does in igb driver. Signed-off-by: Xin Long --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 1

[PATCH net-next 1/6] net: add inline function skb_csum_is_sctp

2021-01-15 Thread Xin Long
This patch is to define a inline function skb_csum_is_sctp(), and also replace all places where it checks if it's a SCTP CSUM skb. This function would be used later in many networking drivers in the following patches. Suggested-by: Alexander Duyck Signed-off-by: Xin Long --- drivers/net/etherne

[PATCH net-next 2/6] net: igb: use skb_csum_is_sctp instead of protocol check

2021-01-15 Thread Xin Long
Using skb_csum_is_sctp is a easier way to validate it's a SCTP CRC checksum offload packet, and there is no need to parse the packet to check its proto field, especially when it's a UDP or GRE encapped packet. So this patch also makes igb support SCTP CRC checksum offload for UDP and GRE encapped

[PATCH net-next 0/6] net: support SCTP CRC csum offload for tunneling packets in some drivers

2021-01-15 Thread Xin Long
This patchset introduces inline function skb_csum_is_sctp(), and uses it to validate it's a sctp CRC csum offload packet, to make SCTP CRC csum offload for tunneling packets supported in some HW drivers. Xin Long (6): net: add inline function skb_csum_is_sctp net: igb: use skb_csum_is_sctp ins

[PATCH net-next] udp: not remove the CRC flag from dev features when need_csum is false

2021-01-15 Thread Xin Long
In __skb_udp_tunnel_segment(), when it's a SCTP over VxLAN/GENEVE packet and need_csum is false, which means the outer udp checksum doesn't need to be computed, csum_start and csum_offset could be used by the inner SCTP CRC CSUM for SCTP HW CRC offload. So this patch is to not remove the CRC flag

[PATCH 1/3] net: usb: cdc_ncm: emit dev_err on error paths

2021-01-15 Thread Grant Grundler
Several error paths in bind/probe code will only emit output using dev_dbg. But if we are going to fail the bind/probe, emit related output with "err" priority. Signed-off-by: Grant Grundler --- drivers/net/usb/cdc_ncm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --gi

[PATCH 3/3] net: usb: cdc_ncm: don't spew notifications

2021-01-15 Thread Grant Grundler
RTL8156 sends notifications about every 32ms. Only display/log notifications when something changes. This issue has been reported by others: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1832472 https://lkml.org/lkml/2020/8/27/1083 ... [785962.779840] usb 1-1: new high-spee

[PATCH 2/3] net: usb: log errors to dmesg/syslog

2021-01-15 Thread Grant Grundler
Errors in protocol should be logged when the driver aborts operations. If the driver can carry on and "humor" the device, then emitting the message as debug output level is fine. Signed-off-by: Grant Grundler --- drivers/net/usb/usbnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

Re: [PATCH bpf-next] xsk: build skb by page

2021-01-15 Thread kernel test robot
Hi Xuan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Xuan-Zhuo/xsk-build-skb-by-page/20210116-105116 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config: s

Re: [PATCH net 1/2] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext

2021-01-15 Thread Florian Fainelli
On 1/15/2021 6:39 PM, Rasmus Villemoes wrote: > mv88e6xxx_port_vlan_join checks whether the VTU already contains an > entry for the given vid (via mv88e6xxx_vtu_getnext), and if so, merely > changes the relevant .member[] element and loads the updated entry > into the VTU. > > However, at least

Re: [PATCH net-next 2/2] net: dsa: mv88e6xxx: use mv88e6185_g1_vtu_getnext() for the 6250

2021-01-15 Thread Florian Fainelli
On 1/15/2021 6:39 PM, Rasmus Villemoes wrote: > mv88e6250_g1_vtu_getnext is almost identical to > mv88e6185_g1_vtu_getnext, except for the 6250 only having 64 databases > instead of 256. We can reduce code duplication by simply masking off > the extra two garbage bits when assembling the fid fro

Re: [PATCH v2 net-next 19/21] net/mlx5e: NVMEoTCP, data-path for DDP offload

2021-01-15 Thread David Ahern
I have not had time to review this version of the patches, but this patch seems very similar to 13 of 15 from v1 and you did not respond to my question on it ... On 1/14/21 8:10 AM, Boris Pismenny wrote: > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/nvmeotcp_rxtx.c > b/drivers/n

Re: [PATCH net-next v2 5/7] virtio-net, xsk: realize the function of xsk packet sending

2021-01-15 Thread Jakub Kicinski
On Sat, 16 Jan 2021 10:59:26 +0800 Xuan Zhuo wrote: > + idx = sq->xsk.hdr_con % sq->xsk.hdr_n; The arguments here are 64 bit, this code will not build on 32 bit machines: ERROR: modpost: "__umoddi3" [drivers/net/virtio_net.ko] undefined! There's also a sparse warning in this patch: drivers/

[PATCHv3 net-next] ip_gre: remove CRC flag from dev features in gre_gso_segment

2021-01-15 Thread Xin Long
This patch is to let it always do CRC checksum in sctp_gso_segment() by removing CRC flag from the dev features in gre_gso_segment() for SCTP over GRE, just as it does in Commit 527beb8ef9c0 ("udp: support sctp over udp in skb_udp_tunnel_segment") for SCTP over UDP. It could set csum/csum_start in

Re: [PATCH net 0/2] ipv6: fixes for the multicast routes

2021-01-15 Thread David Ahern
On 1/15/21 4:12 PM, Matteo Croce wrote: > On Fri, Jan 15, 2021 at 11:50 PM Jakub Kicinski wrote: >> >> On Fri, 15 Jan 2021 19:42:07 +0100 Matteo Croce wrote: >>> From: Matteo Croce >>> >>> Fix two wrong flags in the IPv6 multicast routes created >>> by the autoconf code. >> >> Any chance for Fixe

Re: [PATCH net 1/2] ipv6: create multicast route with RTPROT_KERNEL

2021-01-15 Thread David Ahern
On 1/15/21 11:42 AM, Matteo Croce wrote: > From: Matteo Croce > > The ff00::/8 multicast route is created without specifying the fc_protocol > field, so the default RTPROT_BOOT value is used: > > $ ip -6 -d route > unicast ::1 dev lo proto kernel scope global metric 256 pref medium > unica

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

2021-01-15 Thread Alexander Duyck
On Fri, Jan 15, 2021 at 6:06 AM Jason Gunthorpe wrote: > > On Thu, Jan 14, 2021 at 05:56:20PM -0800, Alexander Duyck wrote: > > > That said, it only works at the driver level. So if the firmware is > > the one that is having to do this it also occured to me that if this > > update happened on FLR

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

2021-01-15 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. v1->v2: - no change. v2->v3: - add the missing signoff. Signed-off-by: Xin Long --- drivers/net/

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

2021-01-15 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

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

2021-01-15 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. v2->v3: - see Patch 2/2. Xin

Re: [PATCH v2] hv_netvsc: Add (more) validation for untrusted Hyper-V values

2021-01-15 Thread Jakub Kicinski
On Thu, 14 Jan 2021 21:26:28 +0100 Andrea Parri (Microsoft) wrote: > For additional robustness in the face of Hyper-V errors or malicious > behavior, validate all values that originate from packets that Hyper-V > has sent to the guest. Ensure that invalid values cannot cause indexing > off the end

Re: [PATCH] tcp_cubic: use memset and offsetof init

2021-01-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Thu, 14 Jan 2021 12:14:56 +0800 you wrote: > In bictcp_reset(), use memset and offsetof instead of = 0. > > Signed-off-by: Yejune Deng > --- > net/ipv4/tcp_cubic.c | 11 +-- > 1 file changed, 1 insertion(+), 1

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

2021-01-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Fri, 15 Jan 2021 12:14:53 +0800 you wrote: > 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,

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

2021-01-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Thu, 14 Jan 2021 18:32:38 -0800 you wrote: > 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 > > [...] Here i

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

2021-01-15 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Fri, 15 Jan 2021 04:11:10 +0200 you wrote: > From: Vladimir Oltean > > In some applications, it is important to create resource reservations in > the Ethernet switches, to prevent background traffic, or deliberate > a

Re: pull-request: bpf-next 2021-01-16

2021-01-15 Thread Jakub Kicinski
On Sat, 16 Jan 2021 02:29:22 +0100 Daniel Borkmann wrote: > 1) Extend atomic operations to the BPF instruction set along with x86-64 JIT > support, >that is, atomic{,64}_{xchg,cmpxchg,fetch_{add,and,or,xor}}, from Brendan > Jackman. > > 2) Add support for using kernel module global variables

[PATCH net-next v2 7/7] virtio-net, xsk: set xsk completed when packet sent done

2021-01-15 Thread Xuan Zhuo
When recycling packets that have been sent, call xsk_tx_completed to inform xsk which packets have been sent. If necessary, start napi to process the packets in the xsk queue. Signed-off-by: Xuan Zhuo --- drivers/net/virtio_net.c | 49 1 file cha

[PATCH iproute2] iplink: work around rtattr length limits for IFLA_VFINFO_LIST

2021-01-15 Thread Edwin Peer
The maximum possible length of an RTNL attribute is 64KB, but the nested VFINFO list exceeds this for more than about 220 VFs (each VF consumes approximately 300 bytes, depending on alignment and optional fields). Exceeding the limit causes IFLA_VFINFO_LIST's length to wrap modulo 16 bits in the ke

[PATCH net-next v2 4/7] virtio-net, xsk: support xsk enable/disable

2021-01-15 Thread Xuan Zhuo
When enable, a certain number of struct virtnet_xsk_hdr is allocated to save the information of each packet and virtio hdr.This number is the limit of the received module parameters. When struct virtnet_xsk_hdr is used up, or the sq->vq->num_free of virtio-net is too small, it will be considered t

[PATCH net-next v2 5/7] virtio-net, xsk: realize the function of xsk packet sending

2021-01-15 Thread Xuan Zhuo
virtnet_xsk_run will be called in the tx interrupt handling function virtnet_poll_tx. The sending process gets desc from the xsk tx queue, and assembles it to send the data. Compared with other drivers, a special place is that the page of the data in xsk is used here instead of the dma address. B

[PATCH net-next v2 2/7] virtio-net, xsk: distinguish XDP_TX and XSK XMIT ctx

2021-01-15 Thread Xuan Zhuo
If support xsk, a new ptr will be recovered during the process of freeing the old ptr. In order to distinguish between ctx sent by XDP_TX and ctx sent by xsk, a struct is added here to distinguish between these two situations. virtnet_xdp_type.type It is used to distinguish different ctx, and virtn

[PATCH net-next v2 6/7] virtio-net, xsk: implement xsk wakeup callback

2021-01-15 Thread Xuan Zhuo
Since I did not find an interface to directly notify virtio to generate a tx interrupt, I sent some data to trigger a new tx interrupt. Another advantage of this is that the transmission delay will be relatively small, and there is no need to wait for the tx interrupt to start softirq. Signed-off

[PATCH net-next v2 3/7] xsk, virtio-net: prepare for support xsk zerocopy xmit

2021-01-15 Thread Xuan Zhuo
Split function free_old_xmit_skbs, add sub-function __free_old_xmit_ptr, which is convenient to call with other statistical information, and supports the parameter 'xsk_wakeup' required for processing xsk. Use netif stop check as a function virtnet_sq_stop_check, which will be used when adding xsk

[PATCH net-next v2 1/7] xsk: support get page for drv

2021-01-15 Thread Xuan Zhuo
For some drivers, such as virtio-net, we do not configure dma when binding xsk. We will get the page when sending. This patch participates in a field need_dma during the setup pool. If the device does not use dma, this value should be set to false. And a function xsk_buff_raw_get_page is added to

[PATCH net-next v2 0/7] virtio-net support xdp socket zero copy xmit

2021-01-15 Thread Xuan Zhuo
XDP socket is an excellent by pass kernel network transmission framework. The zero copy feature of xsk (XDP socket) needs to be supported by the driver. The performance of zero copy is very good. mlx5 and intel ixgbe already support this feature, This patch set allows virtio-net to support xsk's ze

[PATCH bpf-next] xsk: build skb by page

2021-01-15 Thread Xuan Zhuo
This patch is used to construct skb based on page to save memory copy overhead. This has one problem: We construct the skb by fill the data page as a frag into the skb. In this way, the linear space is empty, and the header information is also in the frag, not in the linear space, which is not al

[PATCH net 1/2] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext

2021-01-15 Thread Rasmus Villemoes
mv88e6xxx_port_vlan_join checks whether the VTU already contains an entry for the given vid (via mv88e6xxx_vtu_getnext), and if so, merely changes the relevant .member[] element and loads the updated entry into the VTU. However, at least for the mv88e6250, the on-stack struct mv88e6xxx_vtu_entry v

[PATCH net-next 2/2] net: dsa: mv88e6xxx: use mv88e6185_g1_vtu_getnext() for the 6250

2021-01-15 Thread Rasmus Villemoes
mv88e6250_g1_vtu_getnext is almost identical to mv88e6185_g1_vtu_getnext, except for the 6250 only having 64 databases instead of 256. We can reduce code duplication by simply masking off the extra two garbage bits when assembling the fid from VTU op [3:0] and [11:8]. Signed-off-by: Rasmus Villemo

[PATCH 0/2] net: dsa: mv88e6xxx: fix vlan filtering for 6250

2021-01-15 Thread Rasmus Villemoes
I finally managed to figure out why enabling VLAN filtering on the 6250 broke all (ingressing) traffic, cf. https://lore.kernel.org/netdev/6424c14e-bd25-2a06-cf0b-f1a07f9a3...@prevas.dk/ . The first patch is the minimal fix and for net, while the second one is a little cleanup for net-next. Rasm

Re: [PATCH net] net_sched: avoid shift-out-of-bounds in tcindex_set_parms()

2021-01-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 14 Jan 2021 10:52:29 -0800 you wrote: > From: Eric Dumazet > > tc_index being 16bit wide, we need to check that TCA_TCINDEX_SHIFT > attribute is not silly. > > UBSAN: shift-out-of-bounds in net/sched/cls_tcindex.c:260

Re: [PATCH net] net_sched: gen_estimator: support large ewma log

2021-01-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 14 Jan 2021 10:19:29 -0800 you wrote: > From: Eric Dumazet > > syzbot report reminded us that very big ewma_log were supported in the past, > even if they made litle sense. > > tc qdisc replace dev xxx root est 1sec 1

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

2021-01-15 Thread Alexander Duyck
On Fri, Jan 15, 2021 at 4:44 PM Wei Wang wrote: > > On Fri, Jan 15, 2021 at 3:08 PM Alexander Duyck > wrote: > > > > On Fri, Jan 15, 2021 at 1:54 PM Wei Wang wrote: > > > > > > On Thu, Jan 14, 2021 at 7:34 PM Alexander Duyck > > > wrote: > > > > > > > > On Thu, Jan 14, 2021 at 4:34 PM Wei Wang

Re: [PATCH net] net_sched: reject silly cell_log in qdisc_get_rtab()

2021-01-15 Thread Jakub Kicinski
On Thu, 14 Jan 2021 10:03:39 -0800 Cong Wang wrote: > On Thu, Jan 14, 2021 at 8:06 AM Eric Dumazet wrote: > > > > From: Eric Dumazet > > > > iproute2 probably never goes beyond 8 for the cell exponent, > > but stick to the max shift exponent for signed 32bit. > > > > UBSAN reported: > > UBSAN: sh

Re: [PATCH] neighbor: remove definition of DEBUG

2021-01-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Thu, 14 Jan 2021 13:29:17 -0800 you wrote: > From: Tom Rix > > Defining DEBUG should only be done in development. > So remove DEBUG. > > Signed-off-by: Tom Rix > > [...] Here is the summary with links: - neighbor

Re: [PATCH] gianfar: remove definition of DEBUG

2021-01-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Wed, 13 Jan 2021 13:56:03 -0800 you wrote: > From: Tom Rix > > Defining DEBUG should only be done in development. > So remove DEBUG. > > Signed-off-by: Tom Rix > > [...] Here is the summary with links: - gianfar:

Re: [PATCH] net: ks8851: remove definition of DEBUG

2021-01-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Fri, 15 Jan 2021 07:31:28 -0800 you wrote: > From: Tom Rix > > Defining DEBUG should only be done in development. > So remove DEBUG. > > Signed-off-by: Tom Rix > > [...] Here is the summary with links: - net: ks8

Re: [PATCH v2] wireguard: netlink: add multicast notification for peer changes

2021-01-15 Thread Linus Lotz
Hi Jason, No worries, thanks! Linus > Hey Linus, > > My email server has been firewalled from vger.kernel.org until today, > so I didn't see the original until this v2 was sent today. My > apologies. I'll review this first thing on Monday. > > Jason >

Re: [PATCH bpf-next 1/4] bpf: enable task local storage for tracing programs

2021-01-15 Thread Yonghong Song
On 1/15/21 5:12 PM, Song Liu wrote: On Jan 15, 2021, at 4:55 PM, Yonghong Song wrote: On 1/15/21 3:34 PM, Song Liu wrote: On Jan 12, 2021, at 8:53 AM, KP Singh wrote: On Tue, Jan 12, 2021 at 5:32 PM Yonghong Song wrote: On 1/11/21 3:45 PM, Song Liu wrote: On Jan 11, 2021, at

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

2021-01-15 Thread Alexander Duyck
On Fri, Jan 15, 2021 at 7:53 AM Leon Romanovsky wrote: > > On Fri, Jan 15, 2021 at 10:06:19AM -0400, Jason Gunthorpe wrote: > > On Thu, Jan 14, 2021 at 05:56:20PM -0800, Alexander Duyck wrote: > > > > > That said, it only works at the driver level. So if the firmware is > > > the one that is havin

Re: [PATCH netdev] virtio-net: support XDP_TX when not more queues

2021-01-15 Thread Jakub Kicinski
On Wed, 13 Jan 2021 16:08:57 +0800 Xuan Zhuo wrote: > The number of queues implemented by many virtio backends is limited, > especially some machines have a large number of CPUs. In this case, it > is often impossible to allocate a separate queue for XDP_TX. > > This patch allows XDP_TX to run by

Re: commit 4c7ea3c0791e (net: dsa: mv88e6xxx: disable SA learning for DSA and CPU ports)

2021-01-15 Thread Tobias Waldekranz
On Thu, Jan 14, 2021 at 14:49, Rasmus Villemoes wrote: > Hi > > I've noticed something rather odd with my mv88e6250, which led me to the > commit in the subject. > > First, the MAC address of the master device never seems to get learned > (at least according to "mv88e6xxx_dump --atu"), so all pac

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

2021-01-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Sat, 16 Jan 2021 01:19:19 +0200 you wrote: > As explained in commit 54a0ed0df496 ("net: dsa: provide an option for > drivers to always receive bridge VLANs"), DSA has historically been > skipping VLAN switchdev operation

Re: [PATCHv3 net-next 1/2] net: move the hsize check to the else block in skb_segment

2021-01-15 Thread Alexander Duyck
On Fri, Jan 15, 2021 at 1:36 AM Xin Long wrote: > > After commit 89319d3801d1 ("net: Add frag_list support to skb_segment"), > it goes to process frag_list when !hsize in skb_segment(). However, when > using skb frag_list, sg normally should not be set. In this case, hsize > will be set with len r

pull-request: bpf-next 2021-01-16

2021-01-15 Thread Daniel Borkmann
Hi David, hi Jakub, The following pull-request contains BPF updates for your *net-next* tree. We've added 41 non-merge commits during the last 7 day(s) which contain a total of 100 files changed, 2565 insertions(+), 741 deletions(-). The main changes are: 1) Extend atomic operations to the BPF

Re: pull-request: bpf 2021-01-16

2021-01-15 Thread Jakub Kicinski
On Sat, 16 Jan 2021 01:20:25 +0100 Daniel Borkmann wrote: > 1) Fix a double bpf_prog_put() for BPF_PROG_{TYPE_EXT,TYPE_TRACING} types in >link creation's error path causing a refcount underflow, from Jiri Olsa. > > 2) Fix BTF validation errors for the case where kernel modules don't declare >

[RFC net-next 5/7] net: dsa: Include bridge addresses in assisted CPU port learning

2021-01-15 Thread Tobias Waldekranz
Now that notifications are sent out for addresses added to the bridge itself, extend DSA to include those addresses in the hardware FDB when assisted CPU port learning is enabled. Signed-off-by: Tobias Waldekranz --- net/dsa/slave.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) dif

Re: [PATCH v10 3/3] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver

2021-01-15 Thread Jakub Kicinski
On Wed, 13 Jan 2021 19:40:28 +0100 Łukasz Stelmach wrote: > ASIX AX88796[1] is a versatile ethernet adapter chip, that can be > connected to a CPU with a 8/16-bit bus or with an SPI. This driver > supports SPI connection. > > The driver has been ported from the vendor kernel for ARTIK5[2] > boards

[RFC net-next 7/7] net: dsa: mv88e6xxx: Request assisted learning on CPU port

2021-01-15 Thread Tobias Waldekranz
While the hardware is capable of performing learning on the CPU port, it requires alot of additions to the bridge's forwarding path in order to handle multi-destination traffic correctly. Until that is in place, opt for the next best thing and let DSA sync the relevant addresses down to the hardwa

[RFC net-next 6/7] net: dsa: Sync static FDB entries on foreign interfaces to hardware

2021-01-15 Thread Tobias Waldekranz
Reuse the "assisted_learning_on_cpu_port" functionality to always add entries for user-configured entries on foreign interfaces, even if assisted_learning_on_cpu_port is not enabled. E.g. in this situation: br0 / \ swp0 dummy0 $ bridge fdb add 02:00:de:ad:00:01 dev dummy0 vlan 1 master Res

[RFC net-next 2/7] net: bridge: switchdev: Include local flag in FDB notifications

2021-01-15 Thread Tobias Waldekranz
Some switchdev drivers, notably DSA, ignore all dynamically learned address notifications (!added_by_user) as these are autonomously added by the switch. Previously, such a notification was indistinguishable from a local address notification. Include a local bit in the notification so that the two

[RFC net-next 4/7] net: dsa: Include local addresses in assisted CPU port learning

2021-01-15 Thread Tobias Waldekranz
Add local addresses (i.e. the ports' MAC addresses) to the hardware FDB when assisted CPU port learning is enabled. NOTE: The bridge's own MAC address is also "local". If that address is not shared with any port, the bridge's MAC is not be added by this functionality - but the following commit tak

[RFC net-next 0/7] net: dsa: Sync local bridge FDB addresses to hardware

2021-01-15 Thread Tobias Waldekranz
This is an extension of previous work done by Vladimir Oltean: https://lore.kernel.org/netdev/20210106095136.224739-1-olte...@gmail.com/ With this series, local addresses belonging to bridge ports or to the bridge itself are also synced down to the hardware FDB. As a result the hardware can avoid

[RFC net-next 1/7] net: bridge: switchdev: Refactor br_switchdev_fdb_notify

2021-01-15 Thread Tobias Waldekranz
Instead of having to add more and more arguments to br_switchdev_fdb_call_notifiers, get rid of it and build the info struct directly in br_switchdev_fdb_notify. Signed-off-by: Tobias Waldekranz --- net/bridge/br_switchdev.c | 41 +++ 1 file changed, 11 insert

[RFC net-next 3/7] net: bridge: switchdev: Send FDB notifications for host addresses

2021-01-15 Thread Tobias Waldekranz
Treat addresses added to the bridge itself in the same way as regular ports and send out a notification so that drivers may sync it down to the hardware FDB. Signed-off-by: Tobias Waldekranz --- net/bridge/br_fdb.c | 4 ++-- net/bridge/br_private.h | 7 --- net/bridge/br_switchdev.

Re: [PATCH bpf-next 1/4] bpf: enable task local storage for tracing programs

2021-01-15 Thread Song Liu
> On Jan 15, 2021, at 4:55 PM, Yonghong Song wrote: > > > > On 1/15/21 3:34 PM, Song Liu wrote: >>> On Jan 12, 2021, at 8:53 AM, KP Singh wrote: >>> >>> On Tue, Jan 12, 2021 at 5:32 PM Yonghong Song wrote: On 1/11/21 3:45 PM, Song Liu wrote: > > >> On

[PATCH v2 net-next 09/14] net: mscc: ocelot: reapply bridge forwarding mask on bonding join/leave

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean Applying the bridge forwarding mask currently is done only on the STP state changes for any port. But it depends on both STP state changes, and bonding interface state changes. Export the bit that recalculates the forwarding mask so that it could be reused, and call it when

[PATCH v2 net-next 01/14] net: mscc: ocelot: allow offloading of bridge on top of LAG

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean Commit 7afb3e575e5a ("net: mscc: ocelot: don't handle netdev events for other netdevs") was too aggressive, and it made ocelot_netdevice_event react only to network interface events emitted for the ocelot switch ports. In fact, only the PRECHANGEUPPER should have had that c

[PATCH v2 net-next 00/14] LAG offload for Ocelot DSA switches

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean This patch series reworks the ocelot switchdev driver such that it could share the same implementation for LAG offload as the felix DSA driver. Testing has been done in the following topology: +--+ | Board 1 br0

[PATCH v2 net-next 13/14] net: mscc: ocelot: rebalance LAGs on link up/down events

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean At present there is an issue when ocelot is offloading a bonding interface, but one of the links of the physical ports goes down. Traffic keeps being hashed towards that destination, and of course gets dropped on egress. Monitor the netdev notifier events emitted by the bon

[PATCH v2 net-next 02/14] net: mscc: ocelot: rename ocelot_netdevice_port_event to ocelot_netdevice_changeupper

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean ocelot_netdevice_port_event treats a single event, NETDEV_CHANGEUPPER. So we can remove the check for the type of event, and rename the function to be more suggestive, since there already is a function with a very similar name of ocelot_netdevice_event. Signed-off-by: Vladi

[PATCH v2 net-next 03/14] net: mscc: ocelot: use a switch-case statement in ocelot_netdevice_event

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean Make ocelot's net device event handler more streamlined by structuring it in a similar way with others. The inspiration here was dsa_slave_netdevice_event. Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni --- Changes in v2: Addressed Alex's feedback: > This

[PATCH v2 net-next 08/14] net: mscc: ocelot: use "lag" variable name in ocelot_bridge_stp_state_set

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean In anticipation of further simplification, make it more clear what we're iterating over. Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni --- Changes in v2: None. drivers/net/ethernet/mscc/ocelot.c | 11 +++ 1 file changed, 7 insertions(+), 4 deleti

[PATCH v2 net-next 12/14] net: mscc: ocelot: rename aggr_count to num_ports_in_lag

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean It makes it a bit easier to read and understand the code that deals with balancing the 16 aggregation codes among the ports in a certain LAG. Signed-off-by: Vladimir Oltean --- Changes in v2: None. drivers/net/ethernet/mscc/ocelot.c | 7 +++ 1 file changed, 3 inserti

[PATCH v2 net-next 14/14] net: dsa: felix: propagate the LAG offload ops towards the ocelot lib

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean The ocelot switch has been supporting LAG offload since its initial commit, however felix could not make use of that, due to lack of a LAG abstraction in DSA. Now that we have that, let's forward DSA's calls towards the ocelot library, who will deal with setting up the bondi

[PATCH v2 net-next 11/14] net: mscc: ocelot: drop the use of the "lags" array

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean We can now simplify the implementation by always using ocelot_get_bond_mask to look up the other ports that are offloading the same bonding interface as us. In ocelot_set_aggr_pgids, the code had a way to uniquely iterate through LAGs. We need to achieve the same behavior b

[PATCH v2 net-next 10/14] net: mscc: ocelot: set up logical port IDs centrally

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean The setup of logical port IDs is done in two places: from the inconclusively named ocelot_setup_lag and from ocelot_port_lag_leave, a function that also calls ocelot_setup_lag (which apparently does an incomplete setup of the LAG). To improve this situation, we can rename o

[PATCH v2 net-next 05/14] net: mscc: ocelot: use ipv6 in the aggregation code

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean IPv6 header information is not currently part of the entropy source for the 4-bit aggregation code used for LAG offload, even though it could be. The hardware reference manual says about these fields: ANA::AGGR_CFG.AC_IP6_TCPUDP_PORT_ENA Use IPv6 TCP/UDP port when calculati

[PATCH v2 net-next 07/14] net: mscc: ocelot: avoid unneeded "lp" variable in LAG join

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean The index of the LAG is equal to the logical port ID that all the physical port members have, which is further equal to the index of the first physical port that is a member of the LAG. The code gets a bit carried away with logic like this: if (a == b)

[PATCH v2 net-next 06/14] net: mscc: ocelot: set up the bonding mask in a way that avoids a net_device

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean Since this code should be called from pure switchdev as well as from DSA, we must find a way to determine the bonding mask not by looking directly at the net_device lowers of the bonding interface, since those could have different private structures. We keep a pointer to th

[PATCH v2 net-next 04/14] net: mscc: ocelot: don't refuse bonding interfaces we can't offload

2021-01-15 Thread Vladimir Oltean
From: Vladimir Oltean Since switchdev/DSA exposes network interfaces that fulfill many of the same user space expectations that dedicated NICs do, it makes sense to not deny bonding interfaces with a bonding policy that we cannot offload, but instead allow the bonding driver to select the egress

Re: [PATCH bpf-next 1/4] bpf: enable task local storage for tracing programs

2021-01-15 Thread Yonghong Song
On 1/15/21 3:34 PM, Song Liu wrote: On Jan 12, 2021, at 8:53 AM, KP Singh wrote: On Tue, Jan 12, 2021 at 5:32 PM Yonghong Song wrote: On 1/11/21 3:45 PM, Song Liu wrote: On Jan 11, 2021, at 1:58 PM, Martin Lau wrote: On Mon, Jan 11, 2021 at 10:35:43PM +0100, KP Singh wrote: On

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

2021-01-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Wed, 13 Jan 2021 21:25:18 +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 net-next v16 2/6] net: phy: Add 5GBASER interface mode

2021-01-15 Thread Russell King - ARM Linux admin
On Sat, Jan 16, 2021 at 02:31:16AM +0200, Vladimir Oltean wrote: > On Thu, Jan 14, 2021 at 05:33:27AM +0100, Marek Behún wrote: > > From: Pavana Sharma > > > > Add 5GBASE-R phy interface mode > > > > Signed-off-by: Pavana Sharma > > Reviewed-by: Andrew Lunn > > Reviewed-by: Florian Fainelli >

Re: [PATCH v2] netdevice.7: Update documentation for SIOCGIFADDR SIOCSIFADDR SIOCDIFADDR

2021-01-15 Thread Alejandro Colomar (man-pages)
On 1/12/21 8:26 PM, Pali Rohár wrote: > On Sunday 10 January 2021 20:57:50 Alejandro Colomar (man-pages) wrote: >> [ CC += netdev ] >> >> On 1/10/21 5:38 PM, Pali Rohár wrote: >>> On Saturday 02 January 2021 19:39:52 Pali Rohár wrote: Also add description for struct in6_ifreq which is used for

Re: [PATCH net-next v16 2/6] net: phy: Add 5GBASER interface mode

2021-01-15 Thread Vladimir Oltean
On Thu, Jan 14, 2021 at 05:33:27AM +0100, Marek Behún wrote: > From: Pavana Sharma > > Add 5GBASE-R phy interface mode > > Signed-off-by: Pavana Sharma > Reviewed-by: Andrew Lunn > Reviewed-by: Florian Fainelli > Signed-off-by: Marek Behún > --- This patch now conflicts with commit b1ae3587

pull-request: bpf 2021-01-16

2021-01-15 Thread Daniel Borkmann
Hi David, hi Jakub, The following pull-request contains BPF updates for your *net* tree. We've added 11 non-merge commits during the last 6 day(s) which contain a total of 14 files changed, 128 insertions(+), 115 deletions(-). The main changes are: 1) Fix a double bpf_prog_put() for BPF_PROG_{T

Re: [PATCH v2 net-next 0/2] net: dsa: mv88e6xxx: LAG fixes

2021-01-15 Thread Jakub Kicinski
On Sat, 16 Jan 2021 01:55:47 +0200 Vladimir Oltean wrote: > On Fri, Jan 15, 2021 at 03:46:22PM -0800, Jakub Kicinski wrote: > > On Sat, 16 Jan 2021 01:24:35 +0200 Vladimir Oltean wrote: > > > On Fri, Jan 15, 2021 at 03:02:46PM -0800, Jakub Kicinski wrote: > > > > On Fri, 15 Jan 2021 13:52:57 +0

Re: [PATCH v2 net-next 0/2] net: dsa: mv88e6xxx: LAG fixes

2021-01-15 Thread Tobias Waldekranz
On Fri, Jan 15, 2021 at 15:46, Jakub Kicinski wrote: > On Sat, 16 Jan 2021 01:24:35 +0200 Vladimir Oltean wrote: >> On Fri, Jan 15, 2021 at 03:02:46PM -0800, Jakub Kicinski wrote: >> > On Fri, 15 Jan 2021 13:52:57 +0100 Tobias Waldekranz wrote: >> > > The kernel test robot kindly pointed out tha

Re: [RFC PATCH net 1/2] net: introduce CAN specific pointer in the struct net_device

2021-01-15 Thread Jakub Kicinski
On Fri, 15 Jan 2021 15:30:35 +0100 Oleksij Rempel wrote: > Since 20dd3850bcf8 ("can: Speed up CAN frame receiption by using > ml_priv") the CAN framework uses per device specific data in the AF_CAN > protocol. For this purpose the struct net_device->ml_priv is used. Later > the ml_priv usage in CAN

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

2021-01-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Fri, 15 Jan 2021 10:50:24 -0800 you wrote: > From: Cong Wang > > fl_set_enc_opt() simply checks if there are still bytes left to parse, > but this is not sufficent as syzbot seems to be able to generate > malformatted netli

Re: [PATCH v2 net-next 0/2] net: dsa: mv88e6xxx: LAG fixes

2021-01-15 Thread Vladimir Oltean
On Fri, Jan 15, 2021 at 03:46:22PM -0800, Jakub Kicinski wrote: > On Sat, 16 Jan 2021 01:24:35 +0200 Vladimir Oltean wrote: > > On Fri, Jan 15, 2021 at 03:02:46PM -0800, Jakub Kicinski wrote: > > > On Fri, 15 Jan 2021 13:52:57 +0100 Tobias Waldekranz wrote: > > > > The kernel test robot kindly poin

Re: [PATCH iproute2] iplink: work around rtattr length limits for IFLA_VFINFO_LIST

2021-01-15 Thread Jakub Kicinski
On Fri, 15 Jan 2021 14:59:50 -0800 Edwin Peer wrote: > The maximum possible length of an RTNL attribute is 64KB, but the > nested VFINFO list exceeds this for more than about 220 VFs (each VF > consumes approximately 300 bytes, depending on alignment and optional > fields). Exceeding the limit caus

[PATCH] net: phy: national: remove definition of DEBUG

2021-01-15 Thread trix
From: Tom Rix Defining DEBUG should only be done in development. So remove DEBUG. Signed-off-by: Tom Rix --- drivers/net/phy/national.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/phy/national.c b/drivers/net/phy/national.c index 5a8c8eb18582..46160baaafe3 100644 --- a/dri

Re: [PATCH v2] wireguard: netlink: add multicast notification for peer changes

2021-01-15 Thread Jason A. Donenfeld
Hey Linus, My email server has been firewalled from vger.kernel.org until today, so I didn't see the original until this v2 was sent today. My apologies. I'll review this first thing on Monday. Jason

Re: [PATCH v2 net-next 0/2] net: dsa: mv88e6xxx: LAG fixes

2021-01-15 Thread Jakub Kicinski
On Sat, 16 Jan 2021 01:24:35 +0200 Vladimir Oltean wrote: > On Fri, Jan 15, 2021 at 03:02:46PM -0800, Jakub Kicinski wrote: > > On Fri, 15 Jan 2021 13:52:57 +0100 Tobias Waldekranz wrote: > > > The kernel test robot kindly pointed out that Global 2 support in > > > mv88e6xxx is optional. > > > >

Re: [PATCH net-next v5 0/3] Arrow SpeedChips XRS700x DSA Driver

2021-01-15 Thread Jakub Kicinski
On Thu, 14 Jan 2021 13:57:31 -0600 George McCollister wrote: > This series adds a DSA driver for the Arrow SpeedChips XRS 7000 series > of HSR/PRP gigabit switch chips. > > The chips use Flexibilis IP. > More information can be found here: > https://www.flexibilis.com/products/speedchips-xrs7000/

Re: [PATCH bpf-next 1/4] bpf: enable task local storage for tracing programs

2021-01-15 Thread Song Liu
> On Jan 12, 2021, at 8:53 AM, KP Singh wrote: > > On Tue, Jan 12, 2021 at 5:32 PM Yonghong Song wrote: >> >> >> >> On 1/11/21 3:45 PM, Song Liu wrote: >>> >>> On Jan 11, 2021, at 1:58 PM, Martin Lau wrote: On Mon, Jan 11, 2021 at 10:35:43PM +0100, KP Singh wrote: >

  1   2   3   4   >