ethtool: add support to set/get tx copybreak buf size and rx buf len
Subsystems (74)
v7 cover ethtool: add support to set/get tx copybreak buf size and rx buf len
From: Hao Chen <[email protected]>
This series add support to set/get tx copybreak buf size and rx buf len via ethtool and hns3 driver implements them.
Tx copybreak buf size is used for tx copybreak feature which for small size packet or frag. Use ethtool --get-tunable command to get it, and ethtool --set-tunable command to set it, examples are as follow:
1. set tx spare buf size to 102400:
$ ethtool --set-tunable eth1 tx-buf-size 102400
2. get tx spare buf size:
$ ethtool --get-tunable eth1 tx-buf-size tx-buf-size: 102400
Rx buf len is buffer length of each rx BD. Use ethtool -g command to get it, and ethtool -G command to set it, examples are as follow:
1. set rx buf len to 4096
$ ethtool -G eth1 rx-buf-len 4096
2. get rx buf len
$ ethtool -g eth1 ... RX Buf Len: 4096
Change log:
V6 -> V7
1.Fix compile error for drivers/net/ethernet/toshiba/spider_net_ethtool.c.
V5 -> V6
1.Fix compile error for divers/s390.
V4 -> V5
1.Change struct ethtool_ringparam_ext to kernel_ethtool_ringparam. 2.change "__u32 rx_buf_len" to "u32 rx_buf_len".
V3 -> V4
1.Fix a few allmodconfig compile warning.
2.Add more '=' synbol to ethtool-netlink.rst to refine format. 3.Move definement of struct ethtool_ringparam_ext to include/linux/ethtool.h. 4.Move related modify of rings_fill_reply() from patch 4/6 to patch 3/6.
V2 -> V3
1.Remove documentation for tx copybreak buf size, there is description for it in userspace ethtool. 2.Move extending parameters for get/set_ringparam function from patch3/6 to patch 4/6.
V1 -> V2
1.Add documentation for rx buf len and tx copybreak buf size. 2.Extend structure ringparam_ext for extenal ring params. 3.Change type of ETHTOOL_A_RINGS_RX_BUF_LEN from NLA_U32 to
NLA_POLICY_MIN(NLA_U32, 1).
4.Add supported_ring_params in ethtool_ops to indicate if support external
params.
Hao Chen (6):
ethtool: add support to set/get tx copybreak buf size via ethtool
net: hns3: add support to set/get tx copybreak buf size via ethtool
for hns3 driver
ethtool: add support to set/get rx buf len via ethtool
ethtool: extend ringparam setting/getting API with rx_buf_len
net: hns3: add support to set/get rx buf len via ethtool for hns3
driver
net: hns3: remove the way to set tx spare buf via module parameter
Documentation/networking/ethtool-netlink.rst | 10 +- arch/um/drivers/vector_kern.c | 4 +- drivers/net/can/c_can/c_can_ethtool.c | 4 +- drivers/net/ethernet/3com/typhoon.c | 4 +- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 8 +- drivers/net/ethernet/amd/pcnet32.c | 8 +- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 11 +- .../ethernet/aquantia/atlantic/aq_ethtool.c | 8 +- drivers/net/ethernet/atheros/atlx/atl1.c | 8 +- drivers/net/ethernet/broadcom/b44.c | 8 +- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 25 ++-- drivers/net/ethernet/broadcom/bnx2.c | 8 +- .../ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 8 +- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 8 +- drivers/net/ethernet/broadcom/tg3.c | 10 +- .../net/ethernet/brocade/bna/bnad_ethtool.c | 8 +- drivers/net/ethernet/cadence/macb_main.c | 8 +- .../ethernet/cavium/liquidio/lio_ethtool.c | 11 +- .../ethernet/cavium/thunder/nicvf_ethtool.c | 8 +- drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 8 +- .../net/ethernet/chelsio/cxgb3/cxgb3_main.c | 8 +- .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 8 +- .../ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 8 +- .../net/ethernet/cisco/enic/enic_ethtool.c | 8 +- drivers/net/ethernet/cortina/gemini.c | 8 +- .../net/ethernet/emulex/benet/be_ethtool.c | 4 +- drivers/net/ethernet/ethoc.c | 8 +- drivers/net/ethernet/faraday/ftgmac100.c | 14 ++- .../ethernet/freescale/enetc/enetc_ethtool.c | 4 +- .../net/ethernet/freescale/gianfar_ethtool.c | 8 +- .../net/ethernet/freescale/ucc_geth_ethtool.c | 8 +- drivers/net/ethernet/google/gve/gve_ethtool.c | 4 +- .../net/ethernet/hisilicon/hns/hns_ethtool.c | 6 +- .../net/ethernet/hisilicon/hns3/hns3_enet.c | 11 +- .../net/ethernet/hisilicon/hns3/hns3_enet.h | 2 + .../ethernet/hisilicon/hns3/hns3_ethtool.c | 116 ++++++++++++++++-- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 8 +- drivers/net/ethernet/ibm/emac/core.c | 7 +- drivers/net/ethernet/ibm/ibmvnic.c | 8 +- drivers/net/ethernet/intel/e100.c | 8 +- .../net/ethernet/intel/e1000/e1000_ethtool.c | 8 +- drivers/net/ethernet/intel/e1000e/ethtool.c | 8 +- .../net/ethernet/intel/fm10k/fm10k_ethtool.c | 8 +- .../net/ethernet/intel/i40e/i40e_ethtool.c | 8 +- .../net/ethernet/intel/iavf/iavf_ethtool.c | 12 +- drivers/net/ethernet/intel/ice/ice_ethtool.c | 8 +- drivers/net/ethernet/intel/igb/igb_ethtool.c | 8 +- drivers/net/ethernet/intel/igbvf/ethtool.c | 8 +- drivers/net/ethernet/intel/igc/igc_ethtool.c | 14 ++- .../net/ethernet/intel/ixgb/ixgb_ethtool.c | 8 +- .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 8 +- drivers/net/ethernet/intel/ixgbevf/ethtool.c | 8 +- drivers/net/ethernet/marvell/mv643xx_eth.c | 8 +- drivers/net/ethernet/marvell/mvneta.c | 14 ++- .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 14 ++- .../marvell/octeontx2/nic/otx2_ethtool.c | 8 +- drivers/net/ethernet/marvell/skge.c | 8 +- drivers/net/ethernet/marvell/sky2.c | 8 +- .../net/ethernet/mellanox/mlx4/en_ethtool.c | 8 +- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 8 +- .../net/ethernet/mellanox/mlx5/core/en_rep.c | 14 ++- .../mellanox/mlx5/core/ipoib/ethtool.c | 8 +- .../mellanox/mlxbf_gige/mlxbf_gige_ethtool.c | 7 +- drivers/net/ethernet/micrel/ksz884x.c | 6 +- .../net/ethernet/myricom/myri10ge/myri10ge.c | 4 +- drivers/net/ethernet/neterion/s2io.c | 7 +- .../ethernet/netronome/nfp/nfp_net_ethtool.c | 8 +- drivers/net/ethernet/nvidia/forcedeth.c | 10 +- .../oki-semi/pch_gbe/pch_gbe_ethtool.c | 12 +- .../net/ethernet/pasemi/pasemi_mac_ethtool.c | 4 +- .../ethernet/pensando/ionic/ionic_ethtool.c | 8 +- .../qlogic/netxen/netxen_nic_ethtool.c | 8 +- .../net/ethernet/qlogic/qede/qede_ethtool.c | 8 +- .../ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 8 +- .../net/ethernet/qualcomm/emac/emac-ethtool.c | 8 +- drivers/net/ethernet/qualcomm/qca_debug.c | 8 +- drivers/net/ethernet/realtek/8139cp.c | 4 +- drivers/net/ethernet/realtek/r8169_main.c | 4 +- drivers/net/ethernet/renesas/ravb_main.c | 8 +- drivers/net/ethernet/renesas/sh_eth.c | 8 +- drivers/net/ethernet/sfc/ef100_ethtool.c | 7 +- drivers/net/ethernet/sfc/ethtool.c | 14 ++- drivers/net/ethernet/sfc/falcon/ethtool.c | 14 ++- .../ethernet/stmicro/stmmac/stmmac_ethtool.c | 8 +- drivers/net/ethernet/tehuti/tehuti.c | 12 +- drivers/net/ethernet/ti/am65-cpsw-ethtool.c | 7 +- drivers/net/ethernet/ti/cpmac.c | 8 +- drivers/net/ethernet/ti/cpsw_ethtool.c | 8 +- drivers/net/ethernet/ti/cpsw_priv.h | 8 +- .../net/ethernet/toshiba/spider_net_ethtool.c | 4 +- drivers/net/ethernet/xilinx/ll_temac_main.c | 14 ++- .../net/ethernet/xilinx/xilinx_axienet_main.c | 14 ++- drivers/net/hyperv/netvsc_drv.c | 8 +- drivers/net/netdevsim/ethtool.c | 8 +- drivers/net/usb/r8152.c | 8 +- drivers/net/virtio_net.c | 4 +- drivers/net/vmxnet3/vmxnet3_ethtool.c | 10 +- drivers/s390/net/qeth_ethtool.c | 4 +- include/linux/ethtool.h | 26 +++- include/uapi/linux/ethtool.h | 1 + include/uapi/linux/ethtool_netlink.h | 1 + net/ethtool/common.c | 1 + net/ethtool/ioctl.c | 11 +- net/ethtool/netlink.h | 2 +- net/ethtool/rings.c | 32 ++++- net/mac80211/ethtool.c | 8 +- 106 files changed, 772 insertions(+), 235 deletions(-)
Signature · 1 line
2.33.0
PATCH v7 1/6 ethtool: add support to set/get tx copybreak buf size via ethtool
From: Hao Chen <[email protected]>
Add support for ethtool to set/get tx copybreak buf size.
--- include/uapi/linux/ethtool.h | 1 + net/ethtool/common.c | 1 + net/ethtool/ioctl.c | 1 + 3 files changed, 3 insertions(+)
include/uapi/linux/ethtool.h +1 -0
@@ -231,6 +231,7 @@ enum tunable_id {ETHTOOL_RX_COPYBREAK ,ETHTOOL_TX_COPYBREAK ,ETHTOOL_PFC_PREVENTION_TOUT ,/* timeout in msecs */ +ETHTOOL_TX_COPYBREAK_BUF_SIZE ,/* * Add your fresh new tunable attribute above and remember to update * tunable_strings[] in net/ethtool/common.c
net/ethtool/common.c +1 -0
@@ -89,6 +89,7 @@ tunable_strings[__ETHTOOL_TUNABLE_COUNT][ETH_GSTRING_LEN] = { [ETHTOOL_RX_COPYBREAK] = "rx-copybreak", [ETHTOOL_TX_COPYBREAK] = "tx-copybreak", [ETHTOOL_PFC_PREVENTION_TOUT] = "pfc-prevention-tout", + [ETHTOOL_TX_COPYBREAK_BUF_SIZE] = "tx-copybreak-buf-size", }; const char
net/ethtool/ioctl.c +1 -0
@@ -2396,6 +2396,7 @@ static int ethtool_tunable_valid(const struct ethtool_tunable *tuna)switch (tuna->id) {case ETHTOOL_RX_COPYBREAK :case ETHTOOL_TX_COPYBREAK : +case ETHTOOL_TX_COPYBREAK_BUF_SIZE :if (tuna->len !=sizeof (u32) || tuna->type_id !=ETHTOOL_TUNABLE_U32 )return -EINVAL ;
Signature · 1 line
2.33.0
PATCH v7 2/6 net: hns3: add support to set/get tx copybreak buf size via ethtool for hns3 driver
In reply to Guangbin HuangFrom: Hao Chen <[email protected]>
Tx copybreak buf size is used for tx copybreak feature, the feature is used for small size packet or frag. It adds a queue based tx shared bounce buffer to memcpy the small packet when the len of xmitted skb is below tx_copybreak(value to distinguish small size and normal size), and reduce the overhead of dma map and unmap when IOMMU is on.
Support setting it via ethtool --set-tunable parameter and getting it via ethtool --get-tunable parameter.
--- .../net/ethernet/hisilicon/hns3/hns3_enet.c | 4 +- .../net/ethernet/hisilicon/hns3/hns3_enet.h | 2 + .../ethernet/hisilicon/hns3/hns3_ethtool.c | 56 +++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-)
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +2 -2
@@ -5531,8 +5531,8 @@ static int hns3_reset_notify_uninit_enet(struct hnae3_handle *handle)return 0 ; } -static int hns3_reset_notify (struct hnae3_handle *handle, -enum hnae3_reset_notify_type type) +int hns3_reset_notify (struct hnae3_handle *handle, +enum hnae3_reset_notify_type type) {int ret =0 ;
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h +2 -0
@@ -705,6 +705,8 @@ void hns3_set_vector_coalesce_tx_ql(struct hns3_enet_tqp_vector *tqp_vector, u32 ql_value);void hns3_request_update_promisc_mode (struct hnae3_handle *handle); +int hns3_reset_notify (struct hnae3_handle *handle, +enum hnae3_reset_notify_type type);#ifdef CONFIG_HNS3_DCB void hns3_dcbnl_setup (struct hnae3_handle *handle);
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +56 -0
85 lines not on this page · raw message
Signature · 1 line
2.33.0
PATCH v7 3/6 ethtool: add support to set/get rx buf len via ethtool
In reply to Guangbin HuangFrom: Hao Chen <[email protected]>
Add support to set rx buf len via ethtool -G parameter and get rx buf len via ethtool -g parameter.
--- Documentation/networking/ethtool-netlink.rst | 10 +++++---- include/linux/ethtool.h | 18 +++++++++++++++ include/uapi/linux/ethtool_netlink.h | 1 + net/ethtool/netlink.h | 2 +- net/ethtool/rings.c | 23 ++++++++++++++++++-- 5 files changed, 47 insertions(+), 7 deletions(-)
Documentation/networking/ethtool-netlink.rst +6 -4
@@ -849,7 +849,7 @@ Request contents: Kernel response contents: - ==================================== ====== ========================== + ==================================== ====== =========================== ``ETHTOOL_A_RINGS_HEADER`` nested reply header ``ETHTOOL_A_RINGS_RX_MAX`` u32 max size of RX ring ``ETHTOOL_A_RINGS_RX_MINI_MAX`` u32 max size of RX mini ring
@@ -859,7 +859,8 @@ Kernel response contents: ``ETHTOOL_A_RINGS_RX_MINI`` u32 size of RX mini ring ``ETHTOOL_A_RINGS_RX_JUMBO`` u32 size of RX jumbo ring ``ETHTOOL_A_RINGS_TX`` u32 size of TX ring - ==================================== ====== ========================== + ``ETHTOOL_A_RINGS_RX_BUF_LEN`` u32 size of buffers on the ring + ==================================== ====== =========================== RINGS_SET
@@ -869,13 +870,14 @@ Sets ring sizes like ``ETHTOOL_SRINGPARAM`` ioctl request. Request contents: - ==================================== ====== ========================== + ==================================== ====== =========================== ``ETHTOOL_A_RINGS_HEADER`` nested reply header ``ETHTOOL_A_RINGS_RX`` u32 size of RX ring ``ETHTOOL_A_RINGS_RX_MINI`` u32 size of RX mini ring ``ETHTOOL_A_RINGS_RX_JUMBO`` u32 size of RX jumbo ring ``ETHTOOL_A_RINGS_TX`` u32 size of TX ring - ==================================== ====== ========================== + ``ETHTOOL_A_RINGS_RX_BUF_LEN`` u32 size of buffers on the ring + ==================================== ====== =========================== Kernel checks that requested ring sizes do not exceed limits reported by driver. Driver may impose additional constraints and may not suspport all
include/linux/ethtool.h +18 -0
@@ -67,6 +67,22 @@ enum { ETH_RSS_HASH_FUNCS_COUNT }; +/** +* struct kernel_ethtool_ringparam - RX/TX ring configuration +* @rx_buf_len: Current length of buffers on the rx ring. +*/ +struct kernel_ethtool_ringparam { +u32 rx_buf_len; +}; + +/** +* enum ethtool_supported_ring_param - indicator caps for setting ring params +* @ETHTOOL_RING_USE_RX_BUF_LEN: capture for setting rx_buf_len +*/ +enum ethtool_supported_ring_param { +ETHTOOL_RING_USE_RX_BUF_LEN =BIT (0 ), +}; +#define __ETH_RSS_HASH_BIT (bit) ((u32)1 << (bit))#define __ETH_RSS_HASH (name) __ETH_RSS_HASH_BIT(ETH_RSS_HASH_##name##_BIT)
@@ -432,6 +448,7 @@ struct ethtool_module_power_mode_params {* @cap_link_lanes_supported: indicates if the driver supports lanes * parameter. * @supported_coalesce_params: supported types of interrupt coalescing. +* @supported_ring_params: supported ring params. * @get_drvinfo: Report driver/device information. Should only set the * @driver, @version, @fw_version and @bus_info fields. If not * implemented, the @driver and @bus_info fields will be filled in
@@ -613,6 +630,7 @@ struct ethtool_module_power_mode_params {struct ethtool_ops {u32 cap_link_lanes_supported:1 ;u32 supported_coalesce_params; +u32 supported_ring_params;void (*get_drvinfo)(struct net_device *,struct ethtool_drvinfo *);int (*get_regs_len)(struct net_device *);void (*get_regs)(struct net_device *,struct ethtool_regs *,void *);
include/uapi/linux/ethtool_netlink.h +1 -0
@@ -329,6 +329,7 @@ enum {ETHTOOL_A_RINGS_RX_MINI ,/* u32 */ ETHTOOL_A_RINGS_RX_JUMBO ,/* u32 */ ETHTOOL_A_RINGS_TX ,/* u32 */ +ETHTOOL_A_RINGS_RX_BUF_LEN ,/* u32 */ /* add new constants above here */ __ETHTOOL_A_RINGS_CNT,
net/ethtool/netlink.h +1 -1
@@ -356,7 +356,7 @@ extern const struct nla_policy ethnl_features_set_policy[ETHTOOL_A_FEATURES_WANTextern const struct nla_policy ethnl_privflags_get_policy[ETHTOOL_A_PRIVFLAGS_HEADER +1 ];extern const struct nla_policy ethnl_privflags_set_policy[ETHTOOL_A_PRIVFLAGS_FLAGS +1 ];extern const struct nla_policy ethnl_rings_get_policy[ETHTOOL_A_RINGS_HEADER +1 ]; -extern const struct nla_policy ethnl_rings_set_policy[ETHTOOL_A_RINGS_TX +1 ]; +extern const struct nla_policy ethnl_rings_set_policy[ETHTOOL_A_RINGS_RX_BUF_LEN +1 ];extern const struct nla_policy ethnl_channels_get_policy[ETHTOOL_A_CHANNELS_HEADER +1 ];extern const struct nla_policy ethnl_channels_set_policy[ETHTOOL_A_CHANNELS_COMBINED_COUNT +1 ];extern const struct nla_policy ethnl_coalesce_get_policy[ETHTOOL_A_COALESCE_HEADER +1 ];
net/ethtool/rings.c +21 -2
@@ -10,6 +10,7 @@ struct rings_req_info {struct rings_reply_data {struct ethnl_reply_data base;struct ethtool_ringparam ringparam; +struct kernel_ethtool_ringparam kernel_ringparam; };#define RINGS_REPDATA (__reply_base) \
@@ -49,7 +50,8 @@ static int rings_reply_size(const struct ethnl_req_info *req_base,nla_total_size (sizeof (u32)) +/* _RINGS_RX */ nla_total_size (sizeof (u32)) +/* _RINGS_RX_MINI */ nla_total_size (sizeof (u32)) +/* _RINGS_RX_JUMBO */ -nla_total_size (sizeof (u32));/* _RINGS_TX */ +nla_total_size (sizeof (u32)) +/* _RINGS_TX */ +nla_total_size (sizeof (u32));/* _RINGS_RX_BUF_LEN */ } static int rings_fill_reply(struct sk_buff *skb,
@@ -57,6 +59,7 @@ static int rings_fill_reply(struct sk_buff *skb, const struct ethnl_reply_data *reply_base) {const struct rings_reply_data *data =RINGS_REPDATA (reply_base); +const struct kernel_ethtool_ringparam *kernel_ringparam = &data->kernel_ringparam;const struct ethtool_ringparam *ringparam = &data->ringparam; if ((ringparam->rx_max_pending &&
@@ -78,7 +81,10 @@ static int rings_fill_reply(struct sk_buff *skb, (nla_put_u32 (skb,ETHTOOL_A_RINGS_TX_MAX , ringparam->tx_max_pending) ||nla_put_u32 (skb,ETHTOOL_A_RINGS_TX , - ringparam->tx_pending)))) + ringparam->tx_pending))) || + (kernel_ringparam->rx_buf_len && + (nla_put_u32 (skb,ETHTOOL_A_RINGS_RX_BUF_LEN , + kernel_ringparam->rx_buf_len)))) return -EMSGSIZE;return 0 ;
@@ -105,10 +111,12 @@ const struct nla_policy ethnl_rings_set_policy[] = { [ETHTOOL_A_RINGS_RX_MINI] = { .type = NLA_U32 }, [ETHTOOL_A_RINGS_RX_JUMBO] = { .type = NLA_U32 }, [ETHTOOL_A_RINGS_TX] = { .type = NLA_U32 }, + [ETHTOOL_A_RINGS_RX_BUF_LEN] = NLA_POLICY_MIN(NLA_U32, 1), };int ethnl_set_rings (struct sk_buff *skb,struct genl_info *info) { +struct kernel_ethtool_ringparam kernel_ringparam = {};struct ethtool_ringparam ringparam = {};struct ethnl_req_info req_info = {};struct nlattr **tb = info->attrs;
@@ -142,6 +150,8 @@ int ethnl_set_rings(struct sk_buff *skb, struct genl_info *info)ethnl_update_u32 (&ringparam.rx_jumbo_pending, tb[ETHTOOL_A_RINGS_RX_JUMBO ], &mod);ethnl_update_u32 (&ringparam.tx_pending, tb[ETHTOOL_A_RINGS_TX ], &mod); +ethnl_update_u32 (&kernel_ringparam.rx_buf_len, + tb[ETHTOOL_A_RINGS_RX_BUF_LEN ], &mod); ret =0 ;if (!mod) goto out_ops;
@@ -164,6 +174,15 @@ int ethnl_set_rings(struct sk_buff *skb, struct genl_info *info) goto out_ops; } +if (kernel_ringparam.rx_buf_len !=0 && + !(ops->supported_ring_params ÐTOOL_RING_USE_RX_BUF_LEN )) { + ret = -EOPNOTSUPP ; +NL_SET_ERR_MSG_ATTR (info->extack, + tb[ETHTOOL_A_RINGS_RX_BUF_LEN ], +"setting rx buf len not supported" ); + goto out_ops; + } + ret = dev->ethtool_ops->set_ringparam (dev, &ringparam);if (ret <0 ) goto out_ops;
Signature · 1 line
2.33.0
PATCH v7 4/6 ethtool: extend ringparam setting/getting API with rx_buf_len
In reply to Guangbin HuangFrom: Hao Chen <[email protected]>
Add two new parameters kernel_ringparam and extack for .get_ringparam and .set_ringparam to extend more ring params through netlink.
--- arch/um/drivers/vector_kern.c | 4 ++- drivers/net/can/c_can/c_can_ethtool.c | 4 ++- drivers/net/ethernet/3com/typhoon.c | 4 ++- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 8 ++++-- drivers/net/ethernet/amd/pcnet32.c | 8 ++++-- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 11 +++++--- .../ethernet/aquantia/atlantic/aq_ethtool.c | 8 ++++-- drivers/net/ethernet/atheros/atlx/atl1.c | 8 ++++-- drivers/net/ethernet/broadcom/b44.c | 8 ++++-- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 25 +++++++++++++------ drivers/net/ethernet/broadcom/bnx2.c | 8 ++++-- .../ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 8 ++++-- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 8 ++++-- drivers/net/ethernet/broadcom/tg3.c | 10 ++++++-- .../net/ethernet/brocade/bna/bnad_ethtool.c | 8 ++++-- drivers/net/ethernet/cadence/macb_main.c | 8 ++++-- .../ethernet/cavium/liquidio/lio_ethtool.c | 11 +++++--- .../ethernet/cavium/thunder/nicvf_ethtool.c | 8 ++++-- drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 8 ++++-- .../net/ethernet/chelsio/cxgb3/cxgb3_main.c | 8 ++++-- .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 8 ++++-- .../ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 8 ++++-- .../net/ethernet/cisco/enic/enic_ethtool.c | 8 ++++-- drivers/net/ethernet/cortina/gemini.c | 8 ++++-- .../net/ethernet/emulex/benet/be_ethtool.c | 4 ++- drivers/net/ethernet/ethoc.c | 8 ++++-- drivers/net/ethernet/faraday/ftgmac100.c | 14 ++++++++--- .../ethernet/freescale/enetc/enetc_ethtool.c | 4 ++- .../net/ethernet/freescale/gianfar_ethtool.c | 8 ++++-- .../net/ethernet/freescale/ucc_geth_ethtool.c | 8 ++++-- drivers/net/ethernet/google/gve/gve_ethtool.c | 4 ++- .../net/ethernet/hisilicon/hns/hns_ethtool.c | 6 ++++- .../ethernet/hisilicon/hns3/hns3_ethtool.c | 8 ++++-- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 8 ++++-- drivers/net/ethernet/ibm/emac/core.c | 7 ++++-- drivers/net/ethernet/ibm/ibmvnic.c | 8 ++++-- drivers/net/ethernet/intel/e100.c | 8 ++++-- .../net/ethernet/intel/e1000/e1000_ethtool.c | 8 ++++-- drivers/net/ethernet/intel/e1000e/ethtool.c | 8 ++++-- .../net/ethernet/intel/fm10k/fm10k_ethtool.c | 8 ++++-- .../net/ethernet/intel/i40e/i40e_ethtool.c | 8 ++++-- .../net/ethernet/intel/iavf/iavf_ethtool.c | 12 +++++++-- drivers/net/ethernet/intel/ice/ice_ethtool.c | 8 ++++-- drivers/net/ethernet/intel/igb/igb_ethtool.c | 8 ++++-- drivers/net/ethernet/intel/igbvf/ethtool.c | 8 ++++-- drivers/net/ethernet/intel/igc/igc_ethtool.c | 14 ++++++++--- .../net/ethernet/intel/ixgb/ixgb_ethtool.c | 8 ++++-- .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 8 ++++-- drivers/net/ethernet/intel/ixgbevf/ethtool.c | 8 ++++-- drivers/net/ethernet/marvell/mv643xx_eth.c | 8 ++++-- drivers/net/ethernet/marvell/mvneta.c | 14 ++++++++--- .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 14 ++++++++--- .../marvell/octeontx2/nic/otx2_ethtool.c | 8 ++++-- drivers/net/ethernet/marvell/skge.c | 8 ++++-- drivers/net/ethernet/marvell/sky2.c | 8 ++++-- .../net/ethernet/mellanox/mlx4/en_ethtool.c | 8 ++++-- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 8 ++++-- .../net/ethernet/mellanox/mlx5/core/en_rep.c | 14 ++++++++--- .../mellanox/mlx5/core/ipoib/ethtool.c | 8 ++++-- .../mellanox/mlxbf_gige/mlxbf_gige_ethtool.c | 7 ++++-- drivers/net/ethernet/micrel/ksz884x.c | 6 ++++- .../net/ethernet/myricom/myri10ge/myri10ge.c | 4 ++- drivers/net/ethernet/neterion/s2io.c | 7 ++++-- .../ethernet/netronome/nfp/nfp_net_ethtool.c | 8 ++++-- drivers/net/ethernet/nvidia/forcedeth.c | 10 ++++++-- .../oki-semi/pch_gbe/pch_gbe_ethtool.c | 12 +++++++-- .../net/ethernet/pasemi/pasemi_mac_ethtool.c | 4 ++- .../ethernet/pensando/ionic/ionic_ethtool.c | 8 ++++-- .../qlogic/netxen/netxen_nic_ethtool.c | 8 ++++-- .../net/ethernet/qlogic/qede/qede_ethtool.c | 8 ++++-- .../ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 8 ++++-- .../net/ethernet/qualcomm/emac/emac-ethtool.c | 8 ++++-- drivers/net/ethernet/qualcomm/qca_debug.c | 8 ++++-- drivers/net/ethernet/realtek/8139cp.c | 4 ++- drivers/net/ethernet/realtek/r8169_main.c | 4 ++- drivers/net/ethernet/renesas/ravb_main.c | 8 ++++-- drivers/net/ethernet/renesas/sh_eth.c | 8 ++++-- drivers/net/ethernet/sfc/ef100_ethtool.c | 7 ++++-- drivers/net/ethernet/sfc/ethtool.c | 14 ++++++++--- drivers/net/ethernet/sfc/falcon/ethtool.c | 14 ++++++++--- .../ethernet/stmicro/stmmac/stmmac_ethtool.c | 8 ++++-- drivers/net/ethernet/tehuti/tehuti.c | 12 +++++++-- drivers/net/ethernet/ti/am65-cpsw-ethtool.c | 7 ++++-- drivers/net/ethernet/ti/cpmac.c | 8 ++++-- drivers/net/ethernet/ti/cpsw_ethtool.c | 8 ++++-- drivers/net/ethernet/ti/cpsw_priv.h | 8 ++++-- .../net/ethernet/toshiba/spider_net_ethtool.c | 4 ++- drivers/net/ethernet/xilinx/ll_temac_main.c | 14 ++++++++--- .../net/ethernet/xilinx/xilinx_axienet_main.c | 14 ++++++++--- drivers/net/hyperv/netvsc_drv.c | 8 ++++-- drivers/net/netdevsim/ethtool.c | 8 ++++-- drivers/net/usb/r8152.c | 8 ++++-- drivers/net/virtio_net.c | 4 ++- drivers/net/vmxnet3/vmxnet3_ethtool.c | 10 +++++--- drivers/s390/net/qeth_ethtool.c | 4 ++- include/linux/ethtool.h | 8 ++++-- net/ethtool/ioctl.c | 10 +++++--- net/ethtool/rings.c | 9 ++++--- net/mac80211/ethtool.c | 8 ++++-- 99 files changed, 617 insertions(+), 212 deletions(-)
arch/um/drivers/vector_kern.c +3 -1
@@ -1441,7 +1441,9 @@ static int vector_net_load_bpf_flash(struct net_device *dev, }static void vector_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct vector_private *vp =netdev_priv (netdev);
drivers/net/can/c_can/c_can_ethtool.c +3 -1
@@ -20,7 +20,9 @@ static void c_can_get_drvinfo(struct net_device *netdev, }static void c_can_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct c_can_priv *priv =netdev_priv (netdev);
drivers/net/ethernet/3com/typhoon.c +3 -1
@@ -1138,7 +1138,9 @@ typhoon_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) }static void -typhoon_get_ringparam (struct net_device *dev,struct ethtool_ringparam *ering) +typhoon_get_ringparam (struct net_device *dev,struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) { ering->rx_max_pending =RXENT_ENTRIES ; ering->tx_max_pending =TXLO_ENTRIES -1 ;
drivers/net/ethernet/amazon/ena/ena_ethtool.c +6 -2
@@ -465,7 +465,9 @@ static void ena_get_drvinfo(struct net_device *dev, }static void ena_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ena_adapter *adapter =netdev_priv (netdev);
@@ -476,7 +478,9 @@ static void ena_get_ringparam(struct net_device *netdev, }static int ena_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ena_adapter *adapter =netdev_priv (netdev);u32 new_tx_size, new_rx_size;
drivers/net/ethernet/amd/pcnet32.c +6 -2
@@ -860,7 +860,9 @@ static int pcnet32_nway_reset(struct net_device *dev) }static void pcnet32_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct pcnet32_private *lp =netdev_priv (dev);
@@ -871,7 +873,9 @@ static void pcnet32_get_ringparam(struct net_device *dev, }static int pcnet32_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct pcnet32_private *lp =netdev_priv (dev);unsigned long flags;
drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c +8 -3
@@ -619,8 +619,11 @@ static int xgbe_get_module_eeprom(struct net_device *netdev,return pdata->phy_if.module_eeprom (pdata, eeprom, data); } -static void xgbe_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ringparam) +static void +xgbe_get_ringparam (struct net_device *netdev, +struct ethtool_ringparam *ringparam, +struct kernel_ethtool_ringparam *kernel_ringparam, +struct netlink_ext_ack *extack) {struct xgbe_prv_data *pdata =netdev_priv (netdev);
@@ -631,7 +634,9 @@ static void xgbe_get_ringparam(struct net_device *netdev, }static int xgbe_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ringparam) +struct ethtool_ringparam *ringparam, +struct kernel_ethtool_ringparam *kernel_ringparam, +struct netlink_ext_ack *extack) {struct xgbe_prv_data *pdata =netdev_priv (netdev);unsigned int rx, tx;
drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c +6 -2
@@ -812,7 +812,9 @@ static int aq_ethtool_set_pauseparam(struct net_device *ndev, }static void aq_get_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct aq_nic_s *aq_nic =netdev_priv (ndev);struct aq_nic_cfg_s *cfg;
@@ -827,7 +829,9 @@ static void aq_get_ringparam(struct net_device *ndev, }static int aq_set_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct aq_nic_s *aq_nic =netdev_priv (ndev);const struct aq_hw_caps_s *hw_caps;
drivers/net/ethernet/atheros/atlx/atl1.c +6 -2
@@ -3438,7 +3438,9 @@ static void atl1_get_regs(struct net_device *netdev, struct ethtool_regs *regs, }static void atl1_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct atl1_adapter *adapter =netdev_priv (netdev);struct atl1_tpd_ring *txdr = &adapter->tpd_ring;
@@ -3451,7 +3453,9 @@ static void atl1_get_ringparam(struct net_device *netdev, }static int atl1_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct atl1_adapter *adapter =netdev_priv (netdev);struct atl1_tpd_ring *tpdr = &adapter->tpd_ring;
drivers/net/ethernet/broadcom/b44.c +6 -2
@@ -1961,7 +1961,9 @@ static int b44_set_link_ksettings(struct net_device *dev, }static void b44_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct b44 *bp =netdev_priv (dev);
@@ -1972,7 +1974,9 @@ static void b44_get_ringparam(struct net_device *dev, }static int b44_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct b44 *bp =netdev_priv (dev);
drivers/net/ethernet/broadcom/bcm63xx_enet.c +18 -7
@@ -1497,8 +1497,11 @@ static int bcm_enet_set_link_ksettings(struct net_device *dev, } } -static void bcm_enet_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +static void +bcm_enet_get_ringparam (struct net_device *dev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct bcm_enet_priv *priv;
@@ -1512,7 +1515,9 @@ static void bcm_enet_get_ringparam(struct net_device *dev, }static int bcm_enet_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct bcm_enet_priv *priv;int was_running;
@@ -2579,8 +2584,11 @@ static void bcm_enetsw_get_ethtool_stats(struct net_device *netdev, } } -static void bcm_enetsw_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +static void +bcm_enetsw_get_ringparam (struct net_device *dev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct bcm_enet_priv *priv;
@@ -2595,8 +2603,11 @@ static void bcm_enetsw_get_ringparam(struct net_device *dev, ering->tx_pending = priv->tx_ring_size; } -static int bcm_enetsw_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +static int +bcm_enetsw_set_ringparam (struct net_device *dev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct bcm_enet_priv *priv;int was_running;
drivers/net/ethernet/broadcom/bnx2.c +6 -2
@@ -7318,7 +7318,9 @@ static int bnx2_set_coalesce(struct net_device *dev, }static void -bnx2_get_ringparam (struct net_device *dev,struct ethtool_ringparam *ering) +bnx2_get_ringparam (struct net_device *dev,struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct bnx2 *bp =netdev_priv (dev);
@@ -7389,7 +7391,9 @@ bnx2_change_ring_size(struct bnx2 *bp, u32 rx, u32 tx, bool reset_irq) }static int -bnx2_set_ringparam (struct net_device *dev,struct ethtool_ringparam *ering) +bnx2_set_ringparam (struct net_device *dev,struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct bnx2 *bp =netdev_priv (dev);int rc;
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +6 -2
@@ -1914,7 +1914,9 @@ static int bnx2x_set_coalesce(struct net_device *dev, }static void bnx2x_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct bnx2x *bp =netdev_priv (dev);
@@ -1938,7 +1940,9 @@ static void bnx2x_get_ringparam(struct net_device *dev, }static int bnx2x_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct bnx2x *bp =netdev_priv (dev);
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +6 -2
@@ -775,7 +775,9 @@ static void bnxt_get_strings(struct net_device *dev, u32 stringset, u8 *buf) }static void bnxt_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct bnxt *bp =netdev_priv (dev);
@@ -794,7 +796,9 @@ static void bnxt_get_ringparam(struct net_device *dev, }static int bnxt_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct bnxt *bp =netdev_priv (dev);
drivers/net/ethernet/broadcom/tg3.c +8 -2
@@ -12390,7 +12390,10 @@ static int tg3_nway_reset(struct net_device *dev)return r; } -static void tg3_get_ringparam (struct net_device *dev,struct ethtool_ringparam *ering) +static void tg3_get_ringparam (struct net_device *dev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct tg3 *tp =netdev_priv (dev);
@@ -12411,7 +12414,10 @@ static void tg3_get_ringparam(struct net_device *dev, struct ethtool_ringparam * ering->tx_pending = tp->napi[0 ].tx_pending; } -static int tg3_set_ringparam (struct net_device *dev,struct ethtool_ringparam *ering) +static int tg3_set_ringparam (struct net_device *dev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct tg3 *tp =netdev_priv (dev);int i, irq_sync =0 , err =0 ;
drivers/net/ethernet/brocade/bna/bnad_ethtool.c +6 -2
@@ -405,7 +405,9 @@ static int bnad_set_coalesce(struct net_device *netdev,static void bnad_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ringparam) +struct ethtool_ringparam *ringparam, +struct kernel_ethtool_ringparam *kernel_ringparam, +struct netlink_ext_ack *extack) {struct bnad *bnad =netdev_priv (netdev);
@@ -418,7 +420,9 @@ bnad_get_ringparam(struct net_device *netdev,static int bnad_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ringparam) +struct ethtool_ringparam *ringparam, +struct kernel_ethtool_ringparam *kernel_ringparam, +struct netlink_ext_ack *extack) {int i, current_err, err =0 ;struct bnad *bnad =netdev_priv (netdev);
drivers/net/ethernet/cadence/macb_main.c +6 -2
@@ -3135,7 +3135,9 @@ static int macb_set_link_ksettings(struct net_device *netdev, }static void macb_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct macb *bp =netdev_priv (netdev);
@@ -3147,7 +3149,9 @@ static void macb_get_ringparam(struct net_device *netdev, }static int macb_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct macb *bp =netdev_priv (netdev);u32 new_rx_size, new_tx_size;
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c +8 -3
@@ -947,7 +947,9 @@ static int lio_set_phys_id(struct net_device *netdev,static void lio_ethtool_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct lio *lio =GET_LIO (netdev);struct octeon_device *oct = lio->oct_dev;
@@ -1252,8 +1254,11 @@ static int lio_reset_queues(struct net_device *netdev, uint32_t num_qs)return 0 ; } -static int lio_ethtool_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ering) +static int +lio_ethtool_set_ringparam (struct net_device *netdev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {u32 rx_count, tx_count, rx_count_old, tx_count_old;struct lio *lio =GET_LIO (netdev);
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c +6 -2
@@ -467,7 +467,9 @@ static int nicvf_get_coalesce(struct net_device *netdev, }static void nicvf_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct nicvf *nic =netdev_priv (netdev);struct queue_set *qs = nic->qs;
@@ -479,7 +481,9 @@ static void nicvf_get_ringparam(struct net_device *netdev, }static int nicvf_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct nicvf *nic =netdev_priv (netdev);struct queue_set *qs = nic->qs;
drivers/net/ethernet/chelsio/cxgb/cxgb2.c +6 -2
@@ -710,7 +710,9 @@ static int set_pauseparam(struct net_device *dev,return 0 ; } -static void get_sge_param (struct net_device *dev,struct ethtool_ringparam *e) +static void get_sge_param (struct net_device *dev,struct ethtool_ringparam *e, +struct kernel_ethtool_ringparam *kernel_e, +struct netlink_ext_ack *extack) {struct adapter *adapter = dev->ml_priv;int jumbo_fl =t1_is_T1B (adapter) ?1 :0 ;
@@ -724,7 +726,9 @@ static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e) e->tx_pending = adapter->params.sge.cmdQ_size[0 ]; } -static int set_sge_param (struct net_device *dev,struct ethtool_ringparam *e) +static int set_sge_param (struct net_device *dev,struct ethtool_ringparam *e, +struct kernel_ethtool_ringparam *kernel_e, +struct netlink_ext_ack *extack) {struct adapter *adapter = dev->ml_priv;int jumbo_fl =t1_is_T1B (adapter) ?1 :0 ;
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +6 -2
@@ -1948,7 +1948,9 @@ static int set_pauseparam(struct net_device *dev,return 0 ; } -static void get_sge_param (struct net_device *dev,struct ethtool_ringparam *e) +static void get_sge_param (struct net_device *dev,struct ethtool_ringparam *e, +struct kernel_ethtool_ringparam *kernel_e, +struct netlink_ext_ack *extack) {struct port_info *pi =netdev_priv (dev);struct adapter *adapter = pi->adapter;
@@ -1964,7 +1966,9 @@ static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e) e->tx_pending = q->txq_size[0 ]; } -static int set_sge_param (struct net_device *dev,struct ethtool_ringparam *e) +static int set_sge_param (struct net_device *dev,struct ethtool_ringparam *e, +struct kernel_ethtool_ringparam *kernel_e, +struct netlink_ext_ack *extack) {struct port_info *pi =netdev_priv (dev);struct adapter *adapter = pi->adapter;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c +6 -2
@@ -890,7 +890,9 @@ static int set_pauseparam(struct net_device *dev,return 0 ; } -static void get_sge_param (struct net_device *dev,struct ethtool_ringparam *e) +static void get_sge_param (struct net_device *dev,struct ethtool_ringparam *e, +struct kernel_ethtool_ringparam *kernel_e, +struct netlink_ext_ack *extack) {const struct port_info *pi =netdev_priv (dev);const struct sge *s = &pi->adapter->sge;
@@ -906,7 +908,9 @@ static void get_sge_param(struct net_device *dev, struct ethtool_ringparam *e) e->tx_pending = s->ethtxq[pi->first_qset].q.size; } -static int set_sge_param (struct net_device *dev,struct ethtool_ringparam *e) +static int set_sge_param (struct net_device *dev,struct ethtool_ringparam *e, +struct kernel_ethtool_ringparam *kernel_e, +struct netlink_ext_ack *extack) {int i;const struct port_info *pi =netdev_priv (dev);
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +6 -2
@@ -1591,7 +1591,9 @@ static void cxgb4vf_set_msglevel(struct net_device *dev, u32 msglevel)* first Queue Set. */ static void cxgb4vf_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *rp) +struct ethtool_ringparam *rp, +struct kernel_ethtool_ringparam *kernel_rp, +struct netlink_ext_ack *extack) {const struct port_info *pi =netdev_priv (dev);const struct sge *s = &pi->adapter->sge;
@@ -1614,7 +1616,9 @@ static void cxgb4vf_get_ringparam(struct net_device *dev,* device -- after vetting them of course! */ static int cxgb4vf_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *rp) +struct ethtool_ringparam *rp, +struct kernel_ethtool_ringparam *kernel_rp, +struct netlink_ext_ack *extack) {const struct port_info *pi =netdev_priv (dev);struct adapter *adapter = pi->adapter;
drivers/net/ethernet/cisco/enic/enic_ethtool.c +6 -2
@@ -177,7 +177,9 @@ static void enic_get_strings(struct net_device *netdev, u32 stringset, }static void enic_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct enic *enic =netdev_priv (netdev);struct vnic_enet_config *c = &enic->config;
@@ -189,7 +191,9 @@ static void enic_get_ringparam(struct net_device *netdev, }static int enic_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct enic *enic =netdev_priv (netdev);struct vnic_enet_config *c = &enic->config;
drivers/net/ethernet/cortina/gemini.c +6 -2
@@ -2105,7 +2105,9 @@ static void gmac_get_pauseparam(struct net_device *netdev, }static void gmac_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *rp) +struct ethtool_ringparam *rp, +struct kernel_ethtool_ringparam *kernel_rp, +struct netlink_ext_ack *extack) {struct gemini_ethernet_port *port =netdev_priv (netdev);
@@ -2123,7 +2125,9 @@ static void gmac_get_ringparam(struct net_device *netdev, }static int gmac_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *rp) +struct ethtool_ringparam *rp, +struct kernel_ethtool_ringparam *kernel_rp, +struct netlink_ext_ack *extack) {struct gemini_ethernet_port *port =netdev_priv (netdev);int err =0 ;
drivers/net/ethernet/emulex/benet/be_ethtool.c +3 -1
@@ -683,7 +683,9 @@ static int be_get_link_ksettings(struct net_device *netdev, }static void be_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct be_adapter *adapter =netdev_priv (netdev);
drivers/net/ethernet/ethoc.c +6 -2
@@ -945,7 +945,9 @@ static void ethoc_get_regs(struct net_device *dev, struct ethtool_regs *regs, }static void ethoc_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ethoc *priv =netdev_priv (dev);
@@ -961,7 +963,9 @@ static void ethoc_get_ringparam(struct net_device *dev, }static int ethoc_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ethoc *priv =netdev_priv (dev);
drivers/net/ethernet/faraday/ftgmac100.c +10 -4
@@ -1178,8 +1178,11 @@ static void ftgmac100_get_drvinfo(struct net_device *netdev,strlcpy (info->bus_info,dev_name (&netdev->dev),sizeof (info->bus_info)); } -static void ftgmac100_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ering) +static void +ftgmac100_get_ringparam (struct net_device *netdev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct ftgmac100 *priv =netdev_priv (netdev);
@@ -1190,8 +1193,11 @@ static void ftgmac100_get_ringparam(struct net_device *netdev, ering->tx_pending = priv->tx_q_entries; } -static int ftgmac100_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ering) +static int +ftgmac100_set_ringparam (struct net_device *netdev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct ftgmac100 *priv =netdev_priv (netdev);
drivers/net/ethernet/freescale/enetc/enetc_ethtool.c +3 -1
@@ -562,7 +562,9 @@ static int enetc_set_rxfh(struct net_device *ndev, const u32 *indir, }static void enetc_get_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct enetc_ndev_priv *priv =netdev_priv (ndev);
drivers/net/ethernet/freescale/gianfar_ethtool.c +6 -2
@@ -372,7 +372,9 @@ static int gfar_scoalesce(struct net_device *dev,* rx, rx_mini, and rx_jumbo rings are the same size, as mini and * jumbo are ignored by the driver */ static void gfar_gringparam (struct net_device *dev, -struct ethtool_ringparam *rvals) +struct ethtool_ringparam *rvals, +struct kernel_ethtool_ringparam *kernel_rvals, +struct netlink_ext_ack *extack) {struct gfar_private *priv =netdev_priv (dev);struct gfar_priv_tx_q *tx_queue =NULL ;
@@ -399,7 +401,9 @@ static void gfar_gringparam(struct net_device *dev,* necessary so that we don't mess things up while we're in motion. */ static int gfar_sringparam (struct net_device *dev, -struct ethtool_ringparam *rvals) +struct ethtool_ringparam *rvals, +struct kernel_ethtool_ringparam *kernel_rvals, +struct netlink_ext_ack *extack) {struct gfar_private *priv =netdev_priv (dev);int err =0 , i;
drivers/net/ethernet/freescale/ucc_geth_ethtool.c +6 -2
@@ -207,7 +207,9 @@ uec_get_regs(struct net_device *netdev,static void uec_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ucc_geth_private *ugeth =netdev_priv (netdev);struct ucc_geth_info *ug_info = ugeth->ug_info;
@@ -226,7 +228,9 @@ uec_get_ringparam(struct net_device *netdev,static int uec_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ucc_geth_private *ugeth =netdev_priv (netdev);struct ucc_geth_info *ug_info = ugeth->ug_info;
drivers/net/ethernet/google/gve/gve_ethtool.c +3 -1
@@ -419,7 +419,9 @@ static int gve_set_channels(struct net_device *netdev, }static void gve_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *cmd) +struct ethtool_ringparam *cmd, +struct kernel_ethtool_ringparam *kernel_cmd, +struct netlink_ext_ack *extack) {struct gve_priv *priv =netdev_priv (netdev);
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c +5 -1
@@ -663,9 +663,13 @@ static void hns_nic_get_drvinfo(struct net_device *net_dev,* hns_get_ringparam - get ring parameter * @net_dev: net device * @param: ethtool parameter +* @kernel_param: ethtool external parameter +* @extack: netlink extended ACK report struct */ static void hns_get_ringparam (struct net_device *net_dev, -struct ethtool_ringparam *param) +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param, +struct netlink_ext_ack *extack) {struct hns_nic_priv *priv =netdev_priv (net_dev);struct hnae_ae_ops *ops;
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +6 -2
@@ -643,7 +643,9 @@ static u32 hns3_get_link(struct net_device *netdev) }static void hns3_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *param) +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param, +struct netlink_ext_ack *extack) {struct hns3_nic_priv *priv =netdev_priv (netdev);struct hnae3_handle *h = priv->ae_handle;
@@ -1081,7 +1083,9 @@ static int hns3_check_ringparam(struct net_device *ndev, }static int hns3_set_ringparam (struct net_device *ndev, -struct ethtool_ringparam *param) +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param, +struct netlink_ext_ack *extack) {struct hns3_nic_priv *priv =netdev_priv (ndev);struct hnae3_handle *h = priv->ae_handle;
drivers/net/ethernet/huawei/hinic/hinic_ethtool.c +6 -2
@@ -547,7 +547,9 @@ static void hinic_get_drvinfo(struct net_device *netdev, }static void hinic_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct hinic_dev *nic_dev =netdev_priv (netdev);
@@ -580,7 +582,9 @@ static int check_ringparam_valid(struct hinic_dev *nic_dev, }static int hinic_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct hinic_dev *nic_dev =netdev_priv (netdev);u16 new_sq_depth, new_rq_depth;
drivers/net/ethernet/ibm/emac/core.c +5 -2
@@ -2137,8 +2137,11 @@ emac_ethtool_set_link_ksettings(struct net_device *ndev,return 0 ; } -static void emac_ethtool_get_ringparam (struct net_device *ndev, -struct ethtool_ringparam *rp) +static void +emac_ethtool_get_ringparam (struct net_device *ndev, +struct ethtool_ringparam *rp, +struct kernel_ethtool_ringparam *kernel_rp, +struct netlink_ext_ack *extack) { rp->rx_max_pending = rp->rx_pending =NUM_RX_BUFF ; rp->tx_max_pending = rp->tx_pending =NUM_TX_BUFF ;
drivers/net/ethernet/ibm/ibmvnic.c +6 -2
@@ -3088,7 +3088,9 @@ static u32 ibmvnic_get_link(struct net_device *netdev) }static void ibmvnic_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ibmvnic_adapter *adapter =netdev_priv (netdev);
@@ -3108,7 +3110,9 @@ static void ibmvnic_get_ringparam(struct net_device *netdev, }static int ibmvnic_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ibmvnic_adapter *adapter =netdev_priv (netdev);int ret;
drivers/net/ethernet/intel/e100.c +6 -2
@@ -2557,7 +2557,9 @@ static int e100_set_eeprom(struct net_device *netdev, }static void e100_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct nic *nic =netdev_priv (netdev);struct param_range *rfds = &nic->params.rfds;
@@ -2570,7 +2572,9 @@ static void e100_get_ringparam(struct net_device *netdev, }static int e100_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct nic *nic =netdev_priv (netdev);struct param_range *rfds = &nic->params.rfds;
drivers/net/ethernet/intel/e1000/e1000_ethtool.c +6 -2
@@ -539,7 +539,9 @@ static void e1000_get_drvinfo(struct net_device *netdev, }static void e1000_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct e1000_adapter *adapter =netdev_priv (netdev);struct e1000_hw *hw = &adapter->hw;
@@ -556,7 +558,9 @@ static void e1000_get_ringparam(struct net_device *netdev, }static int e1000_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct e1000_adapter *adapter =netdev_priv (netdev);struct e1000_hw *hw = &adapter->hw;
drivers/net/ethernet/intel/e1000e/ethtool.c +6 -2
@@ -655,7 +655,9 @@ static void e1000_get_drvinfo(struct net_device *netdev, }static void e1000_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct e1000_adapter *adapter =netdev_priv (netdev);
@@ -666,7 +668,9 @@ static void e1000_get_ringparam(struct net_device *netdev, }static int e1000_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct e1000_adapter *adapter =netdev_priv (netdev);struct e1000_ring *temp_tx =NULL , *temp_rx =NULL ;
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c +6 -2
@@ -502,7 +502,9 @@ static void fm10k_set_msglevel(struct net_device *netdev, u32 data) }static void fm10k_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct fm10k_intfc *interface =netdev_priv (netdev);
@@ -517,7 +519,9 @@ static void fm10k_get_ringparam(struct net_device *netdev, }static int fm10k_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct fm10k_intfc *interface =netdev_priv (netdev);struct fm10k_ring *temp_ring;
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +6 -2
@@ -1916,7 +1916,9 @@ static void i40e_get_drvinfo(struct net_device *netdev, }static void i40e_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct i40e_netdev_priv *np =netdev_priv (netdev);struct i40e_pf *pf = np->vsi->back;
@@ -1944,7 +1946,9 @@ static bool i40e_active_tx_ring_index(struct i40e_vsi *vsi, u16 index) }static int i40e_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct i40e_ring *tx_rings =NULL , *rx_rings =NULL ;struct i40e_netdev_priv *np =netdev_priv (netdev);
drivers/net/ethernet/intel/iavf/iavf_ethtool.c +10 -2
@@ -580,12 +580,16 @@ static void iavf_get_drvinfo(struct net_device *netdev,* iavf_get_ringparam - Get ring parameters * @netdev: network interface device structure * @ring: ethtool ringparam structure +* @kernel_ring: ethtool extenal ringparam structure +* @extack: netlink extended ACK report struct * * Returns current ring parameters. TX and RX rings are reported separately, * but the number of rings is not reported. **/ static void iavf_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct iavf_adapter *adapter =netdev_priv (netdev);
@@ -599,12 +603,16 @@ static void iavf_get_ringparam(struct net_device *netdev,* iavf_set_ringparam - Set ring parameters * @netdev: network interface device structure * @ring: ethtool ringparam structure +* @kernel_ring: ethtool external ringparam structure +* @extack: netlink extended ACK report struct * * Sets ring parameters. TX and RX rings are controlled separately, but the * number of rings is not specified, so all rings get the same settings. **/ static int iavf_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct iavf_adapter *adapter =netdev_priv (netdev);u32 new_rx_count, new_tx_count;
drivers/net/ethernet/intel/ice/ice_ethtool.c +6 -2
@@ -2686,7 +2686,9 @@ ice_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd, }static void -ice_get_ringparam (struct net_device *netdev,struct ethtool_ringparam *ring) +ice_get_ringparam (struct net_device *netdev,struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ice_netdev_priv *np =netdev_priv (netdev);struct ice_vsi *vsi = np->vsi;
@@ -2704,7 +2706,9 @@ ice_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring) }static int -ice_set_ringparam (struct net_device *netdev,struct ethtool_ringparam *ring) +ice_set_ringparam (struct net_device *netdev,struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ice_netdev_priv *np =netdev_priv (netdev);struct ice_tx_ring *xdp_rings =NULL ;
drivers/net/ethernet/intel/igb/igb_ethtool.c +6 -2
@@ -864,7 +864,9 @@ static void igb_get_drvinfo(struct net_device *netdev, }static void igb_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct igb_adapter *adapter =netdev_priv (netdev);
@@ -875,7 +877,9 @@ static void igb_get_ringparam(struct net_device *netdev, }static int igb_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct igb_adapter *adapter =netdev_priv (netdev);struct igb_ring *temp_ring;
drivers/net/ethernet/intel/igbvf/ethtool.c +6 -2
@@ -175,7 +175,9 @@ static void igbvf_get_drvinfo(struct net_device *netdev, }static void igbvf_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct igbvf_adapter *adapter =netdev_priv (netdev);struct igbvf_ring *tx_ring = adapter->tx_ring;
@@ -188,7 +190,9 @@ static void igbvf_get_ringparam(struct net_device *netdev, }static int igbvf_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct igbvf_adapter *adapter =netdev_priv (netdev);struct igbvf_ring *temp_ring;
drivers/net/ethernet/intel/igc/igc_ethtool.c +10 -4
@@ -567,8 +567,11 @@ static int igc_ethtool_set_eeprom(struct net_device *netdev,return ret_val; } -static void igc_ethtool_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +static void +igc_ethtool_get_ringparam (struct net_device *netdev, +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct igc_adapter *adapter =netdev_priv (netdev);
@@ -578,8 +581,11 @@ static void igc_ethtool_get_ringparam(struct net_device *netdev, ring->tx_pending = adapter->tx_ring_count; } -static int igc_ethtool_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +static int +igc_ethtool_set_ringparam (struct net_device *netdev, +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct igc_adapter *adapter =netdev_priv (netdev);struct igc_ring *temp_ring;
drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c +6 -2
@@ -464,7 +464,9 @@ ixgb_get_drvinfo(struct net_device *netdev,static void ixgb_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ixgb_adapter *adapter =netdev_priv (netdev);struct ixgb_desc_ring *txdr = &adapter->tx_ring;
@@ -478,7 +480,9 @@ ixgb_get_ringparam(struct net_device *netdev,static int ixgb_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ixgb_adapter *adapter =netdev_priv (netdev);struct ixgb_desc_ring *txdr = &adapter->tx_ring;
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +6 -2
@@ -1118,7 +1118,9 @@ static void ixgbe_get_drvinfo(struct net_device *netdev, }static void ixgbe_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ixgbe_adapter *adapter =netdev_priv (netdev);struct ixgbe_ring *tx_ring = adapter->tx_ring[0 ];
@@ -1131,7 +1133,9 @@ static void ixgbe_get_ringparam(struct net_device *netdev, }static int ixgbe_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ixgbe_adapter *adapter =netdev_priv (netdev);struct ixgbe_ring *temp_ring;
drivers/net/ethernet/intel/ixgbevf/ethtool.c +6 -2
@@ -225,7 +225,9 @@ static void ixgbevf_get_drvinfo(struct net_device *netdev, }static void ixgbevf_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ixgbevf_adapter *adapter =netdev_priv (netdev);
@@ -236,7 +238,9 @@ static void ixgbevf_get_ringparam(struct net_device *netdev, }static int ixgbevf_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ixgbevf_adapter *adapter =netdev_priv (netdev);struct ixgbevf_ring *tx_ring =NULL , *rx_ring =NULL ;
drivers/net/ethernet/marvell/mv643xx_eth.c +6 -2
@@ -1638,7 +1638,9 @@ static int mv643xx_eth_set_coalesce(struct net_device *dev, }static void -mv643xx_eth_get_ringparam (struct net_device *dev,struct ethtool_ringparam *er) +mv643xx_eth_get_ringparam (struct net_device *dev,struct ethtool_ringparam *er, +struct kernel_ethtool_ringparam *kernel_er, +struct netlink_ext_ack *extack) {struct mv643xx_eth_private *mp =netdev_priv (dev);
@@ -1650,7 +1652,9 @@ mv643xx_eth_get_ringparam(struct net_device *dev, struct ethtool_ringparam *er) }static int -mv643xx_eth_set_ringparam (struct net_device *dev,struct ethtool_ringparam *er) +mv643xx_eth_set_ringparam (struct net_device *dev,struct ethtool_ringparam *er, +struct kernel_ethtool_ringparam *kernel_er, +struct netlink_ext_ack *extack) {struct mv643xx_eth_private *mp =netdev_priv (dev);
drivers/net/ethernet/marvell/mvneta.c +10 -4
@@ -4510,8 +4510,11 @@ static void mvneta_ethtool_get_drvinfo(struct net_device *dev, } -static void mvneta_ethtool_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +static void +mvneta_ethtool_get_ringparam (struct net_device *netdev, +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct mvneta_port *pp =netdev_priv (netdev);
@@ -4521,8 +4524,11 @@ static void mvneta_ethtool_get_ringparam(struct net_device *netdev, ring->tx_pending = pp->tx_ring_size; } -static int mvneta_ethtool_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +static int +mvneta_ethtool_set_ringparam (struct net_device *dev, +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct mvneta_port *pp =netdev_priv (dev);
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +10 -4
@@ -5431,8 +5431,11 @@ static void mvpp2_ethtool_get_drvinfo(struct net_device *dev, sizeof(drvinfo->bus_info)); } -static void mvpp2_ethtool_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +static void +mvpp2_ethtool_get_ringparam (struct net_device *dev, +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct mvpp2_port *port =netdev_priv (dev);
@@ -5442,8 +5445,11 @@ static void mvpp2_ethtool_get_ringparam(struct net_device *dev, ring->tx_pending = port->tx_ring_size; } -static int mvpp2_ethtool_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +static int +mvpp2_ethtool_set_ringparam (struct net_device *dev, +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct mvpp2_port *port =netdev_priv (dev);u16 prev_rx_ring_size = port->rx_ring_size;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c +6 -2
@@ -360,7 +360,9 @@ static int otx2_set_pauseparam(struct net_device *netdev, }static void otx2_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct otx2_nic *pfvf =netdev_priv (netdev);struct otx2_qset *qs = &pfvf->qset;
@@ -372,7 +374,9 @@ static void otx2_get_ringparam(struct net_device *netdev, }static int otx2_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct otx2_nic *pfvf =netdev_priv (netdev);bool if_up =netif_running (netdev);
drivers/net/ethernet/marvell/skge.c +6 -2
@@ -492,7 +492,9 @@ static void skge_get_strings(struct net_device *dev, u32 stringset, u8 *data) }static void skge_get_ring_param (struct net_device *dev, -struct ethtool_ringparam *p) +struct ethtool_ringparam *p, +struct kernel_ethtool_ringparam *kernel_p, +struct netlink_ext_ack *extack) {struct skge_port *skge =netdev_priv (dev);
@@ -504,7 +506,9 @@ static void skge_get_ring_param(struct net_device *dev, }static int skge_set_ring_param (struct net_device *dev, -struct ethtool_ringparam *p) +struct ethtool_ringparam *p, +struct kernel_ethtool_ringparam *kernel_p, +struct netlink_ext_ack *extack) {struct skge_port *skge =netdev_priv (dev);int err =0 ;
drivers/net/ethernet/marvell/sky2.c +6 -2
@@ -4149,7 +4149,9 @@ static unsigned long roundup_ring_size(unsigned long pending) }static void sky2_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct sky2_port *sky2 =netdev_priv (dev);
@@ -4161,7 +4163,9 @@ static void sky2_get_ringparam(struct net_device *dev, }static int sky2_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct sky2_port *sky2 =netdev_priv (dev);
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +6 -2
@@ -1141,7 +1141,9 @@ static void mlx4_en_get_pauseparam(struct net_device *dev, }static int mlx4_en_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *param) +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param, +struct netlink_ext_ack *extack) {struct mlx4_en_priv *priv =netdev_priv (dev);struct mlx4_en_dev *mdev = priv->mdev;
@@ -1208,7 +1210,9 @@ static int mlx4_en_set_ringparam(struct net_device *dev, }static void mlx4_en_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *param) +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param, +struct netlink_ext_ack *extack) {struct mlx4_en_priv *priv =netdev_priv (dev);
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +6 -2
@@ -314,7 +314,9 @@ void mlx5e_ethtool_get_ringparam(struct mlx5e_priv *priv, }static void mlx5e_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *param) +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param, +struct netlink_ext_ack *extack) {struct mlx5e_priv *priv =netdev_priv (dev);
@@ -380,7 +382,9 @@ int mlx5e_ethtool_set_ringparam(struct mlx5e_priv *priv, }static int mlx5e_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *param) +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param, +struct netlink_ext_ack *extack) {struct mlx5e_priv *priv =netdev_priv (dev);
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +10 -4
@@ -219,16 +219,22 @@ static int mlx5e_rep_get_sset_count(struct net_device *dev, int sset) } } -static void mlx5e_rep_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *param) +static void +mlx5e_rep_get_ringparam (struct net_device *dev, +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param, +struct netlink_ext_ack *extack) {struct mlx5e_priv *priv =netdev_priv (dev);mlx5e_ethtool_get_ringparam (priv, param); } -static int mlx5e_rep_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *param) +static int +mlx5e_rep_set_ringparam (struct net_device *dev, +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param, +struct netlink_ext_ack *extack) {struct mlx5e_priv *priv =netdev_priv (dev);
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c +6 -2
@@ -67,7 +67,9 @@ static void mlx5i_get_ethtool_stats(struct net_device *dev, }static int mlx5i_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *param) +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param, +struct netlink_ext_ack *extack) {struct mlx5e_priv *priv =mlx5i_epriv (dev);
@@ -75,7 +77,9 @@ static int mlx5i_set_ringparam(struct net_device *dev, }static void mlx5i_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *param) +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param, +struct netlink_ext_ack *extack) {struct mlx5e_priv *priv =mlx5i_epriv (dev);
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c +5 -2
@@ -33,8 +33,11 @@ static void mlxbf_gige_get_regs(struct net_device *netdev,memcpy_fromio (p, priv->base,MLXBF_GIGE_MMIO_REG_SZ ); } -static void mlxbf_gige_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ering) +static void +mlxbf_gige_get_ringparam (struct net_device *netdev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct mlxbf_gige *priv =netdev_priv (netdev);
drivers/net/ethernet/micrel/ksz884x.c +5 -1
@@ -6317,11 +6317,15 @@ static int netdev_set_pauseparam(struct net_device *dev,* netdev_get_ringparam - get tx/rx ring parameters * @dev: Network device. * @ring: Ethtool RING settings data structure. +* @kernel_ring: Ethtool external RING settings data structure. +* @extack: Netlink handle. * * This procedure returns the TX/RX ring settings. */ static void netdev_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct dev_priv *priv =netdev_priv (dev);struct dev_info *hw_priv = priv->adapter;
drivers/net/ethernet/myricom/myri10ge/myri10ge.c +3 -1
@@ -1704,7 +1704,9 @@ myri10ge_set_pauseparam(struct net_device *netdev,static void myri10ge_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct myri10ge_priv *mgp =netdev_priv (netdev);
drivers/net/ethernet/neterion/s2io.c +5 -2
@@ -5461,8 +5461,11 @@ static int s2io_ethtool_set_led(struct net_device *dev,return 0 ; } -static void s2io_ethtool_gringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +static void +s2io_ethtool_gringparam (struct net_device *dev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct s2io_nic *sp =netdev_priv (dev);int i, tx_desc_count =0 , rx_desc_count =0 ;
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c +6 -2
@@ -381,7 +381,9 @@ nfp_net_set_link_ksettings(struct net_device *netdev, }static void nfp_net_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct nfp_net *nn =netdev_priv (netdev);
@@ -406,7 +408,9 @@ static int nfp_net_set_ring_size(struct nfp_net *nn, u32 rxd_cnt, u32 txd_cnt) }static int nfp_net_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct nfp_net *nn =netdev_priv (netdev);u32 rxd_cnt, txd_cnt;
drivers/net/ethernet/nvidia/forcedeth.c +8 -2
@@ -4651,7 +4651,10 @@ static int nv_nway_reset(struct net_device *dev)return ret; } -static void nv_get_ringparam (struct net_device *dev,struct ethtool_ringparam * ring) +static void nv_get_ringparam (struct net_device *dev, +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct fe_priv *np =netdev_priv (dev);
@@ -4662,7 +4665,10 @@ static void nv_get_ringparam(struct net_device *dev, struct ethtool_ringparam* r ring->tx_pending = np->tx_ring_size; } -static int nv_set_ringparam (struct net_device *dev,struct ethtool_ringparam * ring) +static int nv_set_ringparam (struct net_device *dev, +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct fe_priv *np =netdev_priv (dev);u8 __iomem *base =get_hwbase (dev);
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c +10 -2
@@ -270,9 +270,13 @@ static int pch_gbe_nway_reset(struct net_device *netdev)* pch_gbe_get_ringparam - Report ring sizes * @netdev: Network interface device structure * @ring: Ring param structure +* @kernel_ring: Ring external param structure +* @extack: netlink handle */ static void pch_gbe_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct pch_gbe_adapter *adapter =netdev_priv (netdev);struct pch_gbe_tx_ring *txdr = adapter->tx_ring;
@@ -288,12 +292,16 @@ static void pch_gbe_get_ringparam(struct net_device *netdev,* pch_gbe_set_ringparam - Set ring sizes * @netdev: Network interface device structure * @ring: Ring param structure +* @kernel_ring: Ring external param structure +* @extack: netlink handle * Returns * 0: Successful. * Negative value: Failed. */ static int pch_gbe_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct pch_gbe_adapter *adapter =netdev_priv (netdev);struct pch_gbe_tx_ring *txdr, *tx_old;
drivers/net/ethernet/pasemi/pasemi_mac_ethtool.c +3 -1
@@ -69,7 +69,9 @@ pasemi_mac_ethtool_set_msglevel(struct net_device *netdev,static void pasemi_mac_ethtool_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct pasemi_mac *mac =netdev_priv (netdev);
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +6 -2
@@ -512,7 +512,9 @@ static int ionic_set_coalesce(struct net_device *netdev, }static void ionic_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ionic_lif *lif =netdev_priv (netdev);
@@ -523,7 +525,9 @@ static void ionic_get_ringparam(struct net_device *netdev, }static int ionic_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ionic_lif *lif =netdev_priv (netdev);struct ionic_queue_params qparam;
drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c +6 -2
@@ -392,7 +392,9 @@ netxen_nic_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,static void netxen_nic_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct netxen_adapter *adapter =netdev_priv (dev);
@@ -430,7 +432,9 @@ netxen_validate_ringparam(u32 val, u32 min, u32 max, char *r_name)static int netxen_nic_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct netxen_adapter *adapter =netdev_priv (dev);u16 max_rcv_desc =MAX_RCV_DESCRIPTORS_10G ;
drivers/net/ethernet/qlogic/qede/qede_ethtool.c +6 -2
@@ -888,7 +888,9 @@ int qede_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal, }static void qede_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct qede_dev *edev =netdev_priv (dev);
@@ -899,7 +901,9 @@ static void qede_get_ringparam(struct net_device *dev, }static int qede_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct qede_dev *edev =netdev_priv (dev);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c +6 -2
@@ -632,7 +632,9 @@ qlcnic_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,static void qlcnic_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct qlcnic_adapter *adapter =netdev_priv (dev);
@@ -663,7 +665,9 @@ qlcnic_validate_ringparam(u32 val, u32 min, u32 max, char *r_name)static int qlcnic_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct qlcnic_adapter *adapter =netdev_priv (dev);u16 num_rxd, num_jumbo_rxd, num_txd;
drivers/net/ethernet/qualcomm/emac/emac-ethtool.c +6 -2
@@ -133,7 +133,9 @@ static int emac_nway_reset(struct net_device *netdev) }static void emac_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct emac_adapter *adpt =netdev_priv (netdev);
@@ -144,7 +146,9 @@ static void emac_get_ringparam(struct net_device *netdev, }static int emac_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct emac_adapter *adpt =netdev_priv (netdev);
drivers/net/ethernet/qualcomm/qca_debug.c +6 -2
@@ -246,7 +246,9 @@ qcaspi_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p) }static void -qcaspi_get_ringparam (struct net_device *dev,struct ethtool_ringparam *ring) +qcaspi_get_ringparam (struct net_device *dev,struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct qcaspi *qca =netdev_priv (dev);
@@ -257,7 +259,9 @@ qcaspi_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring) }static int -qcaspi_set_ringparam (struct net_device *dev,struct ethtool_ringparam *ring) +qcaspi_set_ringparam (struct net_device *dev,struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {const struct net_device_ops *ops = dev->netdev_ops;struct qcaspi *qca =netdev_priv (dev);
drivers/net/ethernet/realtek/8139cp.c +3 -1
@@ -1388,7 +1388,9 @@ static void cp_get_drvinfo (struct net_device *dev, struct ethtool_drvinfo *info }static void cp_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) { ring->rx_max_pending =CP_RX_RING_SIZE ; ring->tx_max_pending =CP_TX_RING_SIZE ;
drivers/net/ethernet/realtek/r8169_main.c +3 -1
@@ -1873,7 +1873,9 @@ static int rtl8169_set_eee(struct net_device *dev, struct ethtool_eee *data) }static void rtl8169_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *data) +struct ethtool_ringparam *data, +struct kernel_ethtool_ringparam *kernel_data, +struct netlink_ext_ack *extack) { data->rx_max_pending =NUM_RX_DESC ; data->rx_pending =NUM_RX_DESC ;
drivers/net/ethernet/renesas/ravb_main.c +6 -2
@@ -1605,7 +1605,9 @@ static void ravb_get_strings(struct net_device *ndev, u32 stringset, u8 *data) }static void ravb_get_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ravb_private *priv =netdev_priv (ndev);
@@ -1616,7 +1618,9 @@ static void ravb_get_ringparam(struct net_device *ndev, }static int ravb_set_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ravb_private *priv =netdev_priv (ndev);const struct ravb_hw_info *info = priv->info;
drivers/net/ethernet/renesas/sh_eth.c +6 -2
@@ -2296,7 +2296,9 @@ static void sh_eth_get_strings(struct net_device *ndev, u32 stringset, u8 *data) }static void sh_eth_get_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct sh_eth_private *mdp =netdev_priv (ndev);
@@ -2307,7 +2309,9 @@ static void sh_eth_get_ringparam(struct net_device *ndev, }static int sh_eth_set_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct sh_eth_private *mdp =netdev_priv (ndev);int ret;
drivers/net/ethernet/sfc/ef100_ethtool.c +5 -2
@@ -20,8 +20,11 @@/* This is the maximum number of descriptor rings supported by the QDMA */ #define EFX_EF100_MAX_DMAQ_SIZE 16384UL -static void ef100_ethtool_get_ringparam (struct net_device *net_dev, -struct ethtool_ringparam *ring) +static void +ef100_ethtool_get_ringparam (struct net_device *net_dev, +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct efx_nic *efx =netdev_priv (net_dev);
drivers/net/ethernet/sfc/ethtool.c +10 -4
@@ -157,8 +157,11 @@ static int efx_ethtool_set_coalesce(struct net_device *net_dev,return 0 ; } -static void efx_ethtool_get_ringparam (struct net_device *net_dev, -struct ethtool_ringparam *ring) +static void +efx_ethtool_get_ringparam (struct net_device *net_dev, +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct efx_nic *efx =netdev_priv (net_dev);
@@ -168,8 +171,11 @@ static void efx_ethtool_get_ringparam(struct net_device *net_dev, ring->tx_pending = efx->txq_entries; } -static int efx_ethtool_set_ringparam (struct net_device *net_dev, -struct ethtool_ringparam *ring) +static int +efx_ethtool_set_ringparam (struct net_device *net_dev, +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct efx_nic *efx =netdev_priv (net_dev);u32 txq_entries;
drivers/net/ethernet/sfc/falcon/ethtool.c +10 -4
@@ -637,8 +637,11 @@ static int ef4_ethtool_set_coalesce(struct net_device *net_dev,return 0 ; } -static void ef4_ethtool_get_ringparam (struct net_device *net_dev, -struct ethtool_ringparam *ring) +static void +ef4_ethtool_get_ringparam (struct net_device *net_dev, +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ef4_nic *efx =netdev_priv (net_dev);
@@ -648,8 +651,11 @@ static void ef4_ethtool_get_ringparam(struct net_device *net_dev, ring->tx_pending = efx->txq_entries; } -static int ef4_ethtool_set_ringparam (struct net_device *net_dev, -struct ethtool_ringparam *ring) +static int +ef4_ethtool_set_ringparam (struct net_device *net_dev, +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct ef4_nic *efx =netdev_priv (net_dev);u32 txq_entries;
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +6 -2
@@ -463,7 +463,9 @@ static int stmmac_nway_reset(struct net_device *dev) }static void stmmac_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct stmmac_priv *priv =netdev_priv (netdev);
@@ -474,7 +476,9 @@ static void stmmac_get_ringparam(struct net_device *netdev, }static int stmmac_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) { if (ring->rx_mini_pending || ring->rx_jumbo_pending || ring->rx_pending < DMA_MIN_RX_SIZE ||
drivers/net/ethernet/tehuti/tehuti.c +10 -2
@@ -2245,9 +2245,13 @@ static inline int bdx_tx_fifo_size_to_packets(int tx_size)* bdx_get_ringparam - report ring sizes * @netdev * @ring +* @kernel_ring +* @extack */ static void -bdx_get_ringparam (struct net_device *netdev,struct ethtool_ringparam *ring) +bdx_get_ringparam (struct net_device *netdev,struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct bdx_priv *priv =netdev_priv (netdev);
@@ -2262,9 +2266,13 @@ bdx_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)* bdx_set_ringparam - set ring sizes * @netdev * @ring +* @kernel_ring +* @extack */ static int -bdx_set_ringparam (struct net_device *netdev,struct ethtool_ringparam *ring) +bdx_set_ringparam (struct net_device *netdev,struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct bdx_priv *priv =netdev_priv (netdev);int rx_size =0 ;
drivers/net/ethernet/ti/am65-cpsw-ethtool.c +5 -2
@@ -453,8 +453,11 @@ static int am65_cpsw_set_channels(struct net_device *ndev,return am65_cpsw_nuss_update_tx_chns (common, chs->tx_count); } -static void am65_cpsw_get_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ering) +static void +am65_cpsw_get_ringparam (struct net_device *ndev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct am65_cpsw_common *common =am65_ndev_to_common (ndev);
drivers/net/ethernet/ti/cpmac.c +6 -2
@@ -817,7 +817,9 @@ static void cpmac_tx_timeout(struct net_device *dev, unsigned int txqueue) }static void cpmac_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct cpmac_priv *priv =netdev_priv (dev);
@@ -833,7 +835,9 @@ static void cpmac_get_ringparam(struct net_device *dev, }static int cpmac_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct cpmac_priv *priv =netdev_priv (dev);
drivers/net/ethernet/ti/cpsw_ethtool.c +6 -2
@@ -658,7 +658,9 @@ int cpsw_set_channels_common(struct net_device *ndev, }void cpsw_get_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct cpsw_priv *priv =netdev_priv (ndev);struct cpsw_common *cpsw = priv->cpsw;
@@ -671,7 +673,9 @@ void cpsw_get_ringparam(struct net_device *ndev, }int cpsw_set_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct cpsw_common *cpsw =ndev_to_cpsw (ndev);int descs_num, ret;
drivers/net/ethernet/ti/cpsw_priv.h +6 -2
@@ -491,9 +491,13 @@ int cpsw_get_eee(struct net_device *ndev, struct ethtool_eee *edata);int cpsw_set_eee (struct net_device *ndev,struct ethtool_eee *edata);int cpsw_nway_reset (struct net_device *ndev);void cpsw_get_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ering); +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack);int cpsw_set_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ering); +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack);int cpsw_set_channels_common (struct net_device *ndev,struct ethtool_channels *chs,cpdma_handler_fn rx_handler);
drivers/net/ethernet/toshiba/spider_net_ethtool.c +3 -1
@@ -110,7 +110,9 @@ spider_net_ethtool_nway_reset(struct net_device *netdev)static void spider_net_ethtool_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ering) +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct spider_net_card *card =netdev_priv (netdev);
drivers/net/ethernet/xilinx/ll_temac_main.c +10 -4
@@ -1276,8 +1276,11 @@ static const struct attribute_group temac_attr_group = {* ethtool support */ -static void ll_temac_ethtools_get_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ering) +static void +ll_temac_ethtools_get_ringparam (struct net_device *ndev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct temac_local *lp =netdev_priv (ndev);
@@ -1291,8 +1294,11 @@ static void ll_temac_ethtools_get_ringparam(struct net_device *ndev, ering->tx_pending = lp->tx_bd_num; } -static int ll_temac_ethtools_set_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ering) +static int +ll_temac_ethtools_set_ringparam (struct net_device *ndev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct temac_local *lp =netdev_priv (ndev);
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +10 -4
@@ -1323,8 +1323,11 @@ static void axienet_ethtools_get_regs(struct net_device *ndev, data[39 ] =axienet_dma_in32 (lp,XAXIDMA_RX_TDESC_OFFSET ); } -static void axienet_ethtools_get_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ering) +static void +axienet_ethtools_get_ringparam (struct net_device *ndev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct axienet_local *lp =netdev_priv (ndev);
@@ -1338,8 +1341,11 @@ static void axienet_ethtools_get_ringparam(struct net_device *ndev, ering->tx_pending = lp->tx_bd_num; } -static int axienet_ethtools_set_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ering) +static int +axienet_ethtools_set_ringparam (struct net_device *ndev, +struct ethtool_ringparam *ering, +struct kernel_ethtool_ringparam *kernel_ering, +struct netlink_ext_ack *extack) {struct axienet_local *lp =netdev_priv (ndev);
drivers/net/hyperv/netvsc_drv.c +6 -2
@@ -1858,7 +1858,9 @@ static void __netvsc_get_ringparam(struct netvsc_device *nvdev, }static void netvsc_get_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct net_device_context *ndevctx =netdev_priv (ndev);struct netvsc_device *nvdev =rtnl_dereference (ndevctx->nvdev);
@@ -1870,7 +1872,9 @@ static void netvsc_get_ringparam(struct net_device *ndev, }static int netvsc_set_ringparam (struct net_device *ndev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct net_device_context *ndevctx =netdev_priv (ndev);struct netvsc_device *nvdev =rtnl_dereference (ndevctx->nvdev);
drivers/net/netdevsim/ethtool.c +6 -2
@@ -65,7 +65,9 @@ static int nsim_set_coalesce(struct net_device *dev, }static void nsim_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct netdevsim *ns =netdev_priv (dev);
@@ -73,7 +75,9 @@ static void nsim_get_ringparam(struct net_device *dev, }static int nsim_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct netdevsim *ns =netdev_priv (dev);
drivers/net/usb/r8152.c +6 -2
@@ -8983,7 +8983,9 @@ static int rtl8152_set_tunable(struct net_device *netdev, }static void rtl8152_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct r8152 *tp =netdev_priv (netdev);
@@ -8992,7 +8994,9 @@ static void rtl8152_get_ringparam(struct net_device *netdev, }static int rtl8152_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct r8152 *tp =netdev_priv (netdev);
drivers/net/virtio_net.c +3 -1
@@ -2174,7 +2174,9 @@ static void virtnet_cpu_notif_remove(struct virtnet_info *vi) }static void virtnet_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *ring) +struct ethtool_ringparam *ring, +struct kernel_ethtool_ringparam *kernel_ring, +struct netlink_ext_ack *extack) {struct virtnet_info *vi =netdev_priv (dev);
drivers/net/vmxnet3/vmxnet3_ethtool.c +6 -4
@@ -575,10 +575,11 @@ vmxnet3_get_link_ksettings(struct net_device *netdev,return 0 ; } -static void vmxnet3_get_ringparam (struct net_device *netdev, -struct ethtool_ringparam *param) +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param, +struct netlink_ext_ack *extack) {struct vmxnet3_adapter *adapter =netdev_priv (netdev);
@@ -595,10 +596,11 @@ vmxnet3_get_ringparam(struct net_device *netdev, param->rx_jumbo_pending = adapter->rx_ring2_size; } -static int vmxnet3_set_ringparam (struct net_device *netdev, -struct ethtool_ringparam *param) +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param, +struct netlink_ext_ack *extack) {struct vmxnet3_adapter *adapter =netdev_priv (netdev);u32 new_tx_ring_size, new_rx_ring_size, new_rx_ring2_size;
drivers/s390/net/qeth_ethtool.c +3 -1
@@ -144,7 +144,9 @@ static int qeth_set_coalesce(struct net_device *dev, }static void qeth_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *param) +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param, +struct netlink_ext_ack *extack) {struct qeth_card *card = dev->ml_priv;
include/linux/ethtool.h +6 -2
@@ -656,9 +656,13 @@ struct ethtool_ops { struct kernel_ethtool_coalesce *, struct netlink_ext_ack *);void (*get_ringparam)(struct net_device *, -struct ethtool_ringparam *); +struct ethtool_ringparam *, +struct kernel_ethtool_ringparam *, +struct netlink_ext_ack *);int (*set_ringparam)(struct net_device *, -struct ethtool_ringparam *); +struct ethtool_ringparam *, +struct kernel_ethtool_ringparam *, +struct netlink_ext_ack *);void (*get_pause_stats)(struct net_device *dev,struct ethtool_pause_stats *pause_stats); void (*get_pauseparam)(struct net_device *,
net/ethtool/ioctl.c +7 -3
@@ -1743,11 +1743,13 @@ static noinline_for_stack int ethtool_set_coalesce(struct net_device *dev,static int ethtool_get_ringparam (struct net_device *dev,void __user *useraddr) {struct ethtool_ringparam ringparam = { .cmd =ETHTOOL_GRINGPARAM }; +struct kernel_ethtool_ringparam kernel_ringparam = {};if (!dev->ethtool_ops->get_ringparam)return -EOPNOTSUPP ; - dev->ethtool_ops->get_ringparam (dev, &ringparam); + dev->ethtool_ops->get_ringparam (dev, &ringparam, + &kernel_ringparam,NULL );if (copy_to_user (useraddr, &ringparam,sizeof (ringparam)))return -EFAULT ;
@@ -1757,6 +1759,7 @@ static int ethtool_get_ringparam(struct net_device *dev, void __user *useraddr)static int ethtool_set_ringparam (struct net_device *dev,void __user *useraddr) {struct ethtool_ringparam ringparam, max = { .cmd =ETHTOOL_GRINGPARAM }; +struct kernel_ethtool_ringparam kernel_ringparam;int ret;if (!dev->ethtool_ops->set_ringparam || !dev->ethtool_ops->get_ringparam)
@@ -1765,7 +1768,7 @@ static int ethtool_set_ringparam(struct net_device *dev, void __user *useraddr)if (copy_from_user (&ringparam, useraddr,sizeof (ringparam)))return -EFAULT ; - dev->ethtool_ops->get_ringparam (dev, &max); + dev->ethtool_ops->get_ringparam (dev, &max, &kernel_ringparam,NULL );/* ensure new ring parameters are within the maximums */ if (ringparam.rx_pending > max.rx_max_pending ||
@@ -1774,7 +1777,8 @@ static int ethtool_set_ringparam(struct net_device *dev, void __user *useraddr) ringparam.tx_pending > max.tx_max_pending)return -EINVAL ; - ret = dev->ethtool_ops->set_ringparam (dev, &ringparam); + ret = dev->ethtool_ops->set_ringparam (dev, &ringparam, + &kernel_ringparam,NULL );if (!ret)ethtool_notify (dev,ETHTOOL_MSG_RINGS_NTF ,NULL );return ret;
net/ethtool/rings.c +6 -3
@@ -26,6 +26,7 @@ static int rings_prepare_data(const struct ethnl_req_info *req_base, struct genl_info *info) {struct rings_reply_data *data =RINGS_REPDATA (reply_base); +struct netlink_ext_ack *extack = info ? info->extack :NULL ;struct net_device *dev = reply_base->dev;int ret;
@@ -34,7 +35,8 @@ static int rings_prepare_data(const struct ethnl_req_info *req_base, ret =ethnl_ops_begin (dev);if (ret <0 )return ret; - dev->ethtool_ops->get_ringparam (dev, &data->ringparam); + dev->ethtool_ops->get_ringparam (dev, &data->ringparam, + &data->kernel_ringparam, extack);ethnl_ops_complete (dev);return 0 ;
@@ -142,7 +144,7 @@ int ethnl_set_rings(struct sk_buff *skb, struct genl_info *info) ret =ethnl_ops_begin (dev);if (ret <0 ) goto out_rtnl; - ops->get_ringparam (dev, &ringparam); + ops->get_ringparam (dev, &ringparam, &kernel_ringparam, info->extack);ethnl_update_u32 (&ringparam.rx_pending, tb[ETHTOOL_A_RINGS_RX ], &mod); ethnl_update_u32(&ringparam.rx_mini_pending,
@@ -183,7 +185,8 @@ int ethnl_set_rings(struct sk_buff *skb, struct genl_info *info) goto out_ops; } - ret = dev->ethtool_ops->set_ringparam (dev, &ringparam); + ret = dev->ethtool_ops->set_ringparam (dev, &ringparam, + &kernel_ringparam, info->extack);if (ret <0 ) goto out_ops;ethtool_notify (dev,ETHTOOL_MSG_RINGS_NTF ,NULL );
net/mac80211/ethtool.c +6 -2
@@ -14,7 +14,9 @@#include "driver-ops.h" static int ieee80211_set_ringparam (struct net_device *dev, -struct ethtool_ringparam *rp) +struct ethtool_ringparam *rp, +struct kernel_ethtool_ringparam *kernel_rp, +struct netlink_ext_ack *extack) {struct ieee80211_local *local =wiphy_priv (dev->ieee80211_ptr->wiphy);
@@ -25,7 +27,9 @@ static int ieee80211_set_ringparam(struct net_device *dev, }static void ieee80211_get_ringparam (struct net_device *dev, -struct ethtool_ringparam *rp) +struct ethtool_ringparam *rp, +struct kernel_ethtool_ringparam *kernel_rp, +struct netlink_ext_ack *extack) {struct ieee80211_local *local =wiphy_priv (dev->ieee80211_ptr->wiphy);
Signature · 1 line
2.33.0
PATCH v7 5/6 net: hns3: add support to set/get rx buf len via ethtool for hns3 driver
In reply to Guangbin HuangFrom: Hao Chen <[email protected]>
Rx buf len is for rx BD buffer size, support setting it via ethtool -G parameter and getting it via ethtool -g parameter.
--- .../ethernet/hisilicon/hns3/hns3_ethtool.c | 52 ++++++++++++++++--- 1 file changed, 44 insertions(+), 8 deletions(-)
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +44 -8
@@ -649,7 +649,7 @@ static void hns3_get_ringparam(struct net_device *netdev, {struct hns3_nic_priv *priv =netdev_priv (netdev);struct hnae3_handle *h = priv->ae_handle; -int queue_num = h->kinfo.num_tqps; +int rx_queue_index = h->kinfo.num_tqps;if (hns3_nic_resetting (netdev)) {netdev_err (netdev,"dev resetting!" );
@@ -660,7 +660,8 @@ static void hns3_get_ringparam(struct net_device *netdev, param->rx_max_pending =HNS3_RING_MAX_PENDING ; param->tx_pending = priv->ring[0 ].desc_num; - param->rx_pending = priv->ring[queue_num].desc_num; + param->rx_pending = priv->ring[rx_queue_index].desc_num; + kernel_param->rx_buf_len = priv->ring[rx_queue_index].buf_size; } static void hns3_get_pauseparam(struct net_device *netdev,
@@ -1062,14 +1063,23 @@ static struct hns3_enet_ring *hns3_backup_ringparam(struct hns3_nic_priv *priv) }static int hns3_check_ringparam (struct net_device *ndev, -struct ethtool_ringparam *param) +struct ethtool_ringparam *param, +struct kernel_ethtool_ringparam *kernel_param) { +#define RX_BUF_LEN_2K 2048 +#define RX_BUF_LEN_4K 4096if (hns3_nic_resetting (ndev))return -EBUSY ;if (param->rx_mini_pending || param->rx_jumbo_pending)return -EINVAL ; +if (kernel_param->rx_buf_len !=RX_BUF_LEN_2K && + kernel_param->rx_buf_len !=RX_BUF_LEN_4K ) { +netdev_err (ndev,"Rx buf len only support 2048 and 4096\n" ); +return -EINVAL ; + } + if (param->tx_pending > HNS3_RING_MAX_PENDING || param->tx_pending < HNS3_RING_MIN_PENDING || param->rx_pending > HNS3_RING_MAX_PENDING ||
@@ -1082,6 +1092,22 @@ static int hns3_check_ringparam(struct net_device *ndev,return 0 ; } +static int hns3_change_rx_buf_len (struct net_device *ndev,u32 rx_buf_len) +{ +struct hns3_nic_priv *priv =netdev_priv (ndev); +struct hnae3_handle *h = priv->ae_handle; +int i; + + h->kinfo.rx_buf_len = rx_buf_len; + +for (i =0 ; i < h->kinfo.num_tqps; i++) { + h->kinfo.tqp[i]->buf_size = rx_buf_len; + priv->ring[i + h->kinfo.num_tqps].buf_size = rx_buf_len; + } + +return 0 ; +} + static int hns3_set_ringparam(struct net_device *ndev, struct ethtool_ringparam *param, struct kernel_ethtool_ringparam *kernel_param,
@@ -1094,9 +1120,10 @@ static int hns3_set_ringparam(struct net_device *ndev,u32 old_tx_desc_num, new_tx_desc_num;u32 old_rx_desc_num, new_rx_desc_num;u16 queue_num = h->kinfo.num_tqps; +u32 old_rx_buf_len;int ret, i; - ret =hns3_check_ringparam (ndev, param); + ret =hns3_check_ringparam (ndev, param, kernel_param);if (ret)return ret;
@@ -1105,8 +1132,10 @@ static int hns3_set_ringparam(struct net_device *ndev, new_rx_desc_num =ALIGN (param->rx_pending,HNS3_RING_BD_MULTIPLE ); old_tx_desc_num = priv->ring[0 ].desc_num; old_rx_desc_num = priv->ring[queue_num].desc_num; + old_rx_buf_len = priv->ring[queue_num].buf_size;if (old_tx_desc_num == new_tx_desc_num && - old_rx_desc_num == new_rx_desc_num) + old_rx_desc_num == new_rx_desc_num && + kernel_param->rx_buf_len == old_rx_buf_len)return 0 ; tmp_rings =hns3_backup_ringparam (priv);
@@ -1117,19 +1146,22 @@ static int hns3_set_ringparam(struct net_device *ndev, }netdev_info (ndev, -"Changing Tx/Rx ring depth from %u/%u to %u/%u\n" , +"Changing Tx/Rx ring depth from %u/%u to %u/%u, Changing rx buffer len from %d to %d\n" , old_tx_desc_num, old_rx_desc_num, - new_tx_desc_num, new_rx_desc_num); + new_tx_desc_num, new_rx_desc_num, + old_rx_buf_len, kernel_param->rx_buf_len);if (if_running) ndev->netdev_ops->ndo_stop (ndev);hns3_change_all_ring_bd_num (priv, new_tx_desc_num, new_rx_desc_num); +hns3_change_rx_buf_len (ndev, kernel_param->rx_buf_len); ret =hns3_init_all_ring (priv);if (ret) { -netdev_err (ndev,"Change bd num fail, revert to old value(%d)\n" , +netdev_err (ndev,"set ringparam fail, revert to old value(%d)\n" , ret); +hns3_change_rx_buf_len (ndev, old_rx_buf_len);hns3_change_all_ring_bd_num (priv, old_tx_desc_num, old_rx_desc_num);for (i =0 ; i < h->kinfo.num_tqps *2 ; i++)
@@ -1811,6 +1843,8 @@ static int hns3_set_tunable(struct net_device *netdev, ETHTOOL_COALESCE_MAX_FRAMES | \ ETHTOOL_COALESCE_USE_CQE) +#define HNS3_ETHTOOL_RING ETHTOOL_RING_USE_RX_BUF_LEN +static int hns3_get_ts_info (struct net_device *netdev,struct ethtool_ts_info *info) {
@@ -1889,6 +1923,7 @@ static int hns3_get_link_ext_state(struct net_device *netdev,static const struct ethtool_ops hns3vf_ethtool_ops = { .supported_coalesce_params =HNS3_ETHTOOL_COALESCE , + .supported_ring_params =HNS3_ETHTOOL_RING , .get_drvinfo = hns3_get_drvinfo, .get_ringparam = hns3_get_ringparam, .set_ringparam = hns3_set_ringparam,
@@ -1920,6 +1955,7 @@ static const struct ethtool_ops hns3vf_ethtool_ops = {static const struct ethtool_ops hns3_ethtool_ops = { .supported_coalesce_params =HNS3_ETHTOOL_COALESCE , + .supported_ring_params =HNS3_ETHTOOL_RING , .self_test = hns3_self_test, .get_drvinfo = hns3_get_drvinfo, .get_link = hns3_get_link,
Signature · 1 line
2.33.0
PATCH v7 6/6 net: hns3: remove the way to set tx spare buf via module parameter
In reply to Guangbin HuangFrom: Hao Chen <[email protected]>
The way to set tx spare buf via module parameter is not such convenient as the way to set it via ethtool.
So,remove the way to set tx spare buf via module parameter.
--- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +1 -6
@@ -53,10 +53,6 @@ static int debug = -1;module_param (debug, int,0 );MODULE_PARM_DESC (debug," Network interface message level setting" ); -static unsigned int tx_spare_buf_size; -module_param (tx_spare_buf_size, uint,0400 ); -MODULE_PARM_DESC (tx_spare_buf_size,"Size used to allocate tx spare buffer" ); -static unsigned int tx_sgl =1 ;module_param (tx_sgl, uint,0600 );MODULE_PARM_DESC (tx_sgl,"Minimum number of frags when using dma_map_sg() to optimize the IOMMU mapping" );
@@ -1041,8 +1037,7 @@ static void hns3_init_tx_spare_buffer(struct hns3_enet_ring *ring)dma_addr_t dma;int order; - alloc_size = tx_spare_buf_size ? tx_spare_buf_size : - ring->tqp->handle->kinfo.tx_spare_buf_size; + alloc_size = ring->tqp->handle->kinfo.tx_spare_buf_size;if (!alloc_size)return ;
Signature · 1 line
2.33.0
This series was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Quoted 10 lines · On Thu, 18 Nov 2021 20:12:39 +0800 you wrote:
From: Hao Chen <[email protected]>
This series add support to set/get tx copybreak buf size and rx buf len via ethtool and hns3 driver implements them.
Tx copybreak buf size is used for tx copybreak feature which for small size packet or frag. Use ethtool --get-tunable command to get it, and ethtool --set-tunable command to set it, examples are as follow:
[...]
Here is the summary with links:
- [V7,net-next,1/6] ethtool: add support to set/get tx copybreak buf size via ethtool
https://git.kernel.org/netdev/net-next/c/448f413a8bdc - [V7,net-next,2/6] net: hns3: add support to set/get tx copybreak buf size via ethtool for hns3 driver https://git.kernel.org/netdev/net-next/c/e445f08af2b1 - [V7,net-next,3/6] ethtool: add support to set/get rx buf len via ethtool https://git.kernel.org/netdev/net-next/c/0b70c256eba8 - [V7,net-next,4/6] ethtool: extend ringparam setting/getting API with rx_buf_len https://git.kernel.org/netdev/net-next/c/7462494408cd - [V7,net-next,5/6] net: hns3: add support to set/get rx buf len via ethtool for hns3 driver https://git.kernel.org/netdev/net-next/c/e65a0231d2ca - [V7,net-next,6/6] net: hns3: remove the way to set tx spare buf via module parameter https://git.kernel.org/netdev/net-next/c/e175eb5fb054
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Quoted 9 lines · Guangbin Huang
From: Hao Chen <[email protected]>
This series add support to set/get tx copybreak buf size and rx buf len via ethtool and hns3 driver implements them.
Tx copybreak buf size is used for tx copybreak feature which for small size packet or frag. Use ethtool --get-tunable command to get it, and ethtool --set-tunable command to set it, examples are as follow:
Quoted 6 lines
1. set tx spare buf size to 102400:
$ ethtool --set-tunable eth1 tx-buf-size 1024002. get tx spare buf size:
$ ethtool --get-tunable eth1 tx-buf-size tx-buf-size: 102400
Hi Guangbin,
Can you please clarify the difference between TX copybreak and TX copybreak buf size?
Quoted 13 lines · Gal Pressman
Quoted 12 lines · Guangbin Huang
From: Hao Chen <[email protected]>
This series add support to set/get tx copybreak buf size and rx buf len via ethtool and hns3 driver implements them.
Tx copybreak buf size is used for tx copybreak feature which for small size packet or frag. Use ethtool --get-tunable command to get it, and ethtool --set-tunable command to set it, examples are as follow:
1. set tx spare buf size to 102400:
$ ethtool --set-tunable eth1 tx-buf-size 102400
Quoted 7 lines
Quoted 3 lines
2. get tx spare buf size:
$ ethtool --get-tunable eth1 tx-buf-size tx-buf-size: 102400Hi Guangbin,
Can you please clarify the difference between TX copybreak and TX copybreak buf size?
Hi Gal,
'TX copybreak buf size' is the size of buffer allocated to a queue in order to support copybreak handling when skb->len <= 'TX copybreak',
see hns3_can_use_tx_bounce() for 'TX copybreak' and hns3_init_tx_spare_buffer() for 'TX copybreak buf size'.
Quoted 2 lines
.
Quoted 20 lines · Yunsheng Lin
Quoted 13 lines · Gal Pressman
Quoted 12 lines · Guangbin Huang
From: Hao Chen <[email protected]>
This series add support to set/get tx copybreak buf size and rx buf len via ethtool and hns3 driver implements them.
Tx copybreak buf size is used for tx copybreak feature which for small size packet or frag. Use ethtool --get-tunable command to get it, and ethtool --set-tunable command to set it, examples are as follow:
1. set tx spare buf size to 102400:
$ ethtool --set-tunable eth1 tx-buf-size 102400Quoted 6 lines
Quoted 3 lines
2. get tx spare buf size:
$ ethtool --get-tunable eth1 tx-buf-size tx-buf-size: 102400Hi Guangbin,
Can you please clarify the difference between TX copybreak and TX copybreak buf size?
Quoted 6 lines
Hi Gal,
'TX copybreak buf size' is the size of buffer allocated to a queue in order to support copybreak handling whenskb->len<= 'TX copybreak',see
hns3_can_use_tx_bounce()for 'TX copybreak' andhns3_init_tx_spare_buffer()for 'TX copybreak buf size'.
Thanks Yunsheng!
IIUC, there's a single buffer per TX queue, not per TX packet, correct?
One way to implement TX copybreak is using an inline WQE, where the WQE itself serves as the bounce buffer, sounds like 'TX copybreak buf size' cannot be used in such case?
Quoted 25 lines · Gal Pressman
Quoted 24 lines · Yunsheng Lin
Quoted 13 lines · Gal Pressman
Quoted 12 lines · Guangbin Huang
From: Hao Chen <[email protected]>
This series add support to set/get tx copybreak buf size and rx buf len via ethtool and hns3 driver implements them.
Tx copybreak buf size is used for tx copybreak feature which for small size packet or frag. Use ethtool --get-tunable command to get it, and ethtool --set-tunable command to set it, examples are as follow:
1. set tx spare buf size to 102400:
$ ethtool --set-tunable eth1 tx-buf-size 102400Quoted 6 lines
Quoted 3 lines
2. get tx spare buf size:
$ ethtool --get-tunable eth1 tx-buf-size tx-buf-size: 102400Hi Guangbin,
Can you please clarify the difference between TX copybreak and TX copybreak buf size?Hi Gal,
'TX copybreak buf size' is the size of buffer allocated to a queue in order to support copybreak handling whenskb->len<= 'TX copybreak',
Quoted 5 lines
Quoted 2 lines
see
hns3_can_use_tx_bounce()for 'TX copybreak' andhns3_init_tx_spare_buffer()for 'TX copybreak buf size'.Thanks Yunsheng!
IIUC, there's a single buffer per TX queue, not per TX packet, correct?
Yes.
Quoted 4 lines
One way to implement TX copybreak is using an inline WQE, where the WQE itself serves as the bounce buffer, sounds like 'TX copybreak buf size' cannot be used in such case?
If TX copybreak is using an inline WQE, I suppose 'TX copybreak buf size' is not needed.
Quoted 2 lines
.