From: Alexandra Winter <wintera@linux.ibm.com>
To: David Miller <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
Heiko Carstens <hca@linux.ibm.com>,
Julian Wiedmann <jwi@linux.ibm.com>,
Alexandra Winter <wintera@linux.ibm.com>
Subject: [PATCH net-next 5/5] s390/qeth: remove check for packing mode in qeth_check_outbound_queue()
Date: Tue, 7 Dec 2021 10:04:52 +0100 [thread overview]
Message-ID: <20211207090452.1155688-6-wintera@linux.ibm.com> (raw)
In-Reply-To: <20211207090452.1155688-1-wintera@linux.ibm.com>
From: Julian Wiedmann <jwi@linux.ibm.com>
If qeth_check_outbound_queue() finds a partially filled TX buffer on
the queue and flushes it, then the queue _must_ have been in packing
mode.
Remove the redundant check when updating the relevant statistics.
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
---
drivers/s390/net/qeth_core_main.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 093ee14e8051..c296e0556f49 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -3635,12 +3635,10 @@ static void qeth_check_outbound_queue(struct qeth_qdio_out_q *queue)
if ((atomic_read(&queue->used_buffers) <= QETH_LOW_WATERMARK_PACK) ||
!atomic_read(&queue->set_pci_flags_count)) {
unsigned int index, flush_cnt;
- bool q_was_packing;
spin_lock(&queue->lock);
index = queue->next_buf_to_fill;
- q_was_packing = queue->do_pack;
flush_cnt = qeth_switch_to_nonpacking_if_needed(queue);
if (!flush_cnt && !atomic_read(&queue->set_pci_flags_count))
@@ -3648,8 +3646,7 @@ static void qeth_check_outbound_queue(struct qeth_qdio_out_q *queue)
if (flush_cnt) {
qeth_flush_buffers(queue, index, flush_cnt);
- if (q_was_packing)
- QETH_TXQ_STAT_ADD(queue, bufs_pack, flush_cnt);
+ QETH_TXQ_STAT_ADD(queue, bufs_pack, flush_cnt);
}
spin_unlock(&queue->lock);
--
2.32.0
next prev parent reply other threads:[~2021-12-07 9:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 9:04 [PATCH net-next 0/5] s390/net: updates 2021-12-06 Alexandra Winter
2021-12-07 9:04 ` [PATCH net-next 1/5] s390/qeth: simplify qeth_receive_skb() Alexandra Winter
2021-12-07 9:04 ` [PATCH net-next 2/5] s390/qeth: split up L2 netdev_ops Alexandra Winter
2021-12-07 9:04 ` [PATCH net-next 3/5] s390/qeth: don't offer .ndo_bridge_* ops for OSA devices Alexandra Winter
2021-12-07 9:04 ` [PATCH net-next 4/5] s390/qeth: fine-tune .ndo_select_queue() Alexandra Winter
2021-12-07 9:04 ` Alexandra Winter [this message]
2021-12-08 6:10 ` [PATCH net-next 0/5] s390/net: updates 2021-12-06 patchwork-bot+netdevbpf
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=20211207090452.1155688-6-wintera@linux.ibm.com \
--to=wintera@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=hca@linux.ibm.com \
--cc=jwi@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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