From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
vivien.didelot@savoirfairelinux.com
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 [thread overview]
Message-ID: <20171111155015.GC8685@lunn.ch> (raw)
In-Reply-To: <20171110232255.2462-3-f.fainelli@gmail.com>
> +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@lunn.ch>
Andrew
next prev parent reply other threads:[~2017-11-11 15:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-10 23:22 [PATCH net-next 0/4] net: dsa: b53: Support prepended Broadcom tags Florian Fainelli
2017-11-10 23:22 ` [PATCH net-next 1/4] net: dsa: Pass a port to get_tag_protocol() Florian Fainelli
2017-11-10 23:35 ` Vivien Didelot
2017-11-11 15:41 ` Andrew Lunn
2017-11-10 23:22 ` [PATCH net-next 2/4] net: dsa: tag_brcm: Prepare for supporting prepended tag Florian Fainelli
2017-11-11 15:50 ` Andrew Lunn [this message]
2017-11-10 23:22 ` [PATCH net-next 3/4] net: dsa: Support prepended Broadcom tag Florian Fainelli
2017-11-11 15:51 ` Andrew Lunn
2017-11-10 23:22 ` [PATCH net-next 4/4] net: dsa: b53: Support prepended Broadcom tags Florian Fainelli
2017-11-11 15:53 ` Andrew Lunn
2017-11-13 1:35 ` [PATCH net-next 0/4] " David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171111155015.GC8685@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).