1 Star 0 Fork 11

XWwalker/iavf

forked from src-openEuler/iavf 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-extend-coalesce-setting-uAPI-with-CQE-mode.patch 2.31 KB
一键复制 编辑 原始数据 按行查看 历史
eaglegai 提交于 2022-04-16 10:13 +08:00 . fix iavf build error beacuse of kernel changes
From f3ccfda1931977b80267ba54070a1aeafa18f6ca Mon Sep 17 00:00:00 2001
From: Yufeng Mo <moyufeng@huawei.com>
Date: Fri, 20 Aug 2021 15:35:18 +0800
Subject: [PATCH] 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>
---
src/iavf_ethtool.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/iavf_ethtool.c b/src/iavf_ethtool.c
index 3f7d427..4b60027 100644
--- a/src/iavf_ethtool.c
+++ b/src/iavf_ethtool.c
@@ -753,6 +753,8 @@ static int __iavf_get_coalesce(struct net_device *netdev,
* iavf_get_coalesce - Get interrupt coalescing settings
* @netdev: network interface device structure
* @ec: ethtool coalesce structure
+ * @kernel_coal: ethtool CQE mode setting structure
+ * @extack: extack for reporting error messages
*
* Returns current coalescing settings. This is referred to elsewhere in the
* driver as Interrupt Throttle Rate, as this is how the hardware describes
@@ -760,7 +762,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);
}
@@ -898,11 +902,15 @@ static int __iavf_set_coalesce(struct net_device *netdev,
* iavf_set_coalesce - Set interrupt coalescing settings
* @netdev: network interface device structure
* @ec: ethtool coalesce structure
+ * @kernel_coal: ethtool CQE mode setting structure
+ * @extack: extack for reporting error messages
*
* 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);
}
--
2.30.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/XWwalker/iavf.git
git@gitee.com:XWwalker/iavf.git
XWwalker
iavf
iavf
master

搜索帮助