Commit d5edd333 authored by Mustafa Ismail's avatar Mustafa Ismail Committed by Leon Romanovsky
Browse files

RDMA/irdma: Add GEN3 core driver support



Introduce support for the GEN3 auxiliary core driver, which is
responsible for initializing PCI-level RDMA resources.

Facilitate host-driver communication with the device's Control Plane (CP)
to discover capabilities and perform privileged operations through an
RDMA-specific messaging interface built atop the IDPF mailbox and virtual
channel protocol.

Establish the RDMA virtual channel message interface and incorporate
operations to retrieve the hardware version and discover capabilities
from the CP.

Additionally, set up the RDMA MMIO regions and initialize the RF structure.

Signed-off-by: default avatarMustafa Ismail <mustafa.ismail@intel.com>
Co-developed-by: default avatarTatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: default avatarTatyana Nikolova <tatyana.e.nikolova@intel.com>
Link: https://patch.msgid.link/20250827152545.2056-3-tatyana.e.nikolova@intel.com


Tested-by: default avatarJacob Moroni <jmoroni@google.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 0c2b80ca
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ irdma-objs := cm.o \
              hw.o        \
              i40iw_hw.o  \
              i40iw_if.o  \
	      ig3rdma_if.o\
	      icrdma_if.o \
              icrdma_hw.o \
              main.o      \
@@ -23,6 +24,7 @@ irdma-objs := cm.o \
              uk.o        \
              utils.o     \
              verbs.o     \
	      virtchnl.o  \
              ws.o        \

CFLAGS_trace.o = -I$(src)
+407 −77

File changed.

Preview size limit exceeded, changes collapsed.

+29 −21

File changed.

Preview size limit exceeded, changes collapsed.

+15 −3
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
#include "defs.h"
#include "type.h"
#include "protos.h"
#include "virtchnl.h"

/**
 * irdma_find_sd_index_limit - finds segment descriptor index limit
@@ -228,6 +229,10 @@ int irdma_sc_create_hmc_obj(struct irdma_sc_dev *dev,
	bool pd_error = false;
	int ret_code = 0;

	if (dev->hw_attrs.uk_attrs.hw_rev >= IRDMA_GEN_3 &&
	    dev->hmc_info->hmc_obj[info->rsrc_type].mem_loc == IRDMA_LOC_MEM)
		return 0;

	if (info->start_idx >= info->hmc_info->hmc_obj[info->rsrc_type].cnt)
		return -EINVAL;

@@ -330,7 +335,7 @@ static int irdma_finish_del_sd_reg(struct irdma_sc_dev *dev,
	u32 i, sd_idx;
	struct irdma_dma_mem *mem;

	if (!reset)
	if (dev->privileged && !reset)
		ret_code = irdma_hmc_sd_grp(dev, info->hmc_info,
					    info->hmc_info->sd_indexes[0],
					    info->del_sd_cnt, false);
@@ -376,6 +381,9 @@ int irdma_sc_del_hmc_obj(struct irdma_sc_dev *dev,
	u32 i, j;
	int ret_code = 0;

	if (dev->hmc_info->hmc_obj[info->rsrc_type].mem_loc == IRDMA_LOC_MEM)
		return 0;

	if (info->start_idx >= info->hmc_info->hmc_obj[info->rsrc_type].cnt) {
		ibdev_dbg(to_ibdev(dev),
			  "HMC: error start_idx[%04d]  >= [type %04d].cnt[%04d]\n",
@@ -589,6 +597,9 @@ int irdma_add_pd_table_entry(struct irdma_sc_dev *dev,
		pd_entry->sd_index = sd_idx;
		pd_entry->valid = true;
		pd_table->use_cnt++;

		if (hmc_info->hmc_fn_id < dev->hw_attrs.first_hw_vf_fpm_id &&
		    dev->privileged)
			irdma_invalidate_pf_hmc_pd(dev, sd_idx, rel_pd_idx);
	}
	pd_entry->bp.use_cnt++;
@@ -640,6 +651,7 @@ int irdma_remove_pd_bp(struct irdma_sc_dev *dev,
	pd_addr = pd_table->pd_page_addr.va;
	pd_addr += rel_pd_idx;
	memset(pd_addr, 0, sizeof(u64));
	if (dev->privileged && dev->hmc_fn_id == hmc_info->hmc_fn_id)
		irdma_invalidate_pf_hmc_pd(dev, sd_idx, idx);

	if (!pd_entry->rsrc_pg) {
+18 −1

File changed.

Preview size limit exceeded, changes collapsed.

Loading