[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20161005111451.GB2293@nanopsycho>
Date: Wed, 5 Oct 2016 13:14:51 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, yotamg@...lanox.com, idosch@...lanox.com,
eladr@...lanox.com, nogahf@...lanox.com, ogerlitz@...lanox.com
Subject: Re: [patch net 0/2] mlxsw: Couple of fixes
Wed, Oct 05, 2016 at 02:29:27AM CEST, davem@...emloft.net wrote:
>From: Jiri Pirko <jiri@...nulli.us>
>Date: Tue, 4 Oct 2016 09:46:03 +0200
>
>> Couple of fixes from Yotam.
>
>Series applied, thanks.
>
>Note that needed_headroom is a request, rather than a guarantee, so you
>may in some rare cases need to realloc your headroom if the kernel was
>not able to meet your request.
We already do that:
if (unlikely(skb_headroom(skb) < MLXSW_TXHDR_LEN)) {
struct sk_buff *skb_orig = skb;
skb = skb_realloc_headroom(skb, MLXSW_TXHDR_LEN);
if (!skb) {
this_cpu_inc(mlxsw_sp_port->pcpu_stats->tx_dropped);
dev_kfree_skb_any(skb_orig);
return NETDEV_TX_OK;
}
}
Powered by blists - more mailing lists