From: Felix Manlunas <felix.manlu...@cavium.com> Date: Thu, 29 Mar 2018 11:13:22 -0700
> From: Raghu Vatsavayi <raghu.vatsav...@cavium.com> > > This commit has fix for RX traffic issues when we stress test the driver > with continuous ifconfig up/down under very high traffic conditions. > > Reason for the issue is that, in existing liquidio_stop function NAPI is > disabled even before actual FW/HW interface is brought down via > send_rx_ctrl_cmd(lio, 0). Between time frame of NAPI disable and actual > interface down in firmware, firmware continuously enqueues rx traffic to > host. When interrupt happens for new packets, host irq handler fails in > scheduling NAPI as the NAPI is already disabled. > > After "ifconfig <iface> up", Host re-enables NAPI but cannot schedule it > until it receives another Rx interrupt. Host never receives Rx interrupt as > it never cleared the Rx interrupt it received during interface down > operation. NIC Rx interrupt gets cleared only when Host processes queue and > clears the queue counts. Above anomaly leads to other issues like packet > overflow in FW/HW queues, backpressure. > > Fix: > This commit fixes this issue by disabling NAPI only after informing > firmware to stop queueing packets to host via send_rx_ctrl_cmd(lio, 0). > send_rx_ctrl_cmd is not visible in the patch as it is already there in the > code. The DOWN command also waits for any pending packets to be processed > by NAPI so that the deadlock will not occur. > > Signed-off-by: Raghu Vatsavayi <raghu.vatsav...@cavium.com> > Acked-by: Derek Chickles <derek.chick...@cavium.com> > Signed-off-by: Felix Manlunas <felix.manlu...@cavium.com> Applied.