public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Julian Wiedmann <jwi@linux.ibm.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Stefan Raspl <raspl@linux.ibm.com>,
	Ursula Braun <ubraun@linux.ibm.com>,
	Julian Wiedmann <jwi@linux.ibm.com>
Subject: [PATCH net-next 5/8] s390/qeth: don't clear Output buffers on every queue init
Date: Thu, 25 Apr 2019 18:25:58 +0200	[thread overview]
Message-ID: <20190425162601.91997-6-jwi@linux.ibm.com> (raw)
In-Reply-To: <20190425162601.91997-1-jwi@linux.ibm.com>

On the first initialization of a queue, its Output Buffers are in a
clean state with no attached resources. On every subsequent
initialization, qeth_l?_stop_card() has previously put them in a clean
state via qeth_drain_output_queues(). So the call to
qeth_clear_output_buffer() is redundant and can be removed.

While at it, move the initialization of the queue's card pointer into
the queue allocation. It never changes afterwards.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 drivers/s390/net/qeth_core_main.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index bdae99636dd4..5d8777c4d1a6 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -2386,6 +2386,7 @@ static int qeth_alloc_qdio_queues(struct qeth_card *card)
 			goto out_freeoutq;
 		QETH_DBF_TEXT_(SETUP, 2, "outq %i", i);
 		QETH_DBF_HEX(SETUP, 2, &card->qdio.out_qs[i], sizeof(void *));
+		card->qdio.out_qs[i]->card = card;
 		card->qdio.out_qs[i]->queue_no = i;
 		/* give outbound qeth_qdio_buffers their qdio_buffers */
 		for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) {
@@ -2697,7 +2698,7 @@ static int qeth_init_input_buffer(struct qeth_card *card,
 
 int qeth_init_qdio_queues(struct qeth_card *card)
 {
-	int i, j;
+	unsigned int i;
 	int rc;
 
 	QETH_DBF_TEXT(SETUP, 2, "initqdqs");
@@ -2728,11 +2729,6 @@ int qeth_init_qdio_queues(struct qeth_card *card)
 	for (i = 0; i < card->qdio.no_out_queues; ++i) {
 		qdio_reset_buffers(card->qdio.out_qs[i]->qdio_bufs,
 				   QDIO_MAX_BUFFERS_PER_Q);
-		for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) {
-			qeth_clear_output_buffer(card->qdio.out_qs[i],
-						 card->qdio.out_qs[i]->bufs[j]);
-		}
-		card->qdio.out_qs[i]->card = card;
 		card->qdio.out_qs[i]->next_buf_to_fill = 0;
 		card->qdio.out_qs[i]->do_pack = 0;
 		atomic_set(&card->qdio.out_qs[i]->used_buffers, 0);
-- 
2.16.4

  parent reply	other threads:[~2019-04-25 16:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 16:25 [PATCH net-next 0/8] s390/qeth: updates 2019-04-25 Julian Wiedmann
2019-04-25 16:25 ` [PATCH net-next 1/8] s390: qeth: address type mismatch warning Julian Wiedmann
2019-04-25 16:25 ` [PATCH net-next 2/8] s390/qeth: remove RX seqno in skb->cb Julian Wiedmann
2019-04-25 16:25 ` [PATCH net-next 3/8] s390/qeth: clean up stale buffer state documentation Julian Wiedmann
2019-04-25 16:25 ` [PATCH net-next 4/8] s390/qeth: use IS_* helpers for checking device type Julian Wiedmann
2019-04-25 16:25 ` Julian Wiedmann [this message]
2019-04-25 16:25 ` [PATCH net-next 6/8] s390/qeth: cache max number of available buffer elements Julian Wiedmann
2019-04-25 16:26 ` [PATCH net-next 7/8] s390/qeth: extract helper to determine L2 cast type Julian Wiedmann
2019-04-25 16:26 ` [PATCH net-next 8/8] s390/qeth: trust non-IP cast type in qeth_l3_fill_header() Julian Wiedmann
2019-04-26 15:14 ` [PATCH net-next 0/8] s390/qeth: updates 2019-04-25 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=20190425162601.91997-6-jwi@linux.ibm.com \
    --to=jwi@linux.ibm.com \
    --cc=davem@davemloft.net \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=raspl@linux.ibm.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=ubraun@linux.ibm.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