fix iavf build error beacuse of kerner api changing

This commit is contained in:
eaglegai 2022-01-10 14:20:33 +08:00
parent 0335ff8994
commit 3156730f50
2 changed files with 52 additions and 5 deletions

View File

@ -0,0 +1,42 @@
From 7462494408cd3de8b0bc1e79670bf213288501d0 Mon Sep 17 00:00:00 2001
From: Hao Chen <chenhao288@hisilicon.com>
Date: Thu, 18 Nov 2021 20:12:43 +0800
Subject: ethtool: extend ringparam setting/getting API with rx_buf_len
Add two new parameters kernel_ringparam and extack for
.get_ringparam and .set_ringparam to extend more ring params
through netlink.
---
src/iavf_ethtool.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
delete mode 100644 src/.iavf_ethtool_stats.h.swp
diff --git a/src/iavf_ethtool.c b/src/iavf_ethtool.c
index 3f7d427..545685f 100644
--- a/src/iavf_ethtool.c
+++ b/src/iavf_ethtool.c
@@ -634,7 +634,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);
@@ -653,7 +655,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;
--
2.27.0

View File

@ -9,7 +9,7 @@
Name: iavf
Summary: Intel(R) Ethernet Adaptive Virtual Function Driver
Version: 4.0.1
Release: 6
Release: 7
Vendor: Intel Corporation
License: GPL-2.0
URL: http://support.intel.com
@ -21,15 +21,14 @@ BuildRequires: kernel-devel hwdata uname-build-checks gcc
Patch0: fix-build-error-with-Linux-5.10.patch
Patch6000: backport-extend-coalesce-setting-uAPI-with-CQE-mode.patch
Patch1: backport-extend-coalesce-setting-uAPI-with-CQE-mode.patch
Patch2: backport-ethtool-extend-ringparam-setting-getting-API-with-rx.patch
%description
This package contains the Intel(R) Ethernet Adaptive Virtual Function Driver.
%prep
%setup
%patch0 -p1
%patch6000 -p1
%autosetup -p1
%build
make -C src clean
@ -388,6 +387,12 @@ else
fi
%changelog
* Mon Jan 10 2022 gaihuiying <gaihuiying1@huawei.com> - 4.0.1-7
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix iavf build error beacuse of kerner api changing
* Thu Sep 16 2021 xihaochen<xihaochen@huawei.com> - 4.0.1-6
- Type:bugfix
- ID:NA