]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: compute proper aggregation limit
authorAlex Elder <elder@linaro.org>
Thu, 21 Apr 2022 18:53:33 +0000 (13:53 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Apr 2022 10:27:56 +0000 (11:27 +0100)
commite1d00dc51b2d2dc41556cc0512ce4a6008a7b10d
tree325443f0b164c26d268f4ebfc077c97c674a7271
parent12b90b43abd9d8dc5f9f212cd40aea2b70cf522f
net: ipa: compute proper aggregation limit

The aggregation byte limit for an endpoint is currently computed
based on the endpoint's receive buffer size.

However, some bytes at the front of each receive buffer are reserved
on the assumption that--as with SKBs--it might be useful to insert
data (such as headers) before what lands in the buffer.

The aggregation byte limit currently doesn't take into account that
reserved space, and as a result, aggregation could require space
past that which is available in the buffer.

Fix this by reducing the size used to compute the aggregation byte
limit by the NET_SKB_PAD offset reserved for each receive buffer.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_endpoint.c