Re: [PATCH net-next v2 1/2] net: dsa: mv88e6xxx: use the hw tx queues
From: Andrew Lunn
Date: Tue May 26 2026 - 10:20:41 EST
On Tue, May 26, 2026 at 01:21:02PM +0000, Cedric Jehasse wrote:
>
> From: Andrew Lunn <andrew@xxxxxxx>
> Sent: Tuesday, May 26, 2026 2:30 PM
> > From: Andrew Lunn <andrew@xxxxxxx>
> > Sent: Tuesday, May 26, 2026 2:30 PM
> > To: Cedric Jehasse
> > Cc: Vladimir Oltean; David S. Miller; Eric Dumazet; Jakub Kicinski; Paolo Abeni; Simon Horman; Russell King; netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> > Subject: Re: [PATCH net-next v2 1/2] net: dsa: mv88e6xxx: use the hw tx queues
> >
> > On Tue, May 26, 2026 at 01:41:14PM +0200, Cedric Jehasse via B4 Relay wrote:
> > > From: Cedric Jehasse <cedric.jehasse@xxxxxxxxxx>
> > >
> > > >From the datasheets i've looked at these switches have 4 or 8 transmit
> > > queues per port.
> > > There's a PRI field in the dsa tag used to indicate which egress queue
> > > the frame is to be sent to.
> > > This isn't done for vlan tagged frames because this would overwrite the
> > > PCP value in the vlan tag (The PRI field in the dsa
> > > tag is used as the PCP value in the vlan tag).
> >
> > Maybe a bit more context would be good here. This patch is about
> > frames the host is sending to the switch. Looking at just the commit
> > message this was not obvious. It was only when i looked at the tagger
> > change did i understand that.
> >
> > Does DSA_CMD_FORWARD vs DSA_CMD_FROM_CPU make a difference here? Does
> > DSA_CMD_FROM_CPU skip some classification stages in the switch, where
> > as DSA_CMD_FORWARD might pass through more stages in the switch and
> > have the queue over written by the hardware?
> >
> > Andrew
>
> Yes, this is what the documentation says on DSA_CMD_FORWARD:
> > Used for frames that are forwarded in a normal way (ingress and egress filtering is performed on these frames).
>
> And on DSA_CMD_FROM_CPU:
> > Used for frames that need to tunnel through Blocked ports (like BPDU's). No ingress or egress filtering is perfromed.
> > Frames egress out the Trg_Port tagged or untagged determined by Trg_Tagged.
And are there any implications because of this? Could it be you do the
setup you suggest, and it gets ignored because of FORWARD vs FROM_CPU?
Or it is applied to some traffic and not others?
Again, this might be something to mention in the commit message?
Andrew