From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH net-next 2/4] net: dsa: tag_brcm: Prepare for supporting prepended tag Date: Sat, 11 Nov 2017 16:50:15 +0100 Message-ID: <20171111155015.GC8685@lunn.ch> References: <20171110232255.2462-1-f.fainelli@gmail.com> <20171110232255.2462-3-f.fainelli@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, davem@davemloft.net, vivien.didelot@savoirfairelinux.com To: Florian Fainelli Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:52722 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750918AbdKKPuS (ORCPT ); Sat, 11 Nov 2017 10:50:18 -0500 Content-Disposition: inline In-Reply-To: <20171110232255.2462-3-f.fainelli@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: > +static struct sk_buff *brcm_tag_rcv_ll(struct sk_buff *skb, > + struct net_device *dev, > + struct packet_type *pt, > + unsigned int offset) > { > int source_port; > u8 *brcm_tag; > @@ -103,8 +114,7 @@ static struct sk_buff *brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev, > if (unlikely(!pskb_may_pull(skb, BRCM_TAG_LEN))) > return NULL; > > - /* skb->data points to the EtherType, the tag is right before it */ > - brcm_tag = skb->data - 2; > + brcm_tag = skb->data - offset; A minor nit. The first part of the comment is still true. And having it gives you an anchor point to understanding where are we going from when we go backwards in the packet. Yes, the comment appears later, but at that point we are not dealing with skb->data. Otherwise: Reviewed-by: Andrew Lunn Andrew