summaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorDavid Thompson <davthompson@nvidia.com>2023-12-20 18:47:39 -0500
committerDavid S. Miller <davem@davemloft.net>2023-12-29 22:44:38 +0000
commitdcea1bd45e6d111cc8fc1aaefa7e31694089bda3 (patch)
tree84f35f1610de71932fd28b58e8138f4039421db4 /net/sched
parent97417cd79ce179a774b245a3f5535cc3fbbaee50 (diff)
mlxbf_gige: fix receive packet race condition
Under heavy traffic, the BlueField Gigabit interface can become unresponsive. This is due to a possible race condition in the mlxbf_gige_rx_packet function, where the function exits with producer and consumer indices equal but there are remaining packet(s) to be processed. In order to prevent this situation, read receive consumer index *before* the HW replenish so that the mlxbf_gige_rx_packet function returns an accurate return value even if a packet is received into just-replenished buffer prior to exiting this routine. If the just-replenished buffer is received and occupies the last RX ring entry, the interface would not recover and instead would encounter RX packet drops related to internal buffer shortages since the driver RX logic is not being triggered to drain the RX ring. This patch will address and prevent this "ring full" condition. Fixes: f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver") Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com> Signed-off-by: David Thompson <davthompson@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
0 files changed, 0 insertions, 0 deletions