[PATCH net] mlxsw: spectrum_acl: Fix mlxsw_sp_acl_tcam_group_add()'s error path

2020-09-26 Thread Ido Schimmel
From: Ido Schimmel If mlxsw_sp_acl_tcam_group_id_get() fails, the mutex initialized earlier is not destroyed. Fix this by initializing the mutex after calling the function. This is symmetric to mlxsw_sp_acl_tcam_group_del(). Fixes: 5ec2ee28d27b ("mlxsw: spectrum_acl: Introduce a mutex to guard

Re: [PATCH 6/6] USB: cdc-acm: blacklist ETAS ES58X device

2020-09-26 Thread Greg Kroah-Hartman
On Sun, Sep 27, 2020 at 07:45:20AM +0200, Greg Kroah-Hartman wrote: > On Sun, Sep 27, 2020 at 02:57:56AM +0900, Vincent Mailhol wrote: > > The ES58X devices are incorrectly recognized as USB Modem (CDC ACM), > > preventing the etas-es58x module to load. > > > > Thus, these have been added > > to t

Re: [PATCH 6/6] USB: cdc-acm: blacklist ETAS ES58X device

2020-09-26 Thread Greg Kroah-Hartman
On Sun, Sep 27, 2020 at 02:57:56AM +0900, Vincent Mailhol wrote: > The ES58X devices are incorrectly recognized as USB Modem (CDC ACM), > preventing the etas-es58x module to load. > > Thus, these have been added > to the ignore list in drivers/usb/class/cdc-acm.c > > Signed-off-by: Vincent Mailho

[PATCH] mdio: fix mdio-thunder.c dependency & build error

2020-09-26 Thread Randy Dunlap
From: Randy Dunlap Fix build error by selecting MDIO_DEVRES for MDIO_THUNDER. Fixes this build error: ld: drivers/net/phy/mdio-thunder.o: in function `thunder_mdiobus_pci_probe': drivers/net/phy/mdio-thunder.c:78: undefined reference to `devm_mdiobus_alloc_size' Fixes: 379d7ac7ca31 ("phy: mdio

Re: [PATCH v2 1/2] bus: mhi: Remove auto-start option

2020-09-26 Thread Manivannan Sadhasivam
On Mon, Sep 21, 2020 at 09:43:03AM +0200, Loic Poulain wrote: > There is really no point having an auto-start for channels. > This is confusing for the device drivers, some have to enable the > channels, others don't have... and waste resources (e.g. pre allocated > buffers) that may never be used.

Re: [PATCH v2 2/2] net: qrtr: Start MHI channels during init

2020-09-26 Thread Manivannan Sadhasivam
On Mon, Sep 21, 2020 at 09:43:04AM +0200, Loic Poulain wrote: > Start MHI device channels so that transfers can be performed. > The MHI stack does not auto-start channels anymore. > > Signed-off-by: Loic Poulain Applied to mhi-next! Thanks, Mani > --- > v2: split MHI and qrtr changes in dedic

Re: Request for Comment: LED device naming for netdev LEDs

2020-09-26 Thread Andrew Lunn
> So I will have > /sys/class/net/eth0/phydev/leds/eth0:green:activity > || > symlink | > | > symlink > > and I will also have > /sys/class/leds/eth0:green:activity > | >

Re: [PATCH net-next v2 7/7] net: dsa: mv88e6xxx: Add per port devlink regions

2020-09-26 Thread Vladimir Oltean
On Sun, Sep 27, 2020 at 03:03:00AM +0200, Andrew Lunn wrote: > > I was meaning to ask this since the global regions patchset, but I > > forgot. > > > > Do we not expect to see, under the same circumstances, the same region > > snapshot on a big endian and on a little endian system? > > We have neve

Re: [PATCH net-next v2 7/7] net: dsa: mv88e6xxx: Add per port devlink regions

2020-09-26 Thread Andrew Lunn
> I was meaning to ask this since the global regions patchset, but I > forgot. > > Do we not expect to see, under the same circumstances, the same region > snapshot on a big endian and on a little endian system? We have never had any issues with endinness with MDIO. PHY/DSA drivers work with host

Re: Request for Comment: LED device naming for netdev LEDs

2020-09-26 Thread Marek Behun
On Sun, 27 Sep 2020 00:40:25 +0200 Marek Behun wrote: > What I am wondering is how should we select a name for the device part > of the LED for network devices, when network namespaces are enabled. > > a) We could just use the interface name (eth0:yellow:activity). The >problem is what shoul

Re: [PATCH net-next v2 3/7] net: dsa: Register devlink ports before calling DSA driver setup()

2020-09-26 Thread Andrew Lunn
> > +static int dsa_port_devlink_setup(struct dsa_port *dp) > > { > > struct devlink_port *dlp = &dp->devlink_port; > > + struct dsa_switch_tree *dst = dp->ds->dst; > > + struct devlink_port_attrs attrs = {}; > > + struct devlink *dl = dp->ds->devlink; > > + const unsigned char *id; >

Re: Request for Comment: LED device naming for netdev LEDs

2020-09-26 Thread Marek Behun
On Sun, 27 Sep 2020 02:29:35 +0200 Andrew Lunn wrote: > On Sun, Sep 27, 2020 at 12:40:25AM +0200, Marek Behun wrote: > > Hi, > > > > linux-leds is trying to create a consistent naming mechanism for LEDs > > The schema is: > > device:color:function > > for example > > system:green:power > >

Re: WARNING in hrtimer_forward

2020-09-26 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:ba5f4cfe bpf: Add comment to document BTF type PTR_TO_BTF_.. git tree: bpf-next console output: https://syzkaller.appspot.com/x/log.txt?x=13f316e590 kernel config: https://syzkaller.appspot.com/x/.config?x=d44e136

Re: [PATCH net-next v2 1/7] net: devlink: Add unused port flavour

2020-09-26 Thread Andrew Lunn
On Sun, Sep 27, 2020 at 01:00:34AM +0300, Vladimir Oltean wrote: > On Sat, Sep 26, 2020 at 11:06:26PM +0200, Andrew Lunn wrote: > > Not all ports of a switch need to be used, particularly in embedded > > systems. Add a port flavour for ports which physically exist in the > > switch, but are not con

Re: Request for Comment: LED device naming for netdev LEDs

2020-09-26 Thread Andrew Lunn
On Sun, Sep 27, 2020 at 12:40:25AM +0200, Marek Behun wrote: > Hi, > > linux-leds is trying to create a consistent naming mechanism for LEDs > The schema is: > device:color:function > for example > system:green:power > keyboard0:green:capslock > > But we are not there yet. > > LEDs are oft

RE: [PATCH v4 10/11] Driver: hv: util: Use VMBUS_RING_SIZE() for ringbuffer sizes

2020-09-26 Thread Michael Kelley
From: Boqun Feng Sent: Tuesday, September 15, 2020 8:48 PM > > For a Hyper-V vmbus, the size of the ringbuffer has two requirements: > > 1)it has to take one PAGE_SIZE for the header > > 2)it has to be PAGE_SIZE aligned so that double-mapping can work > > VMBUS_RING_SIZE() could calcu

RE: [PATCH v4 09/11] HID: hyperv: Use VMBUS_RING_SIZE() for ringbuffer sizes

2020-09-26 Thread Michael Kelley
From: Boqun Feng Sent: Tuesday, September 15, 2020 8:48 PM > > For a Hyper-V vmbus, the size of the ringbuffer has two requirements: > > 1)it has to take one PAGE_SIZE for the header > > 2)it has to be PAGE_SIZE aligned so that double-mapping can work > > VMBUS_RING_SIZE() could calcu

RE: [PATCH v4 08/11] Input: hyperv-keyboard: Use VMBUS_RING_SIZE() for ringbuffer sizes

2020-09-26 Thread Michael Kelley
From: Boqun Feng Sent: Tuesday, September 15, 2020 8:48 PM > > For a Hyper-V vmbus, the size of the ringbuffer has two requirements: > > 1)it has to take one PAGE_SIZE for the header > > 2)it has to be PAGE_SIZE aligned so that double-mapping can work > > VMBUS_RING_SIZE() could calcu

Re: [PATCH net-next v2 7/7] net: dsa: mv88e6xxx: Add per port devlink regions

2020-09-26 Thread Vladimir Oltean
On Sat, Sep 26, 2020 at 11:06:32PM +0200, Andrew Lunn wrote: > Add a devlink region to return the per port registers. > > Signed-off-by: Andrew Lunn > --- > drivers/net/dsa/mv88e6xxx/devlink.c | 109 +++- > 1 file changed, 105 insertions(+), 4 deletions(-) > > diff --git

Re: [PATCH net-next v2 5/7] net: dsa: Add devlink port regions support to DSA

2020-09-26 Thread Vladimir Oltean
On Sat, Sep 26, 2020 at 11:06:30PM +0200, Andrew Lunn wrote: > Allow DSA drivers to make use of devlink port regions, via simple > wrappers. > > Signed-off-by: Andrew Lunn > --- Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean

Re: [PATCH net-next v2 3/7] net: dsa: Register devlink ports before calling DSA driver setup()

2020-09-26 Thread Vladimir Oltean
On Sat, Sep 26, 2020 at 11:06:28PM +0200, Andrew Lunn wrote: > DSA drivers want to create regions on devlink ports as well as the > devlink device instance, in order to export registers and other tables > per port. To keep all this code together in the drivers, have the > devlink ports registered e

Re: [PATCH net-next] net: marvell: mvpp2: Fix W=1 warning with !CONFIG_ACPI

2020-09-26 Thread Matteo Croce
> From: Andrew Lunn > Subject: [PATCH net-next] net: marvell: mvpp2: Fix W=1 warning with > !CONFIG_ACPI > > Wrap the definition inside #ifdef/#endif. > > Compile tested only. > > Signed-off-by: Andrew Lunn Looks good, ACPI_PTR() should be NULL if !CONFIG_ACPI -- per aspera ad upstream

RE: [PATCH] Revert "net: ethernet: ixgbe: check the return value of ixgbe_mii_bus_init()"

2020-09-26 Thread Liu, Yongxin
> -Original Message- > From: Bartosz Golaszewski > Sent: Friday, September 25, 2020 17:44 > To: Liu, Yongxin > Cc: David S . Miller ; netdev > ; LKML > Subject: Re: [PATCH] Revert "net: ethernet: ixgbe: check the return value > of ixgbe_mii_bus_init()" > > On Fri, Sep 25, 2020 at 10:51

Re: [PATCH net-next v3 1/2] net: mscc: ocelot: Add support for tcam

2020-09-26 Thread Horatiu Vultur
The 09/26/2020 15:37, Vladimir Oltean wrote: > > Hi Horatiu, Hi Vladimir, > > On Sat, Sep 26, 2020 at 01:20:02PM +0200, Horatiu Vultur wrote: > > To be honest, I don't remember precisely. I will need to setup a board > > and see exactly. But from what I remember: > > - according to this[1] in c

Re: [PATCH net-next v2 2/7] net: dsa: Make use of devlink port flavour unused

2020-09-26 Thread Vladimir Oltean
On Sat, Sep 26, 2020 at 11:06:27PM +0200, Andrew Lunn wrote: > If a port is unused, still create a devlink port for it, but set the > flavour to unused. This allows us to attach devlink regions to the > port, etc. > > Signed-off-by: Andrew Lunn > --- Reviewed-by: Vladimir Oltean Tested-by: Vladi

Request for Comment: LED device naming for netdev LEDs

2020-09-26 Thread Marek Behun
Hi, linux-leds is trying to create a consistent naming mechanism for LEDs The schema is: device:color:function for example system:green:power keyboard0:green:capslock But we are not there yet. LEDs are often dedicated to specific function by manufacturers, for example there can be an icon

Re: [net-next 01/15] net/mlx5: DR, Add buddy allocator utilities

2020-09-26 Thread David Miller
From: sa...@kernel.org Date: Fri, 25 Sep 2020 12:37:55 -0700 > From: Yevgeny Kliteynik > > Add implementation of SW Steering variation of buddy allocator. > > The buddy system for ICM memory uses 2 main data structures: > - Bitmap per order, that keeps the current state of allocated > blo

Re: [PATCH net-next v2 0/7] mv88e6xxx: Add per port devlink regions

2020-09-26 Thread Vladimir Oltean
Hi Marek, On Sun, Sep 27, 2020 at 12:02:19AM +0200, Marek Behun wrote: > Andrew, can this be used to write the registers from userspace, or only > to read it? It is intended for reading only. https://www.kernel.org/doc/html/latest/networking/devlink/devlink-region.html Thanks, -Vladimir

Re: [PATCH net-next v2 0/7] mv88e6xxx: Add per port devlink regions

2020-09-26 Thread Marek Behun
Andrew, can this be used to write the registers from userspace, or only to read it? Marek

Re: [PATCH net-next v2 1/7] net: devlink: Add unused port flavour

2020-09-26 Thread Vladimir Oltean
On Sat, Sep 26, 2020 at 11:06:26PM +0200, Andrew Lunn wrote: > Not all ports of a switch need to be used, particularly in embedded > systems. Add a port flavour for ports which physically exist in the > switch, but are not connected to the front panel etc, and so are > unused. > > Signed-off-by: A

Re: [PATCH net-next v2 1/7] net: devlink: Add unused port flavour

2020-09-26 Thread Vladimir Oltean
On Sat, Sep 26, 2020 at 11:06:26PM +0200, Andrew Lunn wrote: > Not all ports of a switch need to be used, particularly in embedded > systems. Add a port flavour for ports which physically exist in the > switch, but are not connected to the front panel etc, and so are > unused. > > Signed-off-by: A

[PATCH net-next] net: marvell: mvpp2: Fix W=1 warning with !CONFIG_ACPI

2020-09-26 Thread Andrew Lunn
rivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:7084:36: warning: ‘mvpp2_acpi_match’ defined but not used [-Wunused-const-variable=] 7084 | static const struct acpi_device_id mvpp2_acpi_match[] = { |^~~~ Wrap the definition inside #ifdef/#endi

Re: [PATCH net-next] netdevsim: fix duplicated debugfs directory

2020-09-26 Thread David Miller
From: Jakub Kicinski Date: Fri, 25 Sep 2020 18:19:13 -0700 > The "ethtool" debugfs directory holds per-netdev knobs, so move > it from the device instance directory to the port directory. > > This fixes the following warning when creating multiple ports: > > debugfs: Directory 'ethtool' with p

Re: [PATCH v3 net-next 00/15] Generic adjustment for flow dissector in DSA

2020-09-26 Thread David Miller
From: Vladimir Oltean Date: Sat, 26 Sep 2020 22:32:00 +0300 > This is the v2 of a series initially submitted in May: > https://www.spinics.net/lists/netdev/msg651866.html > > The end goal is to get rid of the unintuitive code for the flow > dissector that currently exists in the taggers. It can

Re: [PATCH v3 net-next 11/15] net: dsa: tag_edsa: use the generic flow dissector procedure

2020-09-26 Thread Andrew Lunn
On Sat, Sep 26, 2020 at 10:32:11PM +0300, Vladimir Oltean wrote: > Remove the .flow_dissect procedure, so the flow dissector will call the > generic variant which works for this tagging protocol. > > Cc: Andrew Lunn > Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v3 net-next 10/15] net: dsa: tag_dsa: use the generic flow dissector procedure

2020-09-26 Thread Andrew Lunn
On Sat, Sep 26, 2020 at 10:32:10PM +0300, Vladimir Oltean wrote: > Remove the .flow_dissect procedure, so the flow dissector will call the > generic variant which works for this tagging protocol. > > Cc: Andrew Lunn > Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Andrew

[PATCH net-next v2 4/7] net: devlink: Add support for port regions

2020-09-26 Thread Andrew Lunn
Allow regions to be registered to a devlink port. The same netlink API is used, but the port index is provided to indicate when a region is a port region as opposed to a device region. Signed-off-by: Andrew Lunn --- include/net/devlink.h | 27 + net/core/devlink.c| 250 +

[PATCH net-next v2 7/7] net: dsa: mv88e6xxx: Add per port devlink regions

2020-09-26 Thread Andrew Lunn
Add a devlink region to return the per port registers. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/devlink.c | 109 +++- 1 file changed, 105 insertions(+), 4 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/devlink.c b/drivers/net/dsa/mv88e6xxx/devlink.c

[PATCH net-next v2 0/7] mv88e6xxx: Add per port devlink regions

2020-09-26 Thread Andrew Lunn
This patchset extends devlink regions to support per port regions, and them makes use of them to support the ports of the mv88e6xxx switches. root@rap:~# devlink region show mdio_bus/gpio-0:00/global1: size 64 snapshot [] mdio_bus/gpio-0:00/global2: size 64 snapshot [] mdio_bus/gpio-0:00/atu: size

[PATCH net-next v2 5/7] net: dsa: Add devlink port regions support to DSA

2020-09-26 Thread Andrew Lunn
Allow DSA drivers to make use of devlink port regions, via simple wrappers. Signed-off-by: Andrew Lunn --- include/net/dsa.h | 5 + net/dsa/dsa.c | 14 ++ 2 files changed, 19 insertions(+) diff --git a/include/net/dsa.h b/include/net/dsa.h index 9aa44dc8ecdb..f0bb64e5002f 1

[PATCH net-next v2 6/7] net: dsa: Add helper for converting devlink port to ds and port

2020-09-26 Thread Andrew Lunn
Hide away from DSA drivers how devlink works. Signed-off-by: Andrew Lunn --- include/net/dsa.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/net/dsa.h b/include/net/dsa.h index f0bb64e5002f..24c925c192ec 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -686

[PATCH net-next v2 3/7] net: dsa: Register devlink ports before calling DSA driver setup()

2020-09-26 Thread Andrew Lunn
DSA drivers want to create regions on devlink ports as well as the devlink device instance, in order to export registers and other tables per port. To keep all this code together in the drivers, have the devlink ports registered early, so the setup() method can setup both device and port devlink re

[PATCH net-next v2 2/7] net: dsa: Make use of devlink port flavour unused

2020-09-26 Thread Andrew Lunn
If a port is unused, still create a devlink port for it, but set the flavour to unused. This allows us to attach devlink regions to the port, etc. Signed-off-by: Andrew Lunn --- net/dsa/dsa2.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index 3

[PATCH net-next v2 1/7] net: devlink: Add unused port flavour

2020-09-26 Thread Andrew Lunn
Not all ports of a switch need to be used, particularly in embedded systems. Add a port flavour for ports which physically exist in the switch, but are not connected to the front panel etc, and so are unused. Signed-off-by: Andrew Lunn --- include/uapi/linux/devlink.h | 3 +++ net/core/devlink.c

[PATCH net] drivers/net/wan/x25_asy: Keep the ldisc running even when netif is down

2020-09-26 Thread Xie He
I believe it is necessary to keep the N_X25 line discipline running even when the upper network interface is down, because otherwise, the last frame transmitted before the interface going down may be incompletely transmitted, and the first frame received after the interface going up may be incomple

Re: [PATCH v3 net-next 06/15] net: dsa: add a generic procedure for the flow dissector

2020-09-26 Thread Vladimir Oltean
On Sat, Sep 26, 2020 at 10:33:00PM +0200, Andrew Lunn wrote: > > +static inline void dsa_tag_generic_flow_dissect(const struct sk_buff *skb, > > + __be16 *proto, int *offset) > > +{ > > +#if IS_ENABLED(CONFIG_NET_DSA) > > + const struct dsa_device_ops *op

BUG: unable to handle kernel paging request in dqput

2020-09-26 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:98477740 Merge branch 'rcu/urgent' of git://git.kernel.org.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1793087590 kernel config: https://syzkaller.appspot.com/x/.config?x=af502ec9a451c9fc das

Re: [PATCH v3 net-next 06/15] net: dsa: add a generic procedure for the flow dissector

2020-09-26 Thread Andrew Lunn
> +static inline void dsa_tag_generic_flow_dissect(const struct sk_buff *skb, > + __be16 *proto, int *offset) > +{ > +#if IS_ENABLED(CONFIG_NET_DSA) > + const struct dsa_device_ops *ops = skb->dev->dsa_ptr->tag_ops; > + int tag_len = ops->overhead

Re: [PATCH v3 net-next 07/15] net: dsa: point out the tail taggers

2020-09-26 Thread Andrew Lunn
On Sat, Sep 26, 2020 at 10:32:07PM +0300, Vladimir Oltean wrote: > The Marvell 88E6060 uses tag_trailer.c and the KSZ8795, KSZ9477 and > KSZ9893 switches also use tail tags. > > Tell that to the DSA core, since this makes a difference for the flow > dissector. Most switches break the parsing of fr

Re: [PATCH v3 net-next 06/15] net: dsa: add a generic procedure for the flow dissector

2020-09-26 Thread Andrew Lunn
On Sat, Sep 26, 2020 at 10:32:06PM +0300, Vladimir Oltean wrote: > For all DSA formats that don't use tail tags, it looks like behind the > obscure number crunching they're all doing the same thing: locating the > real EtherType behind the DSA tag. Nonetheless, this is not immediately > obvious, so

Re: [PATCH v3 net-next 03/15] net: dsa: tag_sja1105: request promiscuous mode for master

2020-09-26 Thread Andrew Lunn
On Sat, Sep 26, 2020 at 10:32:03PM +0300, Vladimir Oltean wrote: > Currently PTP is broken when ports are in standalone mode (the tagger > keeps printing this message): > > sja1105 spi0.1: Expected meta frame, is 01-80-c2-00-00-0e in the DSA master > multicast filter? > > Sure, one might say "si

Re: [PATCH v3 net-next 02/15] net: dsa: allow drivers to request promiscuous mode on master

2020-09-26 Thread Andrew Lunn
On Sat, Sep 26, 2020 at 10:32:02PM +0300, Vladimir Oltean wrote: > Currently DSA assumes that taggers don't mess with the destination MAC > address of the frames on RX. That is not always the case. Some DSA > headers are placed before the Ethernet header (ocelot), and others > simply mangle random

[PATCH v3 net-next 05/15] net: dsa: make the .flow_dissect tagger callback return void

2020-09-26 Thread Vladimir Oltean
There is no tagger that returns anything other than zero, so just change the return type appropriately. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn --- Changes in v3: None. include/net/dsa.h | 4 ++-- net/core/flow_dissector.c | 4 ++-- net/dsa/tag_brcm.c| 5 ++---

Re: [PATCH net-next] Revert "vxlan: move encapsulation warning"

2020-09-26 Thread David Miller
From: Jakub Kicinski Date: Fri, 25 Sep 2020 18:56:04 -0700 > This reverts commit 546c044c9651e81a16833806feff6b369bb5de33. > > Nothing prevents user from sending frames to "external" VxLAN devices. > In fact kernel itself may generate icmp chatter. > > This is fine, such frames should be droppe

[PATCH v3 net-next 15/15] net: dsa: tag_rtl4_a: use the generic flow dissector procedure

2020-09-26 Thread Vladimir Oltean
Remove the .flow_dissect procedure, so the flow dissector will call the generic variant which works for this tagging protocol. Cc: Linus Walleij Cc: DENG Qingfang Cc: Mauri Sandberg Signed-off-by: Vladimir Oltean --- Changes in v3: Remove the .flow_dissect callback altogether. Actually copy th

[PATCH v3 net-next 14/15] net: dsa: tag_sja1105: use a custom flow dissector procedure

2020-09-26 Thread Vladimir Oltean
The sja1105 is a bit of a special snowflake, in that not all frames are transmitted/received in the same way. L2 link-local frames are received with the source port/switch ID information put in the destination MAC address. For the rest, a tag_8021q header is used. So only the latter frames displace

[PATCH v3 net-next 11/15] net: dsa: tag_edsa: use the generic flow dissector procedure

2020-09-26 Thread Vladimir Oltean
Remove the .flow_dissect procedure, so the flow dissector will call the generic variant which works for this tagging protocol. Cc: Andrew Lunn Signed-off-by: Vladimir Oltean --- Changes in v3: Remove the .flow_dissect callback altogether. Actually copy the people from cc to the patch. net/dsa/

[PATCH v3 net-next 10/15] net: dsa: tag_dsa: use the generic flow dissector procedure

2020-09-26 Thread Vladimir Oltean
Remove the .flow_dissect procedure, so the flow dissector will call the generic variant which works for this tagging protocol. Cc: Andrew Lunn Signed-off-by: Vladimir Oltean --- Changes in v3: Remove the .flow_dissect callback altogether. Actually copy the people from cc to the patch. net/dsa/

[PATCH v3 net-next 13/15] net: dsa: tag_qca: use the generic flow dissector procedure

2020-09-26 Thread Vladimir Oltean
Remove the .flow_dissect procedure, so the flow dissector will call the generic variant which works for this tagging protocol. Cc: John Crispin Cc: Alexander Lobakin Signed-off-by: Vladimir Oltean --- Changes in v3: Remove the .flow_dissect callback altogether. Actually copy the people from cc

[PATCH v3 net-next 07/15] net: dsa: point out the tail taggers

2020-09-26 Thread Vladimir Oltean
The Marvell 88E6060 uses tag_trailer.c and the KSZ8795, KSZ9477 and KSZ9893 switches also use tail tags. Tell that to the DSA core, since this makes a difference for the flow dissector. Most switches break the parsing of frame headers, but these ones don't, so no flow dissector adjustment needs to

[PATCH v3 net-next 12/15] net: dsa: tag_mtk: use the generic flow dissector procedure

2020-09-26 Thread Vladimir Oltean
Remove the .flow_dissect procedure, so the flow dissector will call the generic variant which works for this tagging protocol. Cc: DENG Qingfang Cc: Sean Wang Cc: John Crispin Signed-off-by: Vladimir Oltean --- Changes in v3: Remove the .flow_dissect callback altogether. Actually copy the peop

[PATCH v3 net-next 02/15] net: dsa: allow drivers to request promiscuous mode on master

2020-09-26 Thread Vladimir Oltean
Currently DSA assumes that taggers don't mess with the destination MAC address of the frames on RX. That is not always the case. Some DSA headers are placed before the Ethernet header (ocelot), and others simply mangle random bytes from the destination MAC address (sja1105 with its incl_srcpt optio

Re: [PATCH v2 2/2] net: qrtr: Start MHI channels during init

2020-09-26 Thread David Miller
From: Manivannan Sadhasivam Date: Sat, 26 Sep 2020 13:26:56 +0530 > On Mon, Sep 21, 2020 at 09:43:04AM +0200, Loic Poulain wrote: >> Start MHI device channels so that transfers can be performed. >> The MHI stack does not auto-start channels anymore. >> >> Signed-off-by: Loic Poulain > > Review

[PATCH v3 net-next 08/15] net: flow_dissector: avoid indirect call to DSA .flow_dissect for generic case

2020-09-26 Thread Vladimir Oltean
With the recent mitigations against speculative execution exploits, indirect function calls are more expensive and it would be good to avoid them where possible. In the case of DSA, most switch taggers will shift the EtherType and next headers by a fixed amount equal to that tag's length in bytes.

[PATCH v3 net-next 04/15] net: dsa: tag_ocelot: use a short prefix on both ingress and egress

2020-09-26 Thread Vladimir Oltean
There are 2 goals that we follow: - Reduce the header size - Make the header size equal between RX and TX The issue that required long prefix on RX was the fact that the ocelot DSA tag, being put before Ethernet as it is, would overlap with the area that a DSA master uses for RX filtering (destin

[PATCH v3 net-next 00/15] Generic adjustment for flow dissector in DSA

2020-09-26 Thread Vladimir Oltean
This is the v2 of a series initially submitted in May: https://www.spinics.net/lists/netdev/msg651866.html The end goal is to get rid of the unintuitive code for the flow dissector that currently exists in the taggers. It can all be replaced by a single, common function. Some background work need

[PATCH v3 net-next 09/15] net: dsa: tag_brcm: use generic flow dissector procedure

2020-09-26 Thread Vladimir Oltean
There are 2 Broadcom tags in use, one places the DSA tag before the Ethernet destination MAC address, and the other before the EtherType. Nonetheless, both displace the rest of the headers, so this tagger can use the generic flow dissector procedure which accounts for that. The ASCII art drawing i

[PATCH v3 net-next 01/15] net: mscc: ocelot: move NPI port configuration to DSA

2020-09-26 Thread Vladimir Oltean
Remove the ocelot_configure_cpu() function, which was in fact bringing up 2 ports: the CPU port module, which both switchdev and DSA have, and the NPI port, which only DSA has. The (non-Ethernet) CPU port module is at a fixed index in the analyzer, whereas the NPI port is selected through the "eth

[PATCH v3 net-next 06/15] net: dsa: add a generic procedure for the flow dissector

2020-09-26 Thread Vladimir Oltean
For all DSA formats that don't use tail tags, it looks like behind the obscure number crunching they're all doing the same thing: locating the real EtherType behind the DSA tag. Nonetheless, this is not immediately obvious, so create a generic helper for those DSA taggers that put the header before

[PATCH v3 net-next 03/15] net: dsa: tag_sja1105: request promiscuous mode for master

2020-09-26 Thread Vladimir Oltean
Currently PTP is broken when ports are in standalone mode (the tagger keeps printing this message): sja1105 spi0.1: Expected meta frame, is 01-80-c2-00-00-0e in the DSA master multicast filter? Sure, one might say "simply add 01-80-c2-00-00-0e to the master's RX filter" but things become more co

Re: [PATCH v2] net: lantiq: Add locking for TX DMA channel

2020-09-26 Thread Hauke Mehrtens
On 9/24/20 3:01 AM, David Miller wrote: > From: Hauke Mehrtens > Date: Tue, 22 Sep 2020 23:41:12 +0200 > >> The TX DMA channel data is accessed by the xrx200_start_xmit() and the >> xrx200_tx_housekeeping() function from different threads. Make sure the >> accesses are synchronized by acquiring t

Re: [PATCH net-next v3 1/2] net: mscc: ocelot: Add support for tcam

2020-09-26 Thread Vladimir Oltean
Hi Horatiu, On Sat, Sep 26, 2020 at 08:55:36PM +0200, Horatiu Vultur wrote: > No, you will always have 4 Type-Group values regardless of number of > entries per row(1, 2 or 4). I think this one phrase explains it for me. > I am not sure that I understand what you want to achive with this or > so

Re: [PATCH] net: fec: Fix PHY init after phy_reset_after_clk_enable()

2020-09-26 Thread Marek Vasut
On 9/9/20 10:38 AM, Richard Leitner wrote: > On Fri, Sep 04, 2020 at 09:23:26PM +0200, Marek Vasut wrote: >> On 9/4/20 9:02 PM, Richard Leitner wrote: >>> On Fri, Sep 04, 2020 at 05:26:14PM +0200, Marek Vasut wrote: On 9/4/20 4:02 PM, Andrew Lunn wrote: > On Fri, Sep 04, 2020 at 12:45:44AM

Re: Re: [PATCH net] net/tls: sendfile fails with ktls offload

2020-09-26 Thread rohit maheshwari
> -Original Message- > From: Jakub Kicinski > Sent: Friday, September 25, 2020 3:27 AM > To: Rohit Maheshwari > Cc: netdev@vger.kernel.org; da...@davemloft.net; vakul.g...@nxp.com; secdev > Subject: Re: [PATCH net] net/tls: sendfile fails with ktls offload > > Also shouldn't we u

Re: [PATCH v2 net-next 06/16] net: dsa: add a generic procedure for the flow dissector

2020-09-26 Thread Andrew Lunn
On Sat, Sep 26, 2020 at 09:18:15PM +0300, Vladimir Oltean wrote: > On Sat, Sep 26, 2020 at 08:05:45PM +0200, Andrew Lunn wrote: > > Given spectra and meltdown etc, jumping through a pointer is expensive > > and we try to avoid it on the hot path. Given most of the taggers are > > going to use the g

Re: [PATCH v2 net-next 06/16] net: dsa: add a generic procedure for the flow dissector

2020-09-26 Thread Vladimir Oltean
On Sat, Sep 26, 2020 at 08:05:45PM +0200, Andrew Lunn wrote: > Given spectra and meltdown etc, jumping through a pointer is expensive > and we try to avoid it on the hot path. Given most of the taggers are > going to use the generic version, maybe add a test here, is > ops->flow_dissect the generic

Re: [PATCH v2 net-next 06/16] net: dsa: add a generic procedure for the flow dissector

2020-09-26 Thread Andrew Lunn
> +void dsa_tag_generic_flow_dissect(const struct sk_buff *skb, __be16 *proto, > + int *offset) > +{ > + const struct dsa_device_ops *ops = skb->dev->dsa_ptr->tag_ops; > + int tag_len = ops->overhead; > + > + *offset = tag_len; > + *proto = ((__be16 *)s

Re: [PATCH v2 net-next 06/16] net: dsa: add a generic procedure for the flow dissector

2020-09-26 Thread Andrew Lunn
On Sat, Sep 26, 2020 at 08:30:58PM +0300, Vladimir Oltean wrote: > For all DSA formats that don't use tail tags, it looks like behind the > obscure number crunching they're all doing the same thing: locating the > real EtherType behind the DSA tag. Nonetheless, this is not immediately > obvious, so

[PATCH 6/6] USB: cdc-acm: blacklist ETAS ES58X device

2020-09-26 Thread Vincent Mailhol
The ES58X devices are incorrectly recognized as USB Modem (CDC ACM), preventing the etas-es58x module to load. Thus, these have been added to the ignore list in drivers/usb/class/cdc-acm.c Signed-off-by: Vincent Mailhol --- drivers/usb/class/cdc-acm.c | 11 +++ 1 file changed, 11 insert

[PATCH 4/6] can: dev: add a helper function to calculate the duration of one bit

2020-09-26 Thread Vincent Mailhol
Rename macro CAN_CALC_SYNC_SEG to CAN_SYNC_SEG and make it available through include/linux/can/dev.h Add an helper function can_bit_time() which returns the duration (in time quanta) of one CAN bit. Rationale for this patch: the sync segment and the bit time are two concepts which are defined in

[PATCH 3/6] can: dev: __can_get_echo_skb(): fix the return length

2020-09-26 Thread Vincent Mailhol
The length of Remote Transmission Request (RTR) frames is always 0 bytes. The DLC represents the requested length, not the actual length of the RTR. But __can_get_echo_skb() returns the DLC value regardless. Apply get_can_len() function to retrieve the correct length. Signed-off-by: Vincent Mailh

[PATCH 2/6] can: dev: add a helper function to get the correct length of Classical frames

2020-09-26 Thread Vincent Mailhol
In classical CAN, the length of the data (i.e. CAN payload) is not always equal to the DLC! If the frame is a Remote Transmission Request (RTR), data length is always zero regardless of DLC value and else, if the DLC is greater than 8, the length is 8. Contrary to common belief, ISO 11898-1 Chapter

[PATCH 0/6] can: add support for ETAS ES58X CAN USB

2020-09-26 Thread Vincent Mailhol
Resending: In my previous e-mail, I forgot to include the linux-ker...@vger.kernel.org in the cover letter which broke the chain reply... Sorry for the spam. The purpose of this patch series is to introduce a new CAN USB driver to support ETAS USB interfaces (ES58X series). During development, is

[PATCH 1/6] can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context

2020-09-26 Thread Vincent Mailhol
If a driver calls can_get_echo_skb() during a hardware IRQ (which is often, but not always, the case), the 'WARN_ON(in_irq)' in net/core/skbuff.c#skb_release_head_state() might be triggered, under network congestion circumstances, together with the potential risk of a NULL pointer dereference. The

Re: [PATCH v2 net-next 02/16] net: dsa: allow drivers to request promiscuous mode on master

2020-09-26 Thread Vladimir Oltean
On Sat, Sep 26, 2020 at 07:47:00PM +0200, Andrew Lunn wrote: > Hi Vladimir > > I actually think this is a property of the tagger, not the DSA > driver. In fact, DSA drivers never handle actual frames, they are all > about the control plane, not the data plane. So i think this bool > should be in th

Re: [PATCH v2 net-next 05/16] net: dsa: make the .flow_dissect tagger callback return void

2020-09-26 Thread Andrew Lunn
On Sat, Sep 26, 2020 at 08:30:57PM +0300, Vladimir Oltean wrote: > There is no tagger that returns anything other than zero, so just change > the return type appropriately. > > Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v2 net-next 02/16] net: dsa: allow drivers to request promiscuous mode on master

2020-09-26 Thread Andrew Lunn
On Sat, Sep 26, 2020 at 08:30:54PM +0300, Vladimir Oltean wrote: > Currently DSA assumes that taggers don't mess with the destination MAC > address of the frames on RX. That is not always the case. Some DSA > headers are placed before the Ethernet header (ocelot), and others > simply mangle random

[PATCH 1/6] can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context

2020-09-26 Thread Vincent Mailhol
If a driver calls can_get_echo_skb() during a hardware IRQ (which is often, but not always, the case), the 'WARN_ON(in_irq)' in net/core/skbuff.c#skb_release_head_state() might be triggered, under network congestion circumstances, together with the potential risk of a NULL pointer dereference. The

[PATCH] wl3501_cs: Remove unnecessary NULL check

2020-09-26 Thread Alex Dewar
In wl3501_detach(), link->priv is checked for a NULL value before being passed to free_netdev(). However, it cannot be NULL at this point as it has already been passed to other functions, so just remove the check. Addresses-Coverity: CID 710499: Null pointer dereferences (REVERSE_INULL) Signed-off

[PATCH 3/6] can: dev: __can_get_echo_skb(): fix the return length

2020-09-26 Thread Vincent Mailhol
The length of Remote Transmission Request (RTR) frames is always 0 bytes. The DLC represents the requested length, not the actual length of the RTR. But __can_get_echo_skb() returns the DLC value regardless. Apply get_can_len() function to retrieve the correct length. Signed-off-by: Vincent Mailh

[PATCH 4/6] can: dev: add a helper function to calculate the duration of one bit

2020-09-26 Thread Vincent Mailhol
Rename macro CAN_CALC_SYNC_SEG to CAN_SYNC_SEG and make it available through include/linux/can/dev.h Add an helper function can_bit_time() which returns the duration (in time quanta) of one CAN bit. Rationale for this patch: the sync segment and the bit time are two concepts which are defined in

Re: [PATCH net-next RFC v1 3/4] net: dsa: Add helper for converting devlink port to ds and port

2020-09-26 Thread Vladimir Oltean
On Sat, Sep 26, 2020 at 07:28:26PM +0200, Andrew Lunn wrote: > Hi Vladimir > > Just finishing off the next version of these patches, and i looped > back to check i addressed all the comments. > > This one i tend to disagree with. If you look at DSA drivers, a port > variable is always an integer in

[PATCH 1/6] can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context

2020-09-26 Thread Vincent Mailhol
If a driver calls can_get_echo_skb() during a hardware IRQ (which is often, but not always, the case), the 'WARN_ON(in_irq)' in net/core/skbuff.c#skb_release_head_state() might be triggered, under network congestion circumstances, together with the potential risk of a NULL pointer dereference. The

[PATCH v2 net-next 01/16] net: mscc: ocelot: move NPI port configuration to DSA

2020-09-26 Thread Vladimir Oltean
Remove the ocelot_configure_cpu() function, which was in fact bringing up 2 ports: the CPU port module, which both switchdev and DSA have, and the NPI port, which only DSA has. The (non-Ethernet) CPU port module is at a fixed index in the analyzer, whereas the NPI port is selected through the "eth

[PATCH v2 net-next 03/16] net: dsa: sja1105: request promiscuous mode for master

2020-09-26 Thread Vladimir Oltean
Currently PTP is broken when ports are in standalone mode (the tagger keeps printing this message): sja1105 spi0.1: Expected meta frame, is 01-80-c2-00-00-0e in the DSA master multicast filter? Sure, one might say "simply add 01-80-c2-00-00-0e to the master's RX filter" but things become more co

[PATCH v2 net-next 16/16] net: dsa: tag_rtl4_a: use the generic flow dissector procedure

2020-09-26 Thread Vladimir Oltean
The Realtek 4 byte A tag is placed before the EtherType, so refactor the .flow_dissect procedure to call the common helper created for this specific case. Cc: Linus Walleij Cc: DENG Qingfang Cc: Mauri Sandberg Signed-off-by: Vladimir Oltean --- net/dsa/tag_rtl4_a.c | 10 +- 1 file cha

[PATCH v2 net-next 10/16] net: dsa: tag_edsa: use the generic flow dissector procedure

2020-09-26 Thread Vladimir Oltean
Refactor the .flow_dissect procedure to call the common helper instead of open-coding the header displacement. Cc: Andrew Lunn Signed-off-by: Vladimir Oltean --- net/dsa/tag_edsa.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.

[PATCH v2 net-next 11/16] net: dsa: tag_lan9303: use the generic flow dissector procedure

2020-09-26 Thread Vladimir Oltean
The LAN9303 switches use a DSA tag placed before the EtherType, so they displace all headers that follow afterwards. Call the generic flow dissector procedure so that this is accounted for. Cc: Juergen Beisert Cc: Egil Hjelmeland Signed-off-by: Vladimir Oltean --- net/dsa/tag_lan9303.c | 1 +

[PATCH v2 net-next 13/16] net: dsa: tag_ocelot: use the generic flow dissector procedure

2020-09-26 Thread Vladimir Oltean
Ocelot switches put their DSA tag before the Ethernet header, so they shift the other headers and need to call the generic flow dissector procedure. Do this now, once we've made the injection and the extraction header use the same length prefixes. Signed-off-by: Vladimir Oltean --- net/dsa/tag_o

[PATCH v2 net-next 05/16] net: dsa: make the .flow_dissect tagger callback return void

2020-09-26 Thread Vladimir Oltean
There is no tagger that returns anything other than zero, so just change the return type appropriately. Signed-off-by: Vladimir Oltean --- include/net/dsa.h | 4 ++-- net/core/flow_dissector.c | 4 ++-- net/dsa/tag_brcm.c| 5 ++--- net/dsa/tag_dsa.c | 5 ++--- net/dsa/tag

  1   2   >