Subject: Re: [PATCH net-next 2/4] net: dsa: tag_brcm: Prepare for supporting prepended tag

From: Andrew Lunn <[email-masked]>
Date: Sat, 11 Nov 2017 16:50:15 +0100

> +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 <[email-masked]>

    Andrew