RE: [EXT] [PATCH] mwifiex: Remove redundant assignment

2021-03-17 Thread Sharvari Harisangam
We need to return 0 in success case. So this can't be removed. > -Original Message- > From: zuoqil...@163.com > Sent: Wednesday, March 17, 2021 11:40 AM > To: amitkar...@gmail.com; ganapathi...@gmail.com; Sharvari Harisangam > ; huxinming...@gmail.com; > kv...@codeaurora.org; da...@daveml

[PATCH][next] ixgbe: Fix out-of-bounds warning in ixgbe_host_interface_command()

2021-03-17 Thread Gustavo A. R. Silva
Fix the following out-of-bounds warning by replacing the one-element array in an anonymous union with a pointer: CC [M] drivers/net/ethernet/intel/ixgbe/ixgbe_common.o drivers/net/ethernet/intel/ixgbe/ixgbe_common.c: In function ‘ixgbe_host_interface_command’: drivers/net/ethernet/intel/ixgbe/

Re: [PATCH] iavf: fix locking of critical sections

2021-03-17 Thread Stefan Assmann
On 16.03.21 23:02, Jesse Brandeburg wrote: > Jakub Kicinski wrote: I personally think that the overuse of flags in Intel drivers brings nothing but trouble. At which point does it make sense to just add a lock / semaphore here rather than open code all this with no clear semanti

linux-next: build warning after merge of the net-next tree

2021-03-17 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (htmldocs) produced this warning: Documentation/networking/switchdev.rst:482: WARNING: Unexpected indentation. Introduced by commit 0f22ad45f47c ("Documentation: networking: switchdev: clarify device driver behavior") -- Che

linux-next: build warning after merge of the net-next tree

2021-03-17 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (htmldocs) produced this warning: Documentation/networking/dsa/dsa.rst:468: WARNING: Unexpected indentation. Documentation/networking/dsa/dsa.rst:477: WARNING: Block quote ends without a blank line; unexpected unindent. Introduce

linux-next: build warning after merge of the net-next tree

2021-03-17 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (sparc64 defconfig) produced this warning: drivers/net/ethernet/intel/e1000e/netdev.c:6926:12: warning: 'e1000e_pm_prepare' defined but not used [-Wunused-function] static int e1000e_pm_prepare(struct device *dev) ^~~

Re: [PATCH net-next 1/1] net: phy: fix invalid phy id when probe using C22

2021-03-17 Thread Heiner Kallweit
On 16.03.2021 09:57, Wong Vee Khee wrote: > When using Clause-22 to probe for PHY devices such as the Marvell > 88E2110, PHY ID with value 0 is read from the MII PHYID registers > which caused the PHY framework failed to attach the Marvell PHY > driver. > The issue occurs with a MAC driver that s

Re: linux-next: build warning after merge of the net-next tree

2021-03-17 Thread Chen Yu
Hi Stephen, On Wed, Mar 17, 2021 at 06:56:05PM +1100, Stephen Rothwell wrote: > Hi all, > > After merging the net-next tree, today's linux-next build (sparc64 > defconfig) produced this warning: > > drivers/net/ethernet/intel/e1000e/netdev.c:6926:12: warning: > 'e1000e_pm_prepare' defined but no

Re: [BUG] Re: [net 3/6] can: flexcan: invoke flexcan_chip_freeze() to enter freeze mode

2021-03-17 Thread Marc Kleine-Budde
On 16.03.2021 17:00:25, Ahmad Fatoum wrote: > > --- a/drivers/net/can/flexcan.c > > +++ b/drivers/net/can/flexcan.c > > @@ -1480,10 +1480,13 @@ static int flexcan_chip_start(struct net_device > > *dev) > > > > flexcan_set_bittiming(dev); > > > > + /* set freeze, halt */ > > + err = fle

Re: [PATCH v4 RESEND net-next] net: socket: use BIT() for MSG_*

2021-03-17 Thread Menglong Dong
Hello, On Wed, Mar 17, 2021 at 9:38 AM Guenter Roeck wrote: > > On Wed, Mar 17, 2021 at 01:02:51AM +0200, Andy Shevchenko wrote: > > On Wednesday, March 17, 2021, Guenter Roeck wrote: > > ... > > The problem is in net/packet/af_packet.c:packet_recvmsg(). This function, > as well as all other rcv

Re: [PATCH] drivers: staging: qlge: Fixed an alignment issue.

2021-03-17 Thread Dan Carpenter
On Tue, Mar 16, 2021 at 09:26:34PM +0530, Anish Udupa wrote: > The * of the comment was not aligned properly. Ran checkpatch and > found the warning. Resolved it in this patch. > > Signed-off-by: Anish Udupa > --- > drivers/staging/qlge/qlge_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 del

Re: [PATCH] vhost: Fix vhost_vq_reset()

2021-03-17 Thread Stefano Garzarella
On Fri, Mar 12, 2021 at 03:09:13PM +0100, Laurent Vivier wrote: vhost_reset_is_le() is vhost_init_is_le(), and in the case of cross-endian legacy, vhost_init_is_le() depends on vq->user_be. vq->user_be is set by vhost_disable_cross_endian(). But in vhost_vq_reset(), we have: vhost_reset_is_

Re: [PATCH] dt-bindings: Drop type references on common properties

2021-03-17 Thread Marc Kleine-Budde
On 16.03.2021 13:48:58, Rob Herring wrote: > Users of common properties shouldn't have a type definition as the > common schemas already have one. Drop all the unnecessary type > references in the tree. > > A meta-schema update to catch these is pending. > > Cc: Nicolas Saenz Julienne > Cc: Maxi

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

2021-03-17 Thread Álvaro Fernández Rojas
BCM63xx switches are present on bcm63xx and bmips devices. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli --- 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 8419bb7f450

Re: [PATCH] xfrm: return error when esp offload is requested and not supported

2021-03-17 Thread Antony Antony
Hi, On Mon, Mar 15, 2021 at 16:29:59 +0100, Sabrina Dubroca wrote: > 2021-03-15, 11:43:50 +0100, Steffen Klassert wrote: > > On Wed, Mar 10, 2021 at 10:36:11AM +0100, Antony Antony wrote: > > > When ESP offload is not supported by the device return an error, > > > -EINVAL, instead of silently igno

Re: [net-next PATCH v7 04/16] of: mdio: Refactor of_phy_find_device()

2021-03-17 Thread Calvin Johnson
Hi Daniel, On Tue, Mar 16, 2021 at 07:17:19PM +, Daniel Thompson wrote: > On Thu, Mar 11, 2021 at 11:49:59AM +0530, Calvin Johnson wrote: > > Refactor of_phy_find_device() to use fwnode_phy_find_device(). > > > > Signed-off-by: Calvin Johnson > > This patch series is provoking depmod depend

Re: [PATCH net-next v3 15/16] net/mlx5e: take the rtnl lock when calling netif_set_xps_queue

2021-03-17 Thread Antoine Tenart
Quoting Saeed Mahameed (2021-03-12 21:54:18) > On Fri, 2021-03-12 at 16:04 +0100, Antoine Tenart wrote: > > netif_set_xps_queue must be called with the rtnl lock taken, and this > > is > > now enforced using ASSERT_RTNL(). mlx5e_attach_netdev was taking the > > lock conditionally, fix this by takin

Re: [PATCH] dt-bindings: Drop type references on common properties

2021-03-17 Thread Srinivas Kandagatla
On 16/03/2021 19:48, Rob Herring wrote: Users of common properties shouldn't have a type definition as the common schemas already have one. Drop all the unnecessary type references in the tree. A meta-schema update to catch these is pending. Cc: Nicolas Saenz Julienne Cc: Maxime Ripard Cc: L

[PATCH] net: ppp: Mundane typo fixes in the file pppoe.c

2021-03-17 Thread Bhaskar Chowdhury
s/procesing/processing/ s/comparations/comparisons/ Signed-off-by: Bhaskar Chowdhury --- drivers/net/ppp/pppoe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c index d7f50b835050..9dc7f4b93d51 100644 --- a/drivers/net/p

Design for sk_lookup helper function in context of sk_lookup hook

2021-03-17 Thread Shanti Lombard née Bouchez-Mongardé
Hello everyone, Background discussion: https://lore.kernel.org/bpf/CAADnVQJnX-+9u--px_VnhrMTPB=o9y0lh9t7rjbqzflchbu...@mail.gmail.com/ In a previous e-mail I was explaining that sk_lookup BPF programs had no way to lookup existing sockets in kernel space. The sockets have to be provided by u

Re: [PATCH net-next 1/2] net: dsa: tag_brcm: add support for legacy tags

2021-03-17 Thread Álvaro Fernández Rojas
Hi Vladimir, > El 15 mar 2021, a las 22:28, Vladimir Oltean escribió: > > On Mon, Mar 15, 2021 at 03:27:35PM +0100, Álvaro Fernández Rojas wrote: >> Add support for legacy Broadcom tags, which are similar to >> DSA_TAG_PROTO_BRCM. >> These tags are used on BCM5325, BCM5365 and BCM63xx switches.

set mtu size broken for dwmac-sun8i

2021-03-17 Thread Belisko Marek
Hi, I'm hunting an issue when setting mtu failed for dwmac-sun8i driver. Basically adding more debug shows that in stmmac_change_mtu tx_fifo_size is 0 and in this case EINVAL is reported. Isaw there was fix for similar driver dwmac-sunxi driver by: 806fd188ce2a4f8b587e83e73c478e6484fbfa55 IIRC dw

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

2021-03-17 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 | 55 ++ 1 file changed, 55 insertions(+) diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_

Re: [PATCH v4 RESEND net-next] net: socket: use BIT() for MSG_*

2021-03-17 Thread Andy Shevchenko
On Wed, Mar 17, 2021 at 10:21 AM Menglong Dong wrote: > On Wed, Mar 17, 2021 at 9:38 AM Guenter Roeck wrote: > > On Wed, Mar 17, 2021 at 01:02:51AM +0200, Andy Shevchenko wrote: > > > On Wednesday, March 17, 2021, Guenter Roeck wrote: > > > > ... > > > > The problem is in net/packet/af_packet.c:

Re: [PATCH v4 RESEND net-next] net: socket: use BIT() for MSG_*

2021-03-17 Thread Andy Shevchenko
On Wed, Mar 17, 2021 at 11:36 AM Andy Shevchenko wrote: > On Wed, Mar 17, 2021 at 10:21 AM Menglong Dong > wrote: ... > It maybe fixed by swapping positions of the arguments, i.e. ~(FOO | > BAR) & flags. ...and type casting will be needed anyway here... I was thinking about this case driver

Re: [PATCH net-next 1/5] net: dsa: mv88e6xxx: Provide generic VTU iterator

2021-03-17 Thread Tobias Waldekranz
On Tue, Mar 16, 2021 at 10:42, Vladimir Oltean wrote: > On Mon, Mar 15, 2021 at 10:13:56PM +0100, Tobias Waldekranz wrote: >> @@ -2184,25 +2230,7 @@ static int mv88e6xxx_port_db_dump(struct >> mv88e6xxx_chip *chip, int port, >> if (err) >> return err; >> >> -/* Dump VLANs'

Re: [PATCH] dt-bindings: Drop type references on common properties

2021-03-17 Thread Maxime Ripard
On Tue, Mar 16, 2021 at 01:48:58PM -0600, Rob Herring wrote: > Users of common properties shouldn't have a type definition as the > common schemas already have one. Drop all the unnecessary type > references in the tree. > > A meta-schema update to catch these is pending. > > Cc: Nicolas Saenz Ju

Re: [PATCH net-next 2/5] net: dsa: mv88e6xxx: Remove some bureaucracy around querying the VTU

2021-03-17 Thread Tobias Waldekranz
On Tue, Mar 16, 2021 at 11:17, Vladimir Oltean wrote: > On Mon, Mar 15, 2021 at 10:13:57PM +0100, Tobias Waldekranz wrote: >> +static int mv88e6xxx_vtu_get(struct mv88e6xxx_chip *chip, u16 vid, >> + struct mv88e6xxx_vtu_entry *entry) >> { >> +int err; >> + >> if (

[PATCH V5 0/7] vDPA/ifcvf: enables Intel C5000X-PL virtio-net

2021-03-17 Thread Zhu Lingshan
This series enabled Intel FGPA SmartNIC C5000X-PL virtio-net for vDPA. vDPA requires VIRTIO_F_ACCESS_PLATFORM as a must, this series verify this feature bit when set features. Changes from V4: deduce VIRTIO device ID from pdev device id or subsystem device id(Jason) Changes from V3: checks featu

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

2021-03-17 Thread Zhu Lingshan
This commit removes the version number string, using kernel version is enough. Signed-off-by: Zhu Lingshan Reviewed-by: Leon Romanovsky Acked-by: Jason Wang --- drivers/vdpa/ifcvf/ifcvf_main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/i

[PATCH V5 3/7] vDPA/ifcvf: rename original IFCVF dev ids to N3000 ids

2021-03-17 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 Acked-by: Jason Wang --- drivers/vdpa/ifcvf/ifcvf_base.h | 8 drivers/vdpa/ifcvf/ifcvf_main.c | 8 2 files c

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

2021-03-17 Thread Zhu Lingshan
This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-net for vDPA Signed-off-by: Zhu Lingshan Acked-by: Jason Wang --- 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/driv

[PATCH V5 1/7] vDPA/ifcvf: get_vendor_id returns a device specific vendor id

2021-03-17 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 Acked-by: Jason Wang --- drivers/vdpa/ifcvf/ifcvf_main.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/ifcv

[PATCH V5 5/7] vDPA/ifcvf: fetch device feature bits when probe

2021-03-17 Thread Zhu Lingshan
This commit would read and store device feature bits when probe. rename ifcvf_get_features() to ifcvf_get_hw_features(), it reads and stores features of the probed device. new ifcvf_get_features() simply returns stored feature bits. Signed-off-by: Zhu Lingshan Acked-by: Jason Wang --- drivers

[PATCH V5 7/7] vDPA/ifcvf: deduce VIRTIO device ID from pdev ids

2021-03-17 Thread Zhu Lingshan
This commit deduces the VIRTIO device ID of a probed device from its pdev device ids. Signed-off-by: Zhu Lingshan --- drivers/vdpa/ifcvf/ifcvf_base.h | 1 + drivers/vdpa/ifcvf/ifcvf_main.c | 14 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/ifcvf/ifc

[PATCH V5 6/7] vDPA/ifcvf: verify mandatory feature bits for vDPA

2021-03-17 Thread Zhu Lingshan
vDPA requres VIRTIO_F_ACCESS_PLATFORM as a must, this commit examines this when set features. Signed-off-by: Zhu Lingshan Acked-by: Jason Wang --- drivers/vdpa/ifcvf/ifcvf_base.c | 12 drivers/vdpa/ifcvf/ifcvf_base.h | 1 + drivers/vdpa/ifcvf/ifcvf_main.c | 5 + 3 files chang

Re: [PATCH net-next 4/5] net: dsa: mv88e6xxx: Offload bridge learning flag

2021-03-17 Thread Tobias Waldekranz
On Tue, Mar 16, 2021 at 11:27, Vladimir Oltean wrote: > On Mon, Mar 15, 2021 at 10:13:59PM +0100, Tobias Waldekranz wrote: >> Allow a user to control automatic learning per port. >> >> Many chips have an explicit "LearningDisable"-bit that can be used for >> this, but we opt for setting/clearing

[PATCH] net: ethernet: intel: Fix a typo in the file ixgbe_dcb_nl.c

2021-03-17 Thread Bhaskar Chowdhury
s/Reprogam/Reprogram/ Signed-off-by: Bhaskar Chowdhury --- drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c index c00332d2e02a..

pull-request: mac80211 2021-03-17

2021-03-17 Thread Johannes Berg
Hi Dave, So here's a first set of fixes for the current rc cycle, really nothing major, though the network namespace locking fix is something a few people have been running into. Please pull and let me know if there's any problem. Thanks, johannes The following changes since commit 13832ae275

Re: [PATCH v4 RESEND net-next] net: socket: use BIT() for MSG_*

2021-03-17 Thread Guenter Roeck
On 3/17/21 2:40 AM, Andy Shevchenko wrote: > On Wed, Mar 17, 2021 at 11:36 AM Andy Shevchenko > wrote: >> On Wed, Mar 17, 2021 at 10:21 AM Menglong Dong >> wrote: > > ... > >> It maybe fixed by swapping positions of the arguments, i.e. ~(FOO | >> BAR) & flags. > > ...and type casting will be

[PATCH v2 net-next 1/2] net: dsa: tag_brcm: add support for legacy tags

2021-03-17 Thread Álvaro Fernández Rojas
Add support for legacy Broadcom tags, which are similar to DSA_TAG_PROTO_BRCM. These tags are used on BCM5325, BCM5365 and BCM63xx switches. Signed-off-by: Álvaro Fernández Rojas --- v2: introduce changes requested by Florian and Vladimir. include/net/dsa.h | 2 + net/dsa/Kconfig| 7 +

[PATCH v2 net-next 0/2] net: dsa: b53: support legacy tags

2021-03-17 Thread Álvaro Fernández Rojas
Legacy Broadcom tags are needed for older switches. Álvaro Fernández Rojas (2): net: dsa: tag_brcm: add support for legacy tags net: dsa: b53: support legacy tags drivers/net/dsa/b53/Kconfig | 1 + drivers/net/dsa/b53/b53_common.c | 12 ++-- include/net/dsa.h| 2 +

[PATCH v2 net-next 2/2] net: dsa: b53: support legacy tags

2021-03-17 Thread Álvaro Fernández Rojas
These tags are used on BCM5325, BCM5365 and BCM63xx switches. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli --- v2: remove unneeded comment and remove NET_DSA_TAG_BRCM_LEGACY from b53_can_enable_brcm_tags() as Florian reported that legacy tag can be stacked. drivers/net

[PATCH net-next 2/7] mlxsw: reg: Add Switch Port Egress VLAN EtherType Register

2021-03-17 Thread Ido Schimmel
From: Amit Cohen SPEVET configures which EtherType to push at egress for packets incoming through a local port for which 'SPVID.egr_et_set' is set. The next patches will use SPEVET to configure EtherType 0x88A8 and 0x8100 for local ports member in 802.1ad and 802.1q bridges, respectively. This a

[PATCH net-next 0/7] mlxsw: Allow 802.1d and .1ad VxLAN bridges to coexist on Spectrum>=2

2021-03-17 Thread Ido Schimmel
From: Ido Schimmel This patchset allows user space to simultaneously configure both 802.1d and 802.1ad VxLAN bridges on Spectrum-2 and later ASICs. 802.1ad VxLAN bridges are still forbidden on Spectrum-1. The reason for the current limitation is that up until now the EtherType that was pushed to

[PATCH net-next 5/7] mlxsw: Allow 802.1d and .1ad VxLAN bridges to coexist on Spectrum>=2

2021-03-17 Thread Ido Schimmel
From: Amit Cohen Currently only one EtherType can be configured for pushing in tunnels because EtherType is configured using SPVID.et_vlan for tunnel port. This behavior is forbidden by comparing mlxsw_sp_nve_config struct for each new tunnel, the struct contains 'ethertype' field which means th

[PATCH net-next 6/7] selftests: forwarding: Add test for dual VxLAN bridge

2021-03-17 Thread Ido Schimmel
From: Amit Cohen Configure VxLAN with an 802.1ad bridge and VxLAN with an 802.1d bridge at the same time in same switch, verify that traffic passed as expected. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- .../net/forwarding/dual_vxlan_bridge.sh | 366 ++ 1

[PATCH net-next 3/7] mlxsw: spectrum: Add mlxsw_sp_port_egress_ethtype_set()

2021-03-17 Thread Ido Schimmel
From: Amit Cohen A subsequent patch will cause decapsulated packets to have their EtherType determined by the egress port. Add mlxsw_sp_port_egress_ethtype_set() which will be called when a port joins an 802.1ad bridge, so that it will set an 802.1ad EtherType on decapsulated packets transmitted

[PATCH net-next 1/7] mlxsw: reg: Add egr_et_set field to SPVID

2021-03-17 Thread Ido Schimmel
From: Amit Cohen SPVID.egr_et_set=1 means that when VLAN is pushed at ingress (for untagged packets or for QinQ push mode) then the EtherType is decided at the egress port. The next patches will use this field for VxLAN devices (tunnel port) in order to allow using dual VxLAN bridges (802.1d and

[PATCH net-next 4/7] mlxsw: Add struct mlxsw_sp_switchdev_ops per ASIC

2021-03-17 Thread Ido Schimmel
From: Amit Cohen A subsequent patch will need to implement different set of operations when a port joins / leaves an 802.1ad bridge, based on the ASIC type. Prepare for this change by allowing to initialize the bridge module based on the ASIC type via 'struct mlxsw_sp_switchdev_ops'. Signed-off

[PATCH net-next 7/7] selftests: mlxsw: spectrum-2: Remove q_in_vni_veto test

2021-03-17 Thread Ido Schimmel
From: Amit Cohen q_in_vni_veto.sh is not needed anymore because VxLAN with an 802.1ad bridge and VxLAN with an 802.1d bridge can coexist. Remove the test. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel --- .../net/mlxsw/spectrum-2/q_in_vni_veto.sh | 77 --- 1 file

[PATCH] libbpf: use SOCK_CLOEXEC when opening the netlink socket

2021-03-17 Thread Kumar Kartikeya Dwivedi
Otherwise, there exists a small window between the opening and closing of the socket fd where it may leak into processes launched by some other thread. Signed-off-by: Kumar Kartikeya Dwivedi --- tools/lib/bpf/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib

Re: [PATCH v3 net-next 4/6] linux/etherdevice.h: misc trailing whitespace cleanup

2021-03-17 Thread Alexander Lobakin
From: Jakub Kicinski Date: Mon, 15 Mar 2021 12:00:39 -0700 > On Mon, 15 Mar 2021 09:38:57 + Alexander Lobakin wrote: > > From: Vladimir Oltean > > Date: Sun, 14 Mar 2021 23:04:53 +0200 > > > > > On Sun, Mar 14, 2021 at 11:11:32AM +, Alexander Lobakin wrote: > > > > Caught by the text edi

Re: [PATCH] libbpf: use SOCK_CLOEXEC when opening the netlink socket

2021-03-17 Thread Toke Høiland-Jørgensen
Kumar Kartikeya Dwivedi writes: > Otherwise, there exists a small window between the opening and closing > of the socket fd where it may leak into processes launched by some other > thread. > > Signed-off-by: Kumar Kartikeya Dwivedi FYI, you should be tagging patches with the tree they are targ

Re: [PATCH net-next 5/5] net: dsa: mv88e6xxx: Offload bridge broadcast flooding flag

2021-03-17 Thread Tobias Waldekranz
On Tue, Mar 16, 2021 at 11:39, Vladimir Oltean wrote: > On Mon, Mar 15, 2021 at 10:14:00PM +0100, Tobias Waldekranz wrote: >> These switches have two modes of classifying broadcast: >> >> 1. Broadcast is multicast. >> 2. Broadcast is its own unique thing that is always flooded >>everywhere. >

Re: [PATCH net-next 1/2] net: dsa: tag_brcm: add support for legacy tags

2021-03-17 Thread Jonas Gorski
On Wed, 17 Mar 2021 at 10:16, Álvaro Fernández Rojas wrote: > > Hi Vladimir, > > > El 15 mar 2021, a las 22:28, Vladimir Oltean escribió: > > > > On Mon, Mar 15, 2021 at 03:27:35PM +0100, Álvaro Fernández Rojas wrote: > >> Add support for legacy Broadcom tags, which are similar to > >> DSA_TAG_P

Re: [PATCH net-next 5/5] net: dsa: mv88e6xxx: Offload bridge broadcast flooding flag

2021-03-17 Thread Vladimir Oltean
On Wed, Mar 17, 2021 at 12:14:18PM +0100, Tobias Waldekranz wrote: > Good point. I see two ways forward: > > - My first idea was to cache a vector per switch that would act as the > template when creating a new entry. This avoids having the driver > layer knowing about stacked netdevs etc. But

Re: set mtu size broken for dwmac-sun8i

2021-03-17 Thread Corentin Labbe
Le Wed, Mar 17, 2021 at 10:19:26AM +0100, Belisko Marek a écrit : > Hi, > > I'm hunting an issue when setting mtu failed for dwmac-sun8i driver. > Basically adding more debug shows that in stmmac_change_mtu > tx_fifo_size is 0 and in this case EINVAL is reported. Isaw there was > fix for similar d

Re: set mtu size broken for dwmac-sun8i

2021-03-17 Thread Belisko Marek
On Wed, Mar 17, 2021 at 12:33 PM Corentin Labbe wrote: > > Le Wed, Mar 17, 2021 at 10:19:26AM +0100, Belisko Marek a écrit : > > Hi, > > > > I'm hunting an issue when setting mtu failed for dwmac-sun8i driver. > > Basically adding more debug shows that in stmmac_change_mtu > > tx_fifo_size is 0 an

Re: [BUG] Re: [net 3/6] can: flexcan: invoke flexcan_chip_freeze() to enter freeze mode

2021-03-17 Thread Marc Kleine-Budde
On 17.03.2021 09:18:31, Marc Kleine-Budde wrote: > A fix for this in on its way to net/master: > > https://lore.kernel.org/linux-can/20210316082104.4027260-6-...@pengutronix.de/ It's already in net/master. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedd

[PATCH bpf-next v2] libbpf: use SOCK_CLOEXEC when opening the netlink socket

2021-03-17 Thread Kumar Kartikeya Dwivedi
Otherwise, there exists a small window between the opening and closing of the socket fd where it may leak into processes launched by some other thread. Fixes: 949abbe88436 ("libbpf: add function to setup XDP") Signed-off-by: Kumar Kartikeya Dwivedi --- Changelog: v1 -> v2 Tag the bpf-next tree (

Re: [PATCHv2 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-03-17 Thread Toke Høiland-Jørgensen
Hangbin Liu writes: > This patch add two flags BPF_F_BROADCAST and BPF_F_EXCLUDE_INGRESS to extend > xdp_redirect_map for broadcast support. > > Keep the general data path in net/core/filter.c and the native data > path in kernel/bpf/devmap.c so we can use direct calls to get better > performace.

[PATCH] qtnfmac: Fix possible buffer overflow in qtnf_event_handle_external_auth

2021-03-17 Thread Lee Gibson
Function qtnf_event_handle_external_auth calls memcpy without checking the length. A user could control that length and trigger a buffer overflow. Fix by checking the length is within the maximum allowed size. Signed-off-by: Lee Gibson --- drivers/net/wireless/quantenna/qtnfmac/event.c | 6 -

[PATCH] wl1251: Fix possible buffer overflow in wl1251_cmd_scan

2021-03-17 Thread Lee Gibson
Function wl1251_cmd_scan calls memcpy without checking the length. A user could control that length and trigger a buffer overflow. Fix by checking the length is within the maximum allowed size. Signed-off-by: Lee Gibson --- drivers/net/wireless/ti/wl1251/cmd.c | 7 +-- 1 file changed, 5 inse

[PATCH iproute2] ip: Fix batch processing

2021-03-17 Thread Petr Machata
After the comment cited below, batch mode neglects to set the global variable batch_mode to a non-zero value. Netns and VRF commands use this variable, and break in batch mode. Fix by setting the value again. Fixes: 1d9a81b8c9f3 ("Unify batch processing across tools") Reported-by: Tim Rice Signed

Re: [PATCH iproute2-next v3 2/6] json_print: Add print_tv()

2021-03-17 Thread Petr Machata
Stephen Hemminger writes: >> +_PRINT_FUNC(tv, struct timeval *) > > This > > Make it const please? OK

[PATCH v2] ethernet/broadcom:remove unneeded variable: "ret"

2021-03-17 Thread dingsenjie
From: dingsenjie remove unneeded variable: "ret". Signed-off-by: dingsenjie --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_m

[PATCH v2] ethernet/microchip:remove unneeded variable: "ret"

2021-03-17 Thread dingsenjie
From: dingsenjie remove unneeded variable: "ret". Signed-off-by: dingsenjie --- drivers/net/ethernet/microchip/encx24j600.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/microchip/encx24j600.c b/drivers/net/ethernet/microchip/encx24j600.c index 2c0

[PATCH bpf-next] bpf: Simplify expression for identify bpf mem type

2021-03-17 Thread Jianlin Lv
Added BPF_SIZE_MASK macro as mask of size modifier that help to reduce the evaluation of expressions in if statements, and remove BPF_SIZE_MASK in netronome driver. Signed-off-by: Jianlin Lv --- drivers/net/ethernet/netronome/nfp/bpf/main.h | 2 -- include/uapi/linux/bpf.h

[PATCH iproute2-next v4 1/6] nexthop: Synchronize uAPI files

2021-03-17 Thread Petr Machata
Signed-off-by: Petr Machata --- include/uapi/linux/nexthop.h | 47 +- include/uapi/linux/rtnetlink.h | 7 + 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/nexthop.h b/include/uapi/linux/nexthop.h index b0a5613905ef..37b14b4

[PATCH iproute2-next v4 0/6] ip: nexthop: Support resilient groups

2021-03-17 Thread Petr Machata
Support for resilient next-hop groups was recently accepted to Linux kernel[1]. Resilient next-hop groups add a layer of indirection between the SKB hash and the next hop. Thus the hash is used to reference a hash table bucket, which is then used to reference a particular next hop. This allows the

[PATCH iproute2-next v4 3/6] nexthop: Extract a helper to parse a NH ID

2021-03-17 Thread Petr Machata
NH ID extraction is a common operation, and will become more common still with the resilient NH groups support. Add a helper that does what it usually done and returns the parsed NH ID. Signed-off-by: Petr Machata --- ip/ipnexthop.c | 25 + 1 file changed, 13 insertions(+

[PATCH iproute2-next v4 4/6] nexthop: Add ability to specify group type

2021-03-17 Thread Petr Machata
From: Ido Schimmel Next patches are going to add a 'resilient' nexthop group type, so allow users to specify the type using the 'type' argument. Currently, only 'mpath' type is supported. These two commands are equivalent: # ip nexthop add id 10 group 1/2/3 # ip nexthop add id 10 group 1/2/3

[PATCH iproute2-next v4 5/6] nexthop: Add support for resilient nexthop groups

2021-03-17 Thread Petr Machata
From: Ido Schimmel Add ability to configure resilient nexthop groups and show their current configuration. Example: # ip nexthop add id 10 group 1/2 type resilient buckets 8 # ip nexthop show id 10 id 10 group 1/2 type resilient buckets 8 idle_timer 120 unbalanced_timer 0 # ip -j -p nexthop

[PATCH iproute2-next v4 6/6] nexthop: Add support for nexthop buckets

2021-03-17 Thread Petr Machata
From: Ido Schimmel Add ability to dump multiple nexthop buckets and get a specific one. Example: # ip nexthop add id 10 group 1/2 type resilient buckets 8 # ip nexthop id 1 via 192.0.2.2 dev dummy10 scope link id 2 via 192.0.2.19 dev dummy20 scope link id 10 group 1/2 type resilient buckets

[PATCH iproute2-next v4 2/6] json_print: Add print_tv()

2021-03-17 Thread Petr Machata
Add a helper to dump a timeval. Print by first converting to double and then dispatching to print_color_float(). Signed-off-by: Petr Machata --- Notes: v4: - Make print_tv() take a const*. include/json_print.h | 1 + lib/json_print.c | 13 + 2 files changed, 14 inserti

Re: [PATCH bpf-next v2] libbpf: use SOCK_CLOEXEC when opening the netlink socket

2021-03-17 Thread Toke Høiland-Jørgensen
Kumar Kartikeya Dwivedi writes: > Otherwise, there exists a small window between the opening and closing > of the socket fd where it may leak into processes launched by some other > thread. > > Fixes: 949abbe88436 ("libbpf: add function to setup XDP") > Signed-off-by: Kumar Kartikeya Dwivedi Ac

Re: [PATCH v2] icmp: support rfc5837

2021-03-17 Thread Willem de Bruijn
> + if (ip_version != 4 && ip_version != 6) { > + pr_debug("ip_version must be 4 or 6\n"); > + return; > + } > > > always true > > > I should remove this check, then? > > What is the standard way to differentiate IPV4 vs v6 paths in network code? > Is there a

Re: [RFC v2] net: sched: implement TCQ_F_CAN_BYPASS for lockless qdisc

2021-03-17 Thread Toke Høiland-Jørgensen
Cong Wang writes: > On Mon, Mar 15, 2021 at 2:07 PM Jakub Kicinski wrote: >> >> I thought pfifo was supposed to be "lockless" and this change >> re-introduces a lock between producer and consumer, no? > > It has never been truly lockless, it uses two spinlocks in the ring buffer > implementation

[PATCH net-next 1/5] octeontx2-af: refactor function npc_install_flow for default entry

2021-03-17 Thread Naveen Mamindlapalli
This patch refactors npc_install_flow function to install AF installed default MCAM entries similar to other MCAM entries installed by PF/VF. As a result the code would be more readable and easy to maintain. Modified npc_verify_entry and npc_verify_channel to properly check MCAM rules installed by

[PATCH net-next 0/5] refactor code related to npc install flow

2021-03-17 Thread Naveen Mamindlapalli
This patchset refactors and cleans up the code associated with the npc install flow API, specifically to eliminate different code paths while installing MCAM rules by AF and PF. This makes the code easier to understand and maintain. Also added support for multi channel NIX promisc entry. Nalla, Pr

[PATCH net-next 2/5] octeontx2-af: Add support for multi channel in NIX promisc entry

2021-03-17 Thread Naveen Mamindlapalli
From: "Nalla, Pradeep" This patch adds support for multi channel NIX promisc entry. Packets sent on all those channels by the host should be received by the interface to which those channels belong. Channel count, if greater than 1, should be power of 2 as only one promisc entry is available for

[PATCH net-next 5/5] octeontx2-af: Modify the return code for unsupported flow keys

2021-03-17 Thread Naveen Mamindlapalli
The mbox handler npc_install_flow returns ENOTSUPP for unsupported flow keys. This patch modifies the return value to AF driver defined error code for debugging purpose. Signed-off-by: Naveen Mamindlapalli --- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 1 + drivers/net/ethernet/mar

[PATCH net-next 3/5] octeontx2-af: Use npc_install_flow API for promisc and broadcast entries

2021-03-17 Thread Naveen Mamindlapalli
Use npc_install_flow mailbox API for installing the default promisc and broadcast match entries. Earlier these entries were installed using low level npc_config_mcam_entry API, which does not store these rules and is not available when the rules are dumped using debugfs. Added chan_mask field to np

[PATCH net-next 4/5] octeontx2-af: Avoid duplicate unicast rule in mcam_rules list

2021-03-17 Thread Naveen Mamindlapalli
From: Subbaraya Sundeep A mcam rule described by mcam_rule struct has all the info such as the hardware MCAM entry number, match criteria and corresponding action etc. All mcam rules are stored in a linked list mcam->rules. When adding/updating a rule to the mcam->rules it is checked if a rule al

Re: [RFC v2] net: sched: implement TCQ_F_CAN_BYPASS for lockless qdisc

2021-03-17 Thread Jason A. Donenfeld
On 3/17/21, Toke Høiland-Jørgensen wrote: > Cong Wang writes: > >> On Mon, Mar 15, 2021 at 2:07 PM Jakub Kicinski wrote: >>> >>> I thought pfifo was supposed to be "lockless" and this change >>> re-introduces a lock between producer and consumer, no? >> >> It has never been truly lockless, it us

[PATCH net-next v17 0/4] Add support for mv88e6393x family of Marvell

2021-03-17 Thread Marek Behún
Hello, after 2 months I finally had time to send v17 of Amethyst patches. This series is tested on Marvell CN9130-CRB. Changes since v16: - dropped patches adding 5gbase-r, since they are already merged - rebased onto net-next/master - driver API renamed set_egress_flood() method into 2 methods

[PATCH net-next v17 1/4] net: dsa: mv88e6xxx: change serdes lane parameter type from u8 type to int

2021-03-17 Thread Marek Behún
From: Pavana Sharma Returning 0 is no more an error case with MV88E6393 family which has serdes lane numbers 0, 9 or 10. So with this change .serdes_get_lane will return lane number or -errno (-ENODEV or -EOPNOTSUPP). Signed-off-by: Pavana Sharma Reviewed-by: Andrew Lunn Reviewed-by: Vladimir

[PATCH net-next v17 2/4] net: dsa: mv88e6xxx: wrap .set_egress_port method

2021-03-17 Thread Marek Behún
There are two implementations of the .set_egress_port method, and both of them, if successful, set chip->*gress_dest_port variable. To avoid code repetition, wrap this method into mv88e6xxx_set_egress_port. Signed-off-by: Marek Behún Reviewed-by: Pavana Sharma --- drivers/net/dsa/mv88e6xxx/chi

[PATCH net-next v17 3/4] net: dsa: mv88e6xxx: add support for mv88e6393x family

2021-03-17 Thread Marek Behún
From: Pavana Sharma The Marvell 88E6393X device is a single-chip integration of a 11-port Ethernet switch with eight integrated Gigabit Ethernet (GbE) transceivers and three 10-Gigabit interfaces. This patch adds functionalities specific to mv88e6393x family (88E6393X, 88E6193X and 88E6191X). T

[PATCH net-next v17 4/4] net: dsa: mv88e6xxx: implement .port_set_policy for Amethyst

2021-03-17 Thread Marek Behún
The 16-bit Port Policy CTL register from older chips is on 6393x changed to Port Policy MGMT CTL, which can access more data, but indirectly and via 8-bit registers. The original 16-bit value is divided into first two 8-bit register in the Port Policy MGMT CTL. We can therefore use the previous c

Re: [PATCH v4 RESEND net-next] net: socket: use BIT() for MSG_*

2021-03-17 Thread Menglong Dong
On Wed, Mar 17, 2021 at 5:36 PM Andy Shevchenko wrote: > ... > > The problematic code is negation of the flags when it's done in > operations like &. > It maybe fixed by swapping positions of the arguments, i.e. ~(FOO | > BAR) & flags. > > All this is a beast called "integer promotions" in the C s

Re: [PATCH net 2/2] net: gro: Let the timeout timer expire in softirq context with `threadirqs'

2021-03-17 Thread Thomas Gleixner
On Thu, Apr 16 2020 at 15:59, Sebastian Andrzej Siewior wrote: > any comments from the timer department? Yes. > On 2019-11-27 18:37:19 [+0100], To Eric Dumazet wrote: >> On 2019-11-27 09:11:40 [-0800], Eric Dumazet wrote: >> > Resent in non HTML mode :/ >> don't worry, mutt handles both :) >> >>

Re: [PATCH net-next 4/5] net: dsa: mv88e6xxx: Offload bridge learning flag

2021-03-17 Thread Vladimir Oltean
On Mon, Mar 15, 2021 at 10:13:59PM +0100, Tobias Waldekranz wrote: > + if (flags.mask & BR_LEARNING) { > + u16 pav = (flags.val & BR_LEARNING) ? (1 << port) : 0; > + > + err = mv88e6xxx_port_set_assoc_vector(chip, port, pav); > + if (err) > +

Re: [PATCH stable 0/6] net: dsa: b53: Correct learning for standalone ports

2021-03-17 Thread Vladimir Oltean
On Tue, Mar 16, 2021 at 05:35:43PM -0700, Florian Fainelli wrote: > Hi Greg, Sasha, Jaakub and David, > > This patch series contains backports for a change that recently made it > upstream as f9b3827ee66cfcf297d0acd6ecf33653a5f297ef ("net: dsa: b53: > Support setting learning on port") however tha

Re: [PATCH v4 RESEND net-next] net: socket: use BIT() for MSG_*

2021-03-17 Thread Menglong Dong
On Wed, Mar 17, 2021 at 9:53 PM Menglong Dong wrote: > ... > > Seems that the inconsistent usages of 'msg_flags' is a lot, for example the > 'recvmsg()' in 'struct proto' and 'recvmsg()' in 'struct proto_ops': > > int (*recvmsg)(struct sock *sk, struct msghdr *msg, > size_t len, int nobloc

Re: [PATCH net-next v17 2/4] net: dsa: mv88e6xxx: wrap .set_egress_port method

2021-03-17 Thread Vladimir Oltean
On Wed, Mar 17, 2021 at 02:46:41PM +0100, Marek Behún wrote: > There are two implementations of the .set_egress_port method, and both > of them, if successful, set chip->*gress_dest_port variable. > > To avoid code repetition, wrap this method into > mv88e6xxx_set_egress_port. > > Signed-off-by:

Re: [PATCH net-next v17 4/4] net: dsa: mv88e6xxx: implement .port_set_policy for Amethyst

2021-03-17 Thread Vladimir Oltean
On Wed, Mar 17, 2021 at 02:46:43PM +0100, Marek Behún wrote: > The 16-bit Port Policy CTL register from older chips is on 6393x changed > to Port Policy MGMT CTL, which can access more data, but indirectly and > via 8-bit registers. > > The original 16-bit value is divided into first two 8-bit reg

Re: [PATCH net-next v17 2/4] net: dsa: mv88e6xxx: wrap .set_egress_port method

2021-03-17 Thread Marek Behún
On Wed, 17 Mar 2021 16:22:35 +0200 Vladimir Oltean wrote: > On Wed, Mar 17, 2021 at 02:46:41PM +0100, Marek Behún wrote: > > There are two implementations of the .set_egress_port method, and > > both of them, if successful, set chip->*gress_dest_port variable. > > > > To avoid code repetition, w

[PATCH 2/2] net: dsa: bcm_sf2: fix BCM4908 RGMII reg(s)

2021-03-17 Thread Rafał Miłecki
From: Rafał Miłecki BCM4908 has only 1 RGMII reg for controlling port 7. Fixes: 73b7a6047971 ("net: dsa: bcm_sf2: support BCM4908's integrated switch") Signed-off-by: Rafał Miłecki --- drivers/net/dsa/bcm_sf2.c | 11 +++ drivers/net/dsa/bcm_sf2_regs.h | 1 + 2 files changed, 8 in

  1   2   3   >