All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Per@axis.com, "\"Forlin" <"per.forlin\""@axis.co>,
	netdev@vger.kernel.org, andrew@lunn.ch, davem@davemloft.net
Cc: Per Forlin <per.forlin@axis.com>, Per Forlin <perfn@axis.com>
Subject: Re: [PATCH net 2/2] net: dsa: tag_ar9331: Make sure there is headroom for tag
Date: Thu, 13 Feb 2020 14:59:58 +0100	[thread overview]
Message-ID: <e1c554fa-fde7-0e8b-959d-603e66db54b0@pengutronix.de> (raw)
In-Reply-To: <20200213135100.2963-3-per.forlin@axis.com>

Hi,

On 13.02.20 14:51, Per@axis.com wrote:
> From: Per Forlin <per.forlin@axis.com>
> 
> Passing tag size to skb_cow_head will make sure
> there is enough headroom for the tag data.
> This change does not introduce any overhead in case there
> is already available headroom for tag.
> 
> Signed-off-by: Per Forlin <perfn@axis.com>

Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>

Thank you!

Are you using this driver?

> ---
>   net/dsa/tag_ar9331.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/dsa/tag_ar9331.c b/net/dsa/tag_ar9331.c
> index 466ffa92a474..55b00694cdba 100644
> --- a/net/dsa/tag_ar9331.c
> +++ b/net/dsa/tag_ar9331.c
> @@ -31,7 +31,7 @@ static struct sk_buff *ar9331_tag_xmit(struct sk_buff *skb,
>   	__le16 *phdr;
>   	u16 hdr;
>   
> -	if (skb_cow_head(skb, 0) < 0)
> +	if (skb_cow_head(skb, AR9331_HDR_LEN) < 0)
>   		return NULL;
>   
>   	phdr = skb_push(skb, AR9331_HDR_LEN);
> 

Kind regards,
Oleksij Rempel

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2020-02-13 14:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 13:50 [PATCH net 0/2] net: dsa: Make sure there is headroom for tag Per, Forlin <per.forlin
2020-02-13 13:50 ` [PATCH net 1/2] net: dsa: tag_qca: " Per, Forlin <per.forlin
2020-02-13 14:01   ` Andrew Lunn
2020-02-13 15:08     ` Per Förlin
2020-02-13 13:51 ` [PATCH net 2/2] net: dsa: tag_ar9331: " Per, Forlin <per.forlin
2020-02-13 13:59   ` Oleksij Rempel [this message]
2020-02-13 14:42     ` Per Förlin
2020-02-13 14:26   ` David Miller
2020-02-13 14:37 [PATCH net 0/2] net: dsa: " Per Forlin
2020-02-13 14:37 ` [PATCH net 2/2] net: dsa: tag_ar9331: " Per Forlin
2020-02-13 20:02   ` Florian Fainelli

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=e1c554fa-fde7-0e8b-959d-603e66db54b0@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc="per.forlin\""@axis.co \
    --cc=Per@axis.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=per.forlin@axis.com \
    --cc=perfn@axis.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 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.