net/iavf: enable interrupt polling
authorRobin Zhang <robinx.zhang@intel.com>
Wed, 25 Aug 2021 08:34:35 +0000 (08:34 +0000)
committerQi Zhang <qi.z.zhang@intel.com>
Wed, 22 Sep 2021 07:27:12 +0000 (09:27 +0200)
commitcd3b124955d4673fa0ddd423ebc01a5adf9501d4
tree7eb10ed777f3c8dc19c751fe1ca08e2224aa3340
parentf8d541da5184c91fdec24f1b4713e79e0f837bde
net/iavf: enable interrupt polling

For VF hosted by Intel 700 series NICs, internal Rx interrupt and adminq
interrupt share the same source, that cause a lot CPU cycles be wasted on
interrupt handler on Rx path.

The patch disable PCI interrupt and remove the interrupt handler, replace
it with a low frequency(50ms) interrupt polling daemon which is
implemented by registering an alarm callback periodically.

The virtual channel capability bit VIRTCHNL_VF_OFFLOAD_WB_ON_ITR can be
used to negotiate if iavf PMD needs to enable background alarm or not, so
ideally this change will not impact the case hosted by Intel 800 series
NICS.

This patch implements the same logic with an early i40e commit:
commit 864a800d706d ("net/i40e: remove VF interrupt handler")

Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/iavf/iavf.h
drivers/net/iavf/iavf_ethdev.c
drivers/net/iavf/iavf_vchnl.c