]> git.droids-corp.org - dpdk.git/commit
net/iavf: fix Rx queue interrupt setting
authorKe Zhang <ke1x.zhang@intel.com>
Fri, 20 May 2022 03:00:23 +0000 (03:00 +0000)
committerQi Zhang <qi.z.zhang@intel.com>
Tue, 24 May 2022 02:53:37 +0000 (04:53 +0200)
commita08f9cb698c3d4687765860e328dca727f7a516b
tree80262b5ebd9e604ff54b9ffa1c4900dd1f7f1413
parentfced83c1229e0ad89f26d07fa7bd46b8767d9f5c
net/iavf: fix Rx queue interrupt setting

For Rx-Queue Interrupt Setting, when VF Rx interrupt
disable (INTENA=0), there are two ways to write back
descriptor to host memory:

1) Set WB_ON_ITR bit 0 to Interrupt Dynamic Control Register:
Completed descriptors are posted to host memory according to
the internal descriptor cache policy (in other words when a
full cache line is available for write-back).

A internal descriptor size is 16 bytes or 32 bytes, a cache
line size is 64 bytes or 128 bytes from datasheet :
PCIe Global Config 2 - GLPCI_CNF2 (0x000BE004; RO)
so the full cache line could contains 4 packets, it means
Network card will send 4 packets to host when a full cache line
is available.

2) Set WB_ON_ITR bit 1 to Interrupt Dynamic Control Register:
Completed descriptors also trigger the ITR. Following ITR
expiration, all leftover completed descriptors are posted to
host memory.

Network card will send packet to host even if only one
descriptor is completed.

Changing 1) to 2) to make sure VF send the packet to host even
if there is only one Rx packet is ready in hardware.

Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")
Cc: stable@dpdk.org
Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/iavf/iavf_ethdev.c