[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87eh29ml3h.fsf@xmission.com>
Date: Mon, 10 Mar 2014 21:10:26 -0700
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
xiyou.wangcong@...il.com, mpm@...enic.com, satyam.sharma@...il.com
Subject: Re: [PATCH 02/11] bnx2: Call dev_kfree_skby_any instead of dev_kfree_skb.
Eric Dumazet <eric.dumazet@...il.com> writes:
> On Mon, 2014-03-10 at 20:18 -0700, Eric W. Biederman wrote:
>> Replace dev_kfree_skb with dev_kfree_skb_any in functions that can
>> be called in hard irq and other contexts.
>>
>> Signed-off-by: "Eric W. Biederman" <ebiederm@...ssion.com>
>> ---
>> drivers/net/ethernet/broadcom/bnx2.c | 10 +++++-----
>> 1 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
>> index ca6b36220d94..c94735de808d 100644
>> --- a/drivers/net/ethernet/broadcom/bnx2.c
>> +++ b/drivers/net/ethernet/broadcom/bnx2.c
>> @@ -2885,7 +2885,7 @@ bnx2_tx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
>> sw_cons = BNX2_NEXT_TX_BD(sw_cons);
>>
>> tx_bytes += skb->len;
>> - dev_kfree_skb(skb);
>> + dev_kfree_skb_any(skb);
>
> This looks like a dev_consume_skb_any() candidate ?
That seems reasonable. I am focusing on one dimension at a time.
> Anyway, why can this be called from hard irq ?
netpoll_poll_dev
bnx2_poll
bnx2_poll_work
bnx2_tx_int
> I'll stop my review here, it seems either me or you are confused/tired.
I did my best to verify the code paths I am changing actually exist. I
think I even have a stack backtrace from skb_release_head_state around
somewhere. Transmitted packets frequently have dst cache entries,
conntrack entries, and destructores which make them actually problematic
to free in hard irq context.
Eric
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists