diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2019-04-25 18:25:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-26 11:14:06 -0400 |
commit | 4e26c5fe552e5f0d9e3abcea48cd311af232bed9 (patch) | |
tree | 8e1cba39ad9346cc936c485515a61a4aada56800 /drivers/s390/net/qeth_l2_main.c | |
parent | 7b579ce57ecf73856a26173b04ab6053798c8e2a (diff) |
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_l2_main.c')
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index fb21136c0ec2..cee9a99dd463 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -581,7 +581,7 @@ static int qeth_l2_xmit_osn(struct qeth_card *card, struct sk_buff *skb, } elements += qeth_count_elements(skb, hd_len); - if (elements > QETH_MAX_BUFFER_ELEMENTS(card)) { + if (elements > queue->max_elements) { rc = -E2BIG; goto out; } |