net: ena: add support for traffic mirroring
authorArthur Kiyanovski <akiyano@amazon.com>
Tue, 21 Jul 2020 13:38:08 +0000 (16:38 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2020 22:59:04 +0000 (15:59 -0700)
commit0f505c604e4ffd2ddc7cf06583ac169c443b8f68
treec3a20075c16c88d0e25cbbd96d4b80e0591ff3fe
parent0dcec68651f2162290750aae48fd7a0fdace0c66
net: ena: add support for traffic mirroring

Add support for traffic mirroring, where the hardware reads the
buffer from the instance memory directly.

Traffic Mirroring needs access to the rx buffers in the instance.
To have this access, this patch:
1. Changes the code to map and unmap the rx buffers bidirectionally.
2. Enables the relevant bit in driver_supported_features to indicate
   to the FW that this driver supports traffic mirroring.

Rx completion is not generated until mirroring is done to avoid
the situation where the driver changes the buffer before it is
mirrored.

Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_admin_defs.h
drivers/net/ethernet/amazon/ena/ena_netdev.c