aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_core.h
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.ibm.com>2019-04-25 18:25:59 +0200
committerDavid S. Miller <davem@davemloft.net>2019-04-26 11:14:06 -0400
commit4e26c5fe552e5f0d9e3abcea48cd311af232bed9 (patch)
tree8e1cba39ad9346cc936c485515a61a4aada56800 /drivers/s390/net/qeth_core.h
parents390/qeth: don't clear Output buffers on every queue init (diff)
downloadlinux-dev-4e26c5fe552e5f0d9e3abcea48cd311af232bed9.tar.xz
linux-dev-4e26c5fe552e5f0d9e3abcea48cd311af232bed9.zip
s390/qeth: cache max number of available buffer elements
The QETH_MAX_BUFFER_ELEMENTS() macro effectively returns a constant value. To avoid some redundant pointer chasing and computations in the xmit hot path, cache this value in the queue struct. Take this as opportunity to shrink some of the queue struct's fields to their appropriate value range, slightly reducing its total size. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_core.h')
-rw-r--r--drivers/s390/net/qeth_core.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index 92441593caf3..73afbb8b69e5 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -484,14 +484,12 @@ struct qeth_qdio_out_q {
struct qeth_qdio_out_buffer *bufs[QDIO_MAX_BUFFERS_PER_Q];
struct qdio_outbuf_state *bufstates; /* convenience pointer */
struct qeth_out_q_stats stats;
- int queue_no;
+ u8 next_buf_to_fill;
+ u8 max_elements;
+ u8 queue_no;
+ u8 do_pack;
struct qeth_card *card;
atomic_t state;
- int do_pack;
- /*
- * index of buffer to be filled by driver; state EMPTY or PACKING
- */
- int next_buf_to_fill;
/*
* number of buffers that are currently filled (PRIMED)
* -> these buffers are hardware-owned