Re: [PATCH v3 net-next 06/15] net: dsa: add a generic procedure for the flow dissector

2020-09-26 Thread Vladimir Oltean
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

Re: [PATCH v3 net-next 06/15] net: dsa: add a generic procedure for the flow dissector

2020-09-26 Thread Andrew Lunn
> +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

Re: [PATCH v3 net-next 06/15] net: dsa: add a generic procedure for the flow dissector

2020-09-26 Thread Andrew Lunn
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

[PATCH v3 net-next 06/15] net: dsa: add a generic procedure for the flow dissector

2020-09-26 Thread Vladimir Oltean
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