]> git.baikalelectronics.ru Git - kernel.git/commit
qede: Correct XDP forward unmapping
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Fri, 7 Apr 2017 08:04:58 +0000 (11:04 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Apr 2017 13:26:14 +0000 (06:26 -0700)
commitf592cced51afec4cdbf14ca4a86dc141effc19ae
tree460ee4d36a197507a2b7f79da2c90e34db6905cf
parent8ed24d38d20c9baf53d9440227b40c5cf2ba83c6
qede: Correct XDP forward unmapping

Driver is currently using dma_unmap_single() with the address it
passed to device for the purpose of forwarding, but the XDP
transmission buffer was originally a page allocated for the rx-queue.
The mapped address is likely to differ from the original mapped
address due to the placement offset.

This difference is going to get even bigger once we support headroom.

Cache the original mapped address of the page, and use it for unmapping
of the buffer when completion arrives for the XDP forwarded packet.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qede/qede.h
drivers/net/ethernet/qlogic/qede/qede_fp.c
drivers/net/ethernet/qlogic/qede/qede_main.c