]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: ena: add handling of llq max tx burst size
authorSameeh Jubran <sameehj@amazon.com>
Mon, 3 Jun 2019 14:43:19 +0000 (17:43 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 13 Nov 2019 17:07:37 +0000 (18:07 +0100)
commit2d14518f03c33078b0520e36c4e5f59fec8ed153
treee5c4826b2f298e97f47872b1e16a01f8c7df1400
parent40b49a1183d1a1157cffd6cd6055461e47916b8f
net: ena: add handling of llq max tx burst size

BugLink: https://bugs.launchpad.net/bugs/1850175
There is a maximum TX burst size that the ENA device can handle.
It is exposed by the device to the driver and the driver
needs to comply with it to avoid bugs.

In this commit we:
1. Add ena_com_is_doorbell_needed(), which calculates the number of
   llq entries that will be used to hold a packet, and will return
   true if they exceed the number of allowed entries in a burst.
   If the function returns true, a doorbell needs to be invoked
   to send this packet in the next burst.

2. Follow the available entries in the current burst:
   - Every doorbell a new burst begins
   - With each write of an llq entry, the available entries in the
     current burst are decreased by 1.

Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 05d62ca218f8425c70389d0416c15bd0d455b416)
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Khaled Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/amazon/ena/ena_admin_defs.h
drivers/net/ethernet/amazon/ena/ena_com.c
drivers/net/ethernet/amazon/ena/ena_com.h
drivers/net/ethernet/amazon/ena/ena_eth_com.c
drivers/net/ethernet/amazon/ena/ena_eth_com.h
drivers/net/ethernet/amazon/ena/ena_netdev.c