From: frank.blaschka@de•ibm.com
To: davem@davemloft•net
Cc: netdev@vger•kernel.org, linux-s390@vger•kernel.org,
Jan Glauber <jang@linux•vnet.ibm.com>
Subject: [patch 4/4] [PATCH] qeth: buffer count imbalance
Date: Wed, 08 Dec 2010 13:58:01 +0100 [thread overview]
Message-ID: <20101208125844.812890035@de.ibm.com> (raw)
In-Reply-To: 20101208125757.726629855@de.ibm.com
[-- Attachment #1: 137-qeth-buffer-imbalance.diff --]
[-- Type: text/plain, Size: 1110 bytes --]
From: Jan Glauber <jang@linux•vnet.ibm.com>
The used buffers counter is not incremented in case of an error so
the counter can become negative. Increment the used buffers counter
before checking for errors.
Signed-off-by: Jan Glauber <jang@linux•vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de•ibm.com>
---
drivers/s390/net/qeth_core_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -2840,6 +2840,7 @@ static void qeth_flush_buffers(struct qe
queue->card->perf_stats.outbound_do_qdio_time +=
qeth_get_micros() -
queue->card->perf_stats.outbound_do_qdio_start_time;
+ atomic_add(count, &queue->used_buffers);
if (rc) {
queue->card->stats.tx_errors += count;
/* ignore temporary SIGA errors without busy condition */
@@ -2853,7 +2854,6 @@ static void qeth_flush_buffers(struct qe
qeth_schedule_recovery(queue->card);
return;
}
- atomic_add(count, &queue->used_buffers);
if (queue->card->options.performance_stats)
queue->card->perf_stats.bufs_sent += count;
}
next prev parent reply other threads:[~2010-12-08 12:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-08 12:57 [patch 0/4] s390: qeth patches for net-next frank.blaschka
2010-12-08 12:57 ` [patch 1/4] [PATCH] qeth: support ipv6 query arp cache for HiperSockets frank.blaschka
2010-12-08 12:57 ` [patch 2/4] [PATCH] qeth: support VIPA add/del in offline mode frank.blaschka
2010-12-08 12:58 ` [patch 3/4] [PATCH] qeth: l3 add vlan hdr in passthru frames frank.blaschka
2010-12-08 12:58 ` frank.blaschka [this message]
2010-12-10 22:29 ` [patch 0/4] s390: qeth patches for net-next 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=20101208125844.812890035@de.ibm.com \
--to=frank.blaschka@de$(echo .)ibm.com \
--cc=davem@davemloft$(echo .)net \
--cc=jang@linux$(echo .)vnet.ibm.com \
--cc=linux-s390@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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