diff options
author | Julian Wiedmann <jwi@linux.vnet.ibm.com> | 2018-02-27 18:58:12 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-28 11:13:12 -0500 |
commit | 12472af89632beb1ed8dea29d4efe208ca05b06a (patch) | |
tree | 7ff331b71a1d91c8614d0c7630cd8deba11c83bc /include/net/fib_rules.h | |
parent | 590399ddf9561f2ed0839311c8ae1be21597ba68 (diff) | |
download | blackbird-obmc-linux-12472af89632beb1ed8dea29d4efe208ca05b06a.tar.gz blackbird-obmc-linux-12472af89632beb1ed8dea29d4efe208ca05b06a.zip |
s390/qeth: fix overestimated count of buffer elements
qeth_get_elements_for_range() doesn't know how to handle a 0-length
range (ie. start == end), and returns 1 when it should return 0.
Such ranges occur on TSO skbs, where the L2/L3/L4 headers (and thus all
of the skb's linear data) are skipped when mapping the skb into regular
buffer elements.
This overestimation may cause several performance-related issues:
1. sub-optimal IO buffer selection, where the next buffer gets selected
even though the skb would actually still fit into the current buffer.
2. forced linearization, if the element count for a non-linear skb
exceeds QETH_MAX_BUFFER_ELEMENTS.
Rather than modifying qeth_get_elements_for_range() and adding overhead
to every caller, fix up those callers that are in risk of passing a
0-length range.
Fixes: 2863c61334aa ("qeth: refactor calculation of SBALE count")
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/fib_rules.h')
0 files changed, 0 insertions, 0 deletions