Re: [PATCH 08/14] net: vlan: remove invalid VLAN protocol warning

From: Felix Fietkau
Date: Tue Nov 08 2022 - 05:25:09 EST


On 08.11.22 11:08, Vladimir Oltean wrote:
On Tue, Nov 08, 2022 at 10:46:54AM +0100, Felix Fietkau wrote:
I think it depends on the hardware. If you can rely on the hardware always
reporting the port out-of-band, a generic "oob" tagger would be fine.
In my case, it depends on whether a second non-DSA ethernet MAC is active on
the same device, so I do need to continue using the "mtk" tag driver.

It's not only about the time dimension (always OOB, vs sometimes OOB),
but also about what is conveyed through the OOB tag. I can see 2 vendors
agreeing today on a common "oob" tagger only to diverge in the future
when they'll need to convey more information than just port id. What do
you do with the tagging protocol string names then. Gotta make them
unique from the get go, can't export "oob" to user space IMO.

The flow dissector part is already solved: I simply used the existing
.flow_dissect() tag op.

Yes, well this seems like a generic enough case (DSA offload tag present
=> don't shift network header because it's where it should be) to treat
it in the generic flow dissector and not have to invoke any tagger-specific
fixup method.
In that case I think we shouldn't use METADATA_HW_PORT_MUX, since it is already used for other purposes. I will add a new metadata type METADATA_DSA instead.

- Felix