From: Andrew Lunn <andrew@lunn.ch>
To: "Per Förlin" <Per.Forlin@axis.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"john@phrozen.org" <john@phrozen.org>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>
Subject: Re: [Question] net: dsa: tag_qca: QCA tag and headroom size?
Date: Wed, 12 Feb 2020 21:23:32 +0100 [thread overview]
Message-ID: <20200212202332.GV19213@lunn.ch> (raw)
In-Reply-To: <1581501418212.84729@axis.com>
On Wed, Feb 12, 2020 at 09:57:00AM +0000, Per Förlin wrote:
> Hi,
>
> ---
> net/dsa/tag_qca.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
> index c8a128c9e5e0..70db7c909f74 100644
> --- a/net/dsa/tag_qca.c
> +++ b/net/dsa/tag_qca.c
> @@ -33,7 +33,7 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
> struct dsa_port *dp = dsa_slave_to_port(dev);
> u16 *phdr, hdr;
>
> - if (skb_cow_head(skb, 0) < 0)
> > Is it really safe to assume there is enough headroom for the QCA tag?
>
> + if (skb_cow_head(skb, QCA_HDR_LEN) < 0)
> > My proposal. Specify QCA tag size to make sure there is headroom.
>
> return NULL;
>
> skb_push(skb, QCA_HDR_LEN);
Hi Per
Yes, your change looks correct. ar9331_tag_xmit() also seems to have
the same problem.
Do you want to submit a patch?
Thanks
Andrew
next prev parent reply other threads:[~2020-02-12 20:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-12 9:57 [Question] net: dsa: tag_qca: QCA tag and headroom size? Per Förlin
2020-02-12 20:23 ` Andrew Lunn [this message]
2020-02-13 5:23 ` Per Förlin
2020-02-13 12:53 ` Andrew Lunn
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=20200212202332.GV19213@lunn.ch \
--to=andrew@lunn.ch \
--cc=Per.Forlin@axis.com \
--cc=f.fainelli@gmail.com \
--cc=john@phrozen.org \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.