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
> +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
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
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