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

2021-01-17 Thread Magnus Karlsson
On Thu, Jan 14, 2021 at 3:34 PM 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 memory w

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

2021-01-17 Thread Dongseok Yi
On 2021-01-18 15:37, Steffen Klassert wrote: > On Fri, Jan 15, 2021 at 05:12:33PM +, Alexander Lobakin wrote: > > From: Dongseok Yi > > Date: Fri, 15 Jan 2021 22:20:35 +0900 > > > > > UDP/IP header of UDP GROed frag_skbs are not updated even after NAT > > > forwarding. Only the header of head_

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

2021-01-17 Thread Leon Romanovsky
On Sun, Jan 17, 2021 at 07:16:30PM -0800, Alexander Duyck wrote: > On Sat, Jan 16, 2021 at 12:20 AM Leon Romanovsky wrote: > > > > On Fri, Jan 15, 2021 at 05:48:59PM -0800, Alexander Duyck wrote: > > > On Fri, Jan 15, 2021 at 7:53 AM Leon Romanovsky wrote: > > > > > > > > On Fri, Jan 15, 2021 at

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

2021-01-17 Thread Jason Wang
On 2021/1/16 上午10:59, Xuan Zhuo wrote: 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 u

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

2021-01-17 Thread Steffen Klassert
On Fri, Jan 15, 2021 at 05:12:33PM +, Alexander Lobakin wrote: > From: Dongseok Yi > Date: Fri, 15 Jan 2021 22:20:35 +0900 > > > 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

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

2021-01-17 Thread Jason Wang
On 2021/1/16 上午10:59, Xuan Zhuo wrote: 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 patc

[PATCH net] tcp: Fix potential use-after-free due to double kfree().

2021-01-17 Thread Kuniyuki Iwashima
Receiving ACK with a valid SYN cookie, cookie_v4_check() allocates struct request_sock and then can allocate inet_rsk(req)->ireq_opt. After that, tcp_v4_syn_recv_sock() allocates struct sock and copies ireq_opt to inet_sk(sk)->inet_opt. Normally, tcp_v4_syn_recv_sock() inserts the full socket into

[PATCH] net: usb: qmi_wwan: added support for Thales Cinterion PLSx3 modem family

2021-01-17 Thread Giacinto Cifelli
Bus 003 Device 009: ID 1e2d:006f Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize064 idVe

[PATCH net-next] net/sched: cls_flower add CT_FLAGS_INVALID flag support

2021-01-17 Thread wenxu
From: wenxu This patch add the TCA_FLOWER_KEY_CT_FLAGS_INVALID flag to match the ct_state with invalid for conntrack. Signed-off-by: wenxu --- include/linux/skbuff.h | 4 ++-- include/net/sch_generic.h| 1 + include/uapi/linux/pkt_cls.h | 1 + net/core/dev.c | 2 ++

Re: [PATCH iproute2-next v2 0/7] dcb: Support APP, DCBX objects

2021-01-17 Thread David Ahern
On 1/1/21 5:03 PM, Petr Machata wrote: > Add support to the dcb tool for the following two DCB objects: > > - APP, which allows configuration of traffic prioritization rules based on > several possible packet headers. > > - DCBX, which is a 1-byte bitfield of flags that configure whether the DC

Re: [PATCH iproute2 1/2] vrf: print BPF log buffer if bpf_program_load fails

2021-01-17 Thread David Ahern
On 1/17/21 3:54 PM, Luca Boccassi wrote: > Necessary to understand what is going on when bpf_program_load fails > > Signed-off-by: Luca Boccassi > --- > ip/ipvrf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH iproute2 2/2] vrf: fix ip vrf exec with libbpf

2021-01-17 Thread David Ahern
On 1/17/21 3:54 PM, Luca Boccassi wrote: > The size of bpf_insn is passed to bpf_load_program instead of the number > of elements as it expects, so ip vrf exec fails with: > > $ sudo ip link add vrf-blue type vrf table 10 > $ sudo ip link set dev vrf-blue up > $ sudo ip/ip vrf exec vrf-blue ls > F

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

2021-01-17 Thread David Ahern
On 1/16/21 6:21 PM, Jakub Kicinski wrote: > > I wonder. There is something inherently risky about making > a precedent for user space depending on invalid kernel output. > > _If_ we want to fix the kernel, IMO we should only fix the kernel. > IMHO this is a kernel bug that should be fixed. An e

Re: [PATCH bpf 1/2] samples/bpf: Set flag __SANE_USERSPACE_TYPES__ for MIPS to fix build warnings

2021-01-17 Thread Tiezhu Yang
On 01/14/2021 01:12 AM, Yonghong Song wrote: On 1/13/21 2:57 AM, Tiezhu Yang wrote: MIPS needs __SANE_USERSPACE_TYPES__ before to select 'int-ll64.h' in arch/mips/include/uapi/asm/types.h and avoid compile warnings when printing __u64 with %llu, %llx or %lld. could you mention which command

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

2021-01-17 Thread Alexander Duyck
On Sat, Jan 16, 2021 at 12:20 AM Leon Romanovsky wrote: > > On Fri, Jan 15, 2021 at 05:48:59PM -0800, Alexander Duyck wrote: > > 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:5

Re: [RFC PATCH 0/7] Support for virtio-net hash reporting

2021-01-17 Thread Jason Wang
On 2021/1/17 下午3:57, Yuri Benditovich wrote: On Thu, Jan 14, 2021 at 5:39 AM Jason Wang wrote: On 2021/1/13 下午10:33, Willem de Bruijn wrote: On Tue, Jan 12, 2021 at 11:11 PM Jason Wang wrote: On 2021/1/13 上午7:47, Willem de Bruijn wrote: On Tue, Jan 12, 2021 at 3:29 PM Yuri Benditovich w

[PATCH v3 12/21] net: stmmac: dwmac-sun8i: Prepare for second EMAC clock register

2021-01-17 Thread Andre Przywara
The Allwinner H616 SoC has two EMAC controllers, with the second one being tied to the internal PHY, but also using a separate EMAC clock register. To tell the driver about which clock register to use, we add a parameter to our syscon phandle. The driver will use this value as an index into the re

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

2021-01-17 Thread Gary Lin
On Fri, Jan 15, 2021 at 08:04:06AM -0800, Alexei Starovoitov wrote: > On Fri, Jan 15, 2021 at 1:41 AM Gary Lin wrote: > > > > On Thu, Jan 14, 2021 at 10:37:33PM -0800, Alexei Starovoitov wrote: > > > On Thu, Jan 14, 2021 at 1:54 AM Gary Lin wrote: > > > > * pass to emit the final image.

RE: [PATCHv14 bpf-next 3/6] xdp: add a new helper for dev map multicast support

2021-01-17 Thread John Fastabend
Hangbin Liu wrote: > This patch is for xdp multicast support. which has been discussed > before[0], The goal is to be able to implement an OVS-like data plane in > XDP, i.e., a software switch that can forward XDP frames to multiple ports. > > To achieve this, an application needs to specify a gro

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

2021-01-17 Thread Dongseok Yi
On 2021-01-16 02:12, Alexander Lobakin wrote: > From: Dongseok Yi > Date: Fri, 15 Jan 2021 22:20:35 +0900 > > > 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

RE: [PATCHv14 bpf-next 1/6] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-01-17 Thread John Fastabend
Hangbin Liu wrote: > From: Jesper Dangaard Brouer > > This changes the devmap XDP program support to run the program when the > bulk queue is flushed instead of before the frame is enqueued. This has > a couple of benefits: > > - It "sorts" the packets by destination devmap entry, and then runs

[PATCH iproute2 2/2] vrf: fix ip vrf exec with libbpf

2021-01-17 Thread Luca Boccassi
The size of bpf_insn is passed to bpf_load_program instead of the number of elements as it expects, so ip vrf exec fails with: $ sudo ip link add vrf-blue type vrf table 10 $ sudo ip link set dev vrf-blue up $ sudo ip/ip vrf exec vrf-blue ls Failed to load BPF prog: 'Invalid argument' last insn is

[PATCH iproute2 1/2] vrf: print BPF log buffer if bpf_program_load fails

2021-01-17 Thread Luca Boccassi
Necessary to understand what is going on when bpf_program_load fails Signed-off-by: Luca Boccassi --- ip/ipvrf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ip/ipvrf.c b/ip/ipvrf.c index 42779e5c..91578031 100644 --- a/ip/ipvrf.c +++ b/ip/ipvrf.c @@ -278,8 +278,8 @@ s

[PATCH net v2] net: lapb: Add locking to the lapb module

2021-01-17 Thread Xie He
In the lapb module, the timers may run concurrently with other code in this module, and there is currently no locking to prevent the code from racing on "struct lapb_cb". This patch adds locking to prevent racing. 1. Add "spinlock_t lock" to "struct lapb_cb"; Add "spin_lock_bh" and "spin_unlock_bh

[PATCH v2 bpf-next 1/4] libbpf: add btf_has_size() and btf_int() inlines

2021-01-17 Thread Alan Maguire
BTF type data dumping will use them in later patches, and they are useful generally when handling BTF data. Signed-off-by: Alan Maguire --- tools/lib/bpf/btf.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tools/lib/bpf/btf.h b/tools/lib/bpf/btf.h index 1237bcd..0c48f2

[PATCH v2 bpf-next 3/4] libbpf: BTF dumper support for typed data

2021-01-17 Thread Alan Maguire
Add a BTF dumper for typed data, so that the user can dump a typed version of the data provided. The API is int btf_dump__emit_type_data(struct btf_dump *d, __u32 id, const struct btf_dump_emit_type_data_opts *opts, void *data); ...where

[PATCH v2 bpf-next 4/4] selftests/bpf: add dump type data tests to btf dump tests

2021-01-17 Thread Alan Maguire
Test various type data dumping operations by comparing expected format with the dumped string; an snprintf-style printf function is used to record the string dumped. Signed-off-by: Alan Maguire --- tools/testing/selftests/bpf/prog_tests/btf_dump.c | 233 ++ 1 file changed, 23

[PATCH v2 bpf-next 2/4] libbpf: make skip_mods_and_typedefs available internally in libbpf

2021-01-17 Thread Alan Maguire
btf_dump.c will need it for type-based data display. Signed-off-by: Alan Maguire --- tools/lib/bpf/libbpf.c | 4 +--- tools/lib/bpf/libbpf_internal.h | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 2abbc38..4ef

[PATCH v2 bpf-next 0/4] libbpf: BTF dumper support for typed data

2021-01-17 Thread Alan Maguire
Add a libbpf dumper function that supports dumping a representation of data passed in using the BTF id associated with the data in a manner similar to the bpf_snprintf_btf helper. Default output format is identical to that dumped by bpf_snprintf_btf(), for example a "struct sk_buff" representation

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

2021-01-17 Thread John Fastabend
Xuan Zhuo wrote: > 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

Re: [PATCH v2 net-next 1/1] net: dsa: hellcreek: Add TAPRIO offloading support

2021-01-17 Thread Vladimir Oltean
On Sat, Jan 16, 2021 at 01:49:22PM +0100, Kurt Kanzenbach wrote: > The switch has support for the 802.1Qbv Time Aware Shaper (TAS). Traffic > schedules may be configured individually on each front port. Each port has > eight > egress queues. The traffic is mapped to a traffic class respectively vi

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

2021-01-17 Thread Vladimir Oltean
Hi Rasmus, On Sat, Jan 16, 2021 at 03:39:34AM +0100, Rasmus Villemoes wrote: > 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

Re: [PATCH net-next v5] GTP: add support for flow based tunneling API

2021-01-17 Thread Pravin Shelar
On Sun, Jan 17, 2021 at 7:31 AM Harald Welte wrote: > > Hi Jonas, Jakub and others, > > On Sun, Jan 17, 2021 at 02:23:52PM +0100, Jonas Bonn wrote: > > This patch hasn't received any ACK's from either the maintainers or anyone > > else providing review. The following issues remain unaddressed aft

Re: [PATCH net-next v5] GTP: add support for flow based tunneling API

2021-01-17 Thread Pravin Shelar
On Sun, Jan 17, 2021 at 5:25 AM Jonas Bonn wrote: > > Hi Jakub, > > On 17/01/2021 01:46, Jakub Kicinski wrote: > > On Sat, 9 Jan 2021 23:00:21 -0800 Pravin B Shelar wrote: > >> Following patch add support for flow based tunneling API > >> to send and recv GTP tunnel packet over tunnel metadata AP

Re: [PATCH net-next v5] GTP: add support for flow based tunneling API

2021-01-17 Thread Pravin Shelar
On Sun, Jan 17, 2021 at 5:46 AM Jonas Bonn wrote: > > Hi Pravin, > > Again, this patch is too big and contains too many disparate changes to > allow for easy review. Please break this up into a series of logical > changes for easier review. > > On 10/01/2021 08:00, Pravin B Shelar wrote: > > Foll

Re: [PATCH] rtnetlink.7: Remove IPv4 from description

2021-01-17 Thread Michael Kerrisk (man-pages)
Hi Alex and Pali On 1/16/21 4:04 PM, Alejandro Colomar wrote: > From: Pali Rohár > > rtnetlink is not only used for IPv4 > > Signed-off-by: Pali Rohár > Signed-off-by: Alejandro Colomar Thanks. Patch applied. Cheers, Michael > --- > man7/rtnetlink.7 | 2 +- > 1 file changed, 1 insertion(

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

2021-01-17 Thread Vladimir Oltean
Hi Tobias, On Sat, Jan 16, 2021 at 02:25:10AM +0100, Tobias Waldekranz wrote: > 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

[PATCH] net: hns: fix variable used when DEBUG is defined

2021-01-17 Thread trix
From: Tom Rix When DEBUG is defined this error occurs drivers/net/ethernet/hisilicon/hns/hns_enet.c:1505:36: error: ‘struct net_device’ has no member named ‘ae_handle’; did you mean ‘rx_handler’? assert(skb->queue_mapping < ndev->ae_handle->q_num); ^

Re: [PATCH] arcnet: fix macro name when DEBUG is defined

2021-01-17 Thread Joe Perches
On Sun, 2021-01-17 at 10:15 -0800, t...@redhat.com wrote: > From: Tom Rix > > When DEBUG is defined this error occurs > > drivers/net/arcnet/com20020_cs.c:70:15: error: ‘com20020_REG_W_ADDR_HI’ >   undeclared (first use in this function); >   did you mean ‘COM20020_REG_W_ADDR_HI’? >    ioadd

[PATCH] arcnet: fix macro name when DEBUG is defined

2021-01-17 Thread trix
From: Tom Rix When DEBUG is defined this error occurs drivers/net/arcnet/com20020_cs.c:70:15: error: ‘com20020_REG_W_ADDR_HI’ undeclared (first use in this function); did you mean ‘COM20020_REG_W_ADDR_HI’? ioaddr, com20020_REG_W_ADDR_HI); ^~ >From r

How to port rtl8xxxu to new device...?

2021-01-17 Thread Alex Dewar
Hi all, I'm currently trying to port the rtl8xxxu driver to RTL8822u chips (one of which I own), but I'm finding it hard to figure out where to start and I figured that some wiser minds could maybe help steer me in the right direction. I've managed to get as far as reading and writing to various

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

2021-01-17 Thread Andrea Parri
On Sun, Jan 17, 2021 at 03:10:32PM +, Wei Liu wrote: > On Sat, Jan 16, 2021 at 02:02:01PM +0100, Andrea Parri wrote: > > On Fri, Jan 15, 2021 at 08:30:22PM -0800, Jakub Kicinski wrote: > > > On Thu, 14 Jan 2021 21:26:28 +0100 Andrea Parri (Microsoft) wrote: > > > > For additional robustness in

Re: [PATCH 17/18] net: iosm: readme file

2021-01-17 Thread Bjørn Mork
Sorry about being much too late into this discussion. I'm not having the bandwidth to read netdev anymore, and just stumbled across this now. Andrew Lunn writes: > So, this is what all the Ethernet nonsense is all about. You have a > session ID you need to somehow represent to user space. And y

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

2021-01-17 Thread Vladimir Oltean
On Sat, Jan 16, 2021 at 02:25:09AM +0100, Tobias Waldekranz wrote: > 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 > --- Reviewed-by: Vladi

Re: [EXT] Re: [PATCH net-next 3/3] qede: set default per queue rx/tx usecs coalescing parameters

2021-01-17 Thread Igor Russkikh
>> Here we do the initialization of coalescing values on load. >> Although the default device values are the same - explicit >> config is better visible. > > Can you also make the driver store the settings across ifdown / ifup > and allow the settings to be checked while the interface is down,

Re: [EXT] Re: [PATCH net-next 1/3] qede: add netpoll support for qede driver

2021-01-17 Thread Igor Russkikh
> On Fri, 15 Jan 2021 01:06:08 -0800 Bhaskar Upadhaya wrote: >> Add net poll controller support to transmit kernel printks >> over UDP > > Why do you need this patch? Couple years back netpoll was taught > how to pull NAPIs by itself, and all you do is schedule NAPIs. > > All the driver should

Re: [PATCH net-next 7/7] net: ipa: allow arbitrary number of interconnects

2021-01-17 Thread Alex Elder
On 1/16/21 9:12 PM, Jakub Kicinski wrote: On Fri, 15 Jan 2021 06:50:50 -0600 Alex Elder wrote: Currently we assume that the IPA hardware has exactly three interconnects. But that won't be guaranteed for all platforms, so allow any number of interconnects to be specified in the configuration dat

Re: [PATCH net-next v5] GTP: add support for flow based tunneling API

2021-01-17 Thread Harald Welte
Hi Jonas, Jakub and others, On Sun, Jan 17, 2021 at 02:23:52PM +0100, Jonas Bonn wrote: > This patch hasn't received any ACK's from either the maintainers or anyone > else providing review. The following issues remain unaddressed after > review: [...] Full ACK from my point of view. The patch

Re: [Patch net-next] net_sched: fix RTNL deadlock again caused by request_module()

2021-01-17 Thread Jamal Hadi Salim
On 2021-01-16 7:56 p.m., Cong Wang wrote: From: Cong Wang tcf_action_init_1() loads tc action modules automatically with request_module() after parsing the tc action names, and it drops RTNL lock and re-holds it before and after request_module(). This causes a lot of troubles, as discovered by

[PATCH net] net: Disable NETIF_F_HW_TLS_RX when RXCSUM is disabled

2021-01-17 Thread Tariq Toukan
With NETIF_F_HW_TLS_RX packets are decrypted in HW. This cannot be logically done when RXCSUM offload is off. Fixes: 14136564c8ee ("net: Add TLS RX offload feature") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- Documentation/networking/tls-offload.rst | 3 +++ net/core/dev.c

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

2021-01-17 Thread Wei Liu
On Sat, Jan 16, 2021 at 02:02:01PM +0100, Andrea Parri wrote: > On Fri, Jan 15, 2021 at 08:30:22PM -0800, Jakub Kicinski wrote: > > 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

[PATCH net-next V3 1/8] net: netdevice: Add operation ndo_sk_get_lower_dev

2021-01-17 Thread Tariq Toukan
ndo_sk_get_lower_dev returns the lower netdev that corresponds to a given socket. Additionally, we implement a helper netdev_sk_get_lowest_dev() to get the lowest one in chain. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- include/linux/netdevice.h | 4 net/core/dev.c

[PATCH net-next V3 0/8] TLS device offload for Bond

2021-01-17 Thread Tariq Toukan
Hi, This series opens TX and RX TLS device offload for bond interfaces. This allows bond interfaces to benefit from capable lower devices. We add a new ndo_sk_get_lower_dev() to be used to get the lower dev that corresponds to a given socket. The TLS module uses it to interact directly with the l

[PATCH net-next V3 7/8] net/tls: Device offload to use lowest netdevice in chain

2021-01-17 Thread Tariq Toukan
Do not call the tls_dev_ops of upper devices. Instead, ask them for the proper lowest device and communicate with it directly. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- net/tls/tls_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tls/tls_device.

[PATCH net-next V3 6/8] net/bonding: Declare TLS RX device offload support

2021-01-17 Thread Tariq Toukan
Following the description in previous patch (for TX): As the bond interface is being bypassed by the TLS module, interacting directly against the lower devs, there is no way for the bond interface to disable its device offload capabilities, as long as the mode/policy config allows it. Hence, the fe

[PATCH net-next V3 4/8] net/bonding: Take update_features call out of XFRM funciton

2021-01-17 Thread Tariq Toukan
In preparation for more cases that call netdev_update_features(). While here, move the features logic to the stage where struct bond is already updated, and pass it as the only parameter to function bond_set_xfrm_features(). Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- drivers/n

[PATCH net-next V3 2/8] net/bonding: Take IP hash logic into a helper

2021-01-17 Thread Tariq Toukan
Hash logic on L3 will be used in a downstream patch for one more use case. Take it to a function for a better code reuse. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny --- drivers/net/bonding/bond_main.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --g

[PATCH net-next V3 3/8] net/bonding: Implement ndo_sk_get_lower_dev

2021-01-17 Thread Tariq Toukan
Add ndo_sk_get_lower_dev() implementation for bond interfaces. Support only for the cases where the socket's and SKBs' hash yields identical value for the whole connection lifetime. Here we restrict it to L3+4 sockets only, with xmit_hash_policy==LAYER34 and bond modes xor/802.3ad. Signed-off-by

[PATCH net-next V3 5/8] net/bonding: Implement TLS TX device offload

2021-01-17 Thread Tariq Toukan
Implement TLS TX device offload for bonding interfaces. This allows kTLS sockets running on a bond to benefit from the device offload on capable lower devices. To allow a simple and fast maintenance of the TLS context in SW and lower devices, we bind the TLS socket to a specific lower dev. To achi

[PATCH net-next V3 8/8] net/tls: Except bond interface from some TLS checks

2021-01-17 Thread Tariq Toukan
In the tls_dev_event handler, ignore tlsdev_ops requirement for bond interfaces, they do not exist as the interaction is done directly with the lower device. Also, make the validate function pass when it's called with the upper bond interface. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pisme

Re: [PATCH net-next 1/1] stmmac: intel: change all EHL/TGL to auto detect phy addr

2021-01-17 Thread Greg Kroah-Hartman
On Sat, Jan 16, 2021 at 04:59:14PM -0800, Jakub Kicinski wrote: > On Sat, 16 Jan 2021 10:12:21 +0100 Jan Kiszka wrote: > > On 06.11.20 10:43, Wong Vee Khee wrote: > > > From: Voon Weifeng > > > > > > Set all EHL/TGL phy_addr to -1 so that the driver will automatically > > > detect it at run-time

Re: [PATCH net-next v5] GTP: add support for flow based tunneling API

2021-01-17 Thread Jonas Bonn
Hi Pravin, Again, this patch is too big and contains too many disparate changes to allow for easy review. Please break this up into a series of logical changes for easier review. On 10/01/2021 08:00, Pravin B Shelar wrote: Following patch add support for flow based tunneling API to send and

[PATCH v1] ipv4: add iPv4_is_multicast() check in ip_mc_leave_group().

2021-01-17 Thread wangyingjie55
From: Yingjie Wang There is no iPv4_is_multicast() check added to ip_mc_leave_group() to check if imr->imr_multiaddr.s_addr is a multicast address. If not a multicast address, it may result in an error. In some cases, the callers of ip_mc_leave_group() don't check whether it is multicast address

Re: [PATCH net-next v5] GTP: add support for flow based tunneling API

2021-01-17 Thread Jonas Bonn
Hi Jakub, On 17/01/2021 01:46, Jakub Kicinski wrote: On Sat, 9 Jan 2021 23:00:21 -0800 Pravin B Shelar wrote: Following patch add support for flow based tunneling API to send and recv GTP tunnel packet over tunnel metadata API. This would allow this device integration with OVS or eBPF using fl

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

2021-01-17 Thread Vladimir Oltean
On Sat, Jan 16, 2021 at 05:26:23PM -0800, Jakub Kicinski wrote: > On Sat, 16 Jan 2021 02:59:30 +0200 Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > Commit 7afb3e575e5a ("net: mscc: ocelot: don't handle netdev events for > > other netdevs") was too aggressive, and it made ocelot_netdevice

Re: [PATCH net-next V2 5/8] net/bonding: Implement TLS TX device offload

2021-01-17 Thread Tariq Toukan
On 1/17/2021 4:54 AM, Jakub Kicinski wrote: On Thu, 14 Jan 2021 20:01:32 +0200 Tariq Toukan wrote: As the bond interface is being bypassed by the TLS module, interacting directly against the slaves, there is no way for the bond interface to disable its device offload capabilities, as long as

Re: [PATCH net-next V2 1/8] net: netdevice: Add operation ndo_sk_get_slave

2021-01-17 Thread Tariq Toukan
On 1/17/2021 4:51 AM, Jakub Kicinski wrote: On Thu, 14 Jan 2021 20:01:28 +0200 Tariq Toukan wrote: ndo_sk_get_slave returns the slave that corresponds to a given socket. Additionally, we implement a helper netdev_sk_get_lowest_dev() to get the lowest slave netdevice. Please don't add new us

[PATCH net-next] net: core: Namespace-ify sysctl_rmem_max and sysctl_wmem_max

2021-01-17 Thread menglong8 . dong
From: Menglong Dong For now, sysctl_wmem_max and sysctl_rmem_max are globally unified. It's not convenient in some case. For example, when we use docker and try to control the default udp socket receive buffer for each container. For that reason, make sysctl_wmem_max and sysctl_rmem_max per-name

[PATCH net-next] net: core: Namespace-ify sysctl_wmem_default and sysctl_rmem_default

2021-01-17 Thread menglong8 . dong
From: Menglong Dong For now, sysctl_wmem_default and sysctl_rmem_default are globally unified. It's not convenient in some case. For example, when we use docker and try to control the default udp socket receive buffer for each container. For that reason, make sysctl_wmem_default and sysctl_rmem_

Re: [PATCH net-next V2] net: ks8851: Fix mixed module/builtin build

2021-01-17 Thread Arnd Bergmann
On Sat, Jan 16, 2021 at 10:41 PM Heiner Kallweit wrote: > >> > >> It seems unlikely that a system uses both, the parallel *and* the SPI > >> variant of the ks8851. So the additional memory necessary because of > >> code duplication wouldn't matter in practice. > > > > I have a board with both opt

ibmvnic: Race condition in remove callback

2021-01-17 Thread Uwe Kleine-König
Hello, while working on some cleanup I stumbled over a problem in the ibmvnic's remove callback. Since commit 7d7195a026ba ("ibmvnic: Do not process device remove during device reset") there is the following code in the remove callback: static int ibmvnic_remove(struct vio_dev

[PATCH net-next] net: core: init every ctl_table in netns_core_table

2021-01-17 Thread menglong8 . dong
From: Menglong Dong For now, there is only one element in netns_core_table, and it is inited directly in sysctl_core_net_init. To make it more flexible, we can init every element at once, just like what ipv4_sysctl_init_net() did. Signed-off-by: Menglong Dong --- net/core/sysctl_net_core.c | 1

[PATCH rdma-rc] Revert "RDMA/mlx5: Fix devlink deadlock on net namespace deletion"

2021-01-17 Thread Leon Romanovsky
From: Parav Pandit This reverts commit fbdd0049d98d44914fc57d4b91f867f4996c787b. Due to commit in fixes tag, netdevice events were received only in one net namespace of mlx5_core_dev. Due to this when netdevice events arrive in net namespace other than net namespace of mlx5_core_dev, they are mi

[PATCH net-next 0/5] mlxsw: Add support for RED qevent "mark"

2021-01-17 Thread Ido Schimmel
From: Ido Schimmel Petr says: The RED qdisc currently supports two qevents: "early_drop" and "mark". The filters added to the block bound to the "early_drop" qevent are executed on packets for which the RED algorithm decides that they should be early-dropped. The "mark" filters are similarly exe

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

2021-01-17 Thread Boris Pismenny
On 16/01/2021 6:57, David Ahern wrote: > 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/mell

[PATCH net] net: lapb: Add locking to the lapb module

2021-01-17 Thread Xie He
In the lapb module, the timers may run concurrently with other code in this module, and there is currently no locking to prevent the code from racing on "struct lapb_cb". This patch adds locking to prevent racing. 1. Add "spinlock_t lock" to "struct lapb_cb"; Add "spin_lock_bh" and "spin_unlock_bh

[PATCH mlx5-next v3 3/5] net/mlx5: Add dynamic MSI-X capabilities bits

2021-01-17 Thread Leon Romanovsky
From: Leon Romanovsky These new fields declare the number of MSI-X vectors that is possible to allocate on the VF through PF configuration. Value must be in range defined by min_dynamic_vf_msix_table_size and max_dynamic_vf_msix_table_size. The driver should continue to query its MSI-X table th

[PATCH net-next 5/5] selftests: mlxsw: RED: Add selftests for the mark qevent

2021-01-17 Thread Ido Schimmel
From: Petr Machata Add do_mark_test(), which is to do_ecn_test() like do_drop_test() is to do_red_test(): meant to test that actions on the RED mark qevent block are offloaded, and executed on ECN-marked packets. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- .../drivers/net/mlxs

[PATCH mlx5-next v3 0/5] Dynamically assign MSI-X vectors count

2021-01-17 Thread Leon Romanovsky
From: Leon Romanovsky Changelog v3: * Renamed pci_set_msix_vec_count to be pci_vf_set_msix_vec_count. * Added VF msix_cap check to hide sysfs entry if device doesn't support msix. * Changed "-" to be ":" in the mlx5 patch to silence CI warnings about missing kdoc description. * Split diffe

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

2021-01-17 Thread Leon Romanovsky
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 number of vectors based on the administrator knowledge of targeted VM.

[PATCH mlx5-next v3 4/5] net/mlx5: Dynamically assign MSI-X vectors count

2021-01-17 Thread Leon Romanovsky
From: Leon Romanovsky The number of MSI-X vectors is PCI property visible through lspci, that field is read-only and configured by the device. The static assignment of an amount of MSI-X vectors doesn't allow utilize the newly created VF because it is not known to the device the future load and c

[PATCH] net/qla3xxx: switch from 'pci_' to 'dma_' API

2021-01-17 Thread Christophe JAILLET
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_ with a correct flag. It has been compile tested. When memory is allocated in 'ql_alloc_net_req_rsp_queues()' GFP_KERNEL can be us

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

2021-01-17 Thread Leon Romanovsky
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 file that returns a total number of possible to configure MSI-X vectors.

[PATCH mlx5-next v3 5/5] net/mlx5: Allow to the users to configure number of MSI-X vectors

2021-01-17 Thread Leon Romanovsky
From: Leon Romanovsky Implement ability to configure MSI-X for the SR-IOV VFs. Signed-off-by: Leon Romanovsky --- .../net/ethernet/mellanox/mlx5/core/main.c| 1 + .../ethernet/mellanox/mlx5/core/mlx5_core.h | 1 + .../net/ethernet/mellanox/mlx5/core/sriov.c | 38 +++

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

2021-01-17 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 --- v4: - remove unnecessary brackets. v3: - fix compile warning in br_vlan_set_proto() by casting 'val' to be16. v2: - use eth_type_vlan() in br_validate() and __br_v

[PATCH net-next 3/5] mlxsw: spectrum_qdisc: Offload RED qevent mark

2021-01-17 Thread Ido Schimmel
From: Petr Machata The RED "mark" qevent can be offloaded under the same exact conditions as the RED "tail_drop" qevent. Therefore recognize its binding type in the TC_SETUP_BLOCK handler and translate to the right SPAN trigger. The corresponding hardware trigger, MLXSW_SP_SPAN_TRIGGER_ECN, is c

[PATCH net-next 1/5] devlink: Add ecn_mark trap

2021-01-17 Thread Ido Schimmel
From: Petr Machata Add the packet trap that can report packets that were ECN marked due to RED AQM. Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- Documentation/networking/devlink/devlink-trap.rst | 4 include/net/devlink.h

[PATCH net-next 2/5] mlxsw: spectrum_trap: Add ecn_mark trap

2021-01-17 Thread Ido Schimmel
From: Petr Machata Register with devlink a new buffer drop trap, ecn_mark. Since Spectrum-1 does not support the ecn_mark trap, do it only for Spectrum-2 and above. Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectru

[PATCH net-next 4/5] selftests: mlxsw: sch_red_core: Drop two unused variables

2021-01-17 Thread Ido Schimmel
From: Petr Machata These variables are cut'n'pasted from other functions in the file and not actually used. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/

Re: [RFC PATCH 0/7] Support for virtio-net hash reporting

2021-01-17 Thread Yuri Benditovich
On Thu, Jan 14, 2021 at 5:39 AM Jason Wang wrote: > > > On 2021/1/13 下午10:33, Willem de Bruijn wrote: > > On Tue, Jan 12, 2021 at 11:11 PM Jason Wang wrote: > >> > >> On 2021/1/13 上午7:47, Willem de Bruijn wrote: > >>> On Tue, Jan 12, 2021 at 3:29 PM Yuri Benditovich > >>> wrote: > On Tue, J