On 3/23/2019 8:23 PM, Vladimir Oltean wrote:
> In order to support this, we are creating a make-shift switch tag out of
> a VLAN trunk configured on the CPU port. Termination on switch ports
> only works when not under a vlan_filtering bridge. We are making use of
> the generic CONFIG_NET_DSA_TAG_8021Q code and leveraging it from our own
> CONFIG_NET_DSA_TAG_SJA1105.
>
> There are two types of traffic: regular and link-local.
> The link-local traffic received on the CPU port is trapped from the
> switch's regular forwarding decisions because it matched one of the two
> DMAC filters for management traffic.
> On transmission, the switch requires special massaging for these
> link-local frames. Due to a weird implementation of the switching IP, by
> default it drops link-local frames that originate on the CPU port. It
> needs to be told where to forward them to, through an SPI command
> ("management route") that is valid for only a single frame.
> So when we're sending link-local traffic, we need to clone skb's from
> DSA and send them in our custom xmit worker that also performs SPI access.
>
> For that purpose, the DSA xmit handler and the xmit worker communicate
> through a per-port "skb ring" software structure, with a producer and a
> consumer index. At the moment this structure is rather fragile
> (ping-flooding to a link-local DMAC would cause most of the frames to
> get dropped). I would like to move the management traffic on a separate
> netdev queue that I can stop when the skb ring got full and hardware is
> busy processing, so that we are not forced to drop traffic.
>
> Signed-off-by: Vladimir Oltean <olte...@gmail.com>
Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
I do like the idea of setting up specific management queue later on,
although it is not clear to me how you would go about integrating it as
a network device, given the DSA slave and master devices, do you know
roughly how you would proceed?
--
Florian