[PATCH v2 net-next 09/14] net: dsa: add NETC switch tag support

Wei Fang wei.fang at nxp.com
Wed Mar 25 12:54:24 AEDT 2026


> > +static struct sk_buff *netc_rcv(struct sk_buff *skb,
> > +				struct net_device *ndev)
> > +{
> > +	struct netc_tag_cmn *tag_cmn = dsa_etype_header_pos_rx(skb);
> > +	int tag_len = netc_get_rx_tag_len(tag_cmn->type);
>                                              ^^^^^^^^^^^^
> 
> Is the tag header guaranteed to be in the linear region of the skb?
> Looking at other EtherType-based DSA tag drivers (tag_ar9331, tag_lan9303,
> tag_dsa, tag_edsa, tag_a5psw, tag_brcm_legacy, tag_mxl-gsw1xx,
> tag_gswip, and tag_mtk), they all call pskb_may_pull() before accessing
> tag data to ensure the header is linearized.
> 

I will add this check, thanks



More information about the Linuxppc-dev mailing list