summaryrefslogtreecommitdiff
path: root/include/linux/net/intel/iidc_rdma.h
diff options
context:
space:
mode:
authorDave Ertman <david.m.ertman@intel.com>2025-04-15 21:15:49 -0500
committerTony Nguyen <anthony.l.nguyen@intel.com>2025-05-09 11:35:43 -0700
commitc24a65b6a27c78d8540409800886b6622ea86ebf (patch)
tree98d942b4809897d9c0fc85de3d820b1eb239622a /include/linux/net/intel/iidc_rdma.h
parent8239b771b94b639556c1987185fd82b2a896c923 (diff)
iidc/ice/irdma: Update IDC to support multiple consumers
In preparation of supporting more than a single core PCI driver for RDMA, move ice specific structs like qset_params, qos_info and qos_params from iidc_rdma.h to iidc_rdma_ice.h. Previously, the ice driver was just exporting its entire PF struct to the auxiliary driver, but since each core driver will have its own different PF struct, implement a universal struct that all core drivers can provide to the auxiliary driver through the probe call. Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Dave Ertman <david.m.ertman@intel.com> Co-developed-by: Mustafa Ismail <mustafa.ismail@intel.com> Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com> Co-developed-by: Shiraz Saleem <shiraz.saleem@intel.com> Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com> Co-developed-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com> Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'include/linux/net/intel/iidc_rdma.h')
-rw-r--r--include/linux/net/intel/iidc_rdma.h67
1 files changed, 18 insertions, 49 deletions
diff --git a/include/linux/net/intel/iidc_rdma.h b/include/linux/net/intel/iidc_rdma.h
index 7f1910289534..8baad1082042 100644
--- a/include/linux/net/intel/iidc_rdma.h
+++ b/include/linux/net/intel/iidc_rdma.h
@@ -5,7 +5,6 @@
#define _IIDC_RDMA_H_
#include <linux/auxiliary_bus.h>
-#include <linux/dcbnl.h>
#include <linux/device.h>
#include <linux/if_ether.h>
#include <linux/kernel.h>
@@ -17,14 +16,19 @@ enum iidc_rdma_event_type {
IIDC_RDMA_EVENT_AFTER_MTU_CHANGE,
IIDC_RDMA_EVENT_BEFORE_TC_CHANGE,
IIDC_RDMA_EVENT_AFTER_TC_CHANGE,
+ IIDC_RDMA_EVENT_WARN_RESET,
IIDC_RDMA_EVENT_CRIT_ERR,
IIDC_RDMA_EVENT_NBITS /* must be last */
};
+struct iidc_rdma_event {
+ DECLARE_BITMAP(type, IIDC_RDMA_EVENT_NBITS);
+ u32 reg;
+};
+
enum iidc_rdma_reset_type {
- IIDC_PFR,
- IIDC_CORER,
- IIDC_GLOBR,
+ IIDC_FUNC_RESET,
+ IIDC_DEV_RESET,
};
enum iidc_rdma_protocol {
@@ -32,53 +36,22 @@ enum iidc_rdma_protocol {
IIDC_RDMA_PROTOCOL_ROCEV2 = BIT(1),
};
-#define IIDC_MAX_USER_PRIORITY 8
-#define IIDC_DSCP_PFC_MODE 0x1
-
-/* Struct to hold per RDMA Qset info */
-struct iidc_rdma_qset_params {
- /* Qset TEID returned to the RDMA driver in
- * ice_add_rdma_qset and used by RDMA driver
- * for calls to ice_del_rdma_qset
- */
- u32 teid; /* Qset TEID */
- u16 qs_handle; /* RDMA driver provides this */
- u16 vport_id; /* VSI index */
- u8 tc; /* TC branch the Qset should belong to */
-};
-
-struct iidc_rdma_qos_info {
- u64 tc_ctx;
- u8 rel_bw;
- u8 prio_type;
- u8 egress_virt_up;
- u8 ingress_virt_up;
-};
-
-/* Struct to pass QoS info */
-struct iidc_rdma_qos_params {
- struct iidc_rdma_qos_info tc_info[IEEE_8021QAZ_MAX_TCS];
- u8 up2tc[IIDC_MAX_USER_PRIORITY];
- u8 vport_relative_bw;
- u8 vport_priority_type;
- u8 num_tc;
- u8 pfc_mode;
- u8 dscp_map[DSCP_MAX];
-};
-
-struct iidc_rdma_event {
- DECLARE_BITMAP(type, IIDC_RDMA_EVENT_NBITS);
- u32 reg;
+/* Structure to be populated by core LAN PCI driver */
+struct iidc_rdma_core_dev_info {
+ struct pci_dev *pdev; /* PCI device of corresponding to main function */
+ struct auxiliary_device *adev;
+ /* Current active RDMA protocol */
+ enum iidc_rdma_protocol rdma_protocol;
+ void *iidc_priv; /* elements unique to each driver */
};
/* Structure representing auxiliary driver tailored information about the core
* PCI dev, each auxiliary driver using the IIDC interface will have an
* instance of this struct dedicated to it.
*/
-
struct iidc_rdma_core_auxiliary_dev {
struct auxiliary_device adev;
- struct ice_pf *pf;
+ struct iidc_rdma_core_dev_info *cdev_info;
};
/* structure representing the auxiliary driver. This struct is to be
@@ -88,12 +61,8 @@ struct iidc_rdma_core_auxiliary_dev {
*/
struct iidc_rdma_core_auxiliary_drv {
struct auxiliary_driver adrv;
- /* This event_handler is meant to be a blocking call. For instance,
- * when a BEFORE_MTU_CHANGE event comes in, the event_handler will not
- * return until the auxiliary driver is ready for the MTU change to
- * happen.
- */
- void (*event_handler)(struct ice_pf *pf, struct iidc_rdma_event *event);
+ void (*event_handler)(struct iidc_rdma_core_dev_info *cdev,
+ struct iidc_rdma_event *event);
};
#endif /* _IIDC_RDMA_H_*/