From 86475675f9fb73120ac45523dcfc68e6213ab17c Mon Sep 17 00:00:00 2001 From: hongrongxuan Date: Fri, 10 May 2024 22:09:15 -0400 Subject: [PATCH] drivers/thirdparty: extend coalesce setting uAPI with CQE mode --- drivers/thirdparty/hinic/hinic_ethtool.c | 8 ++++++-- drivers/thirdparty/i40e/i40e_ethtool.c | 8 ++++++-- drivers/thirdparty/iavf/iavf_ethtool.c | 8 ++++++-- drivers/thirdparty/ice/ice_ethtool.c | 8 ++++++-- drivers/thirdparty/ixgbe/ixgbe_ethtool.c | 8 ++++++-- drivers/thirdparty/ixgbevf/ixgbevf_ethtool.c | 8 ++++++-- 6 files changed, 36 insertions(+), 12 deletions(-) diff --git a/drivers/thirdparty/hinic/hinic_ethtool.c b/drivers/thirdparty/hinic/hinic_ethtool.c index 6dd95e68ef7d..8bc88b32bdf3 100644 --- a/drivers/thirdparty/hinic/hinic_ethtool.c +++ b/drivers/thirdparty/hinic/hinic_ethtool.c @@ -1536,13 +1536,17 @@ static int __hinic_set_coalesce(struct net_device *netdev, } static int hinic_get_coalesce(struct net_device *netdev, - struct ethtool_coalesce *coal) + struct ethtool_coalesce *coal, + struct kernel_ethtool_coalesce *kernel_coal, + struct netlink_ext_ack *extack) { return __hinic_get_coalesce(netdev, coal, COALESCE_ALL_QUEUE); } static int hinic_set_coalesce(struct net_device *netdev, - struct ethtool_coalesce *coal) + struct ethtool_coalesce *coal, + struct kernel_ethtool_coalesce *kernel_coal, + struct netlink_ext_ack *extack) { return __hinic_set_coalesce(netdev, coal, COALESCE_ALL_QUEUE); } diff --git a/drivers/thirdparty/i40e/i40e_ethtool.c b/drivers/thirdparty/i40e/i40e_ethtool.c index 7f93f74d41a0..1c1d111dc2e8 100644 --- a/drivers/thirdparty/i40e/i40e_ethtool.c +++ b/drivers/thirdparty/i40e/i40e_ethtool.c @@ -3261,7 +3261,9 @@ static int __i40e_get_coalesce(struct net_device *netdev, * __i40e_get_coalesce for more details. **/ static int i40e_get_coalesce(struct net_device *netdev, - struct ethtool_coalesce *ec) + struct ethtool_coalesce *ec, + struct kernel_ethtool_coalesce *kernel_coal, + struct netlink_ext_ack *extack) { return __i40e_get_coalesce(netdev, ec, -1); } @@ -3484,7 +3486,9 @@ static int __i40e_set_coalesce(struct net_device *netdev, * This will set each queue to the same coalesce settings. **/ static int i40e_set_coalesce(struct net_device *netdev, - struct ethtool_coalesce *ec) + struct ethtool_coalesce *ec, + struct kernel_ethtool_coalesce *kernel_coal, + struct netlink_ext_ack *extack) { return __i40e_set_coalesce(netdev, ec, -1); } diff --git a/drivers/thirdparty/iavf/iavf_ethtool.c b/drivers/thirdparty/iavf/iavf_ethtool.c index 67075abc6feb..6e0988f843eb 100644 --- a/drivers/thirdparty/iavf/iavf_ethtool.c +++ b/drivers/thirdparty/iavf/iavf_ethtool.c @@ -767,7 +767,9 @@ static int __iavf_get_coalesce(struct net_device *netdev, * only represents the settings of queue 0. **/ static int iavf_get_coalesce(struct net_device *netdev, - struct ethtool_coalesce *ec) + struct ethtool_coalesce *ec, + struct kernel_ethtool_coalesce *kernel_coal, + struct netlink_ext_ack *extack) { return __iavf_get_coalesce(netdev, ec, -1); } @@ -909,7 +911,9 @@ static int __iavf_set_coalesce(struct net_device *netdev, * Change current coalescing settings for every queue. **/ static int iavf_set_coalesce(struct net_device *netdev, - struct ethtool_coalesce *ec) + struct ethtool_coalesce *ec, + struct kernel_ethtool_coalesce *kernel_coal, + struct netlink_ext_ack *extack) { return __iavf_set_coalesce(netdev, ec, -1); } diff --git a/drivers/thirdparty/ice/ice_ethtool.c b/drivers/thirdparty/ice/ice_ethtool.c index 9d9adef809dd..926270f3a07d 100644 --- a/drivers/thirdparty/ice/ice_ethtool.c +++ b/drivers/thirdparty/ice/ice_ethtool.c @@ -5451,7 +5451,9 @@ __ice_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec, } static int -ice_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec) +ice_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec, + struct kernel_ethtool_coalesce *kernel_coal, + struct netlink_ext_ack *extack) { return __ice_get_coalesce(netdev, ec, -1); } @@ -5704,7 +5706,9 @@ set_complete: } static int -ice_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec) +ice_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec, + struct kernel_ethtool_coalesce *kernel_coal, + struct netlink_ext_ack *extack) { return __ice_set_coalesce(netdev, ec, -1); } diff --git a/drivers/thirdparty/ixgbe/ixgbe_ethtool.c b/drivers/thirdparty/ixgbe/ixgbe_ethtool.c index 6e0c9e797874..d6f8bd027cda 100644 --- a/drivers/thirdparty/ixgbe/ixgbe_ethtool.c +++ b/drivers/thirdparty/ixgbe/ixgbe_ethtool.c @@ -3048,7 +3048,9 @@ static int ixgbe_phys_id(struct net_device *netdev, u32 data) #endif /* HAVE_ETHTOOL_SET_PHYS_ID */ static int ixgbe_get_coalesce(struct net_device *netdev, - struct ethtool_coalesce *ec) + struct ethtool_coalesce *ec, + struct kernel_ethtool_coalesce *kernel_coal, + struct netlink_ext_ack *extack) { struct ixgbe_adapter *adapter = netdev_priv(netdev); @@ -3104,7 +3106,9 @@ static bool ixgbe_update_rsc(struct ixgbe_adapter *adapter) } static int ixgbe_set_coalesce(struct net_device *netdev, - struct ethtool_coalesce *ec) + struct ethtool_coalesce *ec, + struct kernel_ethtool_coalesce *kernel_coal, + struct netlink_ext_ack *extack) { struct ixgbe_adapter *adapter = netdev_priv(netdev); int i; diff --git a/drivers/thirdparty/ixgbevf/ixgbevf_ethtool.c b/drivers/thirdparty/ixgbevf/ixgbevf_ethtool.c index cab35a9c38a6..43e60b094a8a 100644 --- a/drivers/thirdparty/ixgbevf/ixgbevf_ethtool.c +++ b/drivers/thirdparty/ixgbevf/ixgbevf_ethtool.c @@ -1048,7 +1048,9 @@ static int ixgbevf_nway_reset(struct net_device *netdev) } static int ixgbevf_get_coalesce(struct net_device *netdev, - struct ethtool_coalesce *ec) + struct ethtool_coalesce *ec, + struct kernel_ethtool_coalesce *kernel_coal, + struct netlink_ext_ack *extack) { struct ixgbevf_adapter *adapter = netdev_priv(netdev); @@ -1072,7 +1074,9 @@ static int ixgbevf_get_coalesce(struct net_device *netdev, } static int ixgbevf_set_coalesce(struct net_device *netdev, - struct ethtool_coalesce *ec) + struct ethtool_coalesce *ec, + struct kernel_ethtool_coalesce *kernel_coal, + struct netlink_ext_ack *extack) { struct ixgbevf_adapter *adapter = netdev_priv(netdev); struct ixgbevf_q_vector *q_vector;