[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9235D6609DB808459E95D78E17F2E43D40B8D2D7@CHN-SV-EXMX02.mchp-main.com>
Date: Wed, 25 Oct 2017 15:48:53 +0000
From: <Woojung.Huh@...rochip.com>
To: <privat@...l-hjelmeland.no>, <andrew@...n.ch>,
<vivien.didelot@...oirfairelinux.com>, <f.fainelli@...il.com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net-next 2/2] net: dsa: lan9303: Learn addresses on CPU
port when bridged
Hi Egil,
> >> @@ -62,7 +80,10 @@ static struct sk_buff *lan9303_xmit(struct sk_buff
> *skb,
> >> struct net_device *dev)
> >>
> >> lan9303_tag = (u16 *)(skb->data + 2 * ETH_ALEN);
> >> lan9303_tag[0] = htons(ETH_P_8021Q);
> >> - lan9303_tag[1] = htons(dp->index | BIT(4));
> >> + lan9303_tag[1] = lan9303_tx_use_arl(dp, skb->data) ?
> >
> > How about using skb_mac_header(skb) than skb->data?
> >
> >> + LAN9303_TAG_TX_USE_ALR :
> >> + dp->index |
> >
>
> I am not the expert here.
>
> I see that skb_mac_header() is (skb->head + skb->mac_header). So it will
> cost a few nano seconds per packet. Not the end of the world though.
> But I see that other net/dsa/tag_*.c use skb->data, assuming that
> skb->data point to mac header.
>
Revisited skb_mac_header(). It is basically skb->data after math.
Understand that it would be extra steps than referring skb->data directly.
Unless no one comments on this, please keep first patch.
Thanks.
Woojung
Powered by blists - more mailing lists