Skip to content

Commit 3a8845a

Browse files
atbrady-intelanguy11
authored andcommitted
idpf: add RX splitq napi poll support
Add support to handle interrupts for the RX completion queue and RX buffer queue. When the interrupt fires on RX completion queue, process the RX descriptors that are received. Allocate and prepare the SKB with the RX packet info, for both data and header buffer. IDPF uses software maintained refill queues to manage buffers between RX queue producer and the buffer queue consumer. They are required in order to maintain a lockless buffer management system and are strictly software only constructs. Instead of updating the RX buffer queue tail with available buffers right after the clean routine, it posts the buffer ids to the refill queues, only to post them to the HW later. If the generic receive offload (GRO) is enabled in the capabilities and turned on by default or via ethtool, then HW performs the packet coalescing if certain criteria are met by the incoming packets and updates the RX descriptor. Similar to GRO, if generic checksum is enabled, HW computes the checksum and updates the respective fields in the descriptor. Add support to update the SKB fields with the GRO and the generic checksum received. Signed-off-by: Alan Brady <[email protected]> Co-developed-by: Joshua Hay <[email protected]> Signed-off-by: Joshua Hay <[email protected]> Co-developed-by: Madhu Chittim <[email protected]> Signed-off-by: Madhu Chittim <[email protected]> Co-developed-by: Phani Burra <[email protected]> Signed-off-by: Phani Burra <[email protected]> Reviewed-by: Sridhar Samudrala <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Co-developed-by: Pavan Kumar Linga <[email protected]> Signed-off-by: Pavan Kumar Linga <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent c2d548c commit 3a8845a

File tree

4 files changed

+892
-6
lines changed

4 files changed

+892
-6
lines changed

drivers/net/ethernet/intel/idpf/idpf.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ struct idpf_vport_max_q;
1414
#include <linux/etherdevice.h>
1515
#include <linux/pci.h>
1616
#include <linux/bitfield.h>
17+
#include <net/gro.h>
1718
#include <linux/dim.h>
1819

1920
#include "virtchnl2.h"
@@ -306,6 +307,7 @@ enum idpf_vport_flags {
306307
* @q_vector_idxs: Starting index of queue vectors
307308
* @max_mtu: device given max possible MTU
308309
* @default_mac_addr: device will give a default MAC to use
310+
* @rx_itr_profile: RX profiles for Dynamic Interrupt Moderation
309311
* @tx_itr_profile: TX profiles for Dynamic Interrupt Moderation
310312
* @link_up: True if link is up
311313
* @vc_msg: Virtchnl message buffer
@@ -350,6 +352,7 @@ struct idpf_vport {
350352
u16 *q_vector_idxs;
351353
u16 max_mtu;
352354
u8 default_mac_addr[ETH_ALEN];
355+
u16 rx_itr_profile[IDPF_DIM_PROFILE_SLOTS];
353356
u16 tx_itr_profile[IDPF_DIM_PROFILE_SLOTS];
354357

355358
bool link_up;

0 commit comments

Comments
 (0)