From 188865e66d08750361d94d454a0c75661fd53dce Mon Sep 17 00:00:00 2001 From: hongrongxuan Date: Fri, 10 May 2024 23:14:23 -0400 Subject: [PATCH] driver/thirdparty: extend ringparam setting/getting API with rx_buf_len --- drivers/thirdparty/hinic/hinic_ethtool.c | 8 ++++++-- drivers/thirdparty/i40e/i40e_ethtool.c | 8 ++++++-- drivers/thirdparty/iavf/iavf_ethtool.c | 8 ++++++-- drivers/thirdparty/ixgbe/ixgbe_ethtool.c | 8 ++++++-- drivers/thirdparty/ixgbevf/ixgbevf_ethtool.c | 8 ++++++-- 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/drivers/thirdparty/hinic/hinic_ethtool.c b/drivers/thirdparty/hinic/hinic_ethtool.c index 8bc88b32bdf3..911f8f37046a 100644 --- a/drivers/thirdparty/hinic/hinic_ethtool.c +++ b/drivers/thirdparty/hinic/hinic_ethtool.c @@ -963,7 +963,9 @@ static int hinic_nway_reset(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_nic_dev *nic_dev = netdev_priv(netdev); @@ -989,7 +991,9 @@ static void hinic_update_qp_depth(struct hinic_nic_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_nic_dev *nic_dev = netdev_priv(netdev); u16 new_sq_depth, new_rq_depth; diff --git a/drivers/thirdparty/i40e/i40e_ethtool.c b/drivers/thirdparty/i40e/i40e_ethtool.c index 1c1d111dc2e8..c9707c366af7 100644 --- a/drivers/thirdparty/i40e/i40e_ethtool.c +++ b/drivers/thirdparty/i40e/i40e_ethtool.c @@ -2204,7 +2204,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; @@ -2232,7 +2234,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); diff --git a/drivers/thirdparty/iavf/iavf_ethtool.c b/drivers/thirdparty/iavf/iavf_ethtool.c index 6e0988f843eb..37dc00ce3cb8 100644 --- a/drivers/thirdparty/iavf/iavf_ethtool.c +++ b/drivers/thirdparty/iavf/iavf_ethtool.c @@ -641,7 +641,9 @@ static void iavf_get_drvinfo(struct net_device *netdev, * 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); @@ -660,7 +662,9 @@ static void iavf_get_ringparam(struct net_device *netdev, * 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; diff --git a/drivers/thirdparty/ixgbe/ixgbe_ethtool.c b/drivers/thirdparty/ixgbe/ixgbe_ethtool.c index d6f8bd027cda..4bad5ce278c4 100644 --- a/drivers/thirdparty/ixgbe/ixgbe_ethtool.c +++ b/drivers/thirdparty/ixgbe/ixgbe_ethtool.c @@ -1629,7 +1629,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); @@ -1644,7 +1646,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; diff --git a/drivers/thirdparty/ixgbevf/ixgbevf_ethtool.c b/drivers/thirdparty/ixgbevf/ixgbevf_ethtool.c index 43e60b094a8a..7f6867c92aa3 100644 --- a/drivers/thirdparty/ixgbevf/ixgbevf_ethtool.c +++ b/drivers/thirdparty/ixgbevf/ixgbevf_ethtool.c @@ -386,7 +386,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); @@ -397,7 +399,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;