Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
c8770a789c
!28 fix build error beacuse of kernel api changes
From: @yangl777 
Reviewed-by: @robertxw 
Signed-off-by: @robertxw
2024-01-11 11:43:43 +00:00
yangl777
7ccba53ecf fix build error beacuse of kernel api changes 2024-01-11 06:24:30 +00:00
openeuler-ci-bot
ccebee4b4a
!26 fix build error beacuse of kernel api changes
From: @yangl777 
Reviewed-by: @sunsuwan 
Signed-off-by: @sunsuwan
2023-07-18 11:19:24 +00:00
yangl777
8dd007ff67 fix build error beacuse of kernel api changes 2023-07-18 07:04:58 +00:00
openeuler-ci-bot
269dc4f0bb
!25 Update iavf version to 4.7.0 to fix kernel-6.1 based build error
From: @yangl777 
Reviewed-by: @seuzw 
Signed-off-by: @seuzw
2023-02-01 08:42:48 +00:00
yangl777
bb1e327a65 Update iavf version to 4.7.0 to fix kernel-6.1 based build error 2023-02-01 07:56:56 +00:00
openeuler-ci-bot
2a77451a90
!24 change download path of the source code
From: @XWwalker 
Reviewed-by: @seuzw 
Signed-off-by: @seuzw
2022-12-06 12:08:16 +00:00
xingwei
ae12b50b03 change download path of the source code 2022-12-06 11:46:34 +00:00
openeuler-ci-bot
58bff68715
!17 fix build error beacuse of kernel api changes
From: @eaglegai 
Reviewed-by: @seuzw 
Signed-off-by: @seuzw
2022-06-22 08:33:59 +00:00
eaglegai
b1d18f06fb fix build error beacuse of kernel apichanges 2022-06-22 10:00:13 +08:00
9 changed files with 274 additions and 102 deletions

View File

@ -1,60 +0,0 @@
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

View File

@ -0,0 +1,91 @@
From 068c38ad88ccb09e5e966d4db5cedab0e02b3b95 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 26 Oct 2022 15:22:14 +0200
Subject: net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers).
Now that the 32bit UP oddity is gone and 32bit uses always a sequence
count, there is no need for the fetch_irq() variants anymore.
Convert to the regular interface.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
src/iavf_ethtool_stats.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/iavf_ethtool_stats.h b/src/iavf_ethtool_stats.h
index 2c658aa..2733c0e 100644
--- a/src/iavf_ethtool_stats.h
+++ b/src/iavf_ethtool_stats.h
@@ -228,7 +228,7 @@ enum iavf_chnl_stat_type {
* @stat_type: stat_type could be TX/TX/VECTOR
*
* Queue statistics must be copied while protected by
- * u64_stats_fetch_begin_irq, so we can't directly use iavf_add_ethtool_stats.
+ * u64_stats_fetch_begin, so we can't directly use iavf_add_ethtool_stats.
* Assumes that queue stats are defined in iavf_gstrings_queue_stats. If the
* ring pointer is null, zero out the queue stat values and update the data
* pointer. Otherwise safely copy the stats from the ring into the supplied
@@ -273,12 +273,12 @@ iavf_add_queue_stats_chnl(u64 **data, struct iavf_ring *ring,
/* To avoid invalid statistics values, ensure that we keep retrying
* the copy until we get a consistent value according to
- * u64_stats_fetch_retry_irq. But first, make sure our ring is
+ * u64_stats_fetch_retry. But first, make sure our ring is
* non-null before attempting to access its syncp.
*/
#ifdef HAVE_NDO_GET_STATS64
do {
- start = !ring ? 0 : u64_stats_fetch_begin_irq(&ring->syncp);
+ start = !ring ? 0 : u64_stats_fetch_begin(&ring->syncp);
#endif
for (i = 0; i < size; i++) {
void *ptr = ring;
@@ -289,7 +289,7 @@ iavf_add_queue_stats_chnl(u64 **data, struct iavf_ring *ring,
&stats[i]);
}
#ifdef HAVE_NDO_GET_STATS64
- } while (ring && u64_stats_fetch_retry_irq(&ring->syncp, start));
+ } while (ring && u64_stats_fetch_retry(&ring->syncp, start));
#endif
/* Once we successfully copy the stats in, update the data pointer */
@@ -302,7 +302,7 @@ iavf_add_queue_stats_chnl(u64 **data, struct iavf_ring *ring,
* @ring: the ring to copy
*
* Queue statistics must be copied while protected by
- * u64_stats_fetch_begin_irq, so we can't directly use iavf_add_ethtool_stats.
+ * u64_stats_fetch_begin, so we can't directly use iavf_add_ethtool_stats.
* Assumes that queue stats are defined in iavf_gstrings_queue_stats. If the
* ring pointer is null, zero out the queue stat values and update the data
* pointer. Otherwise safely copy the stats from the ring into the supplied
@@ -322,19 +322,19 @@ iavf_add_queue_stats(u64 **data, struct iavf_ring *ring)
/* To avoid invalid statistics values, ensure that we keep retrying
* the copy until we get a consistent value according to
- * u64_stats_fetch_retry_irq. But first, make sure our ring is
+ * u64_stats_fetch_retry. But first, make sure our ring is
* non-null before attempting to access its syncp.
*/
#ifdef HAVE_NDO_GET_STATS64
do {
- start = !ring ? 0 : u64_stats_fetch_begin_irq(&ring->syncp);
+ start = !ring ? 0 : u64_stats_fetch_begin(&ring->syncp);
#endif
for (i = 0; i < size; i++) {
iavf_add_one_ethtool_stat(&(*data)[i], ring,
&stats[i]);
}
#ifdef HAVE_NDO_GET_STATS64
- } while (ring && u64_stats_fetch_retry_irq(&ring->syncp, start));
+ } while (ring && u64_stats_fetch_retry(&ring->syncp, start));
#endif
/* Once we successfully copy the stats in, update the data pointer */
--
2.33.0

View File

@ -0,0 +1,58 @@
From 2b3082c6ef3b0104d822f6f18d2afbe5fc9a5c2c Mon Sep 17 00:00:00 2001
From: Ratheesh Kannoth <rkannoth@marvell.com>
Date: Sat, 29 Jul 2023 04:52:15 +0530
Subject: [PATCH] net: flow_dissector: Use 64bits for used_keys
As 32bits of dissector->used_keys are exhausted,
increase the size to 64bits.
This is base change for ESP/AH flow dissector patch.
Please find patch and discussions at
https://lore.kernel.org/netdev/ZMDNjD46BvZ5zp5I@corigine.com/T/#t
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw
Tested-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Martin Habets <habetsm.xilinx@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
src/iavf_main.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/iavf_main.c b/src/iavf_main.c
index e475564..9b70c2e 100644
--- a/src/iavf_main.c
+++ b/src/iavf_main.c
@@ -4073,17 +4073,17 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
int i = 0;
if (dissector->used_keys &
- ~(BIT(FLOW_DISSECTOR_KEY_CONTROL) |
- BIT(FLOW_DISSECTOR_KEY_BASIC) |
- BIT(FLOW_DISSECTOR_KEY_ETH_ADDRS) |
- BIT(FLOW_DISSECTOR_KEY_VLAN) |
- BIT(FLOW_DISSECTOR_KEY_IPV4_ADDRS) |
- BIT(FLOW_DISSECTOR_KEY_IPV6_ADDRS) |
+ ~(BIT_ULL(FLOW_DISSECTOR_KEY_CONTROL) |
+ BIT_ULL(FLOW_DISSECTOR_KEY_BASIC) |
+ BIT_ULL(FLOW_DISSECTOR_KEY_ETH_ADDRS) |
+ BIT_ULL(FLOW_DISSECTOR_KEY_VLAN) |
+ BIT_ULL(FLOW_DISSECTOR_KEY_IPV4_ADDRS) |
+ BIT_ULL(FLOW_DISSECTOR_KEY_IPV6_ADDRS) |
#ifdef HAVE_TC_FLOWER_ENC
- BIT(FLOW_DISSECTOR_KEY_ENC_KEYID) |
+ BIT_ULL(FLOW_DISSECTOR_KEY_ENC_KEYID) |
#endif /* HAVE_TC_FLOWER_ENC */
- BIT(FLOW_DISSECTOR_KEY_PORTS))) {
- dev_err(&adapter->pdev->dev, "Unsupported key used: 0x%x\n",
+ BIT_ULL(FLOW_DISSECTOR_KEY_PORTS))) {
+ dev_err(&adapter->pdev->dev, "Unsupported key used: 0x%llx\n",
dissector->used_keys);
return -EOPNOTSUPP;
}
--
2.41.0

View File

@ -0,0 +1,50 @@
From bc4fddc3b306b204c5af664656ae62a1f23e2aab Mon Sep 17 00:00:00 2001
From: Bjorn Helgaas <bhelgaas@google.com>
Date: Wed, 18 Jan 2023 17:46:08 -0600
Subject: [PATCH] iavf: Remove redundant pci_enable_pcie_error_reporting()
pci_enable_pcie_error_reporting() enables the device to send ERR_*
Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is
native"), the PCI core does this for all devices during enumeration.
Remove the redundant pci_enable_pcie_error_reporting() call from the
driver. Also remove the corresponding pci_disable_pcie_error_reporting()
from the driver .remove() path.
Note that this doesn't control interrupt generation by the Root Port; that
is controlled by the AER Root Error Command register, which is managed by
the AER service driver.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org
Tested-by: Marek Szlosek <marek.szlosek@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
src/iavf_main.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/iavf_main.c b/src/iavf_main.c
index 2c4480b20db3a5..3273aeb8fa6763 100644
--- a/src/iavf_main.c
+++ b/src/iavf_main.c
@@ -4868,8 +4868,6 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto err_pci_reg;
}
- pci_enable_pcie_error_reporting(pdev);
-
pci_set_master(pdev);
netdev = alloc_etherdev_mq(sizeof(struct iavf_adapter),
@@ -5175,8 +5172,6 @@ static void iavf_remove(struct pci_dev *pdev)
free_netdev(netdev);
- pci_disable_pcie_error_reporting(pdev);
-
pci_disable_device(pdev);
}

View File

@ -1,37 +0,0 @@
From f72271e2a0ae4277d53c4053f5eed8bb346ba38a Mon Sep 17 00:00:00 2001
From: Brian King <brking@linux.vnet.ibm.com>
Date: Fri, 17 Nov 2017 11:05:49 -0600
Subject: i40evf: Use smp_rmb rather than read_barrier_depends
The original issue being fixed in this patch was seen with the ixgbe
driver, but the same issue exists with i40evf as well, as the code is
very similar. read_barrier_depends is not sufficient to ensure
loads following it are not speculatively loaded out of order
by the CPU, which can result in stale data being loaded, causing
potential system crashes.
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/iavf_txrx.c b/src/iavf_txrx.c
index 03c685c..da3cfed 100644
--- a/src/iavf_txrx.c
+++ b/src/iavf_txrx.c
@@ -289,7 +289,7 @@ static bool iavf_clean_tx_irq(struct iavf_vsi *vsi,
break;
/* prevent any other reads prior to eop_desc */
- read_barrier_depends();
+ smp_rmb();
iavf_trace(clean_tx_irq, tx_ring, tx_desc, tx_buf);
/* if the descriptor isn't done, no work yet to do */
--
1.8.3.1

View File

@ -0,0 +1,24 @@
From 732efb48473a90af4194464a2bf00fcd35993371 Mon Sep 17 00:00:00 2001
From: eaglegai <eaglegai@163.com>
Date: Tue, 9 Jan 2024 06:33:35 +0000
Subject: [PATCH] fix build error with Linux 6.6
---
src/iavf.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/iavf.h b/src/iavf.h
index 21b17fe..e7159d0 100644
--- a/src/iavf.h
+++ b/src/iavf.h
@@ -39,6 +39,7 @@
#include <net/tc_act/tc_gact.h>
#include <net/tc_act/tc_mirred.h>
#endif /* __TC_MQPRIO_MODE_MAX */
+#include <net/xdp.h>
#include "kcompat.h"
--
2.33.0

Binary file not shown.

BIN
iavf-4.7.0.tar.gz Normal file

Binary file not shown.

View File

@ -8,19 +8,21 @@
Name: iavf Name: iavf
Summary: Intel(R) Ethernet Adaptive Virtual Function Driver Summary: Intel(R) Ethernet Adaptive Virtual Function Driver
Version: 4.0.1 Version: 4.7.0
Release: 6 Release: 3
Vendor: Intel Corporation Vendor: Intel Corporation
License: GPL-2.0 License: GPL-2.0
URL: http://support.intel.com URL: http://support.intel.com
Source0: https://downloadcenter.intel.com/download/24693/Intel-Network-Adapter-Virtual-Function-Driver-for-Intel-40-Gigabit-Ethernet-Network-Connections/%{name}-%{version}.tar.gz Source0: https://downloadmirror.intel.com/762473/%{name}-%{version}.tar.gz
Requires: kernel, findutils, gawk, bash, hwdata Requires: kernel, findutils, gawk, bash, hwdata
BuildRequires: kernel-devel hwdata uname-build-checks gcc BuildRequires: kernel-devel hwdata uname-build-checks gcc
Patch0: fix-build-error-with-Linux-5.10.patch Patch0: backport-fix-build-error-with-Linux-6.4.patch
Patch1: backport-extend-coalesce-setting-uAPI-with-CQE-mode.patch Patch1: backport-iavf-remove-redundant-pci_enable_pcie_error_reporting.patch
Patch2: backport-iavf-flow_dissector-use-64bits-for-used_keys.patch
Patch3: fix-build-error-with-Linux-6.6.patch
%description %description
This package contains the Intel(R) Ethernet Adaptive Virtual Function Driver. This package contains the Intel(R) Ethernet Adaptive Virtual Function Driver.
@ -330,6 +332,11 @@ fi
uname -r | grep BOOT || /sbin/depmod -a > /dev/null 2>&1 || true uname -r | grep BOOT || /sbin/depmod -a > /dev/null 2>&1 || true
if [ -x "/usr/sbin/weak-modules" ]; then
modules=( $(cat %{_docdir}/%{name}/file.list | grep '\.ko$' | xargs realpath) )
printf '%s\n' "${modules[@]}" | /usr/sbin/weak-modules --no-initramfs --add-modules
fi
if which dracut >/dev/null 2>&1; then if which dracut >/dev/null 2>&1; then
echo "Updating initramfs with dracut..." echo "Updating initramfs with dracut..."
if dracut --force ; then if dracut --force ; then
@ -355,11 +362,20 @@ else
fi fi
%preun %preun
# save tmp list of installed kernel modules for weak-modules
cat %{_docdir}/%{name}/file.list | grep '\.ko$' | xargs realpath > /var/run/rpm-%{name}-modules.list
rm -rf /usr/local/share/%{name} rm -rf /usr/local/share/%{name}
%postun %postun
uname -r | grep BOOT || /sbin/depmod -a > /dev/null 2>&1 || true uname -r | grep BOOT || /sbin/depmod -a > /dev/null 2>&1 || true
if [ -x "/usr/sbin/weak-modules" ]; then
modules=( $(cat /var/run/rpm-%{name}-modules.list) )
printf '%s\n' "${modules[@]}" | /usr/sbin/weak-modules --no-initramfs --remove-modules
fi
rm /var/run/rpm-%{name}-modules.list
if which dracut >/dev/null 2>&1; then if which dracut >/dev/null 2>&1; then
echo "Updating initramfs with dracut..." echo "Updating initramfs with dracut..."
if dracut --force ; then if dracut --force ; then
@ -385,6 +401,36 @@ else
fi fi
%changelog %changelog
* Thu Jan 11 2024 yanglu <yanglu72@h-partners.com> - 4.7.0-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix build error beacuse of kernel api changes
* Tue Jul 18 2023 yanglu <yanglu72@h-partners.com> - 4.7.0-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix build error beacuse of kernel api changes
* Wed Feb 01 2023 yanglu <yanglu72@h-partners.com> - 4.7.0-1
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Update iavf version to 4.7.0 to fix kernel-6.1 based build error
* Tue Dec 06 2022 xingwei <xingwei@h-partners.com> - 4.0.1-8
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:change download path of the source code
* Wed Jun 22 2022 gaihuiying <eaglegai@163.com> - 4.0.1-7
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix build error beacuse of kernel api changes
* Sat Apr 16 2022 gaihuiying <eaglegai@163.com> - 4.0.1-6 * Sat Apr 16 2022 gaihuiying <eaglegai@163.com> - 4.0.1-6
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA