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.

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

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2024-07-11 (net/intel)

This series contains updates to most Intel network drivers.

Tony removes MODULE_AUTHOR from drivers containing the entry.

Simon Horman corrects a kdoc entry for i40e.

Pawel adds implementation for devlink param "local_forwarding" on ice.

Michal removes unneeded call, and code, for eswitch rebuild for ice.

Sasha removed a no longer used field from igc.

* '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue:
igc: Remove the internal 'eee_advert' field
ice: remove eswitch rebuild
ice: Add support for devlink local_forwarding param
i40e: correct i40e_addr_to_hkey() name in kdoc
net: intel: Remove MODULE_AUTHORs
====================

Link: https://patch.msgid.link/20240711201932.2019925-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+167 -50
+25
Documentation/networking/devlink/ice.rst
··· 11 11 ========== 12 12 13 13 .. list-table:: Generic parameters implemented 14 + :widths: 5 5 90 14 15 15 16 * - Name 16 17 - Mode ··· 69 68 70 69 To verify that value has been set: 71 70 $ devlink dev param show pci/0000:16:00.0 name tx_scheduling_layers 71 + .. list-table:: Driver specific parameters implemented 72 + :widths: 5 5 90 73 + 74 + * - Name 75 + - Mode 76 + - Description 77 + * - ``local_forwarding`` 78 + - runtime 79 + - Controls loopback behavior by tuning scheduler bandwidth. 80 + It impacts all kinds of functions: physical, virtual and 81 + subfunctions. 82 + Supported values are: 83 + 84 + ``enabled`` - loopback traffic is allowed on port 85 + 86 + ``disabled`` - loopback traffic is not allowed on this port 87 + 88 + ``prioritized`` - loopback traffic is prioritized on this port 89 + 90 + Default value of ``local_forwarding`` parameter is ``enabled``. 91 + ``prioritized`` provides ability to adjust loopback traffic rate to increase 92 + one port capacity at cost of the another. User needs to disable 93 + local forwarding on one of the ports in order have increased capacity 94 + on the ``prioritized`` port. 72 95 73 96 Info versions 74 97 =============
-1
drivers/net/ethernet/intel/e100.c
··· 161 161 #define FIRMWARE_D102E "e100/d102e_ucode.bin" 162 162 163 163 MODULE_DESCRIPTION(DRV_DESCRIPTION); 164 - MODULE_AUTHOR(DRV_COPYRIGHT); 165 164 MODULE_LICENSE("GPL v2"); 166 165 MODULE_FIRMWARE(FIRMWARE_D101M); 167 166 MODULE_FIRMWARE(FIRMWARE_D101S);
-1
drivers/net/ethernet/intel/e1000/e1000_main.c
··· 187 187 .err_handler = &e1000_err_handler 188 188 }; 189 189 190 - MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); 191 190 MODULE_DESCRIPTION("Intel(R) PRO/1000 Network Driver"); 192 191 MODULE_LICENSE("GPL v2"); 193 192
-1
drivers/net/ethernet/intel/e1000e/netdev.c
··· 7969 7969 } 7970 7970 module_exit(e1000_exit_module); 7971 7971 7972 - MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); 7973 7972 MODULE_DESCRIPTION("Intel(R) PRO/1000 Network Driver"); 7974 7973 MODULE_LICENSE("GPL v2"); 7975 7974
-1
drivers/net/ethernet/intel/fm10k/fm10k_main.c
··· 17 17 static const char fm10k_copyright[] = 18 18 "Copyright(c) 2013 - 2019 Intel Corporation."; 19 19 20 - MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); 21 20 MODULE_DESCRIPTION(DRV_SUMMARY); 22 21 MODULE_LICENSE("GPL v2"); 23 22
+1 -1
drivers/net/ethernet/intel/i40e/i40e.h
··· 735 735 _i++, _veb = __i40e_pf_next_veb(_pf, &_i)) 736 736 737 737 /** 738 - * i40e_mac_to_hkey - Convert a 6-byte MAC Address to a u64 hash key 738 + * i40e_addr_to_hkey - Convert a 6-byte MAC Address to a u64 hash key 739 739 * @macaddr: the MAC Address as the base key 740 740 * 741 741 * Simply copies the address and returns it as a u64 for hashing
-1
drivers/net/ethernet/intel/i40e/i40e_main.c
··· 98 98 module_param(debug, uint, 0); 99 99 MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all), Debug mask (0x8XXXXXXX)"); 100 100 101 - MODULE_AUTHOR("Intel Corporation, <e1000-devel@lists.sourceforge.net>"); 102 101 MODULE_DESCRIPTION("Intel(R) Ethernet Connection XL710 Network Driver"); 103 102 MODULE_IMPORT_NS(LIBIE); 104 103 MODULE_LICENSE("GPL v2");
-1
drivers/net/ethernet/intel/iavf/iavf_main.c
··· 45 45 MODULE_DEVICE_TABLE(pci, iavf_pci_tbl); 46 46 47 47 MODULE_ALIAS("i40evf"); 48 - MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); 49 48 MODULE_DESCRIPTION("Intel(R) Ethernet Adaptive Virtual Function Network Driver"); 50 49 MODULE_IMPORT_NS(LIBETH); 51 50 MODULE_IMPORT_NS(LIBIE);
+126
drivers/net/ethernet/intel/ice/devlink/devlink.c
··· 1381 1381 return 0; 1382 1382 } 1383 1383 1384 + #define DEVLINK_LOCAL_FWD_DISABLED_STR "disabled" 1385 + #define DEVLINK_LOCAL_FWD_ENABLED_STR "enabled" 1386 + #define DEVLINK_LOCAL_FWD_PRIORITIZED_STR "prioritized" 1387 + 1388 + /** 1389 + * ice_devlink_local_fwd_mode_to_str - Get string for local_fwd mode. 1390 + * @mode: local forwarding for mode used in port_info struct. 1391 + * 1392 + * Return: Mode respective string or "Invalid". 1393 + */ 1394 + static const char * 1395 + ice_devlink_local_fwd_mode_to_str(enum ice_local_fwd_mode mode) 1396 + { 1397 + switch (mode) { 1398 + case ICE_LOCAL_FWD_MODE_ENABLED: 1399 + return DEVLINK_LOCAL_FWD_ENABLED_STR; 1400 + case ICE_LOCAL_FWD_MODE_PRIORITIZED: 1401 + return DEVLINK_LOCAL_FWD_PRIORITIZED_STR; 1402 + case ICE_LOCAL_FWD_MODE_DISABLED: 1403 + return DEVLINK_LOCAL_FWD_DISABLED_STR; 1404 + } 1405 + 1406 + return "Invalid"; 1407 + } 1408 + 1409 + /** 1410 + * ice_devlink_local_fwd_str_to_mode - Get local_fwd mode from string name. 1411 + * @mode_str: local forwarding mode string. 1412 + * 1413 + * Return: Mode value or negative number if invalid. 1414 + */ 1415 + static int ice_devlink_local_fwd_str_to_mode(const char *mode_str) 1416 + { 1417 + if (!strcmp(mode_str, DEVLINK_LOCAL_FWD_ENABLED_STR)) 1418 + return ICE_LOCAL_FWD_MODE_ENABLED; 1419 + else if (!strcmp(mode_str, DEVLINK_LOCAL_FWD_PRIORITIZED_STR)) 1420 + return ICE_LOCAL_FWD_MODE_PRIORITIZED; 1421 + else if (!strcmp(mode_str, DEVLINK_LOCAL_FWD_DISABLED_STR)) 1422 + return ICE_LOCAL_FWD_MODE_DISABLED; 1423 + 1424 + return -EINVAL; 1425 + } 1426 + 1427 + /** 1428 + * ice_devlink_local_fwd_get - Get local_fwd parameter. 1429 + * @devlink: Pointer to the devlink instance. 1430 + * @id: The parameter ID to set. 1431 + * @ctx: Context to store the parameter value. 1432 + * 1433 + * Return: Zero. 1434 + */ 1435 + static int ice_devlink_local_fwd_get(struct devlink *devlink, u32 id, 1436 + struct devlink_param_gset_ctx *ctx) 1437 + { 1438 + struct ice_pf *pf = devlink_priv(devlink); 1439 + struct ice_port_info *pi; 1440 + const char *mode_str; 1441 + 1442 + pi = pf->hw.port_info; 1443 + mode_str = ice_devlink_local_fwd_mode_to_str(pi->local_fwd_mode); 1444 + snprintf(ctx->val.vstr, sizeof(ctx->val.vstr), "%s", mode_str); 1445 + 1446 + return 0; 1447 + } 1448 + 1449 + /** 1450 + * ice_devlink_local_fwd_set - Set local_fwd parameter. 1451 + * @devlink: Pointer to the devlink instance. 1452 + * @id: The parameter ID to set. 1453 + * @ctx: Context to get the parameter value. 1454 + * @extack: Netlink extended ACK structure. 1455 + * 1456 + * Return: Zero. 1457 + */ 1458 + static int ice_devlink_local_fwd_set(struct devlink *devlink, u32 id, 1459 + struct devlink_param_gset_ctx *ctx, 1460 + struct netlink_ext_ack *extack) 1461 + { 1462 + int new_local_fwd_mode = ice_devlink_local_fwd_str_to_mode(ctx->val.vstr); 1463 + struct ice_pf *pf = devlink_priv(devlink); 1464 + struct device *dev = ice_pf_to_dev(pf); 1465 + struct ice_port_info *pi; 1466 + 1467 + pi = pf->hw.port_info; 1468 + if (pi->local_fwd_mode != new_local_fwd_mode) { 1469 + pi->local_fwd_mode = new_local_fwd_mode; 1470 + dev_info(dev, "Setting local_fwd to %s\n", ctx->val.vstr); 1471 + ice_schedule_reset(pf, ICE_RESET_CORER); 1472 + } 1473 + 1474 + return 0; 1475 + } 1476 + 1477 + /** 1478 + * ice_devlink_local_fwd_validate - Validate passed local_fwd parameter value. 1479 + * @devlink: Unused pointer to devlink instance. 1480 + * @id: The parameter ID to validate. 1481 + * @val: Value to validate. 1482 + * @extack: Netlink extended ACK structure. 1483 + * 1484 + * Supported values are: 1485 + * "enabled" - local_fwd is enabled, "disabled" - local_fwd is disabled 1486 + * "prioritized" - local_fwd traffic is prioritized in scheduling. 1487 + * 1488 + * Return: Zero when passed parameter value is supported. Negative value on 1489 + * error. 1490 + */ 1491 + static int ice_devlink_local_fwd_validate(struct devlink *devlink, u32 id, 1492 + union devlink_param_value val, 1493 + struct netlink_ext_ack *extack) 1494 + { 1495 + if (ice_devlink_local_fwd_str_to_mode(val.vstr) < 0) { 1496 + NL_SET_ERR_MSG_MOD(extack, "Error: Requested value is not supported."); 1497 + return -EINVAL; 1498 + } 1499 + 1500 + return 0; 1501 + } 1502 + 1384 1503 enum ice_param_id { 1385 1504 ICE_DEVLINK_PARAM_ID_BASE = DEVLINK_PARAM_GENERIC_ID_MAX, 1386 1505 ICE_DEVLINK_PARAM_ID_TX_SCHED_LAYERS, 1506 + ICE_DEVLINK_PARAM_ID_LOCAL_FWD, 1387 1507 }; 1388 1508 1389 1509 static const struct devlink_param ice_dvl_rdma_params[] = { ··· 1525 1405 ice_devlink_tx_sched_layers_get, 1526 1406 ice_devlink_tx_sched_layers_set, 1527 1407 ice_devlink_tx_sched_layers_validate), 1408 + DEVLINK_PARAM_DRIVER(ICE_DEVLINK_PARAM_ID_LOCAL_FWD, 1409 + "local_forwarding", DEVLINK_PARAM_TYPE_STRING, 1410 + BIT(DEVLINK_PARAM_CMODE_RUNTIME), 1411 + ice_devlink_local_fwd_get, 1412 + ice_devlink_local_fwd_set, 1413 + ice_devlink_local_fwd_validate), 1528 1414 }; 1529 1415 1530 1416 static void ice_devlink_free(void *devlink_ptr)
+10 -1
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
··· 232 232 #define ICE_AQC_GET_SW_CONF_RESP_IS_VF BIT(15) 233 233 }; 234 234 235 + /* Loopback port parameter mode values. */ 236 + enum ice_local_fwd_mode { 237 + ICE_LOCAL_FWD_MODE_ENABLED = 0, 238 + ICE_LOCAL_FWD_MODE_DISABLED = 1, 239 + ICE_LOCAL_FWD_MODE_PRIORITIZED = 2, 240 + }; 241 + 235 242 /* Set Port parameters, (direct, 0x0203) */ 236 243 struct ice_aqc_set_port_params { 237 244 __le16 cmd_flags; ··· 247 240 __le16 swid; 248 241 #define ICE_AQC_PORT_SWID_VALID BIT(15) 249 242 #define ICE_AQC_PORT_SWID_M 0xFF 250 - u8 reserved[10]; 243 + u8 local_fwd_mode; 244 + #define ICE_AQC_SET_P_PARAMS_LOCAL_FWD_MODE_VALID BIT(2) 245 + u8 reserved[9]; 251 246 }; 252 247 253 248 /* These resource type defines are used for all switch resource
+4
drivers/net/ethernet/intel/ice/ice_common.c
··· 1086 1086 goto err_unroll_cqinit; 1087 1087 } 1088 1088 1089 + hw->port_info->local_fwd_mode = ICE_LOCAL_FWD_MODE_ENABLED; 1089 1090 /* set the back pointer to HW */ 1090 1091 hw->port_info->hw = hw; 1091 1092 ··· 3071 3070 if (double_vlan) 3072 3071 cmd_flags |= ICE_AQC_SET_P_PARAMS_DOUBLE_VLAN_ENA; 3073 3072 cmd->cmd_flags = cpu_to_le16(cmd_flags); 3073 + 3074 + cmd->local_fwd_mode = pi->local_fwd_mode | 3075 + ICE_AQC_SET_P_PARAMS_LOCAL_FWD_MODE_VALID; 3074 3076 3075 3077 return ice_aq_send_cmd(hw, &desc, NULL, 0, cd); 3076 3078 }
-16
drivers/net/ethernet/intel/ice/ice_eswitch.c
··· 537 537 } 538 538 539 539 /** 540 - * ice_eswitch_rebuild - rebuild eswitch 541 - * @pf: pointer to PF structure 542 - */ 543 - void ice_eswitch_rebuild(struct ice_pf *pf) 544 - { 545 - struct ice_repr *repr; 546 - unsigned long id; 547 - 548 - if (!ice_is_switchdev_running(pf)) 549 - return; 550 - 551 - xa_for_each(&pf->eswitch.reprs, id, repr) 552 - ice_eswitch_detach(pf, repr->vf); 553 - } 554 - 555 - /** 556 540 * ice_eswitch_get_target - get netdev based on src_vsi from descriptor 557 541 * @rx_ring: ring used to receive the packet 558 542 * @rx_desc: descriptor used to get src_vsi value
-6
drivers/net/ethernet/intel/ice/ice_eswitch.h
··· 10 10 void ice_eswitch_detach(struct ice_pf *pf, struct ice_vf *vf); 11 11 int 12 12 ice_eswitch_attach(struct ice_pf *pf, struct ice_vf *vf); 13 - void ice_eswitch_rebuild(struct ice_pf *pf); 14 13 15 14 int ice_eswitch_mode_get(struct devlink *devlink, u16 *mode); 16 15 int ··· 51 52 static inline int ice_eswitch_configure(struct ice_pf *pf) 52 53 { 53 54 return 0; 54 - } 55 - 56 - static inline int ice_eswitch_rebuild(struct ice_pf *pf) 57 - { 58 - return -EOPNOTSUPP; 59 55 } 60 56 61 57 static inline int ice_eswitch_mode_get(struct devlink *devlink, u16 *mode)
-3
drivers/net/ethernet/intel/ice/ice_main.c
··· 35 35 #define ICE_DDP_PKG_PATH "intel/ice/ddp/" 36 36 #define ICE_DDP_PKG_FILE ICE_DDP_PKG_PATH "ice.pkg" 37 37 38 - MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); 39 38 MODULE_DESCRIPTION(DRV_SUMMARY); 40 39 MODULE_IMPORT_NS(LIBIE); 41 40 MODULE_LICENSE("GPL v2"); ··· 7701 7702 dev_err(dev, "PF VSI rebuild failed: %d\n", err); 7702 7703 goto err_vsi_rebuild; 7703 7704 } 7704 - 7705 - ice_eswitch_rebuild(pf); 7706 7705 7707 7706 if (reset_type == ICE_RESET_PFR) { 7708 7707 err = ice_rebuild_channels(pf);
+1
drivers/net/ethernet/intel/ice/ice_type.h
··· 738 738 u16 sw_id; /* Initial switch ID belongs to port */ 739 739 u16 pf_vf_num; 740 740 u8 port_state; 741 + u8 local_fwd_mode; 741 742 #define ICE_SCHED_PORT_STATE_INIT 0x0 742 743 #define ICE_SCHED_PORT_STATE_READY 0x1 743 744 u8 lport;
-1
drivers/net/ethernet/intel/igb/igb_main.c
··· 203 203 204 204 static void igb_init_dmac(struct igb_adapter *adapter, u32 pba); 205 205 206 - MODULE_AUTHOR("Intel Corporation, <e1000-devel@lists.sourceforge.net>"); 207 206 MODULE_DESCRIPTION("Intel(R) Gigabit Ethernet Network Driver"); 208 207 MODULE_LICENSE("GPL v2"); 209 208
-1
drivers/net/ethernet/intel/igbvf/netdev.c
··· 3001 3001 } 3002 3002 module_exit(igbvf_exit_module); 3003 3003 3004 - MODULE_AUTHOR("Intel Corporation, <e1000-devel@lists.sourceforge.net>"); 3005 3004 MODULE_DESCRIPTION("Intel(R) Gigabit Virtual Function Network Driver"); 3006 3005 MODULE_LICENSE("GPL v2"); 3007 3006
-1
drivers/net/ethernet/intel/igc/igc.h
··· 202 202 struct net_device *netdev; 203 203 204 204 struct ethtool_keee eee; 205 - u16 eee_advert; 206 205 207 206 unsigned long state; 208 207 unsigned int flags;
-6
drivers/net/ethernet/intel/igc/igc_ethtool.c
··· 1636 1636 linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, 1637 1637 edata->supported); 1638 1638 1639 - if (hw->dev_spec._base.eee_enable) 1640 - mii_eee_cap1_mod_linkmode_t(edata->advertised, 1641 - adapter->eee_advert); 1642 - 1643 1639 eeer = rd32(IGC_EEER); 1644 1640 1645 1641 /* EEE status on negotiated link */ ··· 1695 1699 "Setting EEE options are not supported with EEE disabled\n"); 1696 1700 return -EINVAL; 1697 1701 } 1698 - 1699 - adapter->eee_advert = linkmode_to_mii_eee_cap1_t(edata->advertised); 1700 1702 1701 1703 if (hw->dev_spec._base.eee_enable != edata->eee_enabled) { 1702 1704 hw->dev_spec._base.eee_enable = edata->eee_enabled;
-4
drivers/net/ethernet/intel/igc/igc_main.c
··· 32 32 33 33 static int debug = -1; 34 34 35 - MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); 36 35 MODULE_DESCRIPTION(DRV_SUMMARY); 37 36 MODULE_LICENSE("GPL v2"); 38 37 module_param(debug, int, 0); ··· 4975 4976 /* start the watchdog. */ 4976 4977 hw->mac.get_link_status = true; 4977 4978 schedule_work(&adapter->watchdog_task); 4978 - 4979 - adapter->eee_advert = MDIO_EEE_100TX | MDIO_EEE_1000T | 4980 - MDIO_EEE_2_5GT; 4981 4979 } 4982 4980 4983 4981 /**
-1
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
··· 162 162 module_param(debug, int, 0); 163 163 MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); 164 164 165 - MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); 166 165 MODULE_DESCRIPTION("Intel(R) 10 Gigabit PCI Express Network Driver"); 167 166 MODULE_LICENSE("GPL v2"); 168 167
-1
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
··· 76 76 }; 77 77 MODULE_DEVICE_TABLE(pci, ixgbevf_pci_tbl); 78 78 79 - MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); 80 79 MODULE_DESCRIPTION("Intel(R) 10 Gigabit Virtual Function Network Driver"); 81 80 MODULE_LICENSE("GPL v2"); 82 81
-1
drivers/net/ethernet/intel/libeth/rx.c
··· 255 255 256 256 /* Module */ 257 257 258 - MODULE_AUTHOR("Intel Corporation"); 259 258 MODULE_DESCRIPTION("Common Ethernet library"); 260 259 MODULE_LICENSE("GPL");
-1
drivers/net/ethernet/intel/libie/rx.c
··· 118 118 }; 119 119 EXPORT_SYMBOL_NS_GPL(libie_rx_pt_lut, LIBIE); 120 120 121 - MODULE_AUTHOR("Intel Corporation"); 122 121 MODULE_DESCRIPTION("Intel(R) Ethernet common library"); 123 122 MODULE_IMPORT_NS(LIBETH); 124 123 MODULE_LICENSE("GPL");