Re: [PATCH net-next] net: enetc: automatically select IERB module

2021-04-20 Thread Vladimir Oltean
e > enetc was enabled. Fix it by automatically select the enetc-ierb module. > > Fixes: e7d48e5fbf30 ("net: enetc: add a mini driver for the Integrated > Endpoint Register Block") > Signed-off-by: Michael Walle > --- Acked-by: Vladimir Oltean

Re: [EXT] Re: [net-next] net: dsa: felix: disable always guard band bit for TAS config

2021-04-20 Thread Vladimir Oltean
On Tue, Apr 20, 2021 at 01:30:51PM +0300, Vladimir Oltean wrote: > On Tue, Apr 20, 2021 at 10:28:45AM +, Xiaoliang Yang wrote: > > Hi Vladimir, > > > > On Tue, Apr 20, 2021 at 16:27:10AM +0800, Vladimir Oltean wrote: > > > > > > On Tue, Apr 20, 2021 at

Re: [net-next] net: dsa: felix: disable always guard band bit for TAS config

2021-04-20 Thread Vladimir Oltean
o reserve > guard band on each GCL. Users can manually add guard band time for each > schedule queues in their configuration if they want. > > Signed-off-by: Xiaoliang Yang > --- Reviewed-by: Vladimir Oltean

Re: [EXT] Re: [net-next] net: dsa: felix: disable always guard band bit for TAS config

2021-04-20 Thread Vladimir Oltean
On Tue, Apr 20, 2021 at 10:28:45AM +, Xiaoliang Yang wrote: > Hi Vladimir, > > On Tue, Apr 20, 2021 at 16:27:10AM +0800, Vladimir Oltean wrote: > > > > On Tue, Apr 20, 2021 at 03:06:40AM +, Xiaoliang Yang wrote: > >> Hi Vladimir. > >> > >>

Re: [EXT] Re: [net-next] net: dsa: felix: disable always guard band bit for TAS config

2021-04-20 Thread Vladimir Oltean
On Tue, Apr 20, 2021 at 03:06:40AM +, Xiaoliang Yang wrote: > Hi Vladimir. > > On Mon, Apr 19, 2021 at 20:38PM +0800, Vladimir Oltean wrote: > > > >What is a scheduled queue? When time-aware scheduling is enabled on > >the port, why are some queues scheduled a

Re: [net-next 3/3] net: mscc: ocelot: support PTP Sync one-step timestamping

2021-04-20 Thread Vladimir Oltean
On Tue, Apr 20, 2021 at 07:33:39AM +, Y.b. Lu wrote: > > > + /* For two-step timestamp, retrieve ptp_cmd in DSA_SKB_CB_PRIV > > > + * and timestamp ID in clone->cb[0]. > > > + * For one-step timestamp, retrieve ptp_cmd in DSA_SKB_CB_PRIV. > > > + */ > > > + u8 *ptp_cmd =

Re: [net-next] net: dsa: felix: disable always guard band bit for TAS config

2021-04-19 Thread Vladimir Oltean
Hi Xiaoliang, On Mon, Apr 19, 2021 at 06:25:30PM +0800, Xiaoliang Yang wrote: > ALWAYS_GUARD_BAND_SCH_Q bit in TAS config register is descripted as > this: > 0: Guard band is implemented for nonschedule queues to schedule > queues transition. > 1: Guard band is implemented

Re: [net-next 3/3] net: mscc: ocelot: support PTP Sync one-step timestamping

2021-04-18 Thread Vladimir Oltean
On Fri, Apr 16, 2021 at 08:36:55PM +0800, Yangbo Lu wrote: > Although HWTSTAMP_TX_ONESTEP_SYNC existed in ioctl for hardware timestamp > configuration, the PTP Sync one-step timestamping had never been supported. > > This patch is to truely support it. Actually the ocelot switchdev driver does

Re: [net-next 2/3] net: mscc: ocelot: convert to ocelot_port_txtstamp_request()

2021-04-18 Thread Vladimir Oltean
, port, skb, clone)) > + return false; > > - return false; > + return true; Considering the changes you'll have to make to patch 1 (changing the return value and populating DSA_SKB_CB(skb)->clone at the end of this function: Reviewed-by: Vladimir Oltean

Re: [net-next 1/3] net: dsa: optimize tx timestamp request handling

2021-04-18 Thread Vladimir Oltean
On Fri, Apr 16, 2021 at 08:36:53PM +0800, Yangbo Lu wrote: > Optimization could be done on dsa_skb_tx_timestamp(), and dsa device > drivers should adapt to it. > > - Check SKBTX_HW_TSTAMP request flag at the very beginning, instead of in > port_txtstamp, so that most skbs not requiring tx

Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-14 Thread Vladimir Oltean
On Wed, Apr 14, 2021 at 08:39:53PM +0200, Tobias Waldekranz wrote: > In order to have two entries for the same destination, they must belong > to different FIDs. But that FID is also used for automatic learning. So > if all ports use their own FID, all the switched traffic will have to be >

Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-12 Thread Vladimir Oltean
On Tue, Apr 13, 2021 at 12:26:52AM +0200, Tobias Waldekranz wrote: > On Tue, Apr 13, 2021 at 01:06, Vladimir Oltean wrote: > > On Mon, Apr 12, 2021 at 11:49:22PM +0200, Tobias Waldekranz wrote: > >> On Tue, Apr 13, 2021 at 00:34, Vladimir Oltean wrote: > >> > On M

Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-12 Thread Vladimir Oltean
On Tue, Apr 13, 2021 at 12:04:57AM +0200, Marek Behun wrote: > On Mon, 12 Apr 2021 19:32:11 +0300 > Vladimir Oltean wrote: > > > On Mon, Apr 12, 2021 at 11:00:45PM +0800, DENG Qingfang wrote: > > > On Sun, Apr 11, 2021 at 09:50:17PM +0300, Vladimir Oltean wrote: > >

Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-12 Thread Vladimir Oltean
On Mon, Apr 12, 2021 at 11:49:22PM +0200, Tobias Waldekranz wrote: > On Tue, Apr 13, 2021 at 00:34, Vladimir Oltean wrote: > > On Mon, Apr 12, 2021 at 11:22:45PM +0200, Tobias Waldekranz wrote: > >> On Mon, Apr 12, 2021 at 21:30, Marek Behun wrote: > >> > On M

Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-12 Thread Vladimir Oltean
On Mon, Apr 12, 2021 at 11:22:45PM +0200, Tobias Waldekranz wrote: > On Mon, Apr 12, 2021 at 21:30, Marek Behun wrote: > > On Mon, 12 Apr 2021 14:46:11 +0200 > > Tobias Waldekranz wrote: > > > >> I agree. Unless you only have a few really wideband flows, a LAG will > >> typically do a great job

Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-12 Thread Vladimir Oltean
On Mon, Apr 12, 2021 at 11:00:45PM +0800, DENG Qingfang wrote: > On Sun, Apr 11, 2021 at 09:50:17PM +0300, Vladimir Oltean wrote: > > > > So I'd be tempted to say 'tough luck' if all your ports are not up, and > > the ones that are are assigned statically to th

Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-12 Thread Vladimir Oltean
On Mon, Apr 12, 2021 at 02:46:11PM +0200, Tobias Waldekranz wrote: > On Sun, Apr 11, 2021 at 21:50, Vladimir Oltean wrote: > > On Sun, Apr 11, 2021 at 08:01:35PM +0200, Marek Behun wrote: > >> On Sat, 10 Apr 2021 15:34:46 +0200 > >> Ansuel Smith wrote: > >>

Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-11 Thread Vladimir Oltean
On Sun, Apr 11, 2021 at 09:50:17PM +0300, Vladimir Oltean wrote: > On Sun, Apr 11, 2021 at 08:01:35PM +0200, Marek Behun wrote: > > On Sat, 10 Apr 2021 15:34:46 +0200 > > Ansuel Smith wrote: > > > > > Hi, > > > this is a respin of the Marek series in hope t

Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support

2021-04-11 Thread Vladimir Oltean
On Sun, Apr 11, 2021 at 08:01:35PM +0200, Marek Behun wrote: > On Sat, 10 Apr 2021 15:34:46 +0200 > Ansuel Smith wrote: > > > Hi, > > this is a respin of the Marek series in hope that this time we can > > finally make some progress with dsa supporting multi-cpu port. > > > > This implementation

Re: [PATCH RFC iproute2-next] iplink: allow to change iplink value

2021-04-11 Thread Vladimir Oltean
On Sun, Apr 11, 2021 at 10:04:11AM -0700, Stephen Hemminger wrote: > On Sat, 10 Apr 2021 15:34:50 +0200 > Ansuel Smith wrote: > > > Allow to change the interface to which a given interface is linked to. > > This is useful in the case of multi-CPU port DSA, for changing the CPU > > port of a

Re: [PATCH net v2 1/2] net: dsa: lantiq_gswip: Don't use PHY auto polling

2021-04-08 Thread Vladimir Oltean
On Thu, Apr 08, 2021 at 08:38:27PM +0200, Martin Blumenstingl wrote: > PHY auto polling on the GSWIP hardware can be used so link changes > (speed, link up/down, etc.) can be detected automatically. Internally > GSWIP reads the PHY's registers for this functionality. Based on this > automatic

Re: [PATCH net-next v1 2/9] net: dsa: tag_ar9331: detect IGMP and MLD packets

2021-04-04 Thread Vladimir Oltean
On Sun, Apr 04, 2021 at 07:35:26AM +0200, Oleksij Rempel wrote: > Am 04.04.21 um 02:02 schrieb Vladimir Oltean: > > On Sat, Apr 03, 2021 at 07:14:56PM +0200, Oleksij Rempel wrote: > >> Am 03.04.21 um 16:49 schrieb Andrew Lunn: > >>>> @@ -31,6 +96,13 @@ static struc

Re: [PATCH net-next v1 1/9] net: dsa: add rcv_post call back

2021-04-04 Thread Vladimir Oltean
On Sun, Apr 04, 2021 at 07:49:03AM +0200, Oleksij Rempel wrote: > Am 04.04.21 um 01:21 schrieb Vladimir Oltean: > > On Sat, Apr 03, 2021 at 05:05:34PM +0300, Vladimir Oltean wrote: > >> On Sat, Apr 03, 2021 at 01:48:40PM +0200, Oleksij Rempel wrote: > >>> Some sw

Re: [PATCH net-next v1 9/9] net: dsa: qca: ar9331: add vlan support

2021-04-03 Thread Vladimir Oltean
On Sat, Apr 03, 2021 at 01:48:48PM +0200, Oleksij Rempel wrote: > This switch provides simple VLAN resolution database for 16 entries (VLANs). > With this database we can cover typical functionalities as port based > VLANs, untagged and tagged egress. Port based ingress filtering. > > The VLAN

Re: [PATCH net-next v1 4/9] net: dsa: qca: ar9331: make proper initial port defaults

2021-04-03 Thread Vladimir Oltean
On Sat, Apr 03, 2021 at 01:48:43PM +0200, Oleksij Rempel wrote: > Make sure that all external port are actually isolated from each other, > so no packets are leaked. > > Signed-off-by: Oleksij Rempel > --- > drivers/net/dsa/qca/ar9331.c | 145 ++- > 1 file

Re: [PATCH net-next v1 2/9] net: dsa: tag_ar9331: detect IGMP and MLD packets

2021-04-03 Thread Vladimir Oltean
On Sat, Apr 03, 2021 at 07:14:56PM +0200, Oleksij Rempel wrote: > Am 03.04.21 um 16:49 schrieb Andrew Lunn: > >> @@ -31,6 +96,13 @@ static struct sk_buff *ar9331_tag_xmit(struct sk_buff > >> *skb, > >>__le16 *phdr; > >>u16 hdr; > >> > >> + if (dp->stp_state == BR_STATE_BLOCKING) { > >> +

Re: [PATCH net-next v1 5/9] net: dsa: qca: ar9331: add forwarding database support

2021-04-03 Thread Vladimir Oltean
On Sat, Apr 03, 2021 at 05:25:16PM +0200, Andrew Lunn wrote: > > +static int ar9331_sw_port_fdb_rmw(struct ar9331_sw_priv *priv, > > + const unsigned char *mac, > > + u8 port_mask_set, > > + u8 port_mask_clr) > >

Re: [PATCH net-next v1 1/9] net: dsa: add rcv_post call back

2021-04-03 Thread Vladimir Oltean
On Sat, Apr 03, 2021 at 05:05:34PM +0300, Vladimir Oltean wrote: > On Sat, Apr 03, 2021 at 01:48:40PM +0200, Oleksij Rempel wrote: > > Some switches (for example ar9331) do not provide enough information > > about forwarded packets. If the switch decision was made based on IPv4 >

Re: [PATCH net-next v1 2/9] net: dsa: tag_ar9331: detect IGMP and MLD packets

2021-04-03 Thread Vladimir Oltean
On Sat, Apr 03, 2021 at 05:22:24PM +0200, Oleksij Rempel wrote: > Off-topic question, this patch set stops to work after rebasing against > latest netdev. I get following warning: > ip l s lan0 master test > RTNETLINK answers: Invalid argumen > > Are there some API changes? Yes, it's likely that

Re: [PATCH net-next v1 1/9] net: dsa: add rcv_post call back

2021-04-03 Thread Vladimir Oltean
On Sat, Apr 03, 2021 at 01:48:40PM +0200, Oleksij Rempel wrote: > Some switches (for example ar9331) do not provide enough information > about forwarded packets. If the switch decision was made based on IPv4 > or IPv6 header, we need to analyze it and set proper flag. > > Potentially we can do it

Re: [PATCH net-next v1 2/9] net: dsa: tag_ar9331: detect IGMP and MLD packets

2021-04-03 Thread Vladimir Oltean
On Sat, Apr 03, 2021 at 03:26:36PM +0200, Oleksij Rempel wrote: > On Sat, Apr 03, 2021 at 04:03:18PM +0300, Vladimir Oltean wrote: > > Hi Oleksij, > > > > On Sat, Apr 03, 2021 at 01:48:41PM +0200, Oleksij Rempel wrote: > > > The ar9331 switch is not forwardin

Re: [PATCH net-next v1 2/9] net: dsa: tag_ar9331: detect IGMP and MLD packets

2021-04-03 Thread Vladimir Oltean
Hi Oleksij, On Sat, Apr 03, 2021 at 01:48:41PM +0200, Oleksij Rempel wrote: > The ar9331 switch is not forwarding IGMP and MLD packets if IGMP > snooping is enabled. This patch is trying to mimic the HW heuristic to take > same decisions as this switch would do to be able to tell the linux >

Re: [EXT] Re: [PATCH] dt-bindings: spi: Convert Freescale DSPI to json schema

2021-03-24 Thread Vladimir Oltean
On Wed, Mar 24, 2021 at 01:20:33PM -0600, Rob Herring wrote: > In addition, "fsl,ls1088a-dspi" is not known by the Linux driver, so a > fallback is needed. This is a good point, the LS1088A went completely off of my radar, thanks for pointing it out.

Re: [EXT] Re: [PATCH] dt-bindings: spi: Convert Freescale DSPI to json schema

2021-03-24 Thread Vladimir Oltean
On Wed, Mar 24, 2021 at 12:14:03PM -0600, Rob Herring wrote: > On Tue, Mar 16, 2021 at 12:15:06PM +0200, Vladimir Oltean wrote: > > On Tue, Mar 16, 2021 at 06:08:17AM +, Kuldeep Singh wrote: > > > Compatible entries in conjugation require enum and const pair. > > >

Re: [PATCH][next] net: bridge: Fix missing return assignment from br_vlan_replay_one call

2021-03-24 Thread Vladimir Oltean
ed to zero. Fix this > by assigning err. > > Addresses-Coverity: ("'Constant' variable guards dead code") > Fixes: 22f67cdfae6a ("net: bridge: add helper to replay VLANs installed on > port") > Signed-off-by: Colin Ian King > --- Reviewed-by: Vladimir Oltean

Re: [PATCH v4 net-next 04/11] net: bridge: add helper to replay port and local fdb entries

2021-03-23 Thread Vladimir Oltean
On Tue, Mar 23, 2021 at 01:12:33PM +0200, Nikolay Aleksandrov wrote: > On 23/03/2021 01:51, Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > When a switchdev port starts offloading a LAG that is already in a > > bridge and has an FDB entry pointing to it:

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

2021-03-23 Thread Vladimir Oltean
On Mon, Mar 22, 2021 at 10:00:33PM +0200, Vladimir Oltean wrote: > Hi Yunsheng, > > On Mon, Mar 22, 2021 at 05:09:16PM +0800, Yunsheng Lin wrote: > > Currently pfifo_fast has both TCQ_F_CAN_BYPASS and TCQ_F_NOLOCK > > flag set, but queue discipline by-pass does not work f

[PATCH v4 net-next 11/11] net: ocelot: replay switchdev events when joining bridge

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean The premise of this change is that the switchdev port attributes and objects offloaded by ocelot might have been missed when we are joining an already existing bridge port, such as a bonding interface. The patch pulls these switchdev attributes and objects from the bridge

[PATCH v4 net-next 07/11] net: dsa: pass extack to dsa_port_{bridge,lag}_join

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean This is a pretty noisy change that was broken out of the larger change for replaying switchdev attributes and objects at bridge join time, which is when these extack objects are actually used. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed

[PATCH v4 net-next 10/11] net: ocelot: call ocelot_netdevice_bridge_join when joining a bridged LAG

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean Similar to the DSA situation, ocelot supports LAG offload but treats this scenario improperly: ip link add br0 type bridge ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 We do the same thing as we do there, which is to simulate

[PATCH v4 net-next 09/11] net: dsa: sync up switchdev objects and port attributes when joining the bridge

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean If we join an already-created bridge port, such as a bond master interface, then we can miss the initial switchdev notifications emitted by the bridge for this port, while it wasn't offloaded by anybody. Signed-off-by: Vladimir Oltean --- net/dsa/dsa_priv.h | 3 +++ net

[PATCH v4 net-next 08/11] net: dsa: inherit the actual bridge port flags at join time

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean DSA currently assumes that the bridge port starts off with this constellation of bridge port flags: - learning on - unicast flooding on - multicast flooding on - broadcast flooding on just by virtue of code copy-pasta from the bridge layer (new_nbp). This was a simple

[PATCH v4 net-next 03/11] net: bridge: add helper to replay port and host-joined mdb entries

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean I have a system with DSA ports, and udhcpcd is configured to bring interfaces up as soon as they are created. I create a bridge as follows: ip link add br0 type bridge As soon as I create the bridge and udhcpcd brings it up, I also have avahi which automatically starts

[PATCH v4 net-next 05/11] net: bridge: add helper to replay VLANs installed on port

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean Currently this simple setup with DSA: ip link add br0 type bridge vlan_filtering 1 ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 will not work because the bridge has created the PVID in br_add_if -> nbp_vlan_init, and it

[PATCH v4 net-next 06/11] net: dsa: call dsa_port_bridge_join when joining a LAG that is already in a bridge

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean DSA can properly detect and offload this sequence of operations: ip link add br0 type bridge ip link add bond0 type bond ip link set swp0 master bond0 ip link set bond0 master br0 But not this one: ip link add br0 type bridge ip link add bond0 type bond ip link set bond0

[PATCH v4 net-next 04/11] net: bridge: add helper to replay port and local fdb entries

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean When a switchdev port starts offloading a LAG that is already in a bridge and has an FDB entry pointing to it: ip link set bond0 master br0 bridge fdb add dev bond0 00:01:02:03:04:05 master static ip link set swp0 master bond0 the switchdev driver will have no idea

[PATCH v4 net-next 02/11] net: bridge: add helper to retrieve the current ageing time

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean The SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME attribute is only emitted from: sysfs/ioctl/netlink -> br_set_ageing_time -> __set_ageing_time therefore not at bridge port creation time, so: (a) switchdev drivers have to hardcode the initial value for the address

[PATCH v4 net-next 01/11] net: bridge: add helper for retrieving the current bridge port STP state

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean It may happen that we have the following topology with DSA or any other switchdev driver with LAG offload: ip link add br0 type bridge stp_state 1 ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 ip link set swp1 master bond0 STP

[PATCH v4 net-next 00/11] Better support for sandwiched LAGs with bridge and DSA

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean Changes in v4: - Added missing EXPORT_SYMBOL_GPL - Using READ_ONCE(fdb->dst) - Split patches into (a) adding the bridge helpers (b) making DSA use them - br_mdb_replay went back to the v1 approach where it allocated memory in atomic context - Crea

Re: [RFC PATCH v2 net-next 14/16] net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge

2021-03-22 Thread Vladimir Oltean
On Mon, Mar 22, 2021 at 04:04:01PM +0800, DENG Qingfang wrote: > On Fri, Mar 19, 2021 at 6:49 PM Vladimir Oltean wrote: > > Why would you even want to look at the source net device for forwarding? > > I'd say that if dp->bridge_dev is NULL in the xmit function, you certainly

Re: [PATCH net] net: dsa: don't assign an error value to tag_ops

2021-03-22 Thread Vladimir Oltean
er when a deferred switch configuration happens later. > > Fixes: 357f203bb3b5 ("net: dsa: keep a copy of the tagging protocol in the > DSA switch tree") > > Signed-off-by: George McCollister > --- Reviewed-by: Vladimir Oltean Just FYI, new lines aren't typically added between the various tags.

Re: [PATCH net] net: dsa: don't assign an error value to tag_ops

2021-03-22 Thread Vladimir Oltean
On Mon, Mar 22, 2021 at 03:26:50PM -0500, George McCollister wrote: > Use a temporary variable to hold the return value from > dsa_tag_driver_get() instead of assigning it to dst->tag_ops. Leaving > an error value in dst->tag_ops can result in deferencing an invalid > pointer when a deferred

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

2021-03-22 Thread Vladimir Oltean
Hi Yunsheng, On Mon, Mar 22, 2021 at 05:09:16PM +0800, Yunsheng Lin wrote: > Currently pfifo_fast has both TCQ_F_CAN_BYPASS and TCQ_F_NOLOCK > flag set, but queue discipline by-pass does not work for lockless > qdisc because skb is always enqueued to qdisc even when the qdisc > is empty, see

Re: [RFC PATCH v2 net-next 16/16] net: bridge: switchdev: let drivers inform which bridge ports are offloaded

2021-03-22 Thread Vladimir Oltean
On Mon, Mar 22, 2021 at 05:30:52PM +0100, Tobias Waldekranz wrote: > > --- > > .../ethernet/freescale/dpaa2/dpaa2-switch.c | 4 +- > > .../marvell/prestera/prestera_switchdev.c | 7 ++ > > .../mellanox/mlxsw/spectrum_switchdev.c | 4 +- > > drivers/net/ethernet/mscc/ocelot_net.c

Re: [RFC PATCH v2 net-next 09/16] net: dsa: replay port and local fdb entries when joining the bridge

2021-03-22 Thread Vladimir Oltean
On Mon, Mar 22, 2021 at 06:07:51PM +0100, Tobias Waldekranz wrote: > On Mon, Mar 22, 2021 at 18:19, Vladimir Oltean wrote: > > On Mon, Mar 22, 2021 at 04:44:41PM +0100, Tobias Waldekranz wrote: > >> I do not know if it is a problem or not, more of an observation: This is &

Re: [PATCH v3 net-next 08/12] net: dsa: replay port and host-joined mdb entries when joining the bridge

2021-03-22 Thread Vladimir Oltean
On Mon, Mar 22, 2021 at 06:35:10PM +0200, Nikolay Aleksandrov wrote: > > + hlist_for_each_entry(mp, >mdb_list, mdb_node) { > > You cannot walk over these lists without the multicast lock or RCU. RTNL is > not > enough because of various timers and leave messages that can alter both the >

Re: [RFC PATCH v2 net-next 09/16] net: dsa: replay port and local fdb entries when joining the bridge

2021-03-22 Thread Vladimir Oltean
On Mon, Mar 22, 2021 at 04:44:41PM +0100, Tobias Waldekranz wrote: > I do not know if it is a problem or not, more of an observation: This is > not guaranteed to be an exact replay of the events that the bridge port > (i.e. bond0 or whatever) has received since, in fdb_insert, we exit > early when

Re: [RFC PATCH v2 net-next 06/16] net: dsa: sync multicast router state when joining the bridge

2021-03-22 Thread Vladimir Oltean
On Mon, Mar 22, 2021 at 12:17:33PM +0100, Tobias Waldekranz wrote: > On Fri, Mar 19, 2021 at 01:18, Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > Make sure that the multicast router setting of the bridge is picked up > > correctly by DSA when joi

Re: enetc: fix bitfields, we are clearing wrong bits

2021-03-21 Thread Vladimir Oltean
On Sun, Mar 21, 2021 at 07:44:19PM +0200, Vladimir Oltean wrote: > On Sun, Mar 21, 2021 at 05:25:00PM +0100, Pavel Machek wrote: > > Bitfield manipulation in enetc_mac_config() looks wrong. Fix > > it. Untested. > > > > Signed-off-by: Pavel Machek (CIP) > > >

Re: enetc: fix bitfields, we are clearing wrong bits

2021-03-21 Thread Vladimir Oltean
s: c76a97218dcb ("net: enetc: force the RGMII speed and duplex instead of operating in inband mode") Reviewed-by: Vladimir Oltean Note that for normal operation, the bug was inconsequential, due to the fact that we write the IF_MODE register in two stages, first in .phylink_ma

Re: [PATCH net-next] dsa: simplify Kconfig symbols and dependencies

2021-03-20 Thread Vladimir Oltean
re's no more empty menu on > configurations without DSA. > > 4. Kbuild will now descend into 'drivers/net/dsa' only when >CONFIG_NET_DSA is y or m. > > This is safe since no objects inside this folder can be built without > DSA core, as well as when CONFIG_NET_DSA=m, no ob

[PATCH v3 net-next 12/12] net: ocelot: replay switchdev events when joining bridge

2021-03-20 Thread Vladimir Oltean
From: Vladimir Oltean The premise of this change is that the switchdev port attributes and objects offloaded by ocelot might have been missed when we are joining an already existing bridge port, such as a bonding interface. The patch pulls these switchdev attributes and objects from the bridge

[PATCH v3 net-next 11/12] net: ocelot: call ocelot_netdevice_bridge_join when joining a bridged LAG

2021-03-20 Thread Vladimir Oltean
From: Vladimir Oltean Similar to the DSA situation, ocelot supports LAG offload but treats this scenario improperly: ip link add br0 type bridge ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 We do the same thing as we do there, which is to simulate

[PATCH v3 net-next 10/12] net: dsa: replay VLANs installed on port when joining the bridge

2021-03-20 Thread Vladimir Oltean
From: Vladimir Oltean Currently this simple setup: ip link add br0 type bridge vlan_filtering 1 ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 will not work because the bridge has created the PVID in br_add_if -> nbp_vlan_init, and it has notif

[PATCH v3 net-next 09/12] net: dsa: replay port and local fdb entries when joining the bridge

2021-03-20 Thread Vladimir Oltean
From: Vladimir Oltean When a DSA port joins a LAG that already had an FDB entry pointing to it: ip link set bond0 master br0 bridge fdb add dev bond0 00:01:02:03:04:05 master static ip link set swp0 master bond0 the DSA port will have no idea that this FDB entry is there, because it missed

[PATCH v3 net-next 08/12] net: dsa: replay port and host-joined mdb entries when joining the bridge

2021-03-20 Thread Vladimir Oltean
From: Vladimir Oltean I have udhcpcd in my system and this is configured to bring interfaces up as soon as they are created. I create a bridge as follows: ip link add br0 type bridge As soon as I create the bridge and udhcpcd brings it up, I also have avahi which automatically starts sending

[PATCH v3 net-next 07/12] net: dsa: sync ageing time when joining the bridge

2021-03-20 Thread Vladimir Oltean
From: Vladimir Oltean The SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME attribute is only emitted from: sysfs/ioctl/netlink -> br_set_ageing_time -> __set_ageing_time therefore not at bridge port creation time, so: (a) drivers had to hardcode the initial value for the address agein

[PATCH v3 net-next 06/12] net: dsa: sync multicast router state when joining the bridge

2021-03-20 Thread Vladimir Oltean
From: Vladimir Oltean Make sure that the multicast router setting of the bridge is picked up correctly by DSA when joining, regardless of whether there are sandwiched interfaces or not. The SWITCHDEV_ATTR_ID_BRIDGE_MROUTER port attribute is only emitted from br_mc_router_state_change. Signed

[PATCH v3 net-next 05/12] net: dsa: sync up VLAN filtering state when joining the bridge

2021-03-20 Thread Vladimir Oltean
From: Vladimir Oltean This is the same situation as for other switchdev port attributes: if we join an already-created bridge port, such as a bond master interface, then we can miss the initial switchdev notification emitted by the bridge for this port. Signed-off-by: Vladimir Oltean Reviewed

[PATCH v3 net-next 04/12] net: dsa: sync up with bridge port's STP state when joining

2021-03-20 Thread Vladimir Oltean
From: Vladimir Oltean It may happen that we have the following topology: ip link add br0 type bridge stp_state 1 ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 ip link set swp1 master bond0 STP decides that it should put bond0 into the BLOCKING state

[PATCH v3 net-next 01/12] net: dsa: call dsa_port_bridge_join when joining a LAG that is already in a bridge

2021-03-20 Thread Vladimir Oltean
From: Vladimir Oltean DSA can properly detect and offload this sequence of operations: ip link add br0 type bridge ip link add bond0 type bond ip link set swp0 master bond0 ip link set bond0 master br0 But not this one: ip link add br0 type bridge ip link add bond0 type bond ip link set bond0

[PATCH v3 net-next 03/12] net: dsa: inherit the actual bridge port flags at join time

2021-03-20 Thread Vladimir Oltean
From: Vladimir Oltean DSA currently assumes that the bridge port starts off with this constellation of bridge port flags: - learning on - unicast flooding on - multicast flooding on - broadcast flooding on just by virtue of code copy-pasta from the bridge layer (new_nbp). This was a simple

[PATCH v3 net-next 00/12] Better support for sandwiched LAGs with bridge and DSA

2021-03-20 Thread Vladimir Oltean
From: Vladimir Oltean The objective of this series is to make LAG uppers on top of switchdev ports work regardless of which order we link interfaces to their masters (first make the port join the LAG, then the LAG join the bridge, or the other way around). There was a design decision to be made

[PATCH v3 net-next 02/12] net: dsa: pass extack to dsa_port_{bridge,lag}_join

2021-03-20 Thread Vladimir Oltean
From: Vladimir Oltean This is a pretty noisy change that was broken out of the larger change for replaying switchdev attributes and objects at bridge join time, which is when these extack objects are actually used. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- Changes in v3

Re: [RFC PATCH v2 net-next 08/16] net: dsa: replay port and host-joined mdb entries when joining the bridge

2021-03-20 Thread Vladimir Oltean
On Fri, Mar 19, 2021 at 03:20:38PM -0700, Florian Fainelli wrote: > > > On 3/18/2021 4:18 PM, Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > I have udhcpcd in my system and this is configured to bring interfaces > > up as soon as they are created. >

Re: [RFC PATCH v2 net-next 07/16] net: dsa: sync ageing time when joining the bridge

2021-03-20 Thread Vladimir Oltean
On Fri, Mar 19, 2021 at 03:13:03PM -0700, Florian Fainelli wrote: > > diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c > > index 86b5e05d3f21..3dafb6143cff 100644 > > --- a/net/bridge/br_stp.c > > +++ b/net/bridge/br_stp.c > > @@ -639,6 +639,19 @@ int br_set_ageing_time(struct net_bridge

Re: [RFC PATCH v2 net-next 03/16] net: dsa: inherit the actual bridge port flags at join time

2021-03-20 Thread Vladimir Oltean
On Fri, Mar 19, 2021 at 03:08:46PM -0700, Florian Fainelli wrote: > > > On 3/18/2021 4:18 PM, Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > DSA currently assumes that the bridge port starts off with this > > constellation of bridge port flags: >

Re: [RFC PATCH v2 net-next 14/16] net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge

2021-03-19 Thread Vladimir Oltean
On Fri, Mar 19, 2021 at 05:29:12PM +0800, DENG Qingfang wrote: > On Fri, Mar 19, 2021 at 5:06 PM Vladimir Oltean wrote: > > > > This is a good point actually, which I thought about, but did not give a > > lot of importance to for the moment. Either we go full steam ah

Re: [RFC PATCH v2 net-next 14/16] net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge

2021-03-19 Thread Vladimir Oltean
On Fri, Mar 19, 2021 at 04:52:31PM +0800, DENG Qingfang wrote: > On Fri, Mar 19, 2021 at 01:18:27AM +0200, Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > DSA has gained the recent ability to deal gracefully with upper > > interfaces it cannot offload,

[RFC PATCH v2 net-next 15/16] net: dsa: return -EOPNOTSUPP when driver does not implement .port_lag_join

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean The DSA core has a layered structure, and even though we end up returning 0 (success) to user space when setting a bonding/team upper that can't be offloaded, some parts of the framework actually need to know that we couldn't offload that. For example

[RFC PATCH v2 net-next 16/16] net: bridge: switchdev: let drivers inform which bridge ports are offloaded

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean On reception of an skb, the bridge checks if it was marked as 'already forwarded in hardware' (checks if skb->offload_fwd_mark == 1), and if it is, it puts a mark of its own on that skb, with the switchdev mark of the ingress port. Then during forwarding, it enfor

[RFC PATCH v2 net-next 14/16] net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean DSA has gained the recent ability to deal gracefully with upper interfaces it cannot offload, such as the bridge, bonding or team drivers. When such uppers exist, the ports are still in standalone mode as far as the hardware is concerned. But when we deliver packets

[RFC PATCH v2 net-next 13/16] net: ocelot: replay switchdev events when joining bridge

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean The premise of this change is that the switchdev port attributes and objects offloaded by ocelot might have been missed when we are joining an already existing bridge port, such as a bonding interface. The patch pulls these switchdev attributes and objects from the bridge

[RFC PATCH v2 net-next 12/16] net: ocelot: call ocelot_netdevice_bridge_join when joining a bridged LAG

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean Similar to the DSA situation, ocelot supports LAG offload but treats this scenario improperly: ip link add br0 type bridge ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 We do the same thing as we do there, which is to simulate

[RFC PATCH v2 net-next 11/16] net: ocelot: support multiple bridges

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean The ocelot switches are a bit odd in that they do not have an STP state to put the ports into. Instead, the forwarding configuration is delayed from the typical port_bridge_join into stp_state_set, when the port enters the BR_STATE_FORWARDING state. I can only guess

[RFC PATCH v2 net-next 10/16] net: dsa: replay VLANs installed on port when joining the bridge

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean Currently this simple setup: ip link add br0 type bridge vlan_filtering 1 ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 will not work because the bridge has created the PVID in br_add_if -> nbp_vlan_init, and it has notif

[RFC PATCH v2 net-next 08/16] net: dsa: replay port and host-joined mdb entries when joining the bridge

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean I have udhcpcd in my system and this is configured to bring interfaces up as soon as they are created. I create a bridge as follows: ip link add br0 type bridge As soon as I create the bridge and udhcpcd brings it up, I have some other crap (avahi) that starts sending

[RFC PATCH v2 net-next 09/16] net: dsa: replay port and local fdb entries when joining the bridge

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean When a DSA port joins a LAG that already had an FDB entry pointing to it: ip link set bond0 master br0 bridge fdb add dev bond0 00:01:02:03:04:05 master static ip link set swp0 master bond0 the DSA port will have no idea that this FDB entry is there, because it missed

[RFC PATCH v2 net-next 07/16] net: dsa: sync ageing time when joining the bridge

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean The SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME attribute is only emitted from: sysfs/ioctl/netlink -> br_set_ageing_time -> __set_ageing_time therefore not at bridge port creation time, so: (a) drivers had to hardcode the initial value for the address agein

[RFC PATCH v2 net-next 06/16] net: dsa: sync multicast router state when joining the bridge

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean Make sure that the multicast router setting of the bridge is picked up correctly by DSA when joining, regardless of whether there are sandwiched interfaces or not. The SWITCHDEV_ATTR_ID_BRIDGE_MROUTER port attribute is only emitted from br_mc_router_state_change. Signed

[RFC PATCH v2 net-next 05/16] net: dsa: sync up VLAN filtering state when joining the bridge

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean This is the same situation as for other switchdev port attributes: if we join an already-created bridge port, such as a bond master interface, then we can miss the initial switchdev notification emitted by the bridge for this port. Signed-off-by: Vladimir Oltean --- net

[RFC PATCH v2 net-next 04/16] net: dsa: sync up with bridge port's STP state when joining

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean It may happen that we have the following topology: ip link add br0 type bridge stp_state 1 ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 ip link set swp1 master bond0 STP decides that it should put bond0 into the BLOCKING state

[RFC PATCH v2 net-next 03/16] net: dsa: inherit the actual bridge port flags at join time

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean DSA currently assumes that the bridge port starts off with this constellation of bridge port flags: - learning on - unicast flooding on - multicast flooding on - broadcast flooding on just by virtue of code copy-pasta from the bridge layer (new_nbp). This was a simple

[RFC PATCH v2 net-next 02/16] net: dsa: pass extack to dsa_port_{bridge,lag}_join

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean This is a pretty noisy change that was broken out of the larger change for replaying switchdev attributes and objects at bridge join time, which is when these extack objects are actually used. Signed-off-by: Vladimir Oltean --- net/dsa/dsa_priv.h | 6 -- net/dsa

[RFC PATCH v2 net-next 01/16] net: dsa: call dsa_port_bridge_join when joining a LAG that is already in a bridge

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean DSA can properly detect and offload this sequence of operations: ip link add br0 type bridge ip link add bond0 type bond ip link set swp0 master bond0 ip link set bond0 master br0 But not this one: ip link add br0 type bridge ip link add bond0 type bond ip link set bond0

[RFC PATCH v2 net-next 00/16] Better support for sandwiched LAGs with bridge and DSA

2021-03-18 Thread Vladimir Oltean
From: Vladimir Oltean This series has two objectives: - To make LAG uppers on top of DSA ports work regardless of which order we link interfaces to their masters (first make the port join the LAG, then the LAG join the bridge, or the other way around). - To make DSA ports support non

Re: [PATCH net-next] net: phy: at803x: remove at803x_aneg_done()

2021-03-18 Thread Vladimir Oltean
On Thu, Mar 18, 2021 at 05:38:13PM +0100, Michael Walle wrote: > Am 2021-03-18 17:21, schrieb Heiner Kallweit: > > On 18.03.2021 16:17, Vladimir Oltean wrote: > > > On Thu, Mar 18, 2021 at 03:54:00PM +0100, Heiner Kallweit wrote: > > > > On 18.03.2

Re: [PATCH net-next] net: phy: at803x: remove at803x_aneg_done()

2021-03-18 Thread Vladimir Oltean
On Thu, Mar 18, 2021 at 03:54:00PM +0100, Heiner Kallweit wrote: > On 18.03.2021 15:23, Michael Walle wrote: > > at803x_aneg_done() is pretty much dead code since the patch series > > "net: phy: improve and simplify phylib state machine" [1]. Remove it. > > > > Well, it's not dead, it's resting

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

Re: [PATCH net-next v2 3/3] net: ocelot: Remove ocelot_xfh_get_cpuq

2021-03-16 Thread Vladimir Oltean
On Tue, Mar 16, 2021 at 09:10:19PM +0100, Horatiu Vultur wrote: > Now when extracting frames from CPU the cpuq is not used anymore so > remove it. > > Signed-off-by: Horatiu Vultur > --- OCELOT_MRP_CPUQ should have disappeared too. Doesn't matter too much though. Reviewed-by: Vladimir Oltean

  1   2   3   4   5   6   7   8   9   10   >