]> www.infradead.org Git - users/jedix/linux-maple.git/commit
qede: Correctly map aggregation replacement pages
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Wed, 2 Nov 2016 14:36:46 +0000 (16:36 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 6 Mar 2017 05:00:11 +0000 (21:00 -0800)
commitef9bd1f4110fe3426a467d9bbfdc9ac6b25002b3
tree394b1a396e0962f3863427b2ba42d16213ca0cb7
parentbd0bcbf16dc4e2757a4aaa85483c0a7583ff13c2
qede: Correctly map aggregation replacement pages

Orabug: 25477939

Driver allocates replacement buffers before-hand to make
sure whenever an aggregation begins there would be a replacement
for the Rx buffers, as we can't release the buffer until
aggregation is terminated and driver logic assumes the Rx rings
are always full.

For every other Rx page that's being allocated [I.e., regular]
the page is being completely mapped while for the replacement
buffers only the first portion of the page is being mapped.
This means that:
  a. Once replacement buffer replenishes the regular Rx ring,
assuming there's more than a single packet on page we'd post unmapped
memory toward HW [assuming mapping is actually done in granularity
smaller than page].
  b. Unmaps are being done for the entire page, which is incorrect.

Fixes: 55482edc25f06 ("qede: Add slowpath/fastpath support and enable hardware GRO")
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 9512925a2cc2b1cd0206bb93bad200a69716f998)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/qlogic/qede/qede_main.c