ice: add support for DSCP QoS for IDC
Subsystems (2)
PATCH 1/1 ice: add support for DSCP QoS for IDC
The ice driver provides QoS information to auxiliary drivers through the exported function ice_get_qos_params. This function doesn't currently support L3 DSCP QoS.
Add the necessary defines, structure elements and code to support DSCP QoS through the IDC functions.
--- drivers/net/ethernet/intel/ice/ice_idc.c | 5 +++++ include/linux/net/intel/iidc.h | 5 +++++ 2 files changed, 10 insertions(+)
drivers/net/ethernet/intel/ice/ice_idc.c +5 -0
@@ -227,6 +227,11 @@ void ice_get_qos_params(struct ice_pf *pf, struct iidc_qos_params *qos)for (i =0 ; i <IEEE_8021QAZ_MAX_TCS ; i++) qos->tc_info[i].rel_bw = dcbx_cfg->etscfg.tcbwtable[i]; + + qos->pfc_mode = dcbx_cfg->pfc_mode; +if (qos->pfc_mode ==IIDC_DSCP_PFC_MODE ) +for (i =0 ; i <IIDC_MAX_DSCP_MAPPING ; i++) + qos->dscp_map[i] = dcbx_cfg->dscp_map[i]; }EXPORT_SYMBOL_GPL (ice_get_qos_params);
include/linux/net/intel/iidc.h +5 -0
@@ -32,6 +32,9 @@ enum iidc_rdma_protocol { };#define IIDC_MAX_USER_PRIORITY 8 +#define IIDC_MAX_DSCP_MAPPING 64 +#define IIDC_VLAN_PFC_MODE 0x0 +#define IIDC_DSCP_PFC_MODE 0x1/* Struct to hold per RDMA Qset info */ struct iidc_rdma_qset_params {
@@ -60,6 +63,8 @@ struct iidc_qos_params {u8 vport_relative_bw;u8 vport_priority_type;u8 num_tc; +u8 pfc_mode; +u8 dscp_map[IIDC_MAX_DSCP_MAPPING ]; };struct iidc_event {
Signature · 1 line
2.31.1
PATCH 1/1 ice: add support for DSCP QoS for IDC
Dear Dave,
Am 23.11.21 um 19:25 schrieb Dave Ertman:
Quoted 6 lines
The ice driver provides QoS information to auxiliary drivers through the exported function
ice_get_qos_params. This function doesn't currently support L3 DSCP QoS.Add the necessary defines, structure elements and code to support DSCP QoS through the IDC functions.
How did you test this?
In what datasheet (name, revision, section) is that documented?
Quoted 11 lines
Signed-off-by Dave Ertman <[email protected]>--- drivers/net/ethernet/intel/ice/ice_idc.c | 5 +++++ include/linux/net/intel/iidc.h | 5 +++++ 2 files changed, 10 insertions(+)drivers/net/ethernet/intel/ice/ice_idc.c +0
-0
drivers/net/ethernet/intel/ice/ice_idc.c void ice_get_qos_params(struct ice_pf *pf, struct iidc_qos_params *qos) · line 232
Quoted 6 lines
drivers/net/ethernet/intel/ice/ice_idc.c +3
-0@@ -227,6 +227,11 @@ void ice_get_qos_params(struct ice_pf *pf, struct iidc_qos_params *qos)for (i =0 ; i <IEEE_8021QAZ_MAX_TCS ; i++) qos->tc_info[i].rel_bw = dcbx_cfg->etscfg.tcbwtable[i]; + + qos->pfc_mode = dcbx_cfg->pfc_mode; +if (qos->pfc_mode ==IIDC_DSCP_PFC_MODE )
Just a nit as the compiler will probably do it itself, but you could use dcbx_cfg->pfc_mode in the check, and move the assignment into the body.
Quoted 20 lines
drivers/net/ethernet/intel/ice/ice_idc.c +2
-0+for (i =0 ; i <IIDC_MAX_DSCP_MAPPING ; i++) + qos->dscp_map[i] = dcbx_cfg->dscp_map[i]; }EXPORT_SYMBOL_GPL (ice_get_qos_params);include/linux/net/intel/iidc.h +3
-0@@ -32,6 +32,9 @@ enum iidc_rdma_protocol { };#define IIDC_MAX_USER_PRIORITY 8 +#define IIDC_MAX_DSCP_MAPPING 64 +#define IIDC_VLAN_PFC_MODE 0x0 +#define IIDC_DSCP_PFC_MODE 0x1/* Struct to hold per RDMA Qset info */ struct iidc_rdma_qset_params {
include/linux/net/intel/iidc.h struct iidc_qos_params { · line 70
Quoted 8 lines
include/linux/net/intel/iidc.h +2
-0@@ -60,6 +63,8 @@ struct iidc_qos_params {u8 vport_relative_bw;u8 vport_priority_type;u8 num_tc; +u8 pfc_mode; +u8 dscp_map[IIDC_MAX_DSCP_MAPPING ]; };struct iidc_event {
Kind regards,
Paul
Ertman
PATCH 1/1 ice: add support for DSCP QoS for IDC
Quoted 37 lines
-----Original Message-----
From: Paul Menzel <[email protected]>
Sent: Wednesday, November 24, 2021 1:52 AM
To: Ertman, David M <[email protected]>
Cc: intel-wired-lan at lists.osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH net-next] ice: add support for DSCP QoS for IDCDear Dave,
Am 23.11.21 um 19:25 schrieb Dave Ertman:
Quoted 6 lines
The ice driver provides QoS information to auxiliary drivers through the exported function
ice_get_qos_params. This function doesn't currently support L3 DSCP QoS.Add the necessary defines, structure elements and code to support DSCP QoS through the IDC functions.
How did you test this?
In what datasheet (name, revision, section) is that documented?
Review
Quoted 7 lines
Signed-off-by Dave Ertman <[email protected]>--- drivers/net/ethernet/intel/ice/ice_idc.c | 5 +++++ include/linux/net/intel/iidc.h | 5 +++++ 2 files changed, 10 insertions(+)(quoted diff) +0
-0
b/drivers/net/ethernet/intel/ice/ice_idc.cdrivers/net/ethernet/intel/ice/ice_idc.c void ice_get_qos_params(struct ice_pf *pf, struct
Quoted 4 lines
index
fc3580167e7b..263a2e7577a2100644drivers/net/ethernet/intel/ice/ice_idc.c +0
-0@@ -227,6 +227,11 @@ void ice_get_qos_params(struct ice_pf *pf, struct
iidc_qos_params*qos)Quoted 1 line
Quoted 8 lines
drivers/net/ethernet/intel/ice/ice_idc.c void ice_get_qos_params(struct ice_pf *pf, struct iidc_qos_params *qos) · line 232
Quoted 5 lines
for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) qos->tc_info[i].rel_bw = dcbx_cfg->etscfg.tcbwtable[i];drivers/net/ethernet/intel/ice/ice_idc.c +3
-0+ + qos->pfc_mode = dcbx_cfg->pfc_mode; +if (qos->pfc_mode ==IIDC_DSCP_PFC_MODE )Just a nit as the compiler will probably do it itself, but you could use
dcbx_cfg->pfc_modein the check, and move the assignment into the body.
That would be an incorrect implementation. the assignment needs to happen regardless of the results of the test.
Quoted 34 lines
Quoted 21 lines
drivers/net/ethernet/intel/ice/ice_idc.c +2
-0+for (i =0 ; i <IIDC_MAX_DSCP_MAPPING ; i++) + qos->dscp_map[i] = dcbx_cfg->dscp_map[i]; }EXPORT_SYMBOL_GPL (ice_get_qos_params);include/linux/net/intel/iidc.h +3
-0@@ -32,6 +32,9 @@ enum iidc_rdma_protocol { };#define IIDC_MAX_USER_PRIORITY 8 +#define IIDC_MAX_DSCP_MAPPING 64 +#define IIDC_VLAN_PFC_MODE 0x0 +#define IIDC_DSCP_PFC_MODE 0x1/* Struct to hold per RDMA Qset info */ struct iidc_rdma_qset_params {include/linux/net/intel/iidc.h struct iidc_qos_params { · line 70
Quoted 8 lines
include/linux/net/intel/iidc.h +2
-0@@ -60,6 +63,8 @@ struct iidc_qos_params {u8 vport_relative_bw;u8 vport_priority_type;u8 num_tc; +u8 pfc_mode; +u8 dscp_map[IIDC_MAX_DSCP_MAPPING ]; };struct iidc_event {Kind regards,
Paul