Re: [PATCH v2 net] net: dsa: fix switchdev objects on bridge master mistakenly being applied on ports

2021-03-08 Thread Tobias Waldekranz
On Sun, Mar 07, 2021 at 12:21, Vladimir Oltean wrote: > From: Vladimir Oltean > > Tobias reports that after the blamed patch, VLAN objects being added to > a bridge device are being added to all slave ports instead (swp2, swp3). > > ip link add br0 type bridge vlan_filtering 1 > ip link set swp2

Re: [PATCH v2] net: mac802154: Fix general protection fault

2021-03-08 Thread Stefan Schmidt
Hello. On 04.03.21 16:21, Pavel Skripkin wrote: syzbot found general protection fault in crypto_destroy_tfm()[1]. It was caused by wrong clean up loop in llsec_key_alloc(). If one of the tfm array members is in IS_ERR() range it will cause general protection fault in clean up function [1]. Call

Re: [syzbot] WARNING: ODEBUG bug in net_dm_cmd_trace

2021-03-08 Thread Ido Schimmel
On Sun, Mar 07, 2021 at 06:30:27PM -0800, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:d310ec03 Merge tag 'perf-core-2021-02-17' of git://git.ker.. > git tree: net-next > console output: https://syzkaller.appspot.com/x/log.txt?x=108adb32d0 > kernel

Re: seqlock lockdep false positives?

2021-03-08 Thread Peter Zijlstra
On Sun, Mar 07, 2021 at 10:20:08AM +0100, Ahmed S. Darwish wrote: > Hi Jakub, > > On Wed, Mar 03, 2021 at 04:40:35PM -0800, Jakub Kicinski wrote: > > Hi Ahmed! > > > > Erhard is reporting a lockdep splat in > > drivers/net/ethernet/realtek/8139too.c > > > > https://bugzilla.kernel.org/show_bug.cg

[PATCH V2 0/4] vDPA/ifcvf: enables Intel C5000X-PL virtio-net

2021-03-08 Thread Zhu Lingshan
This series enabled Intel FGPA SmartNIC C5000X-PL virtio-net for vDPA changes from V1: remove version number string(Leon) add new device ids and remove original device ids in separate patches(Jason) Zhu Lingshan (4): vDPA/ifcvf: get_vendor_id returns a device specific vendor id vDPA/ifcvf: en

[PATCH V2 1/4] vDPA/ifcvf: get_vendor_id returns a device specific vendor id

2021-03-08 Thread Zhu Lingshan
In this commit, ifcvf_get_vendor_id() will return a device specific vendor id of the probed pci device than a hard code. Signed-off-by: Zhu Lingshan --- drivers/vdpa/ifcvf/ifcvf_main.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drive

[PATCH V2 2/4] vDPA/ifcvf: enable Intel C5000X-PL virtio-net for vDPA

2021-03-08 Thread Zhu Lingshan
This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-net for vDPA Signed-off-by: Zhu Lingshan --- drivers/vdpa/ifcvf/ifcvf_base.h | 5 + drivers/vdpa/ifcvf/ifcvf_main.c | 5 + 2 files changed, 10 insertions(+) diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_b

[PATCH V2 3/4] vDPA/ifcvf: rename original IFCVF dev ids to N3000 ids

2021-03-08 Thread Zhu Lingshan
IFCVF driver probes multiple types of devices now, to distinguish the original device driven by IFCVF from others, it is renamed as "N3000". Signed-off-by: Zhu Lingshan --- drivers/vdpa/ifcvf/ifcvf_base.h | 8 drivers/vdpa/ifcvf/ifcvf_main.c | 8 2 files changed, 8 insertions(+

[PATCH V2 4/4] vDPA/ifcvf: remove the version number string

2021-03-08 Thread Zhu Lingshan
This commit removes the version number string, using kernel version is enough. Signed-off-by: Zhu Lingshan --- drivers/vdpa/ifcvf/ifcvf_main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index fd5befc5cbcc..c34e1eec6b6c 1

Re: [RFC PATCH V2 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-08 Thread Moshe Shemesh
On 3/5/2021 2:50 AM, Don Bollinger wrote: On Thu, Mar 04, 2021 at 10:57AM-0800, Moshe Shemesh wrote: From: Vladyslav Tarasiuk Define get_module_eeprom_data_by_page() ethtool callback and implement netlink infrastructure. get_module_eeprom_data_by_page() allows network drivers to dump a par

[PATCH v7 net-next] virtio-net: support XDP when not more queues

2021-03-08 Thread Xuan Zhuo
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/XDP_REDIRECT, then xdp cannot be loaded to work, even xdp does not use the XDP_TX/XDP_REDIRECT. Th

Re: [RFC PATCH V2 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-08 Thread Moshe Shemesh
On 3/5/2021 3:58 AM, Andrew Lunn wrote: +/* MODULE EEPROM DATA */ + +enum { + ETHTOOL_A_EEPROM_DATA_UNSPEC, + ETHTOOL_A_EEPROM_DATA_HEADER, + + ETHTOOL_A_EEPROM_DATA_OFFSET, + ETHTOOL_A_EEPROM_DATA_LENGTH, + ETHTOOL_A_EEPROM_DATA_PAGE, + ETHTOOL_A_EEPROM_DATA_BANK, +

[PATCH net] mptcp: fix length of ADD_ADDR with port sub-option

2021-03-08 Thread Davide Caratti
in current Linux, MPTCP peers advertising endpoints with port numbers use a sub-option length that wrongly accounts for the trailing TCP NOP. Also, receivers will only process incoming ADD_ADDR with port having such wrong sub-option length. Fix this, making ADD_ADDR compliant to RFC8684 §3.4.1. th

Re: [RFC PATCH V2 net-next 5/5] ethtool: Add fallback to get_module_eeprom from netlink command

2021-03-08 Thread Moshe Shemesh
On 3/5/2021 2:50 AM, Don Bollinger wrote: On Thu, Mar 04, 2021 at 10:57AM-0800, Moshe Shemesh wrote: From: Vladyslav Tarasiuk In case netlink get_module_eeprom_data_by_page() callback is not implemented by the driver, try to call old get_module_info() and get_module_eeprom() pair. Recalcula

[PATCH] net: qrtr: fix error return code of qrtr_sendmsg()

2021-03-08 Thread Jia-Ju Bai
When sock_alloc_send_skb() returns NULL to skb, no error return code of qrtr_sendmsg() is assigned. To fix this bug, rc is assigned with -ENOMEM in this case. Fixes: 194ccc88297a ("net: qrtr: Support decoding incoming v2 packets") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- net/qrtr/q

[PATCH] net: ieee802154: fix error return code of raw_sendmsg()

2021-03-08 Thread Jia-Ju Bai
When sock_alloc_send_skb() returns NULL to skb, no error return code of raw_sendmsg() is assigned. To fix this bug, err is assigned with -ENOMEM in this case. Fixes: 78f821b64826 ("ieee802154: socket: put handling into one file") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- net/ieee802

[PATCH] net: ieee802154: fix error return code of dgram_sendmsg()

2021-03-08 Thread Jia-Ju Bai
When sock_alloc_send_skb() returns NULL to skb, no error return code of dgram_sendmsg() is assigned. To fix this bug, err is assigned with -ENOMEM in this case. Fixes: 78f821b64826 ("ieee802154: socket: put handling into one file") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai --- net/ieee8

RE: [PATCH net-next v2 5/6] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum trailer

2021-03-08 Thread David Laight
From: Alex Elder > Sent: 06 March 2021 03:16 > > Replace the use of C bit-fields in the rmnet_map_dl_csum_trailer > structure with a single one-byte field, using constant field masks > to encode or get at embedded values. > > Signed-off-by: Alex Elder > Reviewed-by: Bjorn Andersson > --- > ...

Re: [PATCH] net: ieee802154: fix error return code of dgram_sendmsg()

2021-03-08 Thread Heiner Kallweit
On 08.03.2021 10:31, Jia-Ju Bai wrote: > When sock_alloc_send_skb() returns NULL to skb, no error return code of > dgram_sendmsg() is assigned. > To fix this bug, err is assigned with -ENOMEM in this case. > Please stop sending such nonsense. Basically all such patches you sent so far are false p

RE: [PATCH net-next v2 6/6] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum header

2021-03-08 Thread David Laight
From: Alex Elder > Sent: 06 March 2021 03:16 > > Replace the use of C bit-fields in the rmnet_map_ul_csum_header > structure with a single two-byte (big endian) structure member, > and use field masks to encode or get values within it. > > Previously rmnet_map_ipv4_ul_csum_header() would update v

[PATCH v2 2/2] net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0

2021-03-08 Thread Balazs Nemeth
A packet with skb_inner_network_header(skb) == skb_network_header(skb) and ETH_P_MPLS_UC will prevent mpls_gso_segment from pulling any headers from the packet. Subsequently, the call to skb_mac_gso_segment will again call mpls_gso_segment with the same packet leading to an infinite loop. Signed-o

[PATCH v2 1/2] net: check if protocol extracted by virtio_net_hdr_set_proto is correct

2021-03-08 Thread Balazs Nemeth
For gso packets, virtio_net_hdr_set_proto sets the protocol (if it isn't set) based on the type in the virtio net hdr, but the skb could contain anything since it could come from packet_snd through a raw socket. If there is a mismatch between what virtio_net_hdr_set_proto sets and the actual protoc

[PATCH v2 0/2] net: prevent infinite loop caused by incorrect proto from virtio_net_hdr_set_proto

2021-03-08 Thread Balazs Nemeth
Here is v2 of the patches that prevent an infinite loop for gso packets with a protocol from virtio net hdr that doesn't match the protocol in the packet. Note that packets coming from a device without header_ops->parse_protocol being implemented will not be caught by the check in virtio_net_hdr_to

Re: [PATCHv2 bpf-next] selftests/bpf: Fix test_attach_probe for powerpc uprobes

2021-03-08 Thread Naveen N . Rao
On 2021/03/05 02:40PM, Jiri Olsa wrote: > When testing uprobes we the test gets GEP (Global Entry Point) > address from kallsyms, but then the function is called locally > so the uprobe is not triggered. > > Fixing this by adjusting the address to LEP (Local Entry Point) > for powerpc arch plus in

[PATCH v3 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-03-08 Thread Lorenzo Bianconi
We want to change the current ndo_xdp_xmit drop semantics because it will allow us to implement better queue overflow handling. This is working towards the larger goal of a XDP TX queue-hook. Move XDP_REDIRECT error path handling from each XDP ethernet driver to devmap code. According to the new AP

[PATCH bpf-next v6 0/2] Optimize bpf_redirect_map()/xdp_do_redirect()

2021-03-08 Thread Björn Töpel
Hi XDP-folks, This two patch series contain two optimizations for the bpf_redirect_map() helper and the xdp_do_redirect() function. The bpf_redirect_map() optimization is about avoiding the map lookup dispatching. Instead of having a switch-statement and selecting the correct lookup function, we

[PATCH bpf-next v6 1/2] bpf, xdp: make bpf_redirect_map() a map operation

2021-03-08 Thread Björn Töpel
From: Björn Töpel Currently the bpf_redirect_map() implementation dispatches to the correct map-lookup function via a switch-statement. To avoid the dispatching, this change adds bpf_redirect_map() as a map operation. Each map provides its bpf_redirect_map() version, and correct function is autom

[PATCH bpf-next v6 2/2] bpf, xdp: restructure redirect actions

2021-03-08 Thread Björn Töpel
From: Björn Töpel The XDP_REDIRECT implementations for maps and non-maps are fairly similar, but obviously need to take different code paths depending on if the target is using a map or not. Today, the redirect targets for XDP either uses a map, or is based on ifindex. Here, the map type and id

Re: [PATCH iproute2] ip: xfrm: add NUL character to security context name before printing

2021-03-08 Thread Sabrina Dubroca
Hi Stephen/David, 2021-02-16, 17:50:58 +0100, Sabrina Dubroca wrote: > Security context names are not guaranteed to be NUL-terminated by the > kernel, so we can't just print them using %s directly. The length of > the string is capped by the size of the netlink attribute (u16), so it > will always

Re: [PATCH] net: ieee802154: fix error return code of dgram_sendmsg()

2021-03-08 Thread Jia-Ju Bai
On 2021/3/8 18:19, Heiner Kallweit wrote: On 08.03.2021 10:31, Jia-Ju Bai wrote: When sock_alloc_send_skb() returns NULL to skb, no error return code of dgram_sendmsg() is assigned. To fix this bug, err is assigned with -ENOMEM in this case. Please stop sending such nonsense. Basically all

RE: stmmac driver timeout issue

2021-03-08 Thread Joakim Zhang
Hi Florian, Andrew, Thanks for your help, after debug, It seems related to PHY(RTL8211FDI). It stop output RXC clock for dozens to hundreds milliseconds during auto-negotiation, and there is no such issue with AR8031. When do ifup/ifdown test or system suspend/resume test, it will suspend then

[PATCH devicetree] arm64: dts: ls1028a: set up the real link speed for ENETC port 2

2021-03-08 Thread Vladimir Oltean
From: Vladimir Oltean In NXP LS1028A there is a MAC-to-MAC internal link between enetc_port2 and mscc_felix_port4. This link operates at 2.5Gbps and is described as such for the mscc_felix_port4 node. The reason for the discrepancy is a limitation in the PHY library support for fixed-link nodes.

Re: Query on new ethtool RSS hashing options

2021-03-08 Thread Sunil Kovvuri
On Sat, Mar 6, 2021 at 8:02 PM Andrew Lunn wrote: > > On Sat, Mar 06, 2021 at 06:04:14PM +0530, Sunil Kovvuri wrote: > > On Sat, Mar 6, 2021 at 5:47 AM Andrew Lunn wrote: > > > > > > On Fri, Mar 05, 2021 at 03:07:02PM -0800, Jakub Kicinski wrote: > > > > On Fri, 5 Mar 2021 16:15:51 +0530 Sunil Ko

Re: Query on new ethtool RSS hashing options

2021-03-08 Thread Sunil Kovvuri
On Sun, Mar 7, 2021 at 2:46 AM Tobias Waldekranz wrote: > > On Sat, Mar 06, 2021 at 14:54, Vladimir Oltean wrote: > > On Sat, Mar 06, 2021 at 05:38:14PM +0530, Sunil Kovvuri wrote: > >> > Can you share the format of the DSA tag? Is there a driver for it > >> > upstream? Do we need to represent it

Re: Query on new ethtool RSS hashing options

2021-03-08 Thread Sunil Kovvuri
On Sat, Mar 6, 2021 at 6:48 PM Vladimir Oltean wrote: > > On Sat, Mar 06, 2021 at 06:04:14PM +0530, Sunil Kovvuri wrote: > > On Sat, Mar 6, 2021 at 5:47 AM Andrew Lunn wrote: > > > > > > On Fri, Mar 05, 2021 at 03:07:02PM -0800, Jakub Kicinski wrote: > > > > On Fri, 5 Mar 2021 16:15:51 +0530 Suni

Re: Query on new ethtool RSS hashing options

2021-03-08 Thread Sunil Kovvuri
On Fri, Mar 5, 2021 at 4:15 PM Sunil Kovvuri wrote: > > Hi, > > We have a requirement where in we want RSS hashing to be done on packet fields > which are not currently supported by the ethtool. > > Current options: > ehtool -n rx-flow-hash > tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 m|v|

Re: [PATCH] net: ieee802154: fix error return code of dgram_sendmsg()

2021-03-08 Thread Heiner Kallweit
On 08.03.2021 13:18, Jia-Ju Bai wrote: > > > On 2021/3/8 18:19, Heiner Kallweit wrote: >> On 08.03.2021 10:31, Jia-Ju Bai wrote: >>> When sock_alloc_send_skb() returns NULL to skb, no error return code of >>> dgram_sendmsg() is assigned. >>> To fix this bug, err is assigned with -ENOMEM in this c

Re: [PATCH] tools include: Add __sum16 and __wsum definitions.

2021-03-08 Thread Daniel Borkmann
On 3/7/21 11:30 PM, Ian Rogers wrote: This adds definitions available in the uapi version. Explanation: In the kernel include of types.h the uapi version is included. In tools the uapi/linux/types.h and linux/types.h are distinct. For BPF programs a definition of __wsum is needed by the generate

Re: [PATCH net-next v2 5/6] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum trailer

2021-03-08 Thread Alex Elder
On 3/8/21 4:13 AM, David Laight wrote: From: Alex Elder Sent: 06 March 2021 03:16 Replace the use of C bit-fields in the rmnet_map_dl_csum_trailer structure with a single one-byte field, using constant field masks to encode or get at embedded values. Signed-off-by: Alex Elder Reviewed-by: Bjo

Re: [PATCH] tools include: Add __sum16 and __wsum definitions.

2021-03-08 Thread Arnaldo Carvalho de Melo
Em Mon, Mar 08, 2021 at 02:37:32PM +0100, Daniel Borkmann escreveu: > On 3/7/21 11:30 PM, Ian Rogers wrote: > > This adds definitions available in the uapi version. > > > > Explanation: > > In the kernel include of types.h the uapi version is included. > > In tools the uapi/linux/types.h and linux

Re: Query on new ethtool RSS hashing options

2021-03-08 Thread Andrew Lunn
> This is Marvell OcteonTx2/CN10K RVU controller > drivers/net/ethernet/marvell/octeontx2. > And no the controller doesn't have a internal switch and hence > currently there is no switchdev support. > The switch I referred to is an external one whose CPU port is > connected to this controller. Hi

RE: [PATCH v3 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-03-08 Thread Camelia Alexandra Groza
> -Original Message- > From: Lorenzo Bianconi > Sent: Monday, March 8, 2021 13:07 > To: b...@vger.kernel.org > Cc: netdev@vger.kernel.org; da...@davemloft.net; k...@kernel.org; > a...@kernel.org; dan...@iogearbox.net; bro...@redhat.com; > t...@redhat.com; freysteinn.alfreds...@kau.se; > lo

Re: [PATCH] net: ieee802154: fix error return code of dgram_sendmsg()

2021-03-08 Thread Jia-Ju Bai
On 2021/3/8 21:33, Heiner Kallweit wrote: On 08.03.2021 13:18, Jia-Ju Bai wrote: On 2021/3/8 18:19, Heiner Kallweit wrote: On 08.03.2021 10:31, Jia-Ju Bai wrote: When sock_alloc_send_skb() returns NULL to skb, no error return code of dgram_sendmsg() is assigned. To fix this bug, err is ass

RE: [PATCH net-next v2 5/6] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum trailer

2021-03-08 Thread David Laight
... > >> - if (!csum_trailer->valid) { > >> + if (!u8_get_bits(csum_trailer->flags, MAP_CSUM_DL_VALID_FMASK)) { > > > > Is that just an overcomplicated way of saying: > > if (!(csum_trailer->flags & MAP_CSUM_DL_VALID_FMASK)) { > > Yes it is. I defined and used all the field masks in a > con

[PATCH net] net: dsa: only unset VLAN filtering when last port leaves last VLAN-aware bridge

2021-03-08 Thread Vladimir Oltean
From: Vladimir Oltean DSA is aware of switches with global VLAN filtering since the blamed commit, but it makes a bad decision when multiple bridges are spanning the same switch: ip link add br0 type bridge vlan_filtering 1 ip link add br1 type bridge vlan_filtering 1 ip link set swp2 master br0

Re: [PATCH net-next v2 6/6] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum header

2021-03-08 Thread Alex Elder
On 3/8/21 4:18 AM, David Laight wrote: From: Alex Elder Sent: 06 March 2021 03:16 Replace the use of C bit-fields in the rmnet_map_ul_csum_header structure with a single two-byte (big endian) structure member, and use field masks to encode or get values within it. Previously rmnet_map_ipv4_ul_

Re: [PATCH v3 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-03-08 Thread Jesper Dangaard Brouer
On Mon, 8 Mar 2021 12:06:58 +0100 Lorenzo Bianconi wrote: > We want to change the current ndo_xdp_xmit drop semantics because > it will allow us to implement better queue overflow handling. > This is working towards the larger goal of a XDP TX queue-hook. > Move XDP_REDIRECT error path handling

RE: [PATCH net-next v2 6/6] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum header

2021-03-08 Thread David Laight
... > Sort of related, I have been meaning to eliminate the > pointless __aligned(1) tags on rmnet structures defined > in . It wouldn't hurt to use __packed, > though I think they're all 4 or 8 bytes naturally anyway. > Perhaps marking them __aligned(4) would help identify > potential unaligned a

Re: [net-next PATCH v6 10/15] net: mdio: Add ACPI support code for mdio

2021-03-08 Thread Calvin Johnson
On Thu, Feb 18, 2021 at 05:08:05PM +0200, Andy Shevchenko wrote: > On Thu, Feb 18, 2021 at 7:28 AM Calvin Johnson > wrote: > > > > Define acpi_mdiobus_register() to Register mii_bus and create PHYs for > > each ACPI child node. > > > +#include > > +#include > > Perhaps it's better to provide t

Re: [PATCH net-next v2 5/6] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum trailer

2021-03-08 Thread Alex Elder
On 3/8/21 7:53 AM, David Laight wrote: ... - if (!csum_trailer->valid) { + if (!u8_get_bits(csum_trailer->flags, MAP_CSUM_DL_VALID_FMASK)) { Is that just an overcomplicated way of saying: if (!(csum_trailer->flags & MAP_CSUM_DL_VALID_FMASK)) { Yes it is. I defined and us

Re: [PATCH bpf-next V2 0/2] bpf: Updates for BPF-helper bpf_check_mtu

2021-03-08 Thread Jesper Dangaard Brouer
On Fri, 26 Feb 2021 23:34:34 +0100 Daniel Borkmann wrote: > On 2/19/21 7:36 AM, Jesper Dangaard Brouer wrote: > > On Thu, 18 Feb 2021 12:49:53 +0100 > > Jesper Dangaard Brouer wrote: > > > >> The FIB lookup example[1] show how the IP-header field tot_len > >> (iph->tot_len) is used as input t

Re: [net-next PATCH v6 10/15] net: mdio: Add ACPI support code for mdio

2021-03-08 Thread Andy Shevchenko
On Mon, Mar 8, 2021 at 4:11 PM Calvin Johnson wrote: > On Thu, Feb 18, 2021 at 05:08:05PM +0200, Andy Shevchenko wrote: > > On Thu, Feb 18, 2021 at 7:28 AM Calvin Johnson > > wrote: > > > Define acpi_mdiobus_register() to Register mii_bus and create PHYs for > > > each ACPI child node. > > > > >

[PATCH bpf V3 0/2] bpf: Updates for BPF-helper bpf_check_mtu

2021-03-08 Thread Jesper Dangaard Brouer
The FIB lookup example[1] show how the IP-header field tot_len (iph->tot_len) is used as input to perform the MTU check. The recently added MTU check helper bpf_check_mtu() should also support this type of MTU check. Lets add this feature before merge window, please. This is a followup to 34b2021c

[PATCH bpf V3 2/2] selftests/bpf: Tests using bpf_check_mtu BPF-helper input mtu_len param

2021-03-08 Thread Jesper Dangaard Brouer
Add tests that use mtu_len as input parameter in BPF-helper bpf_check_mtu(). The BPF-helper is avail from both XDP and TC context. Add two tests per context, one that tests below MTU and one that exceeds the MTU. Signed-off-by: Jesper Dangaard Brouer Acked-by: John Fastabend --- tools/testing/

[PATCH bpf V3 1/2] bpf: BPF-helper for MTU checking add length input

2021-03-08 Thread Jesper Dangaard Brouer
The FIB lookup example[1] show how the IP-header field tot_len (iph->tot_len) is used as input to perform the MTU check. This patch extend the BPF-helper bpf_check_mtu() with the same ability to provide the length as user parameter input, via mtu_len parameter. [1] samples/bpf/xdp_fwd_kern.c Sig

[PATCH net 0/2] net: dsa: Accept software VLANs for stacked interfaces

2021-03-08 Thread Tobias Waldekranz
First, re-introduce the ability for drivers to signal that VLANs for standalone ports are not offloaded. Then, make sure that mv88e6xxx never offloads VLANs for standalone ports. Tobias Waldekranz (2): net: dsa: Accept software VLANs for stacked interfaces net: dsa: mv88e6xxx: Never apply VLA

[PATCH net 2/2] net: dsa: mv88e6xxx: Never apply VLANs on standalone ports to VTU

2021-03-08 Thread Tobias Waldekranz
Standalone ports always have VLAN filtering (Port Control 2, 802.1Q Mode) disabled. So adding VIDs for any VLAN uppers to the VTU does not make one bit of difference on the ingress filtering, the CPU will still receive traffic from all VLANs. It does however needlessly consume a precious global re

[PATCH net 1/2] net: dsa: Accept software VLANs for stacked interfaces

2021-03-08 Thread Tobias Waldekranz
The dsa_slave_vlan_rx_{add,kill}_vid ndos are required for hardware that can not control VLAN filtering per port, rather it is a device global setting, in order to support VLAN uppers on non-bridged ports. For hardware that can control VLAN filtering per port, it is perfectly fine to fallback to s

[PATCH] net/mlx5e: include net/nexthop.h where needed

2021-03-08 Thread Arnd Bergmann
From: Arnd Bergmann drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1510:12: error: implicit declaration of function 'fib_info_nh' [-Werror,-Wimplicit-function-declaration] fib_dev = fib_info_nh(fen_info->fi, 0)->fib_nh_dev; ^ drivers/net/ethernet/mellanox/ml

[PATCH] net/mlx5e: allocate 'indirection_rqt' buffer dynamically

2021-03-08 Thread Arnd Bergmann
From: Arnd Bergmann Increasing the size of the indirection_rqt array from 128 to 256 bytes pushed the stack usage of the mlx5e_hairpin_fill_rqt_rqns() function over the warning limit when building with clang and CONFIG_KASAN: drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:970:1: error: stack fr

Re: [PATCH net 1/2] net: dsa: Accept software VLANs for stacked interfaces

2021-03-08 Thread Vladimir Oltean
On Mon, Mar 08, 2021 at 04:04:04PM +0100, Tobias Waldekranz wrote: > The dsa_slave_vlan_rx_{add,kill}_vid ndos are required for hardware > that can not control VLAN filtering per port, rather it is a device > global setting, in order to support VLAN uppers on non-bridged ports. > > For hardware th

Re: mlx5 sub function issue

2021-03-08 Thread David Ahern
On 3/8/21 12:21 AM, ze wang wrote: > mlxconfig tool from mft tools version 4.16.52 or higher to set number of SF. > > mlxconfig -d b3:00.0 PF_BAR2_ENABLE=0 PER_PF_NUM_SF=1 PF_SF_BAR_SIZE=8 > mlxconfig -d b3:00.0 PER_PF_NUM_SF=1 PF_TOTAL_SF=192 PF_SF_BAR_SIZE=8 > mlxconfig -d b3:00.1 PER_PF_NUM_

Re: [PATCH v2 1/2] net: check if protocol extracted by virtio_net_hdr_set_proto is correct

2021-03-08 Thread Willem de Bruijn
On Mon, Mar 8, 2021 at 5:32 AM Balazs Nemeth wrote: > > For gso packets, virtio_net_hdr_set_proto sets the protocol (if it isn't > set) based on the type in the virtio net hdr, but the skb could contain > anything since it could come from packet_snd through a raw socket. If > there is a mismatch b

Re: [PATCH V2 4/4] vDPA/ifcvf: remove the version number string

2021-03-08 Thread Leon Romanovsky
On Mon, Mar 08, 2021 at 04:35:25PM +0800, Zhu Lingshan wrote: > This commit removes the version number string, using kernel > version is enough. > > Signed-off-by: Zhu Lingshan > --- > drivers/vdpa/ifcvf/ifcvf_main.c | 2 -- > 1 file changed, 2 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky

Re: [PATCH v2 2/2] net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0

2021-03-08 Thread Willem de Bruijn
On Mon, Mar 8, 2021 at 5:32 AM Balazs Nemeth wrote: > > A packet with skb_inner_network_header(skb) == skb_network_header(skb) > and ETH_P_MPLS_UC will prevent mpls_gso_segment from pulling any headers > from the packet. Subsequently, the call to skb_mac_gso_segment will > again call mpls_gso_segm

Re: [PATCH v3 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-03-08 Thread Shay Agroskin
Lorenzo Bianconi writes: We want to change the current ndo_xdp_xmit drop semantics because it will allow us to implement better queue overflow handling. This is working towards the larger goal of a XDP TX queue-hook. Move XDP_REDIRECT error path handling from each XDP ethernet driver to de

Re: [PATCH v2 2/2] net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0

2021-03-08 Thread David Ahern
On 3/8/21 9:07 AM, Willem de Bruijn wrote: >> diff --git a/net/mpls/mpls_gso.c b/net/mpls/mpls_gso.c >> index b1690149b6fa..cc1b6457fc93 100644 >> --- a/net/mpls/mpls_gso.c >> +++ b/net/mpls/mpls_gso.c >> @@ -27,7 +27,7 @@ static struct sk_buff *mpls_gso_segment(struct sk_buff >> *skb, >> >>

Re: [PATCH v2 2/2] net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0

2021-03-08 Thread Balazs Nemeth
On Mon, 2021-03-08 at 09:17 -0700, David Ahern wrote: > On 3/8/21 9:07 AM, Willem de Bruijn wrote: > > > diff --git a/net/mpls/mpls_gso.c b/net/mpls/mpls_gso.c > > > index b1690149b6fa..cc1b6457fc93 100644 > > > --- a/net/mpls/mpls_gso.c > > > +++ b/net/mpls/mpls_gso.c > > > @@ -27,7 +27,7 @@ stati

Re: [PATCH] net/mlx5e: allocate 'indirection_rqt' buffer dynamically

2021-03-08 Thread Tariq Toukan
On 3/8/2021 5:32 PM, Arnd Bergmann wrote: From: Arnd Bergmann Increasing the size of the indirection_rqt array from 128 to 256 bytes pushed the stack usage of the mlx5e_hairpin_fill_rqt_rqns() function over the warning limit when building with clang and CONFIG_KASAN: drivers/net/ethernet/me

Re: [net-next PATCH v6 10/15] net: mdio: Add ACPI support code for mdio

2021-03-08 Thread Calvin Johnson
On Mon, Mar 08, 2021 at 04:57:35PM +0200, Andy Shevchenko wrote: > On Mon, Mar 8, 2021 at 4:11 PM Calvin Johnson > wrote: > > On Thu, Feb 18, 2021 at 05:08:05PM +0200, Andy Shevchenko wrote: > > > On Thu, Feb 18, 2021 at 7:28 AM Calvin Johnson > > > wrote: > > > > > Define acpi_mdiobus_register(

Re: [PATCH mlx5-next v7 0/4] Dynamically assign MSI-X vectors count

2021-03-08 Thread Alexander Duyck
On Sun, Mar 7, 2021 at 11:19 AM Leon Romanovsky wrote: > > On Sun, Mar 07, 2021 at 10:55:24AM -0800, Alexander Duyck wrote: > > On Sun, Feb 28, 2021 at 11:55 PM Leon Romanovsky wrote: > > > > > > From: Leon Romanovsky > > > > > > @Alexander Duyck, please update me if I can add your ROB tag again

Re: [net-next PATCH v6 10/15] net: mdio: Add ACPI support code for mdio

2021-03-08 Thread Andy Shevchenko
On Mon, Mar 8, 2021 at 6:28 PM Calvin Johnson wrote: > On Mon, Mar 08, 2021 at 04:57:35PM +0200, Andy Shevchenko wrote: > I thought of including device.h instead of dev_printk.h because, it is the > only file that includes dev_printk.h and device.h is widely used. Of course, > it will mean

Re: [PATCH v2 2/2] net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0

2021-03-08 Thread David Ahern
On 3/8/21 9:26 AM, Balazs Nemeth wrote: > On Mon, 2021-03-08 at 09:17 -0700, David Ahern wrote: >> On 3/8/21 9:07 AM, Willem de Bruijn wrote: diff --git a/net/mpls/mpls_gso.c b/net/mpls/mpls_gso.c index b1690149b6fa..cc1b6457fc93 100644 --- a/net/mpls/mpls_gso.c +++ b/net/mpls/m

Re: [PATCH net 1/2] net: dsa: Accept software VLANs for stacked interfaces

2021-03-08 Thread Vladimir Oltean
On Mon, Mar 08, 2021 at 05:44:46PM +0200, Vladimir Oltean wrote: > On Mon, Mar 08, 2021 at 04:04:04PM +0100, Tobias Waldekranz wrote: > > The dsa_slave_vlan_rx_{add,kill}_vid ndos are required for hardware > > that can not control VLAN filtering per port, rather it is a device > > global setting, i

Re: [RFC] devlink: health: add remediation type

2021-03-08 Thread Jakub Kicinski
On Sun, 7 Mar 2021 17:59:58 +0200 Eran Ben Elisha wrote: > On 3/6/2021 4:42 AM, Jakub Kicinski wrote: > > Currently devlink health does not give user any clear information > > of what kind of remediation ->recover callback will perform. This > > makes it difficult to understand the impact of enabli

Re: [PATCH iproute2] ip: xfrm: add NUL character to security context name before printing

2021-03-08 Thread Stephen Hemminger
On Tue, 16 Feb 2021 17:50:58 +0100 Sabrina Dubroca wrote: > +static void xfrm_sec_ctx_print(FILE *fp, struct rtattr *attr) > +{ > + struct xfrm_user_sec_ctx *sctx; > + char buf[65536] = {}; > + > + fprintf(fp, "\tsecurity context "); > + > + if (RTA_PAYLOAD(attr) < sizeof(*sctx))

Re: [PATCH net 1/2] net: dsa: Accept software VLANs for stacked interfaces

2021-03-08 Thread Florian Fainelli
On 3/8/21 9:00 AM, Vladimir Oltean wrote: > On Mon, Mar 08, 2021 at 05:44:46PM +0200, Vladimir Oltean wrote: >> On Mon, Mar 08, 2021 at 04:04:04PM +0100, Tobias Waldekranz wrote: >>> The dsa_slave_vlan_rx_{add,kill}_vid ndos are required for hardware >>> that can not control VLAN filtering per port

Re: [PATCH 0/3] fix a couple of atm->phy_data related issues

2021-03-08 Thread Alexander Duyck
On Mon, Mar 8, 2021 at 12:39 AM Tong Zhang wrote: > > there are two drivers(zatm and idt77252) using PRIV() (i.e. atm->phy_data) > to store private data, but the driver happens to populate wrong > pointers: atm->dev_data. which actually cause null-ptr-dereference in > following PRIV(dev). This pat

Re: [PATCH 0/3] fix a couple of atm->phy_data related issues

2021-03-08 Thread Tong Zhang
Hi Alex, attached is the kernel log for zatm(uPD98402) -- I also have idt77252's log -- which is similar to this one -- I think it makes sense to drop if no one is actually using it -- - Tong [5.740774] BUG: KASAN: null-ptr-deref in uPD98402_start+0x5e/0x219 [uPD98402] [5.741179] Write of

Re: stmmac driver timeout issue

2021-03-08 Thread Florian Fainelli
On 3/8/21 4:45 AM, Joakim Zhang wrote: > > Hi Florian, Andrew, > > Thanks for your help, after debug, It seems related to PHY(RTL8211FDI). It > stop output RXC clock for dozens to hundreds milliseconds during > auto-negotiation, and there is no such issue with AR8031. > When do ifup/ifdown test

Re: [RFC] devlink: health: add remediation type

2021-03-08 Thread Jakub Kicinski
On Mon, 8 Mar 2021 09:16:00 -0800 Jakub Kicinski wrote: > > > + DLH_REMEDY_BAD_PART, > > BAD_PART probably indicates that the reporter (or any command line > > execution) cannot recover the issue. > > As the suggested remedy is static per reporter's recover method, it > > doesn't make sense f

Re: [PATCH 0/3] fix a couple of atm->phy_data related issues

2021-03-08 Thread Alexander Duyck
Hi Tong, Is this direct-assigned hardware or is QEMU being used to emulate the hardware here? Admittedly I don't know that much about ATM, so I am not sure when/if those phys would have gone out of production. However since the code dates back to 2005 I am guessing it is on the old side. Ultimate

[PATCH] net: dsa: b53: mmap: Add device tree support

2021-03-08 Thread Álvaro Fernández Rojas
Add device tree support to b53_mmap.c while keeping platform devices support. Signed-off-by: Álvaro Fernández Rojas --- drivers/net/dsa/b53/b53_mmap.c | 36 ++ 1 file changed, 36 insertions(+) diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_

[PATCH] net: dsa: b53: relax is63xx() condition

2021-03-08 Thread Álvaro Fernández Rojas
BCM63xx switches are present on bcm63xx and bmips devices. Signed-off-by: Álvaro Fernández Rojas --- drivers/net/dsa/b53/b53_priv.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h index 8419bb7f4505..82700a5714c1 100644 --- a

Re: [PATCH v2 2/2] net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0

2021-03-08 Thread Willem de Bruijn
On Mon, Mar 8, 2021 at 11:43 AM David Ahern wrote: > > On 3/8/21 9:26 AM, Balazs Nemeth wrote: > > On Mon, 2021-03-08 at 09:17 -0700, David Ahern wrote: > >> On 3/8/21 9:07 AM, Willem de Bruijn wrote: > diff --git a/net/mpls/mpls_gso.c b/net/mpls/mpls_gso.c > index b1690149b6fa..cc1b6457

Re: [PATCH 0/3] fix a couple of atm->phy_data related issues

2021-03-08 Thread Tong Zhang
I have this emulated device in QEMU, -- and I agree with you that probably no one has been using it for a while IMHO, given the quality of the driver it also make sense to drop the support completely or we at least need to fix some obvious issues here. Best, - Tong On Mon, Mar 8, 2021 at 1:06 PM A

[syzbot] WARNING in ieee802154_add_seclevel

2021-03-08 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:d310ec03 Merge tag 'perf-core-2021-02-17' of git://git.ker.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=147866a2d0 kernel config: https://syzkaller.appspot.com/x/.config?x=e681d54870713a40 das

Re: [PATCH] net/mlx5e: include net/nexthop.h where needed

2021-03-08 Thread Roi Dayan
On 2021-03-08 5:31 PM, Arnd Bergmann wrote: From: Arnd Bergmann drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1510:12: error: implicit declaration of function 'fib_info_nh' [-Werror,-Wimplicit-function-declaration] fib_dev = fib_info_nh(fen_info->fi, 0)->fib_nh_dev;

Re: [PATCH] net: dsa: b53: relax is63xx() condition

2021-03-08 Thread Florian Fainelli
On 3/8/21 10:08 AM, Álvaro Fernández Rojas wrote: > BCM63xx switches are present on bcm63xx and bmips devices. > > Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Since you are targeting net-next, please make it clear in the patch subject next time: https://git.kernel.org/pub

Re: seqlock lockdep false positives?

2021-03-08 Thread Erhard F.
On Sun, 7 Mar 2021 10:20:08 +0100 "Ahmed S. Darwish" wrote: > @Erhard, can you please try below patch? Just want to confirm if this > theory has any validity to it: > > diff --git a/drivers/net/ethernet/realtek/8139too.c > b/drivers/net/ethernet/realtek/8139too.c > index 1e5a453dea14..c0dbb0418

Re: [PATCH] net: dsa: b53: mmap: Add device tree support

2021-03-08 Thread Florian Fainelli
On 3/8/21 10:07 AM, Álvaro Fernández Rojas wrote: > Add device tree support to b53_mmap.c while keeping platform devices support. > > Signed-off-by: Álvaro Fernández Rojas > --- > drivers/net/dsa/b53/b53_mmap.c | 36 ++ > 1 file changed, 36 insertions(+) > > diff

[PATCH v2 bpf] libbpf: fix INSTALL flag order

2021-03-08 Thread Andrii Nakryiko
From: Georgi Valkov It was reported ([0]) that having optional -m flag between source and destination arguments in install command breaks bpftools cross-build on MacOS. Move -m to the front to fix this issue. [0] https://github.com/openwrt/openwrt/pull/3959 Fixes: 7110d80d53f4 ("libbpf: Makef

Re: [PATCH] net: dsa: b53: mmap: Add device tree support

2021-03-08 Thread Álvaro Fernández Rojas
Hi Florian, El 08/03/2021 a las 19:29, Florian Fainelli escribió: On 3/8/21 10:07 AM, Álvaro Fernández Rojas wrote: Add device tree support to b53_mmap.c while keeping platform devices support. Signed-off-by: Álvaro Fernández Rojas --- drivers/net/dsa/b53/b53_mmap.c | 36 +++

[PATCH 0/2] net: mdio: Add BCM6368 MDIO mux bus controller

2021-03-08 Thread Álvaro Fernández Rojas
This controller is present on BCM6318, BCM6328, BCM6362, BCM6368 and BCM63268 SoCs. Álvaro Fernández Rojas (2): dt-bindings: net: Add bcm6368-mdio-mux bindings net: mdio: Add BCM6368 MDIO mux bus controller .../bindings/net/brcm,bcm6368-mdio-mux.yaml | 79 drivers/net/mdio/Kconfi

[PATCH 1/2] dt-bindings: net: Add bcm6368-mdio-mux bindings

2021-03-08 Thread Álvaro Fernández Rojas
Add documentations for bcm6368 mdio mux driver. Signed-off-by: Álvaro Fernández Rojas --- .../bindings/net/brcm,bcm6368-mdio-mux.yaml | 79 +++ 1 file changed, 79 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml diff --git a/D

[PATCH 2/2] net: mdio: Add BCM6368 MDIO mux bus controller

2021-03-08 Thread Álvaro Fernández Rojas
This controller is present on BCM6318, BCM6328, BCM6362, BCM6368 and BCM63268 SoCs. Signed-off-by: Álvaro Fernández Rojas --- drivers/net/mdio/Kconfig| 11 ++ drivers/net/mdio/Makefile | 1 + drivers/net/mdio/mdio-mux-bcm6368.c | 179 3 files

Re: [PATCH v2 bpf] libbpf: fix INSTALL flag order

2021-03-08 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf.git (refs/heads/master): On Mon, 8 Mar 2021 10:30:38 -0800 you wrote: > From: Georgi Valkov > > It was reported ([0]) that having optional -m flag between source and > destination arguments in install command breaks bpftools cross-build on MacOS. > Move

Re: [PATCH bpf-next] libbpf: fix INSTALL flag order

2021-03-08 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf.git (refs/heads/master): On Fri, 5 Mar 2021 17:41:26 -0800 you wrote: > It was reported ([0]) that having optional -m flag between source and > destination arguments in install command breaks bpftools cross-build on MacOS. > Move -m to the front to fix thi

Re: [PATCH mlx5-next v7 0/4] Dynamically assign MSI-X vectors count

2021-03-08 Thread Leon Romanovsky
On Mon, Mar 08, 2021 at 08:33:03AM -0800, Alexander Duyck wrote: > On Sun, Mar 7, 2021 at 11:19 AM Leon Romanovsky wrote: > > > > On Sun, Mar 07, 2021 at 10:55:24AM -0800, Alexander Duyck wrote: > > > On Sun, Feb 28, 2021 at 11:55 PM Leon Romanovsky wrote: > > > > > > > > From: Leon Romanovsky >

macb broken on HiFive Unleashed

2021-03-08 Thread Andreas Schwab
One of the changes to the macb driver between 5.10 and 5.11 has broken the SiFive HiFive Unleashed. These are the last messages before the system hangs: [ 12.468674] libphy: Fixed MDIO Bus: probed [ 12.746518] macb 1009.ethernet: Registered clk switch 'sifive-gemgxl-mgmt' [ 12.753119]

  1   2   >