From: David Miller <davem@davemloft.net>
To: sathyap@serverengines.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next-2.6] be2net: free tx buffers when completions never arrive
Date: Thu, 18 Feb 2010 02:16:16 -0800 (PST) [thread overview]
Message-ID: <20100218.021616.127015823.davem@davemloft.net> (raw)
In-Reply-To: <20100218093603.GA28912@serverengines.com>
From: Sathya Perla <sathyap@serverengines.com>
Date: Thu, 18 Feb 2010 15:06:03 +0530
> In cases like when a pci device is disconnected after a pci error,
> pending tx completions will never arrive. Unmap and free such
> buffers in the tx cleanup path.
>
> Signed-off-by: Sathya Perla <sathyap@serverengines.com>
> ---
> drivers/net/benet/be_main.c | 12 ++++++++++++
> 1 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
> index 68e7848..810d2a4 100644
> --- a/drivers/net/benet/be_main.c
> +++ b/drivers/net/benet/be_main.c
> @@ -1128,6 +1128,9 @@ static void be_tx_compl_clean(struct be_adapter *adapter)
> struct be_queue_info *txq = &adapter->tx_obj.q;
> struct be_eth_tx_compl *txcp;
> u16 end_idx, cmpl = 0, timeo = 0;
> + struct sk_buff **sent_skbs = adapter->tx_obj.sent_skb_list;
> + struct sk_buff *sent_skb;
> + bool dummy_wrb;
Some of your lines start with tabs, some with spaces. You
have to use tabs consistently.
> +
> + /* free posted tx for which compls will never arrive */
> + while (atomic_read(&txq->used)) {
> + sent_skb = sent_skbs[txq->tail];
> + end_idx = txq->tail;
> + index_adv(&end_idx,
> + wrb_cnt_for_skb(sent_skb, &dummy_wrb) - 1, txq->len);
> + be_tx_compl_process(adapter, end_idx);
> + }
> }
More tabbing and indentation problems here too.
next prev parent reply other threads:[~2010-02-18 10:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-18 9:36 [PATCH net-next-2.6] be2net: free tx buffers when completions never arrive Sathya Perla
2010-02-18 10:16 ` David Miller [this message]
2010-02-18 10:37 ` Sathya Perla
2010-02-18 23:44 ` David Miller
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=20100218.021616.127015823.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sathyap@serverengines.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).