Thread (5 messages) 5 messages, 2 authors, 2016-10-05

Re: [patch net 0/2] mlxsw: Couple of fixes

flat view

From: Jiri Pirko <jiri@resnulli.us>
Date: 2016-10-05 11:14:54

Wed, Oct 05, 2016 at 02:29:27AM CEST, davem@davemloft.net wrote:
From: Jiri Pirko <jiri@resnulli.us>
Date: Tue,  4 Oct 2016 09:46:03 +0200
quoted
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;
                }
        }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help