Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iidc/ice/irdma: Rename to iidc_* convention

In preparation of supporting more than a single core PCI driver
for RDMA, homogenize naming to iidc_rdma_* and IIDC_RDMA_*
form.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>

authored by

Dave Ertman and committed by
Tony Nguyen
97b5631a 468d8b46

+64 -56
+22 -19
drivers/infiniband/hw/irdma/main.c
··· 61 61 } 62 62 63 63 static void irdma_fill_qos_info(struct irdma_l2params *l2params, 64 - struct iidc_qos_params *qos_info) 64 + struct iidc_rdma_qos_params *qos_info) 65 65 { 66 66 int i; 67 67 ··· 85 85 } 86 86 } 87 87 88 - static void irdma_iidc_event_handler(struct ice_pf *pf, struct iidc_event *event) 88 + static void irdma_iidc_event_handler(struct ice_pf *pf, struct iidc_rdma_event *event) 89 89 { 90 90 struct irdma_device *iwdev = dev_get_drvdata(&pf->adev->dev); 91 91 struct irdma_l2params l2params = {}; 92 92 93 - if (*event->type & BIT(IIDC_EVENT_AFTER_MTU_CHANGE)) { 93 + if (*event->type & BIT(IIDC_RDMA_EVENT_AFTER_MTU_CHANGE)) { 94 94 ibdev_dbg(&iwdev->ibdev, "CLNT: new MTU = %d\n", iwdev->netdev->mtu); 95 95 if (iwdev->vsi.mtu != iwdev->netdev->mtu) { 96 96 l2params.mtu = iwdev->netdev->mtu; ··· 98 98 irdma_log_invalid_mtu(l2params.mtu, &iwdev->rf->sc_dev); 99 99 irdma_change_l2params(&iwdev->vsi, &l2params); 100 100 } 101 - } else if (*event->type & BIT(IIDC_EVENT_BEFORE_TC_CHANGE)) { 101 + } else if (*event->type & BIT(IIDC_RDMA_EVENT_BEFORE_TC_CHANGE)) { 102 102 if (iwdev->vsi.tc_change_pending) 103 103 return; 104 104 105 105 irdma_prep_tc_change(iwdev); 106 - } else if (*event->type & BIT(IIDC_EVENT_AFTER_TC_CHANGE)) { 107 - struct iidc_qos_params qos_info = {}; 106 + } else if (*event->type & BIT(IIDC_RDMA_EVENT_AFTER_TC_CHANGE)) { 107 + struct iidc_rdma_qos_params qos_info = {}; 108 108 109 109 if (!iwdev->vsi.tc_change_pending) 110 110 return; ··· 116 116 if (iwdev->rf->protocol_used != IRDMA_IWARP_PROTOCOL_ONLY) 117 117 iwdev->dcb_vlan_mode = qos_info.num_tc > 1 && !l2params.dscp_mode; 118 118 irdma_change_l2params(&iwdev->vsi, &l2params); 119 - } else if (*event->type & BIT(IIDC_EVENT_CRIT_ERR)) { 119 + } else if (*event->type & BIT(IIDC_RDMA_EVENT_CRIT_ERR)) { 120 120 ibdev_warn(&iwdev->ibdev, "ICE OICR event notification: oicr = 0x%08x\n", 121 121 event->reg); 122 122 if (event->reg & IRDMAPFINT_OICR_PE_CRITERR_M) { ··· 245 245 246 246 static void irdma_remove(struct auxiliary_device *aux_dev) 247 247 { 248 - struct iidc_auxiliary_dev *iidc_adev = container_of(aux_dev, 249 - struct iidc_auxiliary_dev, 250 - adev); 251 - struct ice_pf *pf = iidc_adev->pf; 252 248 struct irdma_device *iwdev = auxiliary_get_drvdata(aux_dev); 249 + struct iidc_rdma_core_auxiliary_dev *iidc_adev; 250 + struct ice_pf *pf; 251 + 252 + iidc_adev = container_of(aux_dev, struct iidc_rdma_core_auxiliary_dev, adev); 253 + pf = iidc_adev->pf; 253 254 254 255 irdma_ib_unregister_device(iwdev); 255 256 ice_rdma_update_vsi_filter(pf, iwdev->vsi_num, false); ··· 293 292 294 293 static int irdma_probe(struct auxiliary_device *aux_dev, const struct auxiliary_device_id *id) 295 294 { 296 - struct iidc_auxiliary_dev *iidc_adev = container_of(aux_dev, 297 - struct iidc_auxiliary_dev, 298 - adev); 299 - struct ice_pf *pf = iidc_adev->pf; 300 - struct ice_vsi *vsi = ice_get_main_vsi(pf); 301 - struct iidc_qos_params qos_info = {}; 295 + struct iidc_rdma_core_auxiliary_dev *iidc_adev; 296 + struct iidc_rdma_qos_params qos_info = {}; 297 + struct irdma_l2params l2params = {}; 302 298 struct irdma_device *iwdev; 303 299 struct irdma_pci_f *rf; 304 - struct irdma_l2params l2params = {}; 300 + struct ice_vsi *vsi; 301 + struct ice_pf *pf; 305 302 int err; 303 + 304 + iidc_adev = container_of(aux_dev, struct iidc_rdma_core_auxiliary_dev, adev); 305 + pf = iidc_adev->pf; 306 + vsi = ice_get_main_vsi(pf); 306 307 307 308 if (!vsi) 308 309 return -EIO; ··· 370 367 371 368 MODULE_DEVICE_TABLE(auxiliary, irdma_auxiliary_id_table); 372 369 373 - static struct iidc_auxiliary_drv irdma_auxiliary_drv = { 370 + static struct iidc_rdma_core_auxiliary_drv irdma_auxiliary_drv = { 374 371 .adrv = { 375 372 .id_table = irdma_auxiliary_id_table, 376 373 .probe = irdma_probe,
+4 -4
drivers/net/ethernet/intel/ice/ice_dcb_lib.c
··· 352 352 struct ice_aqc_port_ets_elem buf = { 0 }; 353 353 struct ice_dcbx_cfg *old_cfg, *curr_cfg; 354 354 struct device *dev = ice_pf_to_dev(pf); 355 + struct iidc_rdma_event *event; 355 356 int ret = ICE_DCB_NO_HW_CHG; 356 - struct iidc_event *event; 357 357 struct ice_vsi *pf_vsi; 358 358 359 359 curr_cfg = &pf->hw.port_info->qos_cfg.local_dcbx_cfg; ··· 405 405 goto free_cfg; 406 406 } 407 407 408 - set_bit(IIDC_EVENT_BEFORE_TC_CHANGE, event->type); 408 + set_bit(IIDC_RDMA_EVENT_BEFORE_TC_CHANGE, event->type); 409 409 ice_send_event_to_aux(pf, event); 410 410 kfree(event); 411 411 ··· 740 740 void ice_pf_dcb_recfg(struct ice_pf *pf, bool locked) 741 741 { 742 742 struct ice_dcbx_cfg *dcbcfg = &pf->hw.port_info->qos_cfg.local_dcbx_cfg; 743 - struct iidc_event *event; 743 + struct iidc_rdma_event *event; 744 744 u8 tc_map = 0; 745 745 int v, ret; 746 746 ··· 789 789 if (!event) 790 790 return; 791 791 792 - set_bit(IIDC_EVENT_AFTER_TC_CHANGE, event->type); 792 + set_bit(IIDC_RDMA_EVENT_AFTER_TC_CHANGE, event->type); 793 793 ice_send_event_to_aux(pf, event); 794 794 kfree(event); 795 795 }
+13 -10
drivers/net/ethernet/intel/ice/ice_idc.c
··· 15 15 * This function has to be called with a device_lock on the 16 16 * pf->adev.dev to avoid race conditions. 17 17 */ 18 - static struct iidc_auxiliary_drv *ice_get_auxiliary_drv(struct ice_pf *pf) 18 + static 19 + struct iidc_rdma_core_auxiliary_drv *ice_get_auxiliary_drv(struct ice_pf *pf) 19 20 { 20 21 struct auxiliary_device *adev; 21 22 ··· 24 23 if (!adev || !adev->dev.driver) 25 24 return NULL; 26 25 27 - return container_of(adev->dev.driver, struct iidc_auxiliary_drv, 28 - adrv.driver); 26 + return container_of(adev->dev.driver, 27 + struct iidc_rdma_core_auxiliary_drv, adrv.driver); 29 28 } 30 29 31 30 /** ··· 33 32 * @pf: pointer to PF struct 34 33 * @event: event struct 35 34 */ 36 - void ice_send_event_to_aux(struct ice_pf *pf, struct iidc_event *event) 35 + void ice_send_event_to_aux(struct ice_pf *pf, struct iidc_rdma_event *event) 37 36 { 38 - struct iidc_auxiliary_drv *iadrv; 37 + struct iidc_rdma_core_auxiliary_drv *iadrv; 39 38 40 39 if (WARN_ON_ONCE(!in_task())) 41 40 return; ··· 142 141 * @pf: struct for PF 143 142 * @reset_type: type of reset 144 143 */ 145 - int ice_rdma_request_reset(struct ice_pf *pf, enum iidc_reset_type reset_type) 144 + int ice_rdma_request_reset(struct ice_pf *pf, 145 + enum iidc_rdma_reset_type reset_type) 146 146 { 147 147 enum ice_reset_req reset; 148 148 ··· 207 205 * @pf: pointer to PF struct 208 206 * @qos: set of QoS values 209 207 */ 210 - void ice_get_qos_params(struct ice_pf *pf, struct iidc_qos_params *qos) 208 + void ice_get_qos_params(struct ice_pf *pf, struct iidc_rdma_qos_params *qos) 211 209 { 212 210 struct ice_dcbx_cfg *dcbx_cfg; 213 211 unsigned int i; ··· 265 263 */ 266 264 static void ice_adev_release(struct device *dev) 267 265 { 268 - struct iidc_auxiliary_dev *iadev; 266 + struct iidc_rdma_core_auxiliary_dev *iadev; 269 267 270 - iadev = container_of(dev, struct iidc_auxiliary_dev, adev.dev); 268 + iadev = container_of(dev, struct iidc_rdma_core_auxiliary_dev, 269 + adev.dev); 271 270 kfree(iadev); 272 271 } 273 272 ··· 278 275 */ 279 276 int ice_plug_aux_dev(struct ice_pf *pf) 280 277 { 281 - struct iidc_auxiliary_dev *iadev; 278 + struct iidc_rdma_core_auxiliary_dev *iadev; 282 279 struct auxiliary_device *adev; 283 280 int ret; 284 281
+1 -1
drivers/net/ethernet/intel/ice/ice_idc_int.h
··· 8 8 9 9 struct ice_pf; 10 10 11 - void ice_send_event_to_aux(struct ice_pf *pf, struct iidc_event *event); 11 + void ice_send_event_to_aux(struct ice_pf *pf, struct iidc_rdma_event *event); 12 12 13 13 #endif /* !_ICE_IDC_INT_H_ */
+4 -4
drivers/net/ethernet/intel/ice/ice_main.c
··· 2401 2401 } 2402 2402 2403 2403 if (test_and_clear_bit(ICE_AUX_ERR_PENDING, pf->state)) { 2404 - struct iidc_event *event; 2404 + struct iidc_rdma_event *event; 2405 2405 2406 2406 event = kzalloc(sizeof(*event), GFP_KERNEL); 2407 2407 if (event) { 2408 - set_bit(IIDC_EVENT_CRIT_ERR, event->type); 2408 + set_bit(IIDC_RDMA_EVENT_CRIT_ERR, event->type); 2409 2409 /* report the entire OICR value to AUX driver */ 2410 2410 swap(event->reg, pf->oicr_err_reg); 2411 2411 ice_send_event_to_aux(pf, event); ··· 2424 2424 ice_plug_aux_dev(pf); 2425 2425 2426 2426 if (test_and_clear_bit(ICE_FLAG_MTU_CHANGED, pf->flags)) { 2427 - struct iidc_event *event; 2427 + struct iidc_rdma_event *event; 2428 2428 2429 2429 event = kzalloc(sizeof(*event), GFP_KERNEL); 2430 2430 if (event) { 2431 - set_bit(IIDC_EVENT_AFTER_MTU_CHANGE, event->type); 2431 + set_bit(IIDC_RDMA_EVENT_AFTER_MTU_CHANGE, event->type); 2432 2432 ice_send_event_to_aux(pf, event); 2433 2433 kfree(event); 2434 2434 }
+20 -18
include/linux/net/intel/iidc_rdma.h
··· 11 11 #include <linux/kernel.h> 12 12 #include <linux/netdevice.h> 13 13 14 - enum iidc_event_type { 15 - IIDC_EVENT_BEFORE_MTU_CHANGE, 16 - IIDC_EVENT_AFTER_MTU_CHANGE, 17 - IIDC_EVENT_BEFORE_TC_CHANGE, 18 - IIDC_EVENT_AFTER_TC_CHANGE, 19 - IIDC_EVENT_CRIT_ERR, 20 - IIDC_EVENT_NBITS /* must be last */ 14 + enum iidc_rdma_event_type { 15 + IIDC_RDMA_EVENT_BEFORE_MTU_CHANGE, 16 + IIDC_RDMA_EVENT_AFTER_MTU_CHANGE, 17 + IIDC_RDMA_EVENT_BEFORE_TC_CHANGE, 18 + IIDC_RDMA_EVENT_AFTER_TC_CHANGE, 19 + IIDC_RDMA_EVENT_CRIT_ERR, 20 + IIDC_RDMA_EVENT_NBITS /* must be last */ 21 21 }; 22 22 23 - enum iidc_reset_type { 23 + enum iidc_rdma_reset_type { 24 24 IIDC_PFR, 25 25 IIDC_CORER, 26 26 IIDC_GLOBR, ··· 47 47 u8 tc; /* TC branch the Qset should belong to */ 48 48 }; 49 49 50 - struct iidc_qos_info { 50 + struct iidc_rdma_qos_info { 51 51 u64 tc_ctx; 52 52 u8 rel_bw; 53 53 u8 prio_type; ··· 56 56 }; 57 57 58 58 /* Struct to pass QoS info */ 59 - struct iidc_qos_params { 60 - struct iidc_qos_info tc_info[IEEE_8021QAZ_MAX_TCS]; 59 + struct iidc_rdma_qos_params { 60 + struct iidc_rdma_qos_info tc_info[IEEE_8021QAZ_MAX_TCS]; 61 61 u8 up2tc[IIDC_MAX_USER_PRIORITY]; 62 62 u8 vport_relative_bw; 63 63 u8 vport_priority_type; ··· 66 66 u8 dscp_map[IIDC_MAX_DSCP_MAPPING]; 67 67 }; 68 68 69 - struct iidc_event { 70 - DECLARE_BITMAP(type, IIDC_EVENT_NBITS); 69 + struct iidc_rdma_event { 70 + DECLARE_BITMAP(type, IIDC_RDMA_EVENT_NBITS); 71 71 u32 reg; 72 72 }; 73 73 ··· 75 75 76 76 int ice_add_rdma_qset(struct ice_pf *pf, struct iidc_rdma_qset_params *qset); 77 77 int ice_del_rdma_qset(struct ice_pf *pf, struct iidc_rdma_qset_params *qset); 78 - int ice_rdma_request_reset(struct ice_pf *pf, enum iidc_reset_type reset_type); 78 + int ice_rdma_request_reset(struct ice_pf *pf, 79 + enum iidc_rdma_reset_type reset_type); 79 80 int ice_rdma_update_vsi_filter(struct ice_pf *pf, u16 vsi_id, bool enable); 80 - void ice_get_qos_params(struct ice_pf *pf, struct iidc_qos_params *qos); 81 + void ice_get_qos_params(struct ice_pf *pf, 82 + struct iidc_rdma_qos_params *qos); 81 83 int ice_alloc_rdma_qvector(struct ice_pf *pf, struct msix_entry *entry); 82 84 void ice_free_rdma_qvector(struct ice_pf *pf, struct msix_entry *entry); 83 85 ··· 88 86 * instance of this struct dedicated to it. 89 87 */ 90 88 91 - struct iidc_auxiliary_dev { 89 + struct iidc_rdma_core_auxiliary_dev { 92 90 struct auxiliary_device adev; 93 91 struct ice_pf *pf; 94 92 }; ··· 98 96 * driver will access these ops by performing a container_of on the 99 97 * auxiliary_device->dev.driver. 100 98 */ 101 - struct iidc_auxiliary_drv { 99 + struct iidc_rdma_core_auxiliary_drv { 102 100 struct auxiliary_driver adrv; 103 101 /* This event_handler is meant to be a blocking call. For instance, 104 102 * when a BEFORE_MTU_CHANGE event comes in, the event_handler will not 105 103 * return until the auxiliary driver is ready for the MTU change to 106 104 * happen. 107 105 */ 108 - void (*event_handler)(struct ice_pf *pf, struct iidc_event *event); 106 + void (*event_handler)(struct ice_pf *pf, struct iidc_rdma_event *event); 109 107 }; 110 108 111 109 #endif /* _IIDC_RDMA_H_*/