net/ice: Add support for enable_iwarp and enable_roce devlink param

Allow support for 'enable_iwarp' and 'enable_roce' devlink params to turn
on/off iWARP or RoCE protocol support for E800 devices.

For example, a user can turn on iWARP functionality with,

devlink dev param set pci/0000:07:00.0 name enable_iwarp value true cmode runtime

This add an iWARP auxiliary rdma device, ice.iwarp.<>, under this PF.

A user request to enable both iWARP and RoCE under the same PF is rejected
since this device does not support both protocols simultaneously on the
same port.

Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Tested-by: Leszek Kaliszczuk <leszek.kaliszczuk@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
Shiraz Saleem 2021-10-18 18:16:02 -05:00 committed by Tony Nguyen
parent 325e0d0aa6
commit e523af4ee5
6 changed files with 166 additions and 5 deletions

View file

@ -26,6 +26,11 @@ enum iidc_reset_type {
IIDC_GLOBR,
};
enum iidc_rdma_protocol {
IIDC_RDMA_PROTOCOL_IWARP = BIT(0),
IIDC_RDMA_PROTOCOL_ROCEV2 = BIT(1),
};
#define IIDC_MAX_USER_PRIORITY 8
/* Struct to hold per RDMA Qset info */
@ -70,8 +75,6 @@ int ice_rdma_request_reset(struct ice_pf *pf, enum iidc_reset_type reset_type);
int ice_rdma_update_vsi_filter(struct ice_pf *pf, u16 vsi_id, bool enable);
void ice_get_qos_params(struct ice_pf *pf, struct iidc_qos_params *qos);
#define IIDC_RDMA_ROCE_NAME "roce"
/* 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.