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

net: intel: rename 'hena' to 'hashcfg' for clarity

i40e, ice, and iAVF all use 'hena' as a shorthand for the "hash enable"
configuration. This comes originally from the X710 datasheet 'xxQF_HENA'
registers. In the context of the registers the meaning is fairly clear.

However, on its own, hena is a weird name that can be more difficult to
understand. This is especially true in ice. The E810 hardware doesn't even
have registers with HENA in the name.

Replace the shorthand 'hena' with 'hashcfg'. This makes it clear the
variables deal with the Hash configuration, not just a single boolean
on/off for all hashing.

Do not update the register names. These come directly from the datasheet
for X710 and X722, and it is more important that the names can be searched.

Suggested-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>

authored by

Jacob Keller and committed by
Tony Nguyen
78b2d990 2c7e4a26

+101 -97
+1 -1
drivers/net/ethernet/intel/i40e/i40e_main.c
··· 12507 12507 /* By default we enable TCP/UDP with IPv4/IPv6 ptypes */ 12508 12508 hena = (u64)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(0)) | 12509 12509 ((u64)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(1)) << 32); 12510 - hena |= i40e_pf_get_default_rss_hena(pf); 12510 + hena |= i40e_pf_get_default_rss_hashcfg(pf); 12511 12511 12512 12512 i40e_write_rx_ctl(hw, I40E_PFQF_HENA(0), (u32)hena); 12513 12513 i40e_write_rx_ctl(hw, I40E_PFQF_HENA(1), (u32)(hena >> 32));
+4 -4
drivers/net/ethernet/intel/i40e/i40e_txrx.h
··· 71 71 #define I40E_SW_ITR I40E_IDX_ITR2 72 72 73 73 /* Supported RSS offloads */ 74 - #define I40E_DEFAULT_RSS_HENA ( \ 74 + #define I40E_DEFAULT_RSS_HASHCFG ( \ 75 75 BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | \ 76 76 BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_SCTP) | \ 77 77 BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP) | \ ··· 84 84 BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV6) | \ 85 85 BIT_ULL(I40E_FILTER_PCTYPE_L2_PAYLOAD)) 86 86 87 - #define I40E_DEFAULT_RSS_HENA_EXPANDED (I40E_DEFAULT_RSS_HENA | \ 87 + #define I40E_DEFAULT_RSS_HASHCFG_EXPANDED (I40E_DEFAULT_RSS_HASHCFG | \ 88 88 BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK) | \ 89 89 BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) | \ 90 90 BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP) | \ ··· 92 92 BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) | \ 93 93 BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP)) 94 94 95 - #define i40e_pf_get_default_rss_hena(pf) \ 95 + #define i40e_pf_get_default_rss_hashcfg(pf) \ 96 96 (test_bit(I40E_HW_CAP_MULTI_TCP_UDP_RSS_PCTYPE, (pf)->hw.caps) ? \ 97 - I40E_DEFAULT_RSS_HENA_EXPANDED : I40E_DEFAULT_RSS_HENA) 97 + I40E_DEFAULT_RSS_HASHCFG_EXPANDED : I40E_DEFAULT_RSS_HASHCFG) 98 98 99 99 /* Supported Rx Buffer Sizes (a multiple of 128) */ 100 100 #define I40E_RXBUFFER_256 256
+24 -22
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
··· 812 812 } 813 813 814 814 if (!idx) { 815 - u64 hena = i40e_pf_get_default_rss_hena(pf); 815 + u64 hashcfg = i40e_pf_get_default_rss_hashcfg(pf); 816 816 u8 broadcast[ETH_ALEN]; 817 817 818 818 vf->lan_vsi_idx = vsi->idx; ··· 841 841 dev_info(&pf->pdev->dev, 842 842 "Could not allocate VF broadcast filter\n"); 843 843 spin_unlock_bh(&vsi->mac_filter_hash_lock); 844 - wr32(&pf->hw, I40E_VFQF_HENA1(0, vf->vf_id), (u32)hena); 845 - wr32(&pf->hw, I40E_VFQF_HENA1(1, vf->vf_id), (u32)(hena >> 32)); 844 + wr32(&pf->hw, I40E_VFQF_HENA1(0, vf->vf_id), (u32)hashcfg); 845 + wr32(&pf->hw, I40E_VFQF_HENA1(1, vf->vf_id), 846 + (u32)(hashcfg >> 32)); 846 847 /* program mac filter only for VF VSI */ 847 848 ret = i40e_sync_vsi_filters(vsi); 848 849 if (ret) ··· 3448 3447 } 3449 3448 3450 3449 /** 3451 - * i40e_vc_get_rss_hena 3450 + * i40e_vc_get_rss_hashcfg 3452 3451 * @vf: pointer to the VF info 3453 3452 * @msg: pointer to the msg buffer 3454 3453 * 3455 - * Return the RSS HENA bits allowed by the hardware 3454 + * Return the RSS Hash configuration bits allowed by the hardware 3456 3455 **/ 3457 - static int i40e_vc_get_rss_hena(struct i40e_vf *vf, u8 *msg) 3456 + static int i40e_vc_get_rss_hashcfg(struct i40e_vf *vf, u8 *msg) 3458 3457 { 3459 - struct virtchnl_rss_hena *vrh = NULL; 3458 + struct virtchnl_rss_hashcfg *vrh = NULL; 3460 3459 struct i40e_pf *pf = vf->pf; 3461 3460 int aq_ret = 0; 3462 3461 int len = 0; ··· 3465 3464 aq_ret = -EINVAL; 3466 3465 goto err; 3467 3466 } 3468 - len = sizeof(struct virtchnl_rss_hena); 3467 + len = sizeof(struct virtchnl_rss_hashcfg); 3469 3468 3470 3469 vrh = kzalloc(len, GFP_KERNEL); 3471 3470 if (!vrh) { ··· 3473 3472 len = 0; 3474 3473 goto err; 3475 3474 } 3476 - vrh->hena = i40e_pf_get_default_rss_hena(pf); 3475 + vrh->hashcfg = i40e_pf_get_default_rss_hashcfg(pf); 3477 3476 err: 3478 3477 /* send the response back to the VF */ 3479 - aq_ret = i40e_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_RSS_HENA_CAPS, 3478 + aq_ret = i40e_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS, 3480 3479 aq_ret, (u8 *)vrh, len); 3481 3480 kfree(vrh); 3482 3481 return aq_ret; 3483 3482 } 3484 3483 3485 3484 /** 3486 - * i40e_vc_set_rss_hena 3485 + * i40e_vc_set_rss_hashcfg 3487 3486 * @vf: pointer to the VF info 3488 3487 * @msg: pointer to the msg buffer 3489 3488 * 3490 - * Set the RSS HENA bits for the VF 3489 + * Set the RSS Hash configuration bits for the VF 3491 3490 **/ 3492 - static int i40e_vc_set_rss_hena(struct i40e_vf *vf, u8 *msg) 3491 + static int i40e_vc_set_rss_hashcfg(struct i40e_vf *vf, u8 *msg) 3493 3492 { 3494 - struct virtchnl_rss_hena *vrh = 3495 - (struct virtchnl_rss_hena *)msg; 3493 + struct virtchnl_rss_hashcfg *vrh = 3494 + (struct virtchnl_rss_hashcfg *)msg; 3496 3495 struct i40e_pf *pf = vf->pf; 3497 3496 struct i40e_hw *hw = &pf->hw; 3498 3497 int aq_ret = 0; ··· 3501 3500 aq_ret = -EINVAL; 3502 3501 goto err; 3503 3502 } 3504 - i40e_write_rx_ctl(hw, I40E_VFQF_HENA1(0, vf->vf_id), (u32)vrh->hena); 3503 + i40e_write_rx_ctl(hw, I40E_VFQF_HENA1(0, vf->vf_id), 3504 + (u32)vrh->hashcfg); 3505 3505 i40e_write_rx_ctl(hw, I40E_VFQF_HENA1(1, vf->vf_id), 3506 - (u32)(vrh->hena >> 32)); 3506 + (u32)(vrh->hashcfg >> 32)); 3507 3507 3508 3508 /* send the response to the VF */ 3509 3509 err: 3510 - return i40e_vc_send_resp_to_vf(vf, VIRTCHNL_OP_SET_RSS_HENA, aq_ret); 3510 + return i40e_vc_send_resp_to_vf(vf, VIRTCHNL_OP_SET_RSS_HASHCFG, aq_ret); 3511 3511 } 3512 3512 3513 3513 /** ··· 4255 4253 case VIRTCHNL_OP_CONFIG_RSS_LUT: 4256 4254 ret = i40e_vc_config_rss_lut(vf, msg); 4257 4255 break; 4258 - case VIRTCHNL_OP_GET_RSS_HENA_CAPS: 4259 - ret = i40e_vc_get_rss_hena(vf, msg); 4256 + case VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS: 4257 + ret = i40e_vc_get_rss_hashcfg(vf, msg); 4260 4258 break; 4261 - case VIRTCHNL_OP_SET_RSS_HENA: 4262 - ret = i40e_vc_set_rss_hena(vf, msg); 4259 + case VIRTCHNL_OP_SET_RSS_HASHCFG: 4260 + ret = i40e_vc_set_rss_hashcfg(vf, msg); 4263 4261 break; 4264 4262 case VIRTCHNL_OP_ENABLE_VLAN_STRIPPING: 4265 4263 ret = i40e_vc_enable_vlan_stripping(vf, msg);
+5 -5
drivers/net/ethernet/intel/iavf/iavf.h
··· 315 315 #define IAVF_FLAG_AQ_CONFIGURE_RSS BIT_ULL(9) /* direct AQ config */ 316 316 #define IAVF_FLAG_AQ_GET_CONFIG BIT_ULL(10) 317 317 /* Newer style, RSS done by the PF so we can ignore hardware vagaries. */ 318 - #define IAVF_FLAG_AQ_GET_HENA BIT_ULL(11) 319 - #define IAVF_FLAG_AQ_SET_HENA BIT_ULL(12) 318 + #define IAVF_FLAG_AQ_GET_RSS_HASHCFG BIT_ULL(11) 319 + #define IAVF_FLAG_AQ_SET_RSS_HASHCFG BIT_ULL(12) 320 320 #define IAVF_FLAG_AQ_SET_RSS_KEY BIT_ULL(13) 321 321 #define IAVF_FLAG_AQ_SET_RSS_LUT BIT_ULL(14) 322 322 #define IAVF_FLAG_AQ_SET_RSS_HFUNC BIT_ULL(15) ··· 456 456 u32 aq_wait_count; 457 457 /* RSS stuff */ 458 458 enum virtchnl_rss_algorithm hfunc; 459 - u64 hena; 459 + u64 rss_hashcfg; 460 460 u16 rss_key_size; 461 461 u16 rss_lut_size; 462 462 u8 *rss_key; ··· 600 600 bool iavf_promiscuous_mode_changed(struct iavf_adapter *adapter); 601 601 void iavf_request_stats(struct iavf_adapter *adapter); 602 602 int iavf_request_reset(struct iavf_adapter *adapter); 603 - void iavf_get_hena(struct iavf_adapter *adapter); 604 - void iavf_set_hena(struct iavf_adapter *adapter); 603 + void iavf_get_rss_hashcfg(struct iavf_adapter *adapter); 604 + void iavf_set_rss_hashcfg(struct iavf_adapter *adapter); 605 605 void iavf_set_rss_key(struct iavf_adapter *adapter); 606 606 void iavf_set_rss_lut(struct iavf_adapter *adapter); 607 607 void iavf_set_rss_hfunc(struct iavf_adapter *adapter);
+9 -8
drivers/net/ethernet/intel/iavf/iavf_main.c
··· 1823 1823 /* Enable PCTYPES for RSS, TCP/UDP with IPv4/IPv6 */ 1824 1824 if (adapter->vf_res->vf_cap_flags & 1825 1825 VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2) 1826 - adapter->hena = IAVF_DEFAULT_RSS_HENA_EXPANDED; 1826 + adapter->rss_hashcfg = 1827 + IAVF_DEFAULT_RSS_HASHCFG_EXPANDED; 1827 1828 else 1828 - adapter->hena = IAVF_DEFAULT_RSS_HENA; 1829 + adapter->rss_hashcfg = IAVF_DEFAULT_RSS_HASHCFG; 1829 1830 1830 - wr32(hw, IAVF_VFQF_HENA(0), (u32)adapter->hena); 1831 - wr32(hw, IAVF_VFQF_HENA(1), (u32)(adapter->hena >> 32)); 1831 + wr32(hw, IAVF_VFQF_HENA(0), (u32)adapter->rss_hashcfg); 1832 + wr32(hw, IAVF_VFQF_HENA(1), (u32)(adapter->rss_hashcfg >> 32)); 1832 1833 } 1833 1834 1834 1835 iavf_fill_rss_lut(adapter); ··· 2196 2195 adapter->aq_required &= ~IAVF_FLAG_AQ_CONFIGURE_RSS; 2197 2196 return 0; 2198 2197 } 2199 - if (adapter->aq_required & IAVF_FLAG_AQ_GET_HENA) { 2200 - iavf_get_hena(adapter); 2198 + if (adapter->aq_required & IAVF_FLAG_AQ_GET_RSS_HASHCFG) { 2199 + iavf_get_rss_hashcfg(adapter); 2201 2200 return 0; 2202 2201 } 2203 - if (adapter->aq_required & IAVF_FLAG_AQ_SET_HENA) { 2204 - iavf_set_hena(adapter); 2202 + if (adapter->aq_required & IAVF_FLAG_AQ_SET_RSS_HASHCFG) { 2203 + iavf_set_rss_hashcfg(adapter); 2205 2204 return 0; 2206 2205 } 2207 2206 if (adapter->aq_required & IAVF_FLAG_AQ_SET_RSS_KEY) {
+2 -2
drivers/net/ethernet/intel/iavf/iavf_txrx.h
··· 59 59 #define IAVF_PE_ITR IAVF_IDX_ITR2 60 60 61 61 /* Supported RSS offloads */ 62 - #define IAVF_DEFAULT_RSS_HENA ( \ 62 + #define IAVF_DEFAULT_RSS_HASHCFG ( \ 63 63 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV4_UDP) | \ 64 64 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV4_SCTP) | \ 65 65 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV4_TCP) | \ ··· 72 72 BIT_ULL(IAVF_FILTER_PCTYPE_FRAG_IPV6) | \ 73 73 BIT_ULL(IAVF_FILTER_PCTYPE_L2_PAYLOAD)) 74 74 75 - #define IAVF_DEFAULT_RSS_HENA_EXPANDED (IAVF_DEFAULT_RSS_HENA | \ 75 + #define IAVF_DEFAULT_RSS_HASHCFG_EXPANDED (IAVF_DEFAULT_RSS_HASHCFG | \ 76 76 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK) | \ 77 77 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) | \ 78 78 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP) | \
+17 -16
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
··· 1128 1128 } 1129 1129 1130 1130 /** 1131 - * iavf_get_hena 1131 + * iavf_get_rss_hashcfg 1132 1132 * @adapter: adapter structure 1133 1133 * 1134 - * Request hash enable capabilities from PF 1134 + * Request RSS Hash enable bits from PF 1135 1135 **/ 1136 - void iavf_get_hena(struct iavf_adapter *adapter) 1136 + void iavf_get_rss_hashcfg(struct iavf_adapter *adapter) 1137 1137 { 1138 1138 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { 1139 1139 /* bail because we already have a command pending */ ··· 1141 1141 adapter->current_op); 1142 1142 return; 1143 1143 } 1144 - adapter->current_op = VIRTCHNL_OP_GET_RSS_HENA_CAPS; 1145 - adapter->aq_required &= ~IAVF_FLAG_AQ_GET_HENA; 1146 - iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_RSS_HENA_CAPS, NULL, 0); 1144 + adapter->current_op = VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS; 1145 + adapter->aq_required &= ~IAVF_FLAG_AQ_GET_RSS_HASHCFG; 1146 + iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS, NULL, 0); 1147 1147 } 1148 1148 1149 1149 /** 1150 - * iavf_set_hena 1150 + * iavf_set_rss_hashcfg 1151 1151 * @adapter: adapter structure 1152 1152 * 1153 1153 * Request the PF to set our RSS hash capabilities 1154 1154 **/ 1155 - void iavf_set_hena(struct iavf_adapter *adapter) 1155 + void iavf_set_rss_hashcfg(struct iavf_adapter *adapter) 1156 1156 { 1157 - struct virtchnl_rss_hena vrh; 1157 + struct virtchnl_rss_hashcfg vrh; 1158 1158 1159 1159 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { 1160 1160 /* bail because we already have a command pending */ ··· 1162 1162 adapter->current_op); 1163 1163 return; 1164 1164 } 1165 - vrh.hena = adapter->hena; 1166 - adapter->current_op = VIRTCHNL_OP_SET_RSS_HENA; 1167 - adapter->aq_required &= ~IAVF_FLAG_AQ_SET_HENA; 1168 - iavf_send_pf_msg(adapter, VIRTCHNL_OP_SET_RSS_HENA, (u8 *)&vrh, 1165 + vrh.hashcfg = adapter->rss_hashcfg; 1166 + adapter->current_op = VIRTCHNL_OP_SET_RSS_HASHCFG; 1167 + adapter->aq_required &= ~IAVF_FLAG_AQ_SET_RSS_HASHCFG; 1168 + iavf_send_pf_msg(adapter, VIRTCHNL_OP_SET_RSS_HASHCFG, (u8 *)&vrh, 1169 1169 sizeof(vrh)); 1170 1170 } 1171 1171 ··· 2735 2735 if (v_opcode != adapter->current_op) 2736 2736 return; 2737 2737 break; 2738 - case VIRTCHNL_OP_GET_RSS_HENA_CAPS: { 2739 - struct virtchnl_rss_hena *vrh = (struct virtchnl_rss_hena *)msg; 2738 + case VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS: { 2739 + struct virtchnl_rss_hashcfg *vrh = 2740 + (struct virtchnl_rss_hashcfg *)msg; 2740 2741 2741 2742 if (msglen == sizeof(*vrh)) 2742 - adapter->hena = vrh->hena; 2743 + adapter->rss_hashcfg = vrh->hashcfg; 2743 2744 else 2744 2745 dev_warn(&adapter->pdev->dev, 2745 2746 "Invalid message %d from PF\n", v_opcode);
+2 -2
drivers/net/ethernet/intel/ice/ice_flow.h
··· 295 295 }; 296 296 297 297 /* Supported RSS offloads This macro is defined to support 298 - * VIRTCHNL_OP_GET_RSS_HENA_CAPS ops. PF driver sends the RSS hardware 298 + * VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS ops. PF driver sends the RSS hardware 299 299 * capabilities to the caller of this ops. 300 300 */ 301 - #define ICE_DEFAULT_RSS_HENA ( \ 301 + #define ICE_DEFAULT_RSS_HASHCFG ( \ 302 302 BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_UDP) | \ 303 303 BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_SCTP) | \ 304 304 BIT_ULL(ICE_AVF_FLOW_FIELD_IPV4_TCP) | \
+1 -1
drivers/net/ethernet/intel/ice/ice_lib.c
··· 1579 1579 return; 1580 1580 } 1581 1581 1582 - status = ice_add_avf_rss_cfg(&pf->hw, vsi, ICE_DEFAULT_RSS_HENA); 1582 + status = ice_add_avf_rss_cfg(&pf->hw, vsi, ICE_DEFAULT_RSS_HASHCFG); 1583 1583 if (status) 1584 1584 dev_dbg(dev, "ice_add_avf_rss_cfg failed for vsi = %d, error = %d\n", 1585 1585 vsi->vsi_num, status);
+22 -22
drivers/net/ethernet/intel/ice/ice_virtchnl.c
··· 2999 2999 } 3000 3000 3001 3001 /** 3002 - * ice_vc_get_rss_hena - return the RSS HENA bits allowed by the hardware 3002 + * ice_vc_get_rss_hashcfg - return the RSS Hash configuration 3003 3003 * @vf: pointer to the VF info 3004 3004 */ 3005 - static int ice_vc_get_rss_hena(struct ice_vf *vf) 3005 + static int ice_vc_get_rss_hashcfg(struct ice_vf *vf) 3006 3006 { 3007 3007 enum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS; 3008 - struct virtchnl_rss_hena *vrh = NULL; 3008 + struct virtchnl_rss_hashcfg *vrh = NULL; 3009 3009 int len = 0, ret; 3010 3010 3011 3011 if (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) { ··· 3019 3019 goto err; 3020 3020 } 3021 3021 3022 - len = sizeof(struct virtchnl_rss_hena); 3022 + len = sizeof(struct virtchnl_rss_hashcfg); 3023 3023 vrh = kzalloc(len, GFP_KERNEL); 3024 3024 if (!vrh) { 3025 3025 v_ret = VIRTCHNL_STATUS_ERR_NO_MEMORY; ··· 3027 3027 goto err; 3028 3028 } 3029 3029 3030 - vrh->hena = ICE_DEFAULT_RSS_HENA; 3030 + vrh->hashcfg = ICE_DEFAULT_RSS_HASHCFG; 3031 3031 err: 3032 3032 /* send the response back to the VF */ 3033 - ret = ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_RSS_HENA_CAPS, v_ret, 3033 + ret = ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS, v_ret, 3034 3034 (u8 *)vrh, len); 3035 3035 kfree(vrh); 3036 3036 return ret; 3037 3037 } 3038 3038 3039 3039 /** 3040 - * ice_vc_set_rss_hena - set RSS HENA bits for the VF 3040 + * ice_vc_set_rss_hashcfg - set RSS Hash configuration bits for the VF 3041 3041 * @vf: pointer to the VF info 3042 3042 * @msg: pointer to the msg buffer 3043 3043 */ 3044 - static int ice_vc_set_rss_hena(struct ice_vf *vf, u8 *msg) 3044 + static int ice_vc_set_rss_hashcfg(struct ice_vf *vf, u8 *msg) 3045 3045 { 3046 - struct virtchnl_rss_hena *vrh = (struct virtchnl_rss_hena *)msg; 3046 + struct virtchnl_rss_hashcfg *vrh = (struct virtchnl_rss_hashcfg *)msg; 3047 3047 enum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS; 3048 3048 struct ice_pf *pf = vf->pf; 3049 3049 struct ice_vsi *vsi; ··· 3074 3074 * disable RSS 3075 3075 */ 3076 3076 status = ice_rem_vsi_rss_cfg(&pf->hw, vsi->idx); 3077 - if (status && !vrh->hena) { 3077 + if (status && !vrh->hashcfg) { 3078 3078 /* only report failure to clear the current RSS configuration if 3079 - * that was clearly the VF's intention (i.e. vrh->hena = 0) 3079 + * that was clearly the VF's intention (i.e. vrh->hashcfg = 0) 3080 3080 */ 3081 3081 v_ret = ice_err_to_virt_err(status); 3082 3082 goto err; ··· 3089 3089 vf->vf_id); 3090 3090 } 3091 3091 3092 - if (vrh->hena) { 3093 - status = ice_add_avf_rss_cfg(&pf->hw, vsi, vrh->hena); 3092 + if (vrh->hashcfg) { 3093 + status = ice_add_avf_rss_cfg(&pf->hw, vsi, vrh->hashcfg); 3094 3094 v_ret = ice_err_to_virt_err(status); 3095 3095 } 3096 3096 3097 3097 /* send the response to the VF */ 3098 3098 err: 3099 - return ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_SET_RSS_HENA, v_ret, 3099 + return ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_SET_RSS_HASHCFG, v_ret, 3100 3100 NULL, 0); 3101 3101 } 3102 3102 ··· 4243 4243 .add_vlan_msg = ice_vc_add_vlan_msg, 4244 4244 .remove_vlan_msg = ice_vc_remove_vlan_msg, 4245 4245 .query_rxdid = ice_vc_query_rxdid, 4246 - .get_rss_hena = ice_vc_get_rss_hena, 4247 - .set_rss_hena_msg = ice_vc_set_rss_hena, 4246 + .get_rss_hashcfg = ice_vc_get_rss_hashcfg, 4247 + .set_rss_hashcfg = ice_vc_set_rss_hashcfg, 4248 4248 .ena_vlan_stripping = ice_vc_ena_vlan_stripping, 4249 4249 .dis_vlan_stripping = ice_vc_dis_vlan_stripping, 4250 4250 .handle_rss_cfg_msg = ice_vc_handle_rss_cfg, ··· 4380 4380 .add_vlan_msg = ice_vc_add_vlan_msg, 4381 4381 .remove_vlan_msg = ice_vc_remove_vlan_msg, 4382 4382 .query_rxdid = ice_vc_query_rxdid, 4383 - .get_rss_hena = ice_vc_get_rss_hena, 4384 - .set_rss_hena_msg = ice_vc_set_rss_hena, 4383 + .get_rss_hashcfg = ice_vc_get_rss_hashcfg, 4384 + .set_rss_hashcfg = ice_vc_set_rss_hashcfg, 4385 4385 .ena_vlan_stripping = ice_vc_ena_vlan_stripping, 4386 4386 .dis_vlan_stripping = ice_vc_dis_vlan_stripping, 4387 4387 .handle_rss_cfg_msg = ice_vc_handle_rss_cfg, ··· 4582 4582 case VIRTCHNL_OP_GET_SUPPORTED_RXDIDS: 4583 4583 err = ops->query_rxdid(vf); 4584 4584 break; 4585 - case VIRTCHNL_OP_GET_RSS_HENA_CAPS: 4586 - err = ops->get_rss_hena(vf); 4585 + case VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS: 4586 + err = ops->get_rss_hashcfg(vf); 4587 4587 break; 4588 - case VIRTCHNL_OP_SET_RSS_HENA: 4589 - err = ops->set_rss_hena_msg(vf, msg); 4588 + case VIRTCHNL_OP_SET_RSS_HASHCFG: 4589 + err = ops->set_rss_hashcfg(vf, msg); 4590 4590 break; 4591 4591 case VIRTCHNL_OP_ENABLE_VLAN_STRIPPING: 4592 4592 err = ops->ena_vlan_stripping(vf);
+2 -2
drivers/net/ethernet/intel/ice/ice_virtchnl.h
··· 57 57 int (*add_vlan_msg)(struct ice_vf *vf, u8 *msg); 58 58 int (*remove_vlan_msg)(struct ice_vf *vf, u8 *msg); 59 59 int (*query_rxdid)(struct ice_vf *vf); 60 - int (*get_rss_hena)(struct ice_vf *vf); 61 - int (*set_rss_hena_msg)(struct ice_vf *vf, u8 *msg); 60 + int (*get_rss_hashcfg)(struct ice_vf *vf); 61 + int (*set_rss_hashcfg)(struct ice_vf *vf, u8 *msg); 62 62 int (*ena_vlan_stripping)(struct ice_vf *vf); 63 63 int (*dis_vlan_stripping)(struct ice_vf *vf); 64 64 int (*handle_rss_cfg_msg)(struct ice_vf *vf, u8 *msg, bool add);
+1 -1
drivers/net/ethernet/intel/ice/ice_virtchnl_allowlist.c
··· 65 65 /* VIRTCHNL_VF_OFFLOAD_RSS_PF */ 66 66 static const u32 rss_pf_allowlist_opcodes[] = { 67 67 VIRTCHNL_OP_CONFIG_RSS_KEY, VIRTCHNL_OP_CONFIG_RSS_LUT, 68 - VIRTCHNL_OP_GET_RSS_HENA_CAPS, VIRTCHNL_OP_SET_RSS_HENA, 68 + VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS, VIRTCHNL_OP_SET_RSS_HASHCFG, 69 69 VIRTCHNL_OP_CONFIG_RSS_HFUNC, 70 70 }; 71 71
+11 -11
include/linux/avf/virtchnl.h
··· 132 132 VIRTCHNL_OP_RELEASE_RDMA_IRQ_MAP = VIRTCHNL_OP_RELEASE_IWARP_IRQ_MAP, 133 133 VIRTCHNL_OP_CONFIG_RSS_KEY = 23, 134 134 VIRTCHNL_OP_CONFIG_RSS_LUT = 24, 135 - VIRTCHNL_OP_GET_RSS_HENA_CAPS = 25, 136 - VIRTCHNL_OP_SET_RSS_HENA = 26, 135 + VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS = 25, 136 + VIRTCHNL_OP_SET_RSS_HASHCFG = 26, 137 137 VIRTCHNL_OP_ENABLE_VLAN_STRIPPING = 27, 138 138 VIRTCHNL_OP_DISABLE_VLAN_STRIPPING = 28, 139 139 VIRTCHNL_OP_REQUEST_QUEUES = 29, ··· 974 974 VIRTCHNL_CHECK_STRUCT_LEN(4, virtchnl_rss_lut); 975 975 #define virtchnl_rss_lut_LEGACY_SIZEOF 6 976 976 977 - /* VIRTCHNL_OP_GET_RSS_HENA_CAPS 978 - * VIRTCHNL_OP_SET_RSS_HENA 979 - * VF sends these messages to get and set the hash filter enable bits for RSS. 977 + /* VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS 978 + * VIRTCHNL_OP_SET_RSS_HASHCFG 979 + * VF sends these messages to get and set the hash filter configuration for RSS. 980 980 * By default, the PF sets these to all possible traffic types that the 981 981 * hardware supports. The VF can query this value if it wants to change the 982 982 * traffic types that are hashed by the hardware. 983 983 */ 984 - struct virtchnl_rss_hena { 985 - u64 hena; 984 + struct virtchnl_rss_hashcfg { 985 + u64 hashcfg; 986 986 }; 987 987 988 - VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_rss_hena); 988 + VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_rss_hashcfg); 989 989 990 990 /* Type of RSS algorithm */ 991 991 enum virtchnl_rss_algorithm { ··· 1779 1779 case VIRTCHNL_OP_CONFIG_RSS_HFUNC: 1780 1780 valid_len = sizeof(struct virtchnl_rss_hfunc); 1781 1781 break; 1782 - case VIRTCHNL_OP_GET_RSS_HENA_CAPS: 1782 + case VIRTCHNL_OP_GET_RSS_HASHCFG_CAPS: 1783 1783 break; 1784 - case VIRTCHNL_OP_SET_RSS_HENA: 1785 - valid_len = sizeof(struct virtchnl_rss_hena); 1784 + case VIRTCHNL_OP_SET_RSS_HASHCFG: 1785 + valid_len = sizeof(struct virtchnl_rss_hashcfg); 1786 1786 break; 1787 1787 case VIRTCHNL_OP_ENABLE_VLAN_STRIPPING: 1788 1788 case VIRTCHNL_OP_DISABLE_VLAN_STRIPPING: