summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ni/nixge.c
diff options
context:
space:
mode:
authorYufeng Mo <moyufeng@huawei.com>2021-08-20 09:35:18 +0200
committerJakub Kicinski <kuba@kernel.org>2021-08-24 16:38:29 +0200
commitf3ccfda1931977b80267ba54070a1aeafa18f6ca (patch)
treec89a98145222e5d59133a4f28cb720a2549d324d /drivers/net/ethernet/ni/nixge.c
parentethtool: add two coalesce attributes for CQE mode (diff)
downloadlinux-f3ccfda1931977b80267ba54070a1aeafa18f6ca.tar.xz
linux-f3ccfda1931977b80267ba54070a1aeafa18f6ca.zip
ethtool: extend coalesce setting uAPI with CQE mode
In order to support more coalesce parameters through netlink, add two new parameter kernel_coal and extack for .set_coalesce and .get_coalesce, then some extra info can return to user with the netlink API. Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/ni/nixge.c')
-rw-r--r--drivers/net/ethernet/ni/nixge.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/ethernet/ni/nixge.c b/drivers/net/ethernet/ni/nixge.c
index 2d097dcb7bda..36fe2c0f31ff 100644
--- a/drivers/net/ethernet/ni/nixge.c
+++ b/drivers/net/ethernet/ni/nixge.c
@@ -993,8 +993,11 @@ static void nixge_ethtools_get_drvinfo(struct net_device *ndev,
strlcpy(ed->bus_info, "platform", sizeof(ed->bus_info));
}
-static int nixge_ethtools_get_coalesce(struct net_device *ndev,
- struct ethtool_coalesce *ecoalesce)
+static int
+nixge_ethtools_get_coalesce(struct net_device *ndev,
+ struct ethtool_coalesce *ecoalesce,
+ struct kernel_ethtool_coalesce *kernel_coal,
+ struct netlink_ext_ack *extack)
{
struct nixge_priv *priv = netdev_priv(ndev);
u32 regval = 0;
@@ -1008,8 +1011,11 @@ static int nixge_ethtools_get_coalesce(struct net_device *ndev,
return 0;
}
-static int nixge_ethtools_set_coalesce(struct net_device *ndev,
- struct ethtool_coalesce *ecoalesce)
+static int
+nixge_ethtools_set_coalesce(struct net_device *ndev,
+ struct ethtool_coalesce *ecoalesce,
+ struct kernel_ethtool_coalesce *kernel_coal,
+ struct netlink_ext_ack *extack)
{
struct nixge_priv *priv = netdev_priv(ndev);