fix build error beacuse of kernel api changes

This commit is contained in:
yangl777 2024-01-11 06:01:34 +00:00
parent ccebee4b4a
commit 7ccba53ecf
4 changed files with 142 additions and 1 deletions

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

@ -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

View File

@ -9,7 +9,7 @@
Name: iavf
Summary: Intel(R) Ethernet Adaptive Virtual Function Driver
Version: 4.7.0
Release: 2
Release: 3
Vendor: Intel Corporation
License: GPL-2.0
URL: http://support.intel.com
@ -20,6 +20,9 @@ Requires: kernel, findutils, gawk, bash, hwdata
BuildRequires: kernel-devel hwdata uname-build-checks gcc
Patch0: backport-fix-build-error-with-Linux-6.4.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
This package contains the Intel(R) Ethernet Adaptive Virtual Function Driver.
@ -398,6 +401,12 @@ else
fi
%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