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

Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2022-08-24 (ice)

This series contains updates to ice driver only.

Marcin adds support for TC parsing on TTL and ToS fields.

Anatolli adds support for devlink port split command to allow
configuration of various port configurations.

Jake allows for passing and writing an additional NVM write activate
field by expanding current cmd_flag.

Ani makes PHY debug output more readable.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+804 -27
+36
Documentation/networking/devlink/ice.rst
··· 139 139 The driver does not currently support reloading the driver via 140 140 ``DEVLINK_RELOAD_ACTION_DRIVER_REINIT``. 141 141 142 + Port split 143 + ========== 144 + 145 + The ``ice`` driver supports port splitting only for port 0, as the FW has 146 + a predefined set of available port split options for the whole device. 147 + 148 + A system reboot is required for port split to be applied. 149 + 150 + The following command will select the port split option with 4 ports: 151 + 152 + .. code:: shell 153 + 154 + $ devlink port split pci/0000:16:00.0/0 count 4 155 + 156 + The list of all available port options will be printed to dynamic debug after 157 + each ``split`` and ``unsplit`` command. The first option is the default. 158 + 159 + .. code:: shell 160 + 161 + ice 0000:16:00.0: Available port split options and max port speeds (Gbps): 162 + ice 0000:16:00.0: Status Split Quad 0 Quad 1 163 + ice 0000:16:00.0: count L0 L1 L2 L3 L4 L5 L6 L7 164 + ice 0000:16:00.0: Active 2 100 - - - 100 - - - 165 + ice 0000:16:00.0: 2 50 - 50 - - - - - 166 + ice 0000:16:00.0: Pending 4 25 25 25 25 - - - - 167 + ice 0000:16:00.0: 4 25 25 - - 25 25 - - 168 + ice 0000:16:00.0: 8 10 10 10 10 10 10 10 10 169 + ice 0000:16:00.0: 1 100 - - - - - - - 170 + 171 + There could be multiple FW port options with the same port split count. When 172 + the same port split count request is issued again, the next FW port option with 173 + the same port split count will be selected. 174 + 175 + ``devlink port unsplit`` will select the option with a split count of 1. If 176 + there is no FW option available with split count 1, you will receive an error. 177 + 142 178 Regions 143 179 ======= 144 180
+60
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
··· 1423 1423 u8 rsvd[13]; 1424 1424 }; 1425 1425 1426 + /* Get Port Options (indirect, 0x06EA) */ 1427 + struct ice_aqc_get_port_options { 1428 + u8 lport_num; 1429 + u8 lport_num_valid; 1430 + u8 port_options_count; 1431 + #define ICE_AQC_PORT_OPT_COUNT_M GENMASK(3, 0) 1432 + #define ICE_AQC_PORT_OPT_MAX 16 1433 + 1434 + u8 innermost_phy_index; 1435 + u8 port_options; 1436 + #define ICE_AQC_PORT_OPT_ACTIVE_M GENMASK(3, 0) 1437 + #define ICE_AQC_PORT_OPT_VALID BIT(7) 1438 + 1439 + u8 pending_port_option_status; 1440 + #define ICE_AQC_PENDING_PORT_OPT_IDX_M GENMASK(3, 0) 1441 + #define ICE_AQC_PENDING_PORT_OPT_VALID BIT(7) 1442 + 1443 + u8 rsvd[2]; 1444 + __le32 addr_high; 1445 + __le32 addr_low; 1446 + }; 1447 + 1448 + struct ice_aqc_get_port_options_elem { 1449 + u8 pmd; 1450 + #define ICE_AQC_PORT_OPT_PMD_COUNT_M GENMASK(3, 0) 1451 + 1452 + u8 max_lane_speed; 1453 + #define ICE_AQC_PORT_OPT_MAX_LANE_M GENMASK(3, 0) 1454 + #define ICE_AQC_PORT_OPT_MAX_LANE_100M 0 1455 + #define ICE_AQC_PORT_OPT_MAX_LANE_1G 1 1456 + #define ICE_AQC_PORT_OPT_MAX_LANE_2500M 2 1457 + #define ICE_AQC_PORT_OPT_MAX_LANE_5G 3 1458 + #define ICE_AQC_PORT_OPT_MAX_LANE_10G 4 1459 + #define ICE_AQC_PORT_OPT_MAX_LANE_25G 5 1460 + #define ICE_AQC_PORT_OPT_MAX_LANE_50G 6 1461 + #define ICE_AQC_PORT_OPT_MAX_LANE_100G 7 1462 + 1463 + u8 global_scid[2]; 1464 + u8 phy_scid[2]; 1465 + u8 pf2port_cid[2]; 1466 + }; 1467 + 1468 + /* Set Port Option (direct, 0x06EB) */ 1469 + struct ice_aqc_set_port_option { 1470 + u8 lport_num; 1471 + u8 lport_num_valid; 1472 + u8 selected_port_option; 1473 + u8 rsvd[13]; 1474 + }; 1475 + 1426 1476 /* Set/Get GPIO (direct, 0x06EC/0x06ED) */ 1427 1477 struct ice_aqc_gpio { 1428 1478 __le16 gpio_ctrl_handle; ··· 1539 1489 #define ICE_AQC_NVM_PERST_FLAG 1 1540 1490 #define ICE_AQC_NVM_EMPR_FLAG 2 1541 1491 #define ICE_AQC_NVM_EMPR_ENA BIT(0) /* Write Activate reply only */ 1492 + /* For Write Activate, several flags are sent as part of a separate 1493 + * flags2 field using a separate byte. For simplicity of the software 1494 + * interface, we pass the flags as a 16 bit value so these flags are 1495 + * all offset by 8 bits 1496 + */ 1497 + #define ICE_AQC_NVM_ACTIV_REQ_EMPR BIT(8) /* NVM Write Activate only */ 1542 1498 __le16 module_typeid; 1543 1499 __le16 length; 1544 1500 #define ICE_AQC_NVM_ERASE_LEN 0xFFFF ··· 2138 2082 struct ice_aqc_gpio read_write_gpio; 2139 2083 struct ice_aqc_sff_eeprom read_write_sff_param; 2140 2084 struct ice_aqc_set_port_id_led set_port_id_led; 2085 + struct ice_aqc_get_port_options get_port_options; 2086 + struct ice_aqc_set_port_option set_port_option; 2141 2087 struct ice_aqc_get_sw_cfg get_sw_conf; 2142 2088 struct ice_aqc_set_port_params set_port_params; 2143 2089 struct ice_aqc_sw_rules sw_rules; ··· 2301 2243 ice_aqc_opc_read_i2c = 0x06E2, 2302 2244 ice_aqc_opc_write_i2c = 0x06E3, 2303 2245 ice_aqc_opc_set_port_id_led = 0x06E9, 2246 + ice_aqc_opc_get_port_options = 0x06EA, 2247 + ice_aqc_opc_set_port_option = 0x06EB, 2304 2248 ice_aqc_opc_set_gpio = 0x06EC, 2305 2249 ice_aqc_opc_get_gpio = 0x06ED, 2306 2250 ice_aqc_opc_sff_eeprom = 0x06EE,
+255 -18
drivers/net/ethernet/intel/ice/ice_common.c
··· 8 8 9 9 #define ICE_PF_RESET_WAIT_COUNT 300 10 10 11 + static const char * const ice_link_mode_str_low[] = { 12 + [0] = "100BASE_TX", 13 + [1] = "100M_SGMII", 14 + [2] = "1000BASE_T", 15 + [3] = "1000BASE_SX", 16 + [4] = "1000BASE_LX", 17 + [5] = "1000BASE_KX", 18 + [6] = "1G_SGMII", 19 + [7] = "2500BASE_T", 20 + [8] = "2500BASE_X", 21 + [9] = "2500BASE_KX", 22 + [10] = "5GBASE_T", 23 + [11] = "5GBASE_KR", 24 + [12] = "10GBASE_T", 25 + [13] = "10G_SFI_DA", 26 + [14] = "10GBASE_SR", 27 + [15] = "10GBASE_LR", 28 + [16] = "10GBASE_KR_CR1", 29 + [17] = "10G_SFI_AOC_ACC", 30 + [18] = "10G_SFI_C2C", 31 + [19] = "25GBASE_T", 32 + [20] = "25GBASE_CR", 33 + [21] = "25GBASE_CR_S", 34 + [22] = "25GBASE_CR1", 35 + [23] = "25GBASE_SR", 36 + [24] = "25GBASE_LR", 37 + [25] = "25GBASE_KR", 38 + [26] = "25GBASE_KR_S", 39 + [27] = "25GBASE_KR1", 40 + [28] = "25G_AUI_AOC_ACC", 41 + [29] = "25G_AUI_C2C", 42 + [30] = "40GBASE_CR4", 43 + [31] = "40GBASE_SR4", 44 + [32] = "40GBASE_LR4", 45 + [33] = "40GBASE_KR4", 46 + [34] = "40G_XLAUI_AOC_ACC", 47 + [35] = "40G_XLAUI", 48 + [36] = "50GBASE_CR2", 49 + [37] = "50GBASE_SR2", 50 + [38] = "50GBASE_LR2", 51 + [39] = "50GBASE_KR2", 52 + [40] = "50G_LAUI2_AOC_ACC", 53 + [41] = "50G_LAUI2", 54 + [42] = "50G_AUI2_AOC_ACC", 55 + [43] = "50G_AUI2", 56 + [44] = "50GBASE_CP", 57 + [45] = "50GBASE_SR", 58 + [46] = "50GBASE_FR", 59 + [47] = "50GBASE_LR", 60 + [48] = "50GBASE_KR_PAM4", 61 + [49] = "50G_AUI1_AOC_ACC", 62 + [50] = "50G_AUI1", 63 + [51] = "100GBASE_CR4", 64 + [52] = "100GBASE_SR4", 65 + [53] = "100GBASE_LR4", 66 + [54] = "100GBASE_KR4", 67 + [55] = "100G_CAUI4_AOC_ACC", 68 + [56] = "100G_CAUI4", 69 + [57] = "100G_AUI4_AOC_ACC", 70 + [58] = "100G_AUI4", 71 + [59] = "100GBASE_CR_PAM4", 72 + [60] = "100GBASE_KR_PAM4", 73 + [61] = "100GBASE_CP2", 74 + [62] = "100GBASE_SR2", 75 + [63] = "100GBASE_DR", 76 + }; 77 + 78 + static const char * const ice_link_mode_str_high[] = { 79 + [0] = "100GBASE_KR2_PAM4", 80 + [1] = "100G_CAUI2_AOC_ACC", 81 + [2] = "100G_CAUI2", 82 + [3] = "100G_AUI2_AOC_ACC", 83 + [4] = "100G_AUI2", 84 + }; 85 + 86 + /** 87 + * ice_dump_phy_type - helper function to dump phy_type 88 + * @hw: pointer to the HW structure 89 + * @low: 64 bit value for phy_type_low 90 + * @high: 64 bit value for phy_type_high 91 + * @prefix: prefix string to differentiate multiple dumps 92 + */ 93 + static void 94 + ice_dump_phy_type(struct ice_hw *hw, u64 low, u64 high, const char *prefix) 95 + { 96 + ice_debug(hw, ICE_DBG_PHY, "%s: phy_type_low: 0x%016llx\n", prefix, low); 97 + 98 + for (u32 i = 0; i < BITS_PER_TYPE(typeof(low)); i++) { 99 + if (low & BIT_ULL(i)) 100 + ice_debug(hw, ICE_DBG_PHY, "%s: bit(%d): %s\n", 101 + prefix, i, ice_link_mode_str_low[i]); 102 + } 103 + 104 + ice_debug(hw, ICE_DBG_PHY, "%s: phy_type_high: 0x%016llx\n", prefix, high); 105 + 106 + for (u32 i = 0; i < BITS_PER_TYPE(typeof(high)); i++) { 107 + if (high & BIT_ULL(i)) 108 + ice_debug(hw, ICE_DBG_PHY, "%s: bit(%d): %s\n", 109 + prefix, i, ice_link_mode_str_high[i]); 110 + } 111 + } 112 + 11 113 /** 12 114 * ice_set_mac_type - Sets MAC type 13 115 * @hw: pointer to the HW structure ··· 285 183 struct ice_aqc_get_phy_caps *cmd; 286 184 u16 pcaps_size = sizeof(*pcaps); 287 185 struct ice_aq_desc desc; 186 + const char *prefix; 288 187 struct ice_hw *hw; 289 188 int status; 290 189 ··· 307 204 cmd->param0 |= cpu_to_le16(report_mode); 308 205 status = ice_aq_send_cmd(hw, &desc, pcaps, pcaps_size, cd); 309 206 310 - ice_debug(hw, ICE_DBG_LINK, "get phy caps - report_mode = 0x%x\n", 311 - report_mode); 312 - ice_debug(hw, ICE_DBG_LINK, " phy_type_low = 0x%llx\n", 313 - (unsigned long long)le64_to_cpu(pcaps->phy_type_low)); 314 - ice_debug(hw, ICE_DBG_LINK, " phy_type_high = 0x%llx\n", 315 - (unsigned long long)le64_to_cpu(pcaps->phy_type_high)); 316 - ice_debug(hw, ICE_DBG_LINK, " caps = 0x%x\n", pcaps->caps); 317 - ice_debug(hw, ICE_DBG_LINK, " low_power_ctrl_an = 0x%x\n", 207 + ice_debug(hw, ICE_DBG_LINK, "get phy caps dump\n"); 208 + 209 + switch (report_mode) { 210 + case ICE_AQC_REPORT_TOPO_CAP_MEDIA: 211 + prefix = "phy_caps_media"; 212 + break; 213 + case ICE_AQC_REPORT_TOPO_CAP_NO_MEDIA: 214 + prefix = "phy_caps_no_media"; 215 + break; 216 + case ICE_AQC_REPORT_ACTIVE_CFG: 217 + prefix = "phy_caps_active"; 218 + break; 219 + case ICE_AQC_REPORT_DFLT_CFG: 220 + prefix = "phy_caps_default"; 221 + break; 222 + default: 223 + prefix = "phy_caps_invalid"; 224 + } 225 + 226 + ice_dump_phy_type(hw, le64_to_cpu(pcaps->phy_type_low), 227 + le64_to_cpu(pcaps->phy_type_high), prefix); 228 + 229 + ice_debug(hw, ICE_DBG_LINK, "%s: report_mode = 0x%x\n", 230 + prefix, report_mode); 231 + ice_debug(hw, ICE_DBG_LINK, "%s: caps = 0x%x\n", prefix, pcaps->caps); 232 + ice_debug(hw, ICE_DBG_LINK, "%s: low_power_ctrl_an = 0x%x\n", prefix, 318 233 pcaps->low_power_ctrl_an); 319 - ice_debug(hw, ICE_DBG_LINK, " eee_cap = 0x%x\n", pcaps->eee_cap); 320 - ice_debug(hw, ICE_DBG_LINK, " eeer_value = 0x%x\n", 234 + ice_debug(hw, ICE_DBG_LINK, "%s: eee_cap = 0x%x\n", prefix, 235 + pcaps->eee_cap); 236 + ice_debug(hw, ICE_DBG_LINK, "%s: eeer_value = 0x%x\n", prefix, 321 237 pcaps->eeer_value); 322 - ice_debug(hw, ICE_DBG_LINK, " link_fec_options = 0x%x\n", 238 + ice_debug(hw, ICE_DBG_LINK, "%s: link_fec_options = 0x%x\n", prefix, 323 239 pcaps->link_fec_options); 324 - ice_debug(hw, ICE_DBG_LINK, " module_compliance_enforcement = 0x%x\n", 325 - pcaps->module_compliance_enforcement); 326 - ice_debug(hw, ICE_DBG_LINK, " extended_compliance_code = 0x%x\n", 327 - pcaps->extended_compliance_code); 328 - ice_debug(hw, ICE_DBG_LINK, " module_type[0] = 0x%x\n", 240 + ice_debug(hw, ICE_DBG_LINK, "%s: module_compliance_enforcement = 0x%x\n", 241 + prefix, pcaps->module_compliance_enforcement); 242 + ice_debug(hw, ICE_DBG_LINK, "%s: extended_compliance_code = 0x%x\n", 243 + prefix, pcaps->extended_compliance_code); 244 + ice_debug(hw, ICE_DBG_LINK, "%s: module_type[0] = 0x%x\n", prefix, 329 245 pcaps->module_type[0]); 330 - ice_debug(hw, ICE_DBG_LINK, " module_type[1] = 0x%x\n", 246 + ice_debug(hw, ICE_DBG_LINK, "%s: module_type[1] = 0x%x\n", prefix, 331 247 pcaps->module_type[1]); 332 - ice_debug(hw, ICE_DBG_LINK, " module_type[2] = 0x%x\n", 248 + ice_debug(hw, ICE_DBG_LINK, "%s: module_type[2] = 0x%x\n", prefix, 333 249 pcaps->module_type[2]); 334 250 335 251 if (!status && report_mode == ICE_AQC_REPORT_TOPO_CAP_MEDIA) { ··· 3674 3552 cmd->ident_mode = ICE_AQC_PORT_IDENT_LED_BLINK; 3675 3553 3676 3554 return ice_aq_send_cmd(hw, &desc, NULL, 0, cd); 3555 + } 3556 + 3557 + /** 3558 + * ice_aq_get_port_options 3559 + * @hw: pointer to the HW struct 3560 + * @options: buffer for the resultant port options 3561 + * @option_count: input - size of the buffer in port options structures, 3562 + * output - number of returned port options 3563 + * @lport: logical port to call the command with (optional) 3564 + * @lport_valid: when false, FW uses port owned by the PF instead of lport, 3565 + * when PF owns more than 1 port it must be true 3566 + * @active_option_idx: index of active port option in returned buffer 3567 + * @active_option_valid: active option in returned buffer is valid 3568 + * @pending_option_idx: index of pending port option in returned buffer 3569 + * @pending_option_valid: pending option in returned buffer is valid 3570 + * 3571 + * Calls Get Port Options AQC (0x06ea) and verifies result. 3572 + */ 3573 + int 3574 + ice_aq_get_port_options(struct ice_hw *hw, 3575 + struct ice_aqc_get_port_options_elem *options, 3576 + u8 *option_count, u8 lport, bool lport_valid, 3577 + u8 *active_option_idx, bool *active_option_valid, 3578 + u8 *pending_option_idx, bool *pending_option_valid) 3579 + { 3580 + struct ice_aqc_get_port_options *cmd; 3581 + struct ice_aq_desc desc; 3582 + int status; 3583 + u8 i; 3584 + 3585 + /* options buffer shall be able to hold max returned options */ 3586 + if (*option_count < ICE_AQC_PORT_OPT_COUNT_M) 3587 + return -EINVAL; 3588 + 3589 + cmd = &desc.params.get_port_options; 3590 + ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_port_options); 3591 + 3592 + if (lport_valid) 3593 + cmd->lport_num = lport; 3594 + cmd->lport_num_valid = lport_valid; 3595 + 3596 + status = ice_aq_send_cmd(hw, &desc, options, 3597 + *option_count * sizeof(*options), NULL); 3598 + if (status) 3599 + return status; 3600 + 3601 + /* verify direct FW response & set output parameters */ 3602 + *option_count = FIELD_GET(ICE_AQC_PORT_OPT_COUNT_M, 3603 + cmd->port_options_count); 3604 + ice_debug(hw, ICE_DBG_PHY, "options: %x\n", *option_count); 3605 + *active_option_valid = FIELD_GET(ICE_AQC_PORT_OPT_VALID, 3606 + cmd->port_options); 3607 + if (*active_option_valid) { 3608 + *active_option_idx = FIELD_GET(ICE_AQC_PORT_OPT_ACTIVE_M, 3609 + cmd->port_options); 3610 + if (*active_option_idx > (*option_count - 1)) 3611 + return -EIO; 3612 + ice_debug(hw, ICE_DBG_PHY, "active idx: %x\n", 3613 + *active_option_idx); 3614 + } 3615 + 3616 + *pending_option_valid = FIELD_GET(ICE_AQC_PENDING_PORT_OPT_VALID, 3617 + cmd->pending_port_option_status); 3618 + if (*pending_option_valid) { 3619 + *pending_option_idx = FIELD_GET(ICE_AQC_PENDING_PORT_OPT_IDX_M, 3620 + cmd->pending_port_option_status); 3621 + if (*pending_option_idx > (*option_count - 1)) 3622 + return -EIO; 3623 + ice_debug(hw, ICE_DBG_PHY, "pending idx: %x\n", 3624 + *pending_option_idx); 3625 + } 3626 + 3627 + /* mask output options fields */ 3628 + for (i = 0; i < *option_count; i++) { 3629 + options[i].pmd = FIELD_GET(ICE_AQC_PORT_OPT_PMD_COUNT_M, 3630 + options[i].pmd); 3631 + options[i].max_lane_speed = FIELD_GET(ICE_AQC_PORT_OPT_MAX_LANE_M, 3632 + options[i].max_lane_speed); 3633 + ice_debug(hw, ICE_DBG_PHY, "pmds: %x max speed: %x\n", 3634 + options[i].pmd, options[i].max_lane_speed); 3635 + } 3636 + 3637 + return 0; 3638 + } 3639 + 3640 + /** 3641 + * ice_aq_set_port_option 3642 + * @hw: pointer to the HW struct 3643 + * @lport: logical port to call the command with 3644 + * @lport_valid: when false, FW uses port owned by the PF instead of lport, 3645 + * when PF owns more than 1 port it must be true 3646 + * @new_option: new port option to be written 3647 + * 3648 + * Calls Set Port Options AQC (0x06eb). 3649 + */ 3650 + int 3651 + ice_aq_set_port_option(struct ice_hw *hw, u8 lport, u8 lport_valid, 3652 + u8 new_option) 3653 + { 3654 + struct ice_aqc_set_port_option *cmd; 3655 + struct ice_aq_desc desc; 3656 + 3657 + if (new_option > ICE_AQC_PORT_OPT_COUNT_M) 3658 + return -EINVAL; 3659 + 3660 + cmd = &desc.params.set_port_option; 3661 + ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_set_port_option); 3662 + 3663 + if (lport_valid) 3664 + cmd->lport_num = lport; 3665 + 3666 + cmd->lport_num_valid = lport_valid; 3667 + cmd->selected_port_option = new_option; 3668 + 3669 + return ice_aq_send_cmd(hw, &desc, NULL, 0, NULL); 3677 3670 } 3678 3671 3679 3672 /**
+9
drivers/net/ethernet/intel/ice/ice_common.h
··· 151 151 ice_aq_set_port_id_led(struct ice_port_info *pi, bool is_orig_mode, 152 152 struct ice_sq_cd *cd); 153 153 int 154 + ice_aq_get_port_options(struct ice_hw *hw, 155 + struct ice_aqc_get_port_options_elem *options, 156 + u8 *option_count, u8 lport, bool lport_valid, 157 + u8 *active_option_idx, bool *active_option_valid, 158 + u8 *pending_option_idx, bool *pending_option_valid); 159 + int 160 + ice_aq_set_port_option(struct ice_hw *hw, u8 lport, u8 lport_valid, 161 + u8 new_option); 162 + int 154 163 ice_aq_sff_eeprom(struct ice_hw *hw, u16 lport, u8 bus_addr, 155 164 u16 mem_addr, u8 page, u8 set_page, u8 *data, u8 length, 156 165 bool write, struct ice_sq_cd *cd);
+288
drivers/net/ethernet/intel/ice/ice_devlink.c
··· 9 9 #include "ice_eswitch.h" 10 10 #include "ice_fw_update.h" 11 11 12 + static int ice_active_port_option = -1; 13 + 12 14 /* context for devlink info version reporting */ 13 15 struct ice_info_ctx { 14 16 char buf[128]; ··· 468 466 return 0; 469 467 } 470 468 469 + /** 470 + * ice_devlink_port_opt_speed_str - convert speed to a string 471 + * @speed: speed value 472 + */ 473 + static const char *ice_devlink_port_opt_speed_str(u8 speed) 474 + { 475 + switch (speed & ICE_AQC_PORT_OPT_MAX_LANE_M) { 476 + case ICE_AQC_PORT_OPT_MAX_LANE_100M: 477 + return "0.1"; 478 + case ICE_AQC_PORT_OPT_MAX_LANE_1G: 479 + return "1"; 480 + case ICE_AQC_PORT_OPT_MAX_LANE_2500M: 481 + return "2.5"; 482 + case ICE_AQC_PORT_OPT_MAX_LANE_5G: 483 + return "5"; 484 + case ICE_AQC_PORT_OPT_MAX_LANE_10G: 485 + return "10"; 486 + case ICE_AQC_PORT_OPT_MAX_LANE_25G: 487 + return "25"; 488 + case ICE_AQC_PORT_OPT_MAX_LANE_50G: 489 + return "50"; 490 + case ICE_AQC_PORT_OPT_MAX_LANE_100G: 491 + return "100"; 492 + } 493 + 494 + return "-"; 495 + } 496 + 497 + #define ICE_PORT_OPT_DESC_LEN 50 498 + /** 499 + * ice_devlink_port_options_print - Print available port split options 500 + * @pf: the PF to print split port options 501 + * 502 + * Prints a table with available port split options and max port speeds 503 + */ 504 + static void ice_devlink_port_options_print(struct ice_pf *pf) 505 + { 506 + u8 i, j, options_count, cnt, speed, pending_idx, active_idx; 507 + struct ice_aqc_get_port_options_elem *options, *opt; 508 + struct device *dev = ice_pf_to_dev(pf); 509 + bool active_valid, pending_valid; 510 + char desc[ICE_PORT_OPT_DESC_LEN]; 511 + const char *str; 512 + int status; 513 + 514 + options = kcalloc(ICE_AQC_PORT_OPT_MAX * ICE_MAX_PORT_PER_PCI_DEV, 515 + sizeof(*options), GFP_KERNEL); 516 + if (!options) 517 + return; 518 + 519 + for (i = 0; i < ICE_MAX_PORT_PER_PCI_DEV; i++) { 520 + opt = options + i * ICE_AQC_PORT_OPT_MAX; 521 + options_count = ICE_AQC_PORT_OPT_MAX; 522 + active_valid = 0; 523 + 524 + status = ice_aq_get_port_options(&pf->hw, opt, &options_count, 525 + i, true, &active_idx, 526 + &active_valid, &pending_idx, 527 + &pending_valid); 528 + if (status) { 529 + dev_dbg(dev, "Couldn't read port option for port %d, err %d\n", 530 + i, status); 531 + goto err; 532 + } 533 + } 534 + 535 + dev_dbg(dev, "Available port split options and max port speeds (Gbps):\n"); 536 + dev_dbg(dev, "Status Split Quad 0 Quad 1\n"); 537 + dev_dbg(dev, " count L0 L1 L2 L3 L4 L5 L6 L7\n"); 538 + 539 + for (i = 0; i < options_count; i++) { 540 + cnt = 0; 541 + 542 + if (i == ice_active_port_option) 543 + str = "Active"; 544 + else if ((i == pending_idx) && pending_valid) 545 + str = "Pending"; 546 + else 547 + str = ""; 548 + 549 + cnt += snprintf(&desc[cnt], ICE_PORT_OPT_DESC_LEN - cnt, 550 + "%-8s", str); 551 + 552 + cnt += snprintf(&desc[cnt], ICE_PORT_OPT_DESC_LEN - cnt, 553 + "%-6u", options[i].pmd); 554 + 555 + for (j = 0; j < ICE_MAX_PORT_PER_PCI_DEV; ++j) { 556 + speed = options[i + j * ICE_AQC_PORT_OPT_MAX].max_lane_speed; 557 + str = ice_devlink_port_opt_speed_str(speed); 558 + cnt += snprintf(&desc[cnt], ICE_PORT_OPT_DESC_LEN - cnt, 559 + "%3s ", str); 560 + } 561 + 562 + dev_dbg(dev, "%s\n", desc); 563 + } 564 + 565 + err: 566 + kfree(options); 567 + } 568 + 569 + /** 570 + * ice_devlink_aq_set_port_option - Send set port option admin queue command 571 + * @pf: the PF to print split port options 572 + * @option_idx: selected port option 573 + * @extack: extended netdev ack structure 574 + * 575 + * Sends set port option admin queue command with selected port option and 576 + * calls NVM write activate. 577 + */ 578 + static int 579 + ice_devlink_aq_set_port_option(struct ice_pf *pf, u8 option_idx, 580 + struct netlink_ext_ack *extack) 581 + { 582 + struct device *dev = ice_pf_to_dev(pf); 583 + int status; 584 + 585 + status = ice_aq_set_port_option(&pf->hw, 0, true, option_idx); 586 + if (status) { 587 + dev_dbg(dev, "ice_aq_set_port_option, err %d aq_err %d\n", 588 + status, pf->hw.adminq.sq_last_status); 589 + NL_SET_ERR_MSG_MOD(extack, "Port split request failed"); 590 + return -EIO; 591 + } 592 + 593 + status = ice_acquire_nvm(&pf->hw, ICE_RES_WRITE); 594 + if (status) { 595 + dev_dbg(dev, "ice_acquire_nvm failed, err %d aq_err %d\n", 596 + status, pf->hw.adminq.sq_last_status); 597 + NL_SET_ERR_MSG_MOD(extack, "Failed to acquire NVM semaphore"); 598 + return -EIO; 599 + } 600 + 601 + status = ice_nvm_write_activate(&pf->hw, ICE_AQC_NVM_ACTIV_REQ_EMPR, NULL); 602 + if (status) { 603 + dev_dbg(dev, "ice_nvm_write_activate failed, err %d aq_err %d\n", 604 + status, pf->hw.adminq.sq_last_status); 605 + NL_SET_ERR_MSG_MOD(extack, "Port split request failed to save data"); 606 + ice_release_nvm(&pf->hw); 607 + return -EIO; 608 + } 609 + 610 + ice_release_nvm(&pf->hw); 611 + 612 + NL_SET_ERR_MSG_MOD(extack, "Reboot required to finish port split"); 613 + return 0; 614 + } 615 + 616 + /** 617 + * ice_devlink_port_split - .port_split devlink handler 618 + * @devlink: devlink instance structure 619 + * @port: devlink port structure 620 + * @count: number of ports to split to 621 + * @extack: extended netdev ack structure 622 + * 623 + * Callback for the devlink .port_split operation. 624 + * 625 + * Unfortunately, the devlink expression of available options is limited 626 + * to just a number, so search for an FW port option which supports 627 + * the specified number. As there could be multiple FW port options with 628 + * the same port split count, allow switching between them. When the same 629 + * port split count request is issued again, switch to the next FW port 630 + * option with the same port split count. 631 + * 632 + * Return: zero on success or an error code on failure. 633 + */ 634 + static int 635 + ice_devlink_port_split(struct devlink *devlink, struct devlink_port *port, 636 + unsigned int count, struct netlink_ext_ack *extack) 637 + { 638 + struct ice_aqc_get_port_options_elem options[ICE_AQC_PORT_OPT_MAX]; 639 + u8 i, j, active_idx, pending_idx, new_option; 640 + struct ice_pf *pf = devlink_priv(devlink); 641 + u8 option_count = ICE_AQC_PORT_OPT_MAX; 642 + struct device *dev = ice_pf_to_dev(pf); 643 + bool active_valid, pending_valid; 644 + int status; 645 + 646 + status = ice_aq_get_port_options(&pf->hw, options, &option_count, 647 + 0, true, &active_idx, &active_valid, 648 + &pending_idx, &pending_valid); 649 + if (status) { 650 + dev_dbg(dev, "Couldn't read port split options, err = %d\n", 651 + status); 652 + NL_SET_ERR_MSG_MOD(extack, "Failed to get available port split options"); 653 + return -EIO; 654 + } 655 + 656 + new_option = ICE_AQC_PORT_OPT_MAX; 657 + active_idx = pending_valid ? pending_idx : active_idx; 658 + for (i = 1; i <= option_count; i++) { 659 + /* In order to allow switching between FW port options with 660 + * the same port split count, search for a new option starting 661 + * from the active/pending option (with array wrap around). 662 + */ 663 + j = (active_idx + i) % option_count; 664 + 665 + if (count == options[j].pmd) { 666 + new_option = j; 667 + break; 668 + } 669 + } 670 + 671 + if (new_option == active_idx) { 672 + dev_dbg(dev, "request to split: count: %u is already set and there are no other options\n", 673 + count); 674 + NL_SET_ERR_MSG_MOD(extack, "Requested split count is already set"); 675 + ice_devlink_port_options_print(pf); 676 + return -EINVAL; 677 + } 678 + 679 + if (new_option == ICE_AQC_PORT_OPT_MAX) { 680 + dev_dbg(dev, "request to split: count: %u not found\n", count); 681 + NL_SET_ERR_MSG_MOD(extack, "Port split requested unsupported port config"); 682 + ice_devlink_port_options_print(pf); 683 + return -EINVAL; 684 + } 685 + 686 + status = ice_devlink_aq_set_port_option(pf, new_option, extack); 687 + if (status) 688 + return status; 689 + 690 + ice_devlink_port_options_print(pf); 691 + 692 + return 0; 693 + } 694 + 695 + /** 696 + * ice_devlink_port_unsplit - .port_unsplit devlink handler 697 + * @devlink: devlink instance structure 698 + * @port: devlink port structure 699 + * @extack: extended netdev ack structure 700 + * 701 + * Callback for the devlink .port_unsplit operation. 702 + * Calls ice_devlink_port_split with split count set to 1. 703 + * There could be no FW option available with split count 1. 704 + * 705 + * Return: zero on success or an error code on failure. 706 + */ 707 + static int 708 + ice_devlink_port_unsplit(struct devlink *devlink, struct devlink_port *port, 709 + struct netlink_ext_ack *extack) 710 + { 711 + return ice_devlink_port_split(devlink, port, 1, extack); 712 + } 713 + 471 714 static const struct devlink_ops ice_devlink_ops = { 472 715 .supported_flash_update_params = DEVLINK_SUPPORT_FLASH_UPDATE_OVERWRITE_MASK, 473 716 .reload_actions = BIT(DEVLINK_RELOAD_ACTION_FW_ACTIVATE), 474 717 /* The ice driver currently does not support driver reinit */ 475 718 .reload_down = ice_devlink_reload_empr_start, 476 719 .reload_up = ice_devlink_reload_empr_finish, 720 + .port_split = ice_devlink_port_split, 721 + .port_unsplit = ice_devlink_port_unsplit, 477 722 .eswitch_mode_get = ice_eswitch_mode_get, 478 723 .eswitch_mode_set = ice_eswitch_mode_set, 479 724 .info_get = ice_devlink_info_get, ··· 944 695 } 945 696 946 697 /** 698 + * ice_devlink_set_port_split_options - Set port split options 699 + * @pf: the PF to set port split options 700 + * @attrs: devlink attributes 701 + * 702 + * Sets devlink port split options based on available FW port options 703 + */ 704 + static void 705 + ice_devlink_set_port_split_options(struct ice_pf *pf, 706 + struct devlink_port_attrs *attrs) 707 + { 708 + struct ice_aqc_get_port_options_elem options[ICE_AQC_PORT_OPT_MAX]; 709 + u8 i, active_idx, pending_idx, option_count = ICE_AQC_PORT_OPT_MAX; 710 + bool active_valid, pending_valid; 711 + int status; 712 + 713 + status = ice_aq_get_port_options(&pf->hw, options, &option_count, 714 + 0, true, &active_idx, &active_valid, 715 + &pending_idx, &pending_valid); 716 + if (status) { 717 + dev_dbg(ice_pf_to_dev(pf), "Couldn't read port split options, err = %d\n", 718 + status); 719 + return; 720 + } 721 + 722 + /* find the biggest available port split count */ 723 + for (i = 0; i < option_count; i++) 724 + attrs->lanes = max_t(int, attrs->lanes, options[i].pmd); 725 + 726 + attrs->splittable = attrs->lanes ? 1 : 0; 727 + ice_active_port_option = active_idx; 728 + } 729 + 730 + /** 947 731 * ice_devlink_create_pf_port - Create a devlink port for this PF 948 732 * @pf: the PF to create a devlink port for 949 733 * ··· 1003 721 1004 722 attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL; 1005 723 attrs.phys.port_number = pf->hw.bus.func; 724 + 725 + /* As FW supports only port split options for whole device, 726 + * set port split options only for first PF. 727 + */ 728 + if (pf->hw.pf_id == 0) 729 + ice_devlink_set_port_split_options(pf, &attrs); 1006 730 1007 731 ice_devlink_set_switch_id(pf, &attrs.switch_id); 1008 732
+9 -4
drivers/net/ethernet/intel/ice/ice_nvm.c
··· 1114 1114 * Update the control word with the required banks' validity bits 1115 1115 * and dumps the Shadow RAM to flash (0x0707) 1116 1116 * 1117 - * cmd_flags controls which banks to activate, and the preservation level to 1118 - * use when activating the NVM bank. 1117 + * cmd_flags controls which banks to activate, the preservation level to use 1118 + * when activating the NVM bank, and whether an EMP reset is required for 1119 + * activation. 1120 + * 1121 + * Note that the 16bit cmd_flags value is split between two separate 1 byte 1122 + * flag values in the descriptor. 1119 1123 * 1120 1124 * On successful return of the firmware command, the response_flags variable 1121 1125 * is updated with the flags reported by firmware indicating certain status, 1122 1126 * such as whether EMP reset is enabled. 1123 1127 */ 1124 - int ice_nvm_write_activate(struct ice_hw *hw, u8 cmd_flags, u8 *response_flags) 1128 + int ice_nvm_write_activate(struct ice_hw *hw, u16 cmd_flags, u8 *response_flags) 1125 1129 { 1126 1130 struct ice_aqc_nvm *cmd; 1127 1131 struct ice_aq_desc desc; ··· 1134 1130 cmd = &desc.params.nvm; 1135 1131 ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_nvm_write_activate); 1136 1132 1137 - cmd->cmd_flags = cmd_flags; 1133 + cmd->cmd_flags = (u8)(cmd_flags & 0xFF); 1134 + cmd->offset_high = (u8)((cmd_flags >> 8) & 0xFF); 1138 1135 1139 1136 err = ice_aq_send_cmd(hw, &desc, NULL, 0, NULL); 1140 1137 if (!err && response_flags)
+1 -1
drivers/net/ethernet/intel/ice/ice_nvm.h
··· 34 34 int 35 35 ice_aq_erase_nvm(struct ice_hw *hw, u16 module_typeid, struct ice_sq_cd *cd); 36 36 int ice_nvm_validate_checksum(struct ice_hw *hw); 37 - int ice_nvm_write_activate(struct ice_hw *hw, u8 cmd_flags, u8 *response_flags); 37 + int ice_nvm_write_activate(struct ice_hw *hw, u16 cmd_flags, u8 *response_flags); 38 38 int ice_aq_nvm_update_empr(struct ice_hw *hw); 39 39 int 40 40 ice_nvm_set_pkg_data(struct ice_hw *hw, bool del_pkg_data_flag, u8 *data,
+138 -4
drivers/net/ethernet/intel/ice/ice_tc_lib.c
··· 36 36 ICE_TC_FLWR_FIELD_ENC_DEST_IPV6)) 37 37 lkups_cnt++; 38 38 39 + if (flags & (ICE_TC_FLWR_FIELD_ENC_IP_TOS | 40 + ICE_TC_FLWR_FIELD_ENC_IP_TTL)) 41 + lkups_cnt++; 42 + 39 43 if (flags & ICE_TC_FLWR_FIELD_ENC_DEST_L4_PORT) 40 44 lkups_cnt++; 41 45 ··· 66 62 /* are IPv[4|6] fields specified? */ 67 63 if (flags & (ICE_TC_FLWR_FIELD_DEST_IPV4 | ICE_TC_FLWR_FIELD_SRC_IPV4 | 68 64 ICE_TC_FLWR_FIELD_DEST_IPV6 | ICE_TC_FLWR_FIELD_SRC_IPV6)) 65 + lkups_cnt++; 66 + 67 + if (flags & (ICE_TC_FLWR_FIELD_IP_TOS | ICE_TC_FLWR_FIELD_IP_TTL)) 69 68 lkups_cnt++; 70 69 71 70 /* is L4 (TCP/UDP/any other L4 protocol fields) specified? */ ··· 264 257 i++; 265 258 } 266 259 260 + if (fltr->inner_headers.l2_key.n_proto == htons(ETH_P_IP) && 261 + (flags & (ICE_TC_FLWR_FIELD_ENC_IP_TOS | 262 + ICE_TC_FLWR_FIELD_ENC_IP_TTL))) { 263 + list[i].type = ice_proto_type_from_ipv4(false); 264 + 265 + if (flags & ICE_TC_FLWR_FIELD_ENC_IP_TOS) { 266 + list[i].h_u.ipv4_hdr.tos = hdr->l3_key.tos; 267 + list[i].m_u.ipv4_hdr.tos = hdr->l3_mask.tos; 268 + } 269 + 270 + if (flags & ICE_TC_FLWR_FIELD_ENC_IP_TTL) { 271 + list[i].h_u.ipv4_hdr.time_to_live = hdr->l3_key.ttl; 272 + list[i].m_u.ipv4_hdr.time_to_live = hdr->l3_mask.ttl; 273 + } 274 + 275 + i++; 276 + } 277 + 278 + if (fltr->inner_headers.l2_key.n_proto == htons(ETH_P_IPV6) && 279 + (flags & (ICE_TC_FLWR_FIELD_ENC_IP_TOS | 280 + ICE_TC_FLWR_FIELD_ENC_IP_TTL))) { 281 + struct ice_ipv6_hdr *hdr_h, *hdr_m; 282 + 283 + hdr_h = &list[i].h_u.ipv6_hdr; 284 + hdr_m = &list[i].m_u.ipv6_hdr; 285 + list[i].type = ice_proto_type_from_ipv6(false); 286 + 287 + if (flags & ICE_TC_FLWR_FIELD_ENC_IP_TOS) { 288 + be32p_replace_bits(&hdr_h->be_ver_tc_flow, 289 + hdr->l3_key.tos, 290 + ICE_IPV6_HDR_TC_MASK); 291 + be32p_replace_bits(&hdr_m->be_ver_tc_flow, 292 + hdr->l3_mask.tos, 293 + ICE_IPV6_HDR_TC_MASK); 294 + } 295 + 296 + if (flags & ICE_TC_FLWR_FIELD_ENC_IP_TTL) { 297 + hdr_h->hop_limit = hdr->l3_key.ttl; 298 + hdr_m->hop_limit = hdr->l3_mask.ttl; 299 + } 300 + 301 + i++; 302 + } 303 + 267 304 if ((flags & ICE_TC_FLWR_FIELD_ENC_DEST_L4_PORT) && 268 305 hdr->l3_key.ip_proto == IPPROTO_UDP) { 269 306 list[i].type = ICE_UDP_OF; ··· 468 417 memcpy(&ipv6_mask->src_addr, &l3_mask->src_ipv6_addr, 469 418 sizeof(l3_mask->src_ipv6_addr)); 470 419 } 420 + i++; 421 + } 422 + 423 + if (headers->l2_key.n_proto == htons(ETH_P_IP) && 424 + (flags & (ICE_TC_FLWR_FIELD_IP_TOS | ICE_TC_FLWR_FIELD_IP_TTL))) { 425 + list[i].type = ice_proto_type_from_ipv4(inner); 426 + 427 + if (flags & ICE_TC_FLWR_FIELD_IP_TOS) { 428 + list[i].h_u.ipv4_hdr.tos = headers->l3_key.tos; 429 + list[i].m_u.ipv4_hdr.tos = headers->l3_mask.tos; 430 + } 431 + 432 + if (flags & ICE_TC_FLWR_FIELD_IP_TTL) { 433 + list[i].h_u.ipv4_hdr.time_to_live = 434 + headers->l3_key.ttl; 435 + list[i].m_u.ipv4_hdr.time_to_live = 436 + headers->l3_mask.ttl; 437 + } 438 + 439 + i++; 440 + } 441 + 442 + if (headers->l2_key.n_proto == htons(ETH_P_IPV6) && 443 + (flags & (ICE_TC_FLWR_FIELD_IP_TOS | ICE_TC_FLWR_FIELD_IP_TTL))) { 444 + struct ice_ipv6_hdr *hdr_h, *hdr_m; 445 + 446 + hdr_h = &list[i].h_u.ipv6_hdr; 447 + hdr_m = &list[i].m_u.ipv6_hdr; 448 + list[i].type = ice_proto_type_from_ipv6(inner); 449 + 450 + if (flags & ICE_TC_FLWR_FIELD_IP_TOS) { 451 + be32p_replace_bits(&hdr_h->be_ver_tc_flow, 452 + headers->l3_key.tos, 453 + ICE_IPV6_HDR_TC_MASK); 454 + be32p_replace_bits(&hdr_m->be_ver_tc_flow, 455 + headers->l3_mask.tos, 456 + ICE_IPV6_HDR_TC_MASK); 457 + } 458 + 459 + if (flags & ICE_TC_FLWR_FIELD_IP_TTL) { 460 + hdr_h->hop_limit = headers->l3_key.ttl; 461 + hdr_m->hop_limit = headers->l3_mask.ttl; 462 + } 463 + 471 464 i++; 472 465 } 473 466 ··· 934 839 } 935 840 936 841 /** 842 + * ice_tc_set_tos_ttl - Parse IP ToS/TTL from TC flower filter 843 + * @match: Pointer to flow match structure 844 + * @fltr: Pointer to filter structure 845 + * @headers: inner or outer header fields 846 + * @is_encap: set true for tunnel 847 + */ 848 + static void 849 + ice_tc_set_tos_ttl(struct flow_match_ip *match, 850 + struct ice_tc_flower_fltr *fltr, 851 + struct ice_tc_flower_lyr_2_4_hdrs *headers, 852 + bool is_encap) 853 + { 854 + if (match->mask->tos) { 855 + if (is_encap) 856 + fltr->flags |= ICE_TC_FLWR_FIELD_ENC_IP_TOS; 857 + else 858 + fltr->flags |= ICE_TC_FLWR_FIELD_IP_TOS; 859 + 860 + headers->l3_key.tos = match->key->tos; 861 + headers->l3_mask.tos = match->mask->tos; 862 + } 863 + 864 + if (match->mask->ttl) { 865 + if (is_encap) 866 + fltr->flags |= ICE_TC_FLWR_FIELD_ENC_IP_TTL; 867 + else 868 + fltr->flags |= ICE_TC_FLWR_FIELD_IP_TTL; 869 + 870 + headers->l3_key.ttl = match->key->ttl; 871 + headers->l3_mask.ttl = match->mask->ttl; 872 + } 873 + } 874 + 875 + /** 937 876 * ice_tc_set_port - Parse ports from TC flower filter 938 877 * @match: Flow match structure 939 878 * @fltr: Pointer to filter structure ··· 1096 967 struct flow_match_ip match; 1097 968 1098 969 flow_rule_match_enc_ip(rule, &match); 1099 - headers->l3_key.tos = match.key->tos; 1100 - headers->l3_key.ttl = match.key->ttl; 1101 - headers->l3_mask.tos = match.mask->tos; 1102 - headers->l3_mask.ttl = match.mask->ttl; 970 + ice_tc_set_tos_ttl(&match, fltr, headers, true); 1103 971 } 1104 972 1105 973 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_PORTS) && ··· 1165 1039 BIT(FLOW_DISSECTOR_KEY_ENC_IPV6_ADDRS) | 1166 1040 BIT(FLOW_DISSECTOR_KEY_ENC_PORTS) | 1167 1041 BIT(FLOW_DISSECTOR_KEY_ENC_OPTS) | 1042 + BIT(FLOW_DISSECTOR_KEY_IP) | 1168 1043 BIT(FLOW_DISSECTOR_KEY_ENC_IP) | 1169 1044 BIT(FLOW_DISSECTOR_KEY_PORTS) | 1170 1045 BIT(FLOW_DISSECTOR_KEY_PPPOE))) { ··· 1342 1215 flow_rule_match_ipv6_addrs(rule, &match); 1343 1216 if (ice_tc_set_ipv6(&match, fltr, headers, false)) 1344 1217 return -EINVAL; 1218 + } 1219 + 1220 + if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_IP)) { 1221 + struct flow_match_ip match; 1222 + 1223 + flow_rule_match_ip(rule, &match); 1224 + ice_tc_set_tos_ttl(&match, fltr, headers, false); 1345 1225 } 1346 1226 1347 1227 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_PORTS)) {
+6
drivers/net/ethernet/intel/ice/ice_tc_lib.h
··· 26 26 #define ICE_TC_FLWR_FIELD_CVLAN BIT(19) 27 27 #define ICE_TC_FLWR_FIELD_PPPOE_SESSID BIT(20) 28 28 #define ICE_TC_FLWR_FIELD_PPP_PROTO BIT(21) 29 + #define ICE_TC_FLWR_FIELD_IP_TOS BIT(22) 30 + #define ICE_TC_FLWR_FIELD_IP_TTL BIT(23) 31 + #define ICE_TC_FLWR_FIELD_ENC_IP_TOS BIT(24) 32 + #define ICE_TC_FLWR_FIELD_ENC_IP_TTL BIT(25) 29 33 30 34 #define ICE_TC_FLOWER_MASK_32 0xFFFFFFFF 35 + 36 + #define ICE_IPV6_HDR_TC_MASK 0xFF00000 31 37 32 38 struct ice_indr_block_priv { 33 39 struct net_device *netdev;
+2
drivers/net/ethernet/intel/ice/ice_type.h
··· 564 564 #define ICE_SCHED_INVAL_PROF_ID 0xFFFF 565 565 #define ICE_SCHED_DFLT_BURST_SIZE (15 * 1024) /* in bytes (15k) */ 566 566 567 + #define ICE_MAX_PORT_PER_PCI_DEV 8 568 + 567 569 /* Data structure for saving BW information */ 568 570 enum ice_bw_type { 569 571 ICE_BW_TYPE_PRIO,