Skip to content

Commit

Permalink
s390/qeth: remove check for packing mode in qeth_check_outbound_queue()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Julian Wiedmann authored and Jakub Kicinski committed Dec 8, 2021
1 parent 1b9e410 commit 6dc490e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/s390/net/qeth_core_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3635,21 +3635,18 @@ 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))
flush_cnt = qeth_prep_flush_pack_buffer(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);
Expand Down

0 comments on commit 6dc490e

Please sign in to comment.