Skip to content

Commit

Permalink
idpf: add RX splitq napi poll support
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
atbrady-intel authored and anguy11 committed Sep 13, 2023
1 parent c2d548c commit 3a8845a
Show file tree
Hide file tree
Showing 4 changed files with 892 additions and 6 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/intel/idpf/idpf.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ struct idpf_vport_max_q;
#include <linux/etherdevice.h>
#include <linux/pci.h>
#include <linux/bitfield.h>
#include <net/gro.h>
#include <linux/dim.h>

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

bool link_up;
Expand Down
Loading

0 comments on commit 3a8845a

Please sign in to comment.