> +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; > + > + *offset = tag_len; > + *proto = ((__be16 *)skb->data)[(tag_len / 2) - 1]; > +#endif > +} > +
Do you actually need the IS_ENABLED()? There is only one caller of this function, and it is already protected by IS_ENABLED(CONFIG_NET_DSA). So i don't think it adds anything. Andrew