Lines Matching +full:1000 +full:base +full:- +full:x +full:- +full:to +full:- +full:1000 +full:base +full:- +full:t

1 // SPDX-License-Identifier: GPL-2.0-only
17 [NETIF_F_SG_BIT] = "tx-scatter-gather",
18 [NETIF_F_IP_CSUM_BIT] = "tx-checksum-ipv4",
19 [NETIF_F_HW_CSUM_BIT] = "tx-checksum-ip-generic",
20 [NETIF_F_IPV6_CSUM_BIT] = "tx-checksum-ipv6",
22 [NETIF_F_FRAGLIST_BIT] = "tx-scatter-gather-fraglist",
23 [NETIF_F_HW_VLAN_CTAG_TX_BIT] = "tx-vlan-hw-insert",
25 [NETIF_F_HW_VLAN_CTAG_RX_BIT] = "rx-vlan-hw-parse",
26 [NETIF_F_HW_VLAN_CTAG_FILTER_BIT] = "rx-vlan-filter",
27 [NETIF_F_HW_VLAN_STAG_TX_BIT] = "tx-vlan-stag-hw-insert",
28 [NETIF_F_HW_VLAN_STAG_RX_BIT] = "rx-vlan-stag-hw-parse",
29 [NETIF_F_HW_VLAN_STAG_FILTER_BIT] = "rx-vlan-stag-filter",
30 [NETIF_F_VLAN_CHALLENGED_BIT] = "vlan-challenged",
31 [NETIF_F_GSO_BIT] = "tx-generic-segmentation",
32 [NETIF_F_GRO_BIT] = "rx-gro",
33 [NETIF_F_GRO_HW_BIT] = "rx-gro-hw",
34 [NETIF_F_LRO_BIT] = "rx-lro",
36 [NETIF_F_TSO_BIT] = "tx-tcp-segmentation",
37 [NETIF_F_GSO_ROBUST_BIT] = "tx-gso-robust",
38 [NETIF_F_TSO_ECN_BIT] = "tx-tcp-ecn-segmentation",
39 [NETIF_F_GSO_ACCECN_BIT] = "tx-tcp-accecn-segmentation",
40 [NETIF_F_TSO_MANGLEID_BIT] = "tx-tcp-mangleid-segmentation",
41 [NETIF_F_TSO6_BIT] = "tx-tcp6-segmentation",
42 [NETIF_F_FSO_BIT] = "tx-fcoe-segmentation",
43 [NETIF_F_GSO_GRE_BIT] = "tx-gre-segmentation",
44 [NETIF_F_GSO_GRE_CSUM_BIT] = "tx-gre-csum-segmentation",
45 [NETIF_F_GSO_IPXIP4_BIT] = "tx-ipxip4-segmentation",
46 [NETIF_F_GSO_IPXIP6_BIT] = "tx-ipxip6-segmentation",
47 [NETIF_F_GSO_UDP_TUNNEL_BIT] = "tx-udp_tnl-segmentation",
48 [NETIF_F_GSO_UDP_TUNNEL_CSUM_BIT] = "tx-udp_tnl-csum-segmentation",
49 [NETIF_F_GSO_PARTIAL_BIT] = "tx-gso-partial",
50 [NETIF_F_GSO_TUNNEL_REMCSUM_BIT] = "tx-tunnel-remcsum-segmentation",
51 [NETIF_F_GSO_SCTP_BIT] = "tx-sctp-segmentation",
52 [NETIF_F_GSO_ESP_BIT] = "tx-esp-segmentation",
53 [NETIF_F_GSO_UDP_L4_BIT] = "tx-udp-segmentation",
54 [NETIF_F_GSO_FRAGLIST_BIT] = "tx-gso-list",
56 [NETIF_F_FCOE_CRC_BIT] = "tx-checksum-fcoe-crc",
57 [NETIF_F_SCTP_CRC_BIT] = "tx-checksum-sctp",
58 [NETIF_F_NTUPLE_BIT] = "rx-ntuple-filter",
59 [NETIF_F_RXHASH_BIT] = "rx-hashing",
60 [NETIF_F_RXCSUM_BIT] = "rx-checksum",
61 [NETIF_F_NOCACHE_COPY_BIT] = "tx-nocache-copy",
63 [NETIF_F_RXFCS_BIT] = "rx-fcs",
64 [NETIF_F_RXALL_BIT] = "rx-all",
65 [NETIF_F_HW_L2FW_DOFFLOAD_BIT] = "l2-fwd-offload",
66 [NETIF_F_HW_TC_BIT] = "hw-tc-offload",
67 [NETIF_F_HW_ESP_BIT] = "esp-hw-offload",
68 [NETIF_F_HW_ESP_TX_CSUM_BIT] = "esp-tx-csum-hw-offload",
69 [NETIF_F_RX_UDP_TUNNEL_PORT_BIT] = "rx-udp_tunnel-port-offload",
70 [NETIF_F_HW_TLS_RECORD_BIT] = "tls-hw-record",
71 [NETIF_F_HW_TLS_TX_BIT] = "tls-hw-tx-offload",
72 [NETIF_F_HW_TLS_RX_BIT] = "tls-hw-rx-offload",
73 [NETIF_F_GRO_FRAGLIST_BIT] = "rx-gro-list",
74 [NETIF_F_HW_MACSEC_BIT] = "macsec-hw-offload",
75 [NETIF_F_GRO_UDP_FWD_BIT] = "rx-udp-gro-forwarding",
76 [NETIF_F_HW_HSR_TAG_INS_BIT] = "hsr-tag-ins-offload",
77 [NETIF_F_HW_HSR_TAG_RM_BIT] = "hsr-tag-rm-offload",
78 [NETIF_F_HW_HSR_FWD_BIT] = "hsr-fwd-offload",
79 [NETIF_F_HW_HSR_DUP_BIT] = "hsr-dup-offload",
92 [ETHTOOL_RX_COPYBREAK] = "rx-copybreak",
93 [ETHTOOL_TX_COPYBREAK] = "tx-copybreak",
94 [ETHTOOL_PFC_PREVENTION_TOUT] = "pfc-prevention-tout",
95 [ETHTOOL_TX_COPYBREAK_BUF_SIZE] = "tx-copybreak-buf-size",
101 [ETHTOOL_PHY_DOWNSHIFT] = "phy-downshift",
102 [ETHTOOL_PHY_FAST_LINK_DOWN] = "phy-fast-link-down",
103 [ETHTOOL_PHY_EDPD] = "phy-energy-detect-power-down",
107 #speed "base" #type "/" #duplex
115 __DEFINE_LINK_MODE_NAME(10, T, Half),
116 __DEFINE_LINK_MODE_NAME(10, T, Full),
117 __DEFINE_LINK_MODE_NAME(100, T, Half),
118 __DEFINE_LINK_MODE_NAME(100, T, Full),
119 __DEFINE_LINK_MODE_NAME(1000, T, Half),
120 __DEFINE_LINK_MODE_NAME(1000, T, Full),
127 __DEFINE_LINK_MODE_NAME(10000, T, Full),
130 __DEFINE_LINK_MODE_NAME(2500, X, Full),
132 __DEFINE_LINK_MODE_NAME(1000, KX, Full),
156 __DEFINE_LINK_MODE_NAME(1000, X, Full),
162 __DEFINE_LINK_MODE_NAME(2500, T, Full),
163 __DEFINE_LINK_MODE_NAME(5000, T, Full),
183 __DEFINE_LINK_MODE_NAME(1000, T1, Full),
300 __DEFINE_LINK_MODE_PARAMS(10, T, Half),
301 __DEFINE_LINK_MODE_PARAMS(10, T, Full),
302 __DEFINE_LINK_MODE_PARAMS(100, T, Half),
303 __DEFINE_LINK_MODE_PARAMS(100, T, Full),
304 __DEFINE_LINK_MODE_PARAMS(1000, T, Half),
305 __DEFINE_LINK_MODE_PARAMS(1000, T, Full),
312 __DEFINE_LINK_MODE_PARAMS(10000, T, Full),
315 __DEFINE_LINK_MODE_PARAMS(2500, X, Full),
317 __DEFINE_LINK_MODE_PARAMS(1000, KX, Full),
345 __DEFINE_LINK_MODE_PARAMS(1000, X, Full),
351 __DEFINE_LINK_MODE_PARAMS(2500, T, Full),
352 __DEFINE_LINK_MODE_PARAMS(5000, T, Full),
372 __DEFINE_LINK_MODE_PARAMS(1000, T1, Full),
461 [const_ilog2(SOF_TIMESTAMPING_TX_HARDWARE)] = "hardware-transmit",
462 [const_ilog2(SOF_TIMESTAMPING_TX_SOFTWARE)] = "software-transmit",
463 [const_ilog2(SOF_TIMESTAMPING_RX_HARDWARE)] = "hardware-receive",
464 [const_ilog2(SOF_TIMESTAMPING_RX_SOFTWARE)] = "software-receive",
465 [const_ilog2(SOF_TIMESTAMPING_SOFTWARE)] = "software-system-clock",
466 [const_ilog2(SOF_TIMESTAMPING_SYS_HARDWARE)] = "hardware-legacy-clock",
467 [const_ilog2(SOF_TIMESTAMPING_RAW_HARDWARE)] = "hardware-raw-clock",
468 [const_ilog2(SOF_TIMESTAMPING_OPT_ID)] = "option-id",
469 [const_ilog2(SOF_TIMESTAMPING_TX_SCHED)] = "sched-transmit",
470 [const_ilog2(SOF_TIMESTAMPING_TX_ACK)] = "ack-transmit",
471 [const_ilog2(SOF_TIMESTAMPING_OPT_CMSG)] = "option-cmsg",
472 [const_ilog2(SOF_TIMESTAMPING_OPT_TSONLY)] = "option-tsonly",
473 [const_ilog2(SOF_TIMESTAMPING_OPT_STATS)] = "option-stats",
474 [const_ilog2(SOF_TIMESTAMPING_OPT_PKTINFO)] = "option-pktinfo",
475 [const_ilog2(SOF_TIMESTAMPING_OPT_TX_SWHW)] = "option-tx-swhw",
476 [const_ilog2(SOF_TIMESTAMPING_BIND_PHC)] = "bind-phc",
477 [const_ilog2(SOF_TIMESTAMPING_OPT_ID_TCP)] = "option-id-tcp",
478 [const_ilog2(SOF_TIMESTAMPING_OPT_RX_FILTER)] = "option-rx-filter",
479 [const_ilog2(SOF_TIMESTAMPING_TX_COMPLETION)] = "tx-completion",
486 [HWTSTAMP_TX_ONESTEP_SYNC] = "onestep-sync",
487 [HWTSTAMP_TX_ONESTEP_P2P] = "onestep-p2p",
495 [HWTSTAMP_FILTER_PTP_V1_L4_EVENT] = "ptpv1-l4-event",
496 [HWTSTAMP_FILTER_PTP_V1_L4_SYNC] = "ptpv1-l4-sync",
497 [HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ] = "ptpv1-l4-delay-req",
498 [HWTSTAMP_FILTER_PTP_V2_L4_EVENT] = "ptpv2-l4-event",
499 [HWTSTAMP_FILTER_PTP_V2_L4_SYNC] = "ptpv2-l4-sync",
500 [HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ] = "ptpv2-l4-delay-req",
501 [HWTSTAMP_FILTER_PTP_V2_L2_EVENT] = "ptpv2-l2-event",
502 [HWTSTAMP_FILTER_PTP_V2_L2_SYNC] = "ptpv2-l2-sync",
503 [HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ] = "ptpv2-l2-delay-req",
504 [HWTSTAMP_FILTER_PTP_V2_EVENT] = "ptpv2-event",
505 [HWTSTAMP_FILTER_PTP_V2_SYNC] = "ptpv2-sync",
506 [HWTSTAMP_FILTER_PTP_V2_DELAY_REQ] = "ptpv2-delay-req",
507 [HWTSTAMP_FILTER_NTP_ALL] = "ntp-all",
512 [const_ilog2(HWTSTAMP_FLAG_BONDED_PHC_INDEX)] = "bonded-phc-index",
519 [ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE] = "vxlan-gpe",
524 /* return false if legacy contained non-0 deprecated fields
536 /* This is used to tell users that driver is still using these in convert_legacy_settings_to_link_ksettings()
540 if (legacy_settings->maxtxpkt || in convert_legacy_settings_to_link_ksettings()
541 legacy_settings->maxrxpkt) in convert_legacy_settings_to_link_ksettings()
545 link_ksettings->link_modes.supported, in convert_legacy_settings_to_link_ksettings()
546 legacy_settings->supported); in convert_legacy_settings_to_link_ksettings()
548 link_ksettings->link_modes.advertising, in convert_legacy_settings_to_link_ksettings()
549 legacy_settings->advertising); in convert_legacy_settings_to_link_ksettings()
551 link_ksettings->link_modes.lp_advertising, in convert_legacy_settings_to_link_ksettings()
552 legacy_settings->lp_advertising); in convert_legacy_settings_to_link_ksettings()
553 link_ksettings->base.speed in convert_legacy_settings_to_link_ksettings()
555 link_ksettings->base.duplex in convert_legacy_settings_to_link_ksettings()
556 = legacy_settings->duplex; in convert_legacy_settings_to_link_ksettings()
557 link_ksettings->base.port in convert_legacy_settings_to_link_ksettings()
558 = legacy_settings->port; in convert_legacy_settings_to_link_ksettings()
559 link_ksettings->base.phy_address in convert_legacy_settings_to_link_ksettings()
560 = legacy_settings->phy_address; in convert_legacy_settings_to_link_ksettings()
561 link_ksettings->base.autoneg in convert_legacy_settings_to_link_ksettings()
562 = legacy_settings->autoneg; in convert_legacy_settings_to_link_ksettings()
563 link_ksettings->base.mdio_support in convert_legacy_settings_to_link_ksettings()
564 = legacy_settings->mdio_support; in convert_legacy_settings_to_link_ksettings()
565 link_ksettings->base.eth_tp_mdix in convert_legacy_settings_to_link_ksettings()
566 = legacy_settings->eth_tp_mdix; in convert_legacy_settings_to_link_ksettings()
567 link_ksettings->base.eth_tp_mdix_ctrl in convert_legacy_settings_to_link_ksettings()
568 = legacy_settings->eth_tp_mdix_ctrl; in convert_legacy_settings_to_link_ksettings()
574 if (!dev->ethtool_ops->get_link) in __ethtool_get_link()
575 return -EOPNOTSUPP; in __ethtool_get_link()
577 return netif_running(dev) && dev->ethtool_ops->get_link(dev); in __ethtool_get_link()
582 const struct ethtool_ops *ops = dev->ethtool_ops; in ethtool_get_rxnfc_rule_count()
588 err = ops->get_rxnfc(dev, &info, NULL); in ethtool_get_rxnfc_rule_count()
604 for (i = 0; i < ctx->indir_size; i++) in ethtool_get_rss_ctx_max_channel()
611 const struct ethtool_ops *ops = dev->ethtool_ops; in ethtool_get_max_rxnfc_channel()
616 if (!ops->get_rxnfc) in ethtool_get_max_rxnfc_channel()
617 return -EOPNOTSUPP; in ethtool_get_max_rxnfc_channel()
621 return -EINVAL; in ethtool_get_max_rxnfc_channel()
625 return -ENOMEM; in ethtool_get_max_rxnfc_channel()
627 info->cmd = ETHTOOL_GRXCLSRLALL; in ethtool_get_max_rxnfc_channel()
628 info->rule_cnt = rule_cnt; in ethtool_get_max_rxnfc_channel()
629 err = ops->get_rxnfc(dev, info, info->rule_locs); in ethtool_get_max_rxnfc_channel()
636 .fs.location = info->rule_locs[i], in ethtool_get_max_rxnfc_channel()
639 err = ops->get_rxnfc(dev, &rule_info, NULL); in ethtool_get_max_rxnfc_channel()
651 ctx = xa_load(&dev->ethtool->rss_ctx, in ethtool_get_max_rxnfc_channel()
675 mutex_lock(&dev->ethtool->rss_lock); in ethtool_get_max_rss_ctx_channel()
676 xa_for_each(&dev->ethtool->rss_ctx, context, ctx) in ethtool_get_max_rss_ctx_channel()
678 mutex_unlock(&dev->ethtool->rss_lock); in ethtool_get_max_rss_ctx_channel()
691 * Assume drivers won't auto-regenerate the additional tables, in ethtool_get_max_rxfh_channel()
692 * to be safe. in ethtool_get_max_rxfh_channel()
699 if (!dev->ethtool_ops->get_rxfh_indir_size || in ethtool_get_max_rxfh_channel()
700 !dev->ethtool_ops->get_rxfh) in ethtool_get_max_rxfh_channel()
702 dev_size = dev->ethtool_ops->get_rxfh_indir_size(dev); in ethtool_get_max_rxfh_channel()
710 ret = dev->ethtool_ops->get_rxfh(dev, &rxfh); in ethtool_get_max_rxfh_channel()
716 while (dev_size--) in ethtool_get_max_rxfh_channel()
741 return -EINVAL; in ethtool_check_max_channel()
746 return -EINVAL; in ethtool_check_max_channel()
753 return -EINVAL; in ethtool_check_max_channel()
761 const struct ethtool_ops *ops = dev->ethtool_ops; in ethtool_check_rss_ctx_busy()
765 if (!ops->get_rxnfc) in ethtool_check_rss_ctx_busy()
773 return -EINVAL; in ethtool_check_rss_ctx_busy()
777 return -ENOMEM; in ethtool_check_rss_ctx_busy()
779 info->cmd = ETHTOOL_GRXCLSRLALL; in ethtool_check_rss_ctx_busy()
780 info->rule_cnt = rule_cnt; in ethtool_check_rss_ctx_busy()
781 rc = ops->get_rxnfc(dev, info, info->rule_locs); in ethtool_check_rss_ctx_busy()
788 .fs.location = info->rule_locs[i], in ethtool_check_rss_ctx_busy()
791 rc = ops->get_rxnfc(dev, &rule_info, NULL); in ethtool_check_rss_ctx_busy()
797 rc = -EBUSY; in ethtool_check_rss_ctx_busy()
809 if (WARN_ON(ops->set_coalesce && !ops->supported_coalesce_params)) in ethtool_check_ops()
810 return -EINVAL; in ethtool_check_ops()
811 if (WARN_ON(ops->rxfh_max_num_contexts == 1)) in ethtool_check_ops()
812 return -EINVAL; in ethtool_check_ops()
815 * mean the ops attached to a netdev later on are sane. in ethtool_check_ops()
828 param->cmd = ETHTOOL_GRINGPARAM; in ethtool_ringparam_get_cfg()
829 dev->ethtool_ops->get_ringparam(dev, param, kparam, extack); in ethtool_ringparam_get_cfg()
831 /* Driver gives us current state, we want to return current config */ in ethtool_ringparam_get_cfg()
832 kparam->tcp_data_split = dev->cfg->hds_config; in ethtool_ringparam_get_cfg()
833 kparam->hds_thresh = dev->cfg->hds_thresh; in ethtool_ringparam_get_cfg()
839 info->cmd = ETHTOOL_GET_TS_INFO; in ethtool_init_tsinfo()
840 info->phc_index = -1; in ethtool_init_tsinfo()
847 const struct ethtool_ops *ops = dev->ethtool_ops; in ethtool_net_get_ts_info_by_phc()
850 if (!ops->get_ts_info) in ethtool_net_get_ts_info_by_phc()
851 return -ENODEV; in ethtool_net_get_ts_info_by_phc()
855 info->phc_qualifier = hwprov_desc->qualifier; in ethtool_net_get_ts_info_by_phc()
856 err = ops->get_ts_info(dev, info); in ethtool_net_get_ts_info_by_phc()
860 if (info->phc_index == hwprov_desc->index && in ethtool_net_get_ts_info_by_phc()
861 net_support_hwtstamp_qualifier(dev, hwprov_desc->qualifier)) in ethtool_net_get_ts_info_by_phc()
864 return -ENODEV; in ethtool_net_get_ts_info_by_phc()
875 if (hwprov_desc->qualifier != HWTSTAMP_PROVIDER_QUALIFIER_PRECISE) in ethtool_phy_get_ts_info_by_phc()
876 return ERR_PTR(-ENODEV); in ethtool_phy_get_ts_info_by_phc()
879 if (dev->link_topo) { in ethtool_phy_get_ts_info_by_phc()
883 xa_for_each(&dev->link_topo->phys, phy_index, pdn) { in ethtool_phy_get_ts_info_by_phc()
884 if (!phy_has_tsinfo(pdn->phy)) in ethtool_phy_get_ts_info_by_phc()
888 err = phy_ts_info(pdn->phy, info); in ethtool_phy_get_ts_info_by_phc()
892 if (info->phc_index == hwprov_desc->index) in ethtool_phy_get_ts_info_by_phc()
893 return pdn->phy; in ethtool_phy_get_ts_info_by_phc()
895 return ERR_PTR(-ENODEV); in ethtool_phy_get_ts_info_by_phc()
898 /* Look on the dev->phydev */ in ethtool_phy_get_ts_info_by_phc()
899 if (phy_has_tsinfo(dev->phydev)) { in ethtool_phy_get_ts_info_by_phc()
901 err = phy_ts_info(dev->phydev, info); in ethtool_phy_get_ts_info_by_phc()
905 if (info->phc_index == hwprov_desc->index) in ethtool_phy_get_ts_info_by_phc()
906 return dev->phydev; in ethtool_phy_get_ts_info_by_phc()
909 return ERR_PTR(-ENODEV); in ethtool_phy_get_ts_info_by_phc()
919 if (err == -ENODEV) { in ethtool_get_ts_info_by_phc()
929 info->so_timestamping |= SOF_TIMESTAMPING_RX_SOFTWARE | in ethtool_get_ts_info_by_phc()
942 hwprov = rcu_dereference(dev->hwprov); in __ethtool_get_ts_info()
945 const struct ethtool_ops *ops = dev->ethtool_ops; in __ethtool_get_ts_info()
946 struct phy_device *phydev = dev->phydev; in __ethtool_get_ts_info()
952 else if (ops->get_ts_info) in __ethtool_get_ts_info()
953 err = ops->get_ts_info(dev, info); in __ethtool_get_ts_info()
955 info->so_timestamping |= SOF_TIMESTAMPING_RX_SOFTWARE | in __ethtool_get_ts_info()
962 err = ethtool_get_ts_info_by_phc(dev, info, &hwprov->desc); in __ethtool_get_ts_info()
970 const struct ethtool_ops *ops = dev->ethtool_ops; in net_support_hwtstamp_qualifier()
976 * qualifier description to not break the old behavior. in net_support_hwtstamp_qualifier()
978 if (!ops->supported_hwtstamp_qualifiers && in net_support_hwtstamp_qualifier()
982 if (ops->supported_hwtstamp_qualifiers & BIT(qualifier)) in net_support_hwtstamp_qualifier()
1025 link_ksettings->base.speed = link_info->speed; in ethtool_params_from_link_mode()
1026 link_ksettings->lanes = link_info->lanes; in ethtool_params_from_link_mode()
1027 link_ksettings->base.duplex = link_info->duplex; in ethtool_params_from_link_mode()
1033 * @maps: Pointer to an array of Ethtool forced speed map
1036 * Initialize an array of Ethtool forced speed map to Ethtool link modes. This
1045 linkmode_set_bit_array(map->cap_arr, map->arr_size, map->caps); in ethtool_forced_speed_maps_init()
1046 map->cap_arr = NULL; in ethtool_forced_speed_maps_init()
1047 map->arr_size = 0; in ethtool_forced_speed_maps_init()
1057 !lockdep_is_held_type(&dev->ethtool->rss_lock, -1), in ethtool_rxfh_context_lost()
1061 ctx = xa_erase(&dev->ethtool->rss_ctx, context_id); in ethtool_rxfh_context_lost()