kernel-modules: re-enable bnxt_en

This commit re-enables the bnxt_en/bnxt_re OOT drivers.

We also upgrade to the driver versions recommended by Broadcom.
Upgrade the bnxt_en/bnxt_re version to 227.0.130.0 from 220.0.13.0.
(For clarity, the main driver package file name is "bcm_227.1.111.0b.tar.gz".)

The package libbnxt-re also is upgraded to the related version 227.0.130.0
because of the drivers upgradation.

We encountered a few the version compatibility issues between
bnxt_en/bnxt_re drivers and the 6.6.7 kernel. We adapted drivers' code
to the kernel 6.6.7 by referring to the upstream commits.

Verification:
* bnxt_en/bnxt_re:
  - Installation of the ISO image is successful with standard and
    low-latency profiles.
  - Physical function interfaces are up and pass packets for rt and std.
  - Create vfs, ensure that the interface can come up and pass packets.
  - RDMA/Infiniband over Ethernet functionalities of the Broadcom
    adapters were successfully tested using the Linux RDMA community's
    perftest package.

Story: 2011056
Task: 49876

Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
Change-Id: I2931cf333c28ee69662913e81c65340e633fbbc8
(cherry picked from commit cbe03073af)
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
This commit is contained in:
Jiping Ma 2024-04-15 05:12:32 +00:00
parent 997cf36107
commit ec1eeccb70
28 changed files with 595 additions and 8616 deletions

View File

@ -1,8 +1,8 @@
# List of packages to be included/installed in ISO
# bnxt_en - Broadcom kernel modules
#bnxt-en
#bnxt-en-rt
bnxt-en
bnxt-en-rt
#intel-i40e
i40e
@ -54,7 +54,7 @@ linux-perf
#mlnx-ofa_kernel
mlnx-ofed-kernel-modules
mlnx-ofed-kernel-modules-rt
#mlnx-ofed-kernel-utils
mlnx-ofed-kernel-utils
#qat20
qat2.0.l

View File

@ -1,5 +1,5 @@
kernel-std
#kernel-modules/bnxt_en
kernel-modules/bnxt_en
kernel-modules/intel-i40e
kernel-modules/intel-iavf
kernel-modules/intel-ice

View File

@ -1,5 +1,5 @@
kernel-rt
#kernel-modules/bnxt_en
kernel-modules/bnxt_en
kernel-modules/intel-i40e
kernel-modules/intel-iavf
kernel-modules/intel-ice

View File

@ -1,3 +1,11 @@
bnxt-en (1.10.2.227.0.130.0-1) unstable; urgency=medium
* Upgrade the release of the out-of-tree bnxt_en driver to 1.10.2-227.0.130.0
for StarlingX. This driver corresponds to "netxtreme-bnxt_en-1.10.2-227.0.130.0.tar.gz" in
Broadcom's "bcm_227.1.111.0" release.
-- Jiping Ma <jiping.ma2@windriver.com> Mon, 08 Apr 2024 15:46:23 +0800
bnxt-en (1.10.2.220.0.13.0-1) unstable; urgency=medium
* Initial release of the out-of-tree bnxt_en driver for StarlingX. This

View File

@ -1,7 +1,8 @@
From 8df4ad6c7e42a1d3e0753716d62efa35b7eb6891 Mon Sep 17 00:00:00 2001
From 6cb55956bc72f255626510ee30e612b23cbff0ab Mon Sep 17 00:00:00 2001
From: "M. Vefa Bicakci" <vefa.bicakci@windriver.com>
Date: Fri, 4 Feb 2022 18:27:53 -0500
Subject: [PATCH] bnxt_re/Makefile: Adapt to mlnx-ofa_kernel for StarlingX
Subject: [PATCH 01/10] bnxt_re/Makefile: Adapt to mlnx-ofa_kernel for
StarlingX
This patch adapts the bnxt_re kernel module's Makefile to
mlnx-ofa_kernel for Debian-based StarlingX.
@ -42,14 +43,16 @@ Here is a summary of the changes:
WARNING: Symbol version dump "/Module.symvers" is missing.
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
[jm: Adapted the patch for context change]
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
---
bnxt_re-220.0.12.0/Makefile | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
bnxt_re-227.0.130.0/Makefile | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/bnxt_re-220.0.12.0/Makefile b/bnxt_re-220.0.12.0/Makefile
index 532fb8025465..702d4a81c6f2 100644
--- a/bnxt_re-220.0.12.0/Makefile
+++ b/bnxt_re-220.0.12.0/Makefile
diff --git a/bnxt_re-227.0.130.0/Makefile b/bnxt_re-227.0.130.0/Makefile
index a9c6104..600698c 100644
--- a/bnxt_re-227.0.130.0/Makefile
+++ b/bnxt_re-227.0.130.0/Makefile
@@ -59,6 +59,8 @@ endif
ifneq ($(KDIR),)
LINUX=$(KDIR)
@ -59,12 +62,12 @@ index 532fb8025465..702d4a81c6f2 100644
endif
ifeq ($(shell ls $(LINUXSRC)/include/uapi > /dev/null 2>&1 && echo uapi),)
@@ -90,26 +92,32 @@ ifeq ($(OFED_VERSION), )
@@ -89,24 +91,25 @@ ifeq ($(OFED_VERSION), )
endif
#find OFED version and compat-includes
-ofed_major=$(filter OFED-3.% OFED-4.%, $(OFED_VERSION))
+ofed_major=$(filter OFED-3.% OFED-4.% 5.%, $(OFED_VERSION))
+ofed_major=$(filter OFED-3.% OFED-4.% 5.% 23.%, $(OFED_VERSION))
ifneq ($(ofed_major), )
-exists=$(shell if [ -e /usr/src/compat-rdma$(OFED_VERSION) ];\
+exists=$(shell if [ -e /usr/src/ofa_kernel-$(OFED_VERSION) ];\
@ -81,7 +84,7 @@ index 532fb8025465..702d4a81c6f2 100644
+OFA_KERNEL_PATH=/usr/src/ofa_kernel/default
EXTRA_CFLAGS += -DOFED_3_x
-ofed_4_17_x=$(filter OFED-4.17%, $(ofed_major))
+ofed_4_17_x=$(filter OFED-4.17% 5.%, $(ofed_major))
+ofed_4_17_x=$(filter OFED-4.17% 5.% 23.%, $(ofed_major))
ifneq ($(ofed_4_17_x), )
EXTRA_CFLAGS += -D__OFED_BUILD__
endif
@ -90,15 +93,8 @@ index 532fb8025465..702d4a81c6f2 100644
AUTOCONF_H = -include $(shell /bin/ls -1 $(LINUX)/include/*/autoconf.h 2> /dev/null | head -1)
+AUTOCONF_H += -include $(LINUXSRC)/include/linux/kconfig.h
endif #end non 3.x OFED
+
+ifneq ($(BNXT_PEER_MEM_INC),)
KBUILD_EXTRA_SYMBOLS := $(BNXT_PEER_MEM_INC)/Module.symvers
+else
+KBUILD_EXTRA_SYMBOLS :=
+endif
ifeq (OFED-NATIVE, $(findstring OFED-NATIVE, $(OFED_VERSION)))
ifeq ($(KERNELRELEASE),)
--
2.25.1
2.43.0

View File

@ -0,0 +1,88 @@
From b9ce5c292b8cc4da2fa2f4ee7ea0220242447991 Mon Sep 17 00:00:00 2001
From: Jiping Ma <jiping.ma2@windriver.com>
Date: Tue, 9 Apr 2024 06:54:11 +0000
Subject: [PATCH 02/10] bnxt_en: Rename page_pool.h to page_pool/helpers.h
This patch accommodates commit a9ca9f9ceff3 ("page_pool: split types and
declarations from page_pool.h") merged in the v6.6 development cycle, by
applying a similar change to the out-of-tree bnxt_en driver to resolve
the compilation errors encountered with the v6.6 kernel, which are listed
below.
References:
* https://git.yoctoproject.org/linux-yocto/commit/?h=a9ca9f9ceff3
Resolved compilation errors:
bnxt_en-1.10.2-227.0.130.0/bnxt_compat.h:2581: error: "page_pool_release_page"\
redefined [-Werror]
2581 | #define page_pool_release_page(pp, page)
|
In file included from /<<PKGBUILDDIR>>/bnxt_en-1.10.2-227.0.130.0/bnxt.c:80:
bnxt_en-1.10.2-227.0.130.0/bnxt_compat.h:1893: note: this is the location of\
the previous definition
1893 | #define page_pool_release_page(page_pool, page)
|
bnxt_en-1.10.2-227.0.130.0/bnxt.c:102:10: fatal error: net/page_pool.h: No\
such file or directory
102 | #include <net/page_pool.h>
| ^~~~~~~~~~~~~~~~~
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
---
bnxt_en-1.10.2-227.0.130.0/Makefile | 4 ++--
bnxt_en-1.10.2-227.0.130.0/bnxt.c | 2 +-
bnxt_en-1.10.2-227.0.130.0/bnxt_xdp.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/bnxt_en-1.10.2-227.0.130.0/Makefile b/bnxt_en-1.10.2-227.0.130.0/Makefile
index 6237767..2331171 100644
--- a/bnxt_en-1.10.2-227.0.130.0/Makefile
+++ b/bnxt_en-1.10.2-227.0.130.0/Makefile
@@ -753,7 +753,7 @@ ifneq ($(shell grep -so "xdp_data_hard_end" $(LINUXSRC)/include/net/xdp.h),)
DISTRO_CFLAG += -DHAVE_XDP_FRAME_SZ
endif
-ifneq ($(shell grep -so "page_pool_release_page" $(LINUXSRC)/include/net/page_pool.h),)
+ifneq ($(shell grep -so "page_pool_release_page" $(LINUXSRC)/include/net/page_pool/helpers.h),)
DISTRO_CFLAG += -DHAVE_PAGE_POOL_RELEASE_PAGE
endif
@@ -1224,7 +1224,7 @@ ifneq ($(shell grep -so "hwmon_notify_event" $(LINUXSRC)/include/linux/hwmon.h),
DISTRO_CFLAG += -DHAVE_HWMON_NOTIFY_EVENT
endif
-ifneq ($(shell grep -so "page_pool_dev_alloc_frag" $(LINUXSRC)/include/net/page_pool.h),)
+ifneq ($(shell grep -so "page_pool_dev_alloc_frag" $(LINUXSRC)/include/net/page_pool/helpers.h),)
DISTRO_CFLAG += -DHAVE_PAGE_POOL_PAGE_FRAG
endif
diff --git a/bnxt_en-1.10.2-227.0.130.0/bnxt.c b/bnxt_en-1.10.2-227.0.130.0/bnxt.c
index 611dcaa..f464809 100644
--- a/bnxt_en-1.10.2-227.0.130.0/bnxt.c
+++ b/bnxt_en-1.10.2-227.0.130.0/bnxt.c
@@ -99,7 +99,7 @@
#include "bnxt_debugfs.h"
#include "bnxt_coredump.h"
#ifdef CONFIG_PAGE_POOL
-#include <net/page_pool.h>
+#include <net/page_pool/helpers.h>
#ifdef HAVE_XDP_MULTI_BUFF
#include <linux/align.h>
#endif
diff --git a/bnxt_en-1.10.2-227.0.130.0/bnxt_xdp.c b/bnxt_en-1.10.2-227.0.130.0/bnxt_xdp.c
index 4b15c9a..42469c7 100644
--- a/bnxt_en-1.10.2-227.0.130.0/bnxt_xdp.c
+++ b/bnxt_en-1.10.2-227.0.130.0/bnxt_xdp.c
@@ -25,7 +25,7 @@
#include "bnxt.h"
#include "bnxt_xdp.h"
#ifdef CONFIG_PAGE_POOL
-#include <net/page_pool.h>
+#include <net/page_pool/helpers.h>
#endif
DEFINE_STATIC_KEY_FALSE(bnxt_xdp_locking_key);
--
2.43.0

View File

@ -1,45 +0,0 @@
From 861bb6919cf76ca93c0f41fab8fbd2178aba08c3 Mon Sep 17 00:00:00 2001
From: "M. Vefa Bicakci" <vefa.bicakci@windriver.com>
Date: Fri, 4 Feb 2022 19:44:06 -0500
Subject: [PATCH] bnxt_en/bnxt_compat.h: Fix up a build failure
This commit resolves the following build failure:
In file included from ./include/net/sock.h:59,
from ./include/linux/tcp.h:19,
from ./include/linux/ipv6.h:87,
from ./include/net/dsfield.h:12,
from ./include/net/ip_tunnels.h:13,
from ./include/net/dst_metadata.h:6,
from /builddir/build/BUILD/netxtreme-bnxt_en-1.10.2-219.0.55.0/bnxt_en-1.10.2-219.0.55.0/bnxt.h:30,
from /builddir/build/BUILD/netxtreme-bnxt_en-1.10.2-219.0.55.0/bnxt_en-1.10.2-219.0.55.0/bnxt_hwrm.c:26:
./include/linux/filter.h:980:1: error: useless type name in empty declaration [-Werror]
void bpf_warn_invalid_xdp_action(u32 act);
^~~~
cc1: all warnings being treated as errors
The problem arises from the fact that the function
bpf_warn_invalid_xdp_action is already defined in the kernel. Having a
placeholder macro definition with the same name causes the compilation
warning (which turns into an error due to -Werror).
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
---
bnxt_en-1.10.2-220.0.13.0/bnxt_compat.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/bnxt_en-1.10.2-220.0.13.0/bnxt_compat.h b/bnxt_en-1.10.2-220.0.13.0/bnxt_compat.h
index 63d27f2e8979..aeb15fc9ab2a 100644
--- a/bnxt_en-1.10.2-220.0.13.0/bnxt_compat.h
+++ b/bnxt_en-1.10.2-220.0.13.0/bnxt_compat.h
@@ -1596,7 +1596,6 @@ enum xdp_action {
#ifndef HAVE_BPF_TRACE
#define trace_xdp_exception(dev, xdp_prog, act)
-#define bpf_warn_invalid_xdp_action(act)
#endif
#ifdef HAVE_XDP_RXQ_INFO
--
2.25.1

View File

@ -0,0 +1,62 @@
From cbeba2c17eb7bc5a64e90eceae08908e6be16e36 Mon Sep 17 00:00:00 2001
From: Jiping Ma <jiping.ma2@windriver.com>
Date: Tue, 9 Apr 2024 07:15:18 +0000
Subject: [PATCH 03/10] bnxt_en: fix the build errors
We encounter the following two build errors.
1. "page_pool_release_page" redefined.
bnxt_en-1.10.2-227.0.130.0/bnxt_compat.h:2581: error: "page_pool_release_page"\
redefined [-Werror]
2581 | #define page_pool_release_page(pp, page)
|
In file included from /<<PKGBUILDDIR>>/bnxt_en-1.10.2-227.0.130.0/bnxt.c:80:
bnxt_en-1.10.2-227.0.130.0/bnxt_compat.h:1893: note: this is the location of \
the previous definition
1893 | #define page_pool_release_page(page_pool, page)
2. conversion from enum cfa_tcam_mgr_device_type to enum
cfa_tcam_mgr_tbl_type.
bnxt_en-1.10.2-227.0.130.0/tf_core/cfa_tcam_mgr.c:982:32: error: implicit \
conversion from enum cfa_tcam_mgr_device_type to enum cfa_tcam_mgr_tbl_type\
[-Werror=enum-conversion]
982 | cfa_tcam_mgr_tbl_2_str(type),
| ^~~~
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
---
bnxt_en-1.10.2-227.0.130.0/bnxt_compat.h | 4 ----
bnxt_en-1.10.2-227.0.130.0/tf_core/cfa_tcam_mgr.c | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/bnxt_en-1.10.2-227.0.130.0/bnxt_compat.h b/bnxt_en-1.10.2-227.0.130.0/bnxt_compat.h
index 652724f..df93a73 100644
--- a/bnxt_en-1.10.2-227.0.130.0/bnxt_compat.h
+++ b/bnxt_en-1.10.2-227.0.130.0/bnxt_compat.h
@@ -2577,10 +2577,6 @@ struct netlink_ext_ack {
#define skb_mark_for_recycle(skb) skb_mark_for_recycle(skb, page, rxr->page_pool)
#endif
-#ifdef HAVE_SKB_MARK_RECYCLE
-#define page_pool_release_page(pp, page)
-#endif
-
#ifdef CONFIG_BNXT_HWMON
#include <linux/hwmon.h>
#ifndef HWMON_CHANNEL_INFO
diff --git a/bnxt_en-1.10.2-227.0.130.0/tf_core/cfa_tcam_mgr.c b/bnxt_en-1.10.2-227.0.130.0/tf_core/cfa_tcam_mgr.c
index 08b90d4..7a0d9fc 100644
--- a/bnxt_en-1.10.2-227.0.130.0/tf_core/cfa_tcam_mgr.c
+++ b/bnxt_en-1.10.2-227.0.130.0/tf_core/cfa_tcam_mgr.c
@@ -979,7 +979,7 @@ int cfa_tcam_mgr_init(struct tf *tfp, enum cfa_tcam_mgr_device_type type,
netdev_dbg(tfp->bp->dev,
"%s: %s End row is OOR(%d >= %d)\n",
tf_dir_2_str(dir),
- cfa_tcam_mgr_tbl_2_str(type),
+ cfa_tcam_mgr_tbl_2_str((enum cfa_tcam_mgr_tbl_type)type),
table_data->end_row,
table_data->num_rows);
return -EFAULT;
--
2.43.0

View File

@ -0,0 +1,60 @@
From 87beff6c0d67f5ae8f088a49469bf5262d75023b Mon Sep 17 00:00:00 2001
From: Jiping Ma <jiping.ma2@windriver.com>
Date: Tue, 9 Apr 2024 07:30:05 +0000
Subject: [PATCH 04/10] bnxt_en: skb_frag_fill_page_desc() replace of
__skb_frag_set_page
This patch accommodates commit 278fda0d52f6 ("net: remove __skb_frag_set_page()")
merged in the v6.5 development cycle, by applying a similar change to the
out-of-tree bnxt_en driver to resolve the compilation errors encountered with
the v6.6 kernel, which are listed below.
References:
* https://git.yoctoproject.org/linux-yocto/commit/?h=b51f4113ebb0
* https://git.yoctoproject.org/linux-yocto/commit/?h=278fda0d52f6
Resolved compilation errors:
bnxt_en-1.10.2-227.0.130.0/bnxt.c: In function __bnxt_rx_agg_pages:
bnxt_en-1.10.2-227.0.130.0/bnxt.c:1545:3: error: implicit declaration\
of function __skb_frag_set_page; did you mean skb_frag_page? \
[-Werror=implicit-function-declaration]
1545 | __skb_frag_set_page(frag, cons_rx_buf->page);
| ^~~~~~~~~~~~~~~~~~~
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
---
bnxt_en-1.10.2-227.0.130.0/bnxt.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/bnxt_en-1.10.2-227.0.130.0/bnxt.c b/bnxt_en-1.10.2-227.0.130.0/bnxt.c
index f464809..b763655 100644
--- a/bnxt_en-1.10.2-227.0.130.0/bnxt.c
+++ b/bnxt_en-1.10.2-227.0.130.0/bnxt.c
@@ -1540,9 +1540,8 @@ static u32 __bnxt_rx_agg_pages(struct bnxt *bp,
RX_AGG_CMP_LEN) >> RX_AGG_CMP_LEN_SHIFT;
cons_rx_buf = &rxr->rx_agg_ring[cons];
- skb_frag_off_set(frag, cons_rx_buf->offset);
- skb_frag_size_set(frag, frag_len);
- __skb_frag_set_page(frag, cons_rx_buf->page);
+ skb_frag_fill_page_desc(frag, cons_rx_buf->page,
+ cons_rx_buf->offset, frag_len);
shinfo->nr_frags = i + 1;
__clear_bit(cons, rxr->rx_agg_bmap);
@@ -1558,10 +1557,7 @@ static u32 __bnxt_rx_agg_pages(struct bnxt *bp,
xdp_buff_set_frag_pfmemalloc(xdp);
if (bnxt_alloc_rx_page(bp, rxr, prod, GFP_ATOMIC) != 0) {
- unsigned int nr_frags;
-
- nr_frags = --shinfo->nr_frags;
- __skb_frag_set_page(&shinfo->frags[nr_frags], NULL);
+ --shinfo->nr_frags;
cons_rx_buf->page = page;
/* Update prod since possibly some pages have been
--
2.43.0

View File

@ -0,0 +1,58 @@
From 71d56c87a2fdbcc600e39867d462ea40ca4260ad Mon Sep 17 00:00:00 2001
From: Jiping Ma <jiping.ma2@windriver.com>
Date: Tue, 9 Apr 2024 07:33:11 +0000
Subject: [PATCH 05/10] bnxt_en: Drop redundant
pci_enable_pcie_error_reporting()
This commit accommodates commit 7ec4b34be423 ("PCI/AER: Unexport
pci_enable_pcie_error_reporting()") merged in the v6.6 development cycle,
by applying changes similar to the ones found in commit 5f29b73d4eba
("bnxt: Drop redundant pci_enable_pcie_error_reporting()
") to resolve the bnxt_en driver compilation failures encountered with
the v6.6 kernel, which are listed below.
References:
* https://git.yoctoproject.org/linux-yocto/commit/?h=5f29b73d4eba
Resolved compilation errors:
bnxt_en-1.10.2-227.0.130.0/bnxt.c:16658:2: error: implicit declaration\
of function pci_enable_pcie_error_reporting \
[-Werror=implicit-function-declaration]
16658 | pci_enable_pcie_error_reporting(pdev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bnxt_en-1.10.2-227.0.130.0/bnxt.c: In function bnxt_remove_one:
bnxt_en-1.10.2-227.0.130.0/bnxt.c:17632:2: error: implicit declaration\
of function pci_disable_pcie_error_reporting \
[-Werror=implicit-function-declaration]
17632 | pci_disable_pcie_error_reporting(pdev);
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
---
bnxt_en-1.10.2-227.0.130.0/bnxt.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/bnxt_en-1.10.2-227.0.130.0/bnxt.c b/bnxt_en-1.10.2-227.0.130.0/bnxt.c
index b763655..1ccdb79 100644
--- a/bnxt_en-1.10.2-227.0.130.0/bnxt.c
+++ b/bnxt_en-1.10.2-227.0.130.0/bnxt.c
@@ -16651,8 +16651,6 @@ static int bnxt_init_board(struct pci_dev *pdev, struct net_device *dev)
goto init_err_release;
}
- pci_enable_pcie_error_reporting(pdev);
-
INIT_WORK(&bp->sp_task, bnxt_sp_task);
INIT_DELAYED_WORK(&bp->fw_reset_task, bnxt_fw_reset_task);
@@ -17625,7 +17623,6 @@ static void bnxt_remove_one(struct pci_dev *pdev)
devlink_port_type_clear(&bp->dl_port);
#endif
bnxt_ptp_clear(bp);
- pci_disable_pcie_error_reporting(pdev);
unregister_netdev(dev);
bnxt_dbr_exit(bp);
clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state);
--
2.43.0

View File

@ -1,195 +0,0 @@
From 4b2ec2164007df4b380dcf6f27b5110b7f1e3855 Mon Sep 17 00:00:00 2001
From: Jiping Ma <jiping.ma2@windriver.com>
Date: Mon, 6 Nov 2023 18:02:02 -0800
Subject: [PATCH] bnxt_re: Fix the version compatibility issue
We meet the version compatibility issue after upgrading mlnx-ofa_kernel
to 5.9. mlnx-ofa_kernel-5.5 is based on linux kernel 5.13-rc4.
mlnx-ofa_kernel-5.9 is based on linux kernel v6.0-rc5. We adapt bnxt_re
to mlnx-ofa_kernel-5.9 by referring to the following two upstream
commits and the bnxt_re-227.0.130.0 source code.
The definition of create_qp() was changed with the following commit
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15-rc6&id=514aee660df493cd673154a6ba6bab745ec47b8c
IB_DEVICE_LOCAL_DMA_LKEY was removed with the following commit
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.0.y&id=e945c653c8e972d1b81a88e474d79f801b60213a
bnxt_re-220.0.12.0/main.c:1340:16: error: initialization of init \
(*)(struct ib_qp *, struct ib_qp_init_attr *, struct ib_udata *) \
from incompatible pointer type struct ib_qp * (*)(struct ib_pd *, \
struct ib_qp_init_attr *, struct ib_udata *)
[-Werror=incompatible-pointer-types]
1340 | .create_qp = bnxt_re_create_qp,
| ^~~~~~~~~~~~~~~~~
bnxt_re-220.0.12.0/ib_verbs.c:160:11: error: IB_DEVICE_LOCAL_DMA_LKEY \
undeclared (first use in this function); did you mean \
IBK_LOCAL_DMA_LKEY?
160 | | IB_DEVICE_LOCAL_DMA_LKEY
| ^~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
---
bnxt_re-220.0.12.0/Makefile | 4 ++++
bnxt_re-220.0.12.0/ib_verbs.c | 29 ++++++++++++-----------------
bnxt_re-220.0.12.0/ib_verbs.h | 7 +++----
bnxt_re-220.0.12.0/main.c | 1 +
4 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/bnxt_re-220.0.12.0/Makefile b/bnxt_re-220.0.12.0/Makefile
index 702d4a8..e36c307 100644
--- a/bnxt_re-220.0.12.0/Makefile
+++ b/bnxt_re-220.0.12.0/Makefile
@@ -744,6 +744,10 @@ ifneq ($(shell grep "smac" $(OFA_KERNEL_PATH)/include/rdma/ib_verbs.h),)
DISTRO_CFLAG += -DHAVE_IB_WC_SMAC
endif
+ifneq ($(shell grep "ib_kernel_cap_flags" $(OFA_KERNEL_PATH)/include/rdma/ib_verbs.h),)
+ DISTRO_CFLAG += -DHAVE_IB_KERNEL_CAP_FLAGS
+endif
+
EXTRA_CFLAGS += ${DISTRO_CFLAG} -DFPGA -g -DCONFIG_BNXT_SRIOV \
-DCONFIG_BNXT_DCB -DENABLE_DEBUGFS -DCONFIG_BNXT_RE \
-DBIND_MW_FENCE_WQE -DPOST_QP1_DUMMY_WQE
diff --git a/bnxt_re-220.0.12.0/ib_verbs.c b/bnxt_re-220.0.12.0/ib_verbs.c
index 7b9e77d..24120c5 100644
--- a/bnxt_re-220.0.12.0/ib_verbs.c
+++ b/bnxt_re-220.0.12.0/ib_verbs.c
@@ -157,7 +157,9 @@ int bnxt_re_query_device(struct ib_device *ibdev,
| IB_DEVICE_RC_RNR_NAK_GEN
| IB_DEVICE_SHUTDOWN_PORT
| IB_DEVICE_SYS_IMAGE_GUID
+#ifndef HAVE_IB_KERNEL_CAP_FLAGS
| IB_DEVICE_LOCAL_DMA_LKEY
+#endif
| IB_DEVICE_RESIZE_MAX_WR
| IB_DEVICE_PORT_ACTIVE_EVENT
| IB_DEVICE_N_NOTIFY_CQ
@@ -221,6 +223,9 @@ int bnxt_re_query_device(struct ib_device *ibdev,
ib_attr->sig_prot_cap = 0;
ib_attr->sig_guard_cap = 0;
ib_attr->odp_caps.general_caps = 0;
+#endif
+#ifdef HAVE_IB_KERNEL_CAP_FLAGS
+ ib_attr->kernel_cap_flags = IBK_LOCAL_DMA_LKEY;
#endif
return 0;
}
@@ -1832,7 +1837,7 @@ int bnxt_re_destroy_qp(struct ib_qp *ib_qp
rdev->gsi_ctx.gsi_sqp) {
rc = bnxt_re_destroy_gsi_sqp(qp);
if (rc)
- goto sh_fail;
+ return rc;
}
bnxt_qplib_free_hdr_buf(&rdev->qplib_res, &qp->qplib_qp);
}
@@ -1841,11 +1846,8 @@ int bnxt_re_destroy_qp(struct ib_qp *ib_qp
ib_umem_release(qp->rumem);
if (qp->sumem && !IS_ERR(qp->sumem))
ib_umem_release(qp->sumem);
- kfree(qp);
return 0;
-sh_fail:
- return rc;
}
static u8 __from_ib_qp_type(enum ib_qp_type type)
@@ -2605,14 +2607,15 @@ static bool bnxt_re_test_qp_limits(struct bnxt_re_dev *rdev,
return rc;
}
-struct ib_qp *bnxt_re_create_qp(struct ib_pd *ib_pd,
+int bnxt_re_create_qp(struct ib_qp *ib_qp,
struct ib_qp_init_attr *qp_init_attr,
struct ib_udata *udata)
{
+ struct ib_pd *ib_pd = ib_qp->pd;
struct bnxt_re_pd *pd = to_bnxt_re(ib_pd, struct bnxt_re_pd, ib_pd);
struct bnxt_qplib_dev_attr *dev_attr;
struct bnxt_re_dev *rdev;
- struct bnxt_re_qp *qp;
+ struct bnxt_re_qp *qp = container_of(ib_qp, struct bnxt_re_qp, ib_qp);
int rc;
rdev = pd->rdev;
@@ -2621,15 +2624,9 @@ struct ib_qp *bnxt_re_create_qp(struct ib_pd *ib_pd,
rc = bnxt_re_test_qp_limits(rdev, qp_init_attr, dev_attr);
if (!rc) {
rc = -EINVAL;
- goto exit;
+ goto fail;
}
- qp = kzalloc(sizeof(*qp), GFP_KERNEL);
- if (!qp) {
- dev_err(rdev_to_dev(rdev), "Allocate QP failed!");
- rc = -ENOMEM;
- goto exit;
- }
qp->rdev = rdev;
rc = bnxt_re_init_qp_attr(qp, pd, qp_init_attr, udata);
@@ -2677,7 +2674,7 @@ struct ib_qp *bnxt_re_create_qp(struct ib_pd *ib_pd,
bnxt_re_qp_info_add_qpinfo(rdev, qp);
- return &qp->ib_qp;
+ return 0;
qp_destroy:
bnxt_qplib_destroy_qp(&rdev->qplib_res, &qp->qplib_qp);
@@ -2689,9 +2686,7 @@ free_umem:
ib_umem_release(qp->sumem);
}
fail:
- kfree(qp);
-exit:
- return ERR_PTR(rc);
+ return rc;
}
static int bnxt_re_modify_shadow_qp(struct bnxt_re_dev *rdev,
diff --git a/bnxt_re-220.0.12.0/ib_verbs.h b/bnxt_re-220.0.12.0/ib_verbs.h
index 5c5d3b9..257a3cb 100644
--- a/bnxt_re-220.0.12.0/ib_verbs.h
+++ b/bnxt_re-220.0.12.0/ib_verbs.h
@@ -121,9 +121,9 @@ struct bnxt_re_qp_info_entry {
};
struct bnxt_re_qp {
+ struct ib_qp ib_qp;
struct list_head list;
struct bnxt_re_dev *rdev;
- struct ib_qp ib_qp;
spinlock_t sq_lock;
spinlock_t rq_lock;
struct bnxt_qplib_qp qplib_qp;
@@ -333,9 +333,8 @@ DESTROY_SRQ_RET bnxt_re_destroy_srq(struct ib_srq *srq
);
int bnxt_re_post_srq_recv(struct ib_srq *ib_srq, CONST_STRUCT ib_recv_wr *wr,
CONST_STRUCT ib_recv_wr **bad_wr);
-struct ib_qp *bnxt_re_create_qp(struct ib_pd *pd,
- struct ib_qp_init_attr *qp_init_attr,
- struct ib_udata *udata);
+int bnxt_re_create_qp(struct ib_qp *qp, struct ib_qp_init_attr *qp_init_attr,
+ struct ib_udata *udata);
int bnxt_re_modify_qp(struct ib_qp *qp, struct ib_qp_attr *qp_attr,
int qp_attr_mask, struct ib_udata *udata);
int bnxt_re_query_qp(struct ib_qp *qp, struct ib_qp_attr *qp_attr,
diff --git a/bnxt_re-220.0.12.0/main.c b/bnxt_re-220.0.12.0/main.c
index 61010bb..dcd3212 100644
--- a/bnxt_re-220.0.12.0/main.c
+++ b/bnxt_re-220.0.12.0/main.c
@@ -1416,6 +1416,7 @@ static const struct ib_device_ops bnxt_re_dev_ops = {
#ifdef HAVE_CQ_ALLOC_IN_IB_CORE
INIT_RDMA_OBJ_SIZE(ib_cq, bnxt_re_cq, ib_cq),
#endif
+ INIT_RDMA_OBJ_SIZE(ib_qp, bnxt_re_qp, ib_qp),
#ifdef HAVE_UCONTEXT_ALLOC_IN_IB_CORE
INIT_RDMA_OBJ_SIZE(ib_ucontext, bnxt_re_ucontext, ib_uctx),
#endif
--
2.42.0

View File

@ -0,0 +1,41 @@
From d7b26be91901d084d78b97583f328efb09b5d637 Mon Sep 17 00:00:00 2001
From: Jiping Ma <jiping.ma2@windriver.com>
Date: Tue, 9 Apr 2024 07:55:36 +0000
Subject: [PATCH 06/10] bnxt_en: Use 64bits for used_keys
As 32bits of dissector->used_keys are exhausted,
increase the size to 64bits. change 0x%x to 0x%llx to fix the
following build error.
References:
* https://git.yoctoproject.org/linux-yocto/commit/?h=2b3082c6ef3b
bnxt_en-1.10.2-227.0.130.0/bnxt_tc.c:679:24: error: format \
expects argument of type unsigned int, but argument 4 has \
type long long unsigned int [-Werror=format=]
679 | netdev_info(bp->dev, "cannot form TC key: used_keys = 0x%x\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
680 | dissector->used_keys);
| ~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
---
bnxt_en-1.10.2-227.0.130.0/bnxt_tc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bnxt_en-1.10.2-227.0.130.0/bnxt_tc.c b/bnxt_en-1.10.2-227.0.130.0/bnxt_tc.c
index 6a1bcac..39879be 100644
--- a/bnxt_en-1.10.2-227.0.130.0/bnxt_tc.c
+++ b/bnxt_en-1.10.2-227.0.130.0/bnxt_tc.c
@@ -676,7 +676,7 @@ static int bnxt_tc_parse_flow(struct bnxt *bp,
/* KEY_CONTROL and KEY_BASIC are needed for forming a meaningful key */
if ((dissector->used_keys & BIT(FLOW_DISSECTOR_KEY_CONTROL)) == 0 ||
(dissector->used_keys & BIT(FLOW_DISSECTOR_KEY_BASIC)) == 0) {
- netdev_info(bp->dev, "cannot form TC key: used_keys = 0x%x\n",
+ netdev_info(bp->dev, "cannot form TC key: used_keys = 0x%llx\n",
dissector->used_keys);
return -EOPNOTSUPP;
}
--
2.43.0

View File

@ -0,0 +1,49 @@
From a3309f86fe1c3f7829b1f9673e6278f76a6e754c Mon Sep 17 00:00:00 2001
From: Jiping Ma <jiping.ma2@windriver.com>
Date: Tue, 9 Apr 2024 08:05:40 +0000
Subject: [PATCH 07/10] bnxt_en: remove module * from class_create()
This commit accommodates commit dcfbb67e48a2 ("driver core: class:
use lock_class_key already present in struct subsys_private"),
which removes the module pointer. This commit was merged in the
v6.4 development cycle and causes compilation failures with the
v6.6 kernel, which are listed below.
References:
* https://git.yoctoproject.org/linux-yocto/commit/?h=1aaba11da9aa
* https://git.yoctoproject.org/linux-yocto/commit/?h=dcfbb67e48a2
Resolved compilation errors:
/usr/src/linux-headers-6.6.0-1-common/include/linux/export.h:29:22: \
error: passing argument 1 of class_create from incompatible pointer\
type [-Werror=incompatible-pointer-types]
29 | #define THIS_MODULE (&__this_module)
| ~^~~~~~~~~~~~~~~
| |
| struct module *
bnxt_en-1.10.2-227.0.130.0/bnxt_lfc.c:1180:41: note: in expansion of\
macro THIS_MODULE
1180 | blfc_global_dev.d_class = class_create(THIS_MODULE, BNXT_LFC_DEV_NAME);
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
---
bnxt_en-1.10.2-227.0.130.0/bnxt_lfc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bnxt_en-1.10.2-227.0.130.0/bnxt_lfc.c b/bnxt_en-1.10.2-227.0.130.0/bnxt_lfc.c
index 16fd078..09729ae 100644
--- a/bnxt_en-1.10.2-227.0.130.0/bnxt_lfc.c
+++ b/bnxt_en-1.10.2-227.0.130.0/bnxt_lfc.c
@@ -1177,7 +1177,7 @@ int32_t __init bnxt_lfc_init(void)
return rc;
}
- blfc_global_dev.d_class = class_create(THIS_MODULE, BNXT_LFC_DEV_NAME);
+ blfc_global_dev.d_class = class_create(BNXT_LFC_DEV_NAME);
if (IS_ERR(blfc_global_dev.d_class)) {
BNXT_LFC_ERR(NULL, "Class creation is failed\n");
unregister_chrdev_region(blfc_global_dev.d_dev, 1);
--
2.43.0

View File

@ -0,0 +1,101 @@
From 833b892b0654611bf84d18dcb932535b33d94601 Mon Sep 17 00:00:00 2001
From: Jiping Ma <jiping.ma2@windriver.com>
Date: Tue, 9 Apr 2024 08:43:38 +0000
Subject: [PATCH 08/10] bnxt_en: correct the path for auxiliary_bus.h
auxiliary_bus.h is in /usr/src/linux-headers-6.6.0-1-common, so correct
the path for auxiliary_bus.h to fix the build issue.
bnxt_re-227.0.130.0/main.c:1032:40: error: implicit declaration of\
function auxiliary_get_drvdata [-Werror=implicit-function-declaration]
1032 | struct bnxt_re_en_dev_info *en_info = auxiliary_get_drvdata(handle);
| ^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
---
bnxt_en-1.10.2-227.0.130.0/Makefile | 12 +++++++++---
bnxt_en-1.10.2-227.0.130.0/bnxt_auxbus_compat.h | 4 ----
bnxt_re-227.0.130.0/Makefile | 11 ++++++++---
3 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/bnxt_en-1.10.2-227.0.130.0/Makefile b/bnxt_en-1.10.2-227.0.130.0/Makefile
index 2331171..e229cc9 100644
--- a/bnxt_en-1.10.2-227.0.130.0/Makefile
+++ b/bnxt_en-1.10.2-227.0.130.0/Makefile
@@ -1196,7 +1196,13 @@ ifneq ($(shell grep -so "struct netlink_ext_ack" $(LINUXSRC)/include/linux/netli
DISTRO_CFLAG += -DHAVE_NETLINK_EXT_ACK
endif
-ifneq ($(shell ls $(LINUXSRC)/include/linux/auxiliary_bus.h > /dev/null 2>&1 && echo auxiliary_driver),)
+ifeq (${KSRC_COMMON},)
+KSRC_AUX := ${LINUXSRC}
+else
+KSRC_AUX := ${KSRC_COMMON}
+endif
+
+ifneq ($(shell ls $(KSRC_AUX)/include/linux/auxiliary_bus.h > /dev/null 2>&1 && echo auxiliary_driver),)
DISTRO_CFLAG += -DHAVE_AUXILIARY_DRIVER
endif
@@ -1208,11 +1214,11 @@ ifneq ($(shell grep -o "struct auxiliary_device_id" $(LINUXSRC)/include/linux/mo
DISTRO_CFLAG += -DHAVE_AUX_DEVICE_ID
endif
-ifneq ($(shell grep -so "auxiliary_set_drvdata" $(LINUXSRC)/include/linux/auxiliary_bus.h),)
+ifneq ($(shell grep -so "auxiliary_set_drvdata" $(KSRC_AUX)/include/linux/auxiliary_bus.h),)
DISTRO_CFLAG += -DHAVE_AUX_SET_DRVDATA
endif
-ifneq ($(shell grep -so "auxiliary_get_drvdata" $(LINUXSRC)/include/linux/auxiliary_bus.h),)
+ifneq ($(shell grep -so "auxiliary_get_drvdata" $(KSRC_AUX)/include/linux/auxiliary_bus.h),)
DISTRO_CFLAG += -DHAVE_AUX_GET_DRVDATA
endif
diff --git a/bnxt_en-1.10.2-227.0.130.0/bnxt_auxbus_compat.h b/bnxt_en-1.10.2-227.0.130.0/bnxt_auxbus_compat.h
index 9496e56..d4b2653 100644
--- a/bnxt_en-1.10.2-227.0.130.0/bnxt_auxbus_compat.h
+++ b/bnxt_en-1.10.2-227.0.130.0/bnxt_auxbus_compat.h
@@ -10,10 +10,6 @@
#ifndef _BNXT_AUXILIARY_COMPAT_H_
#define _BNXT_AUXILIARY_COMPAT_H_
-#if !defined(CONFIG_AUXILIARY_BUS)
-#undef HAVE_AUXILIARY_DRIVER
-#endif
-
#ifdef HAVE_AUXILIARY_DRIVER
#include <linux/auxiliary_bus.h>
#endif
diff --git a/bnxt_re-227.0.130.0/Makefile b/bnxt_re-227.0.130.0/Makefile
index 600698c..21048b9 100644
--- a/bnxt_re-227.0.130.0/Makefile
+++ b/bnxt_re-227.0.130.0/Makefile
@@ -910,17 +910,22 @@ ifneq ($(shell grep -o "struct auxiliary_device_id" $(LINUXSRC)/include/linux/mo
DISTRO_CFLAG += -DHAVE_AUX_DEVICE_ID
endif
-ifneq ($(shell ls $(LINUXSRC)/include/linux/auxiliary_bus.h > /dev/null 2>&1 && echo auxiliary_driver),)
+ifeq (${KSRC_COMMON},)
+KSRC_AUX := ${LINUXSRC}
+else
+KSRC_AUX := ${KSRC_COMMON}
+endif
+ifneq ($(shell ls $(KSRC_AUX)/include/linux/auxiliary_bus.h > /dev/null 2>&1 && echo auxiliary_driver),)
ifneq ($(CONFIG_AUXILIARY_BUS),)
DISTRO_CFLAG += -DHAVE_AUXILIARY_DRIVER
endif
endif
-ifneq ($(shell grep -so "auxiliary_set_drvdata" $(LINUXSRC)/include/linux/auxiliary_bus.h),)
+ifneq ($(shell grep -so "auxiliary_set_drvdata" $(KSRC_AUX)/include/linux/auxiliary_bus.h),)
DISTRO_CFLAG += -DHAVE_AUX_SET_DRVDATA
endif
-ifneq ($(shell grep -so "auxiliary_get_drvdata" $(LINUXSRC)/include/linux/auxiliary_bus.h),)
+ifneq ($(shell grep -so "auxiliary_get_drvdata" $(KSRC_AUX)/include/linux/auxiliary_bus.h),)
DISTRO_CFLAG += -DHAVE_AUX_GET_DRVDATA
endif
--
2.43.0

View File

@ -1,7 +1,7 @@
From ad51050d13b3cae78140b1acc507d792646f8503 Mon Sep 17 00:00:00 2001
From 474236904abea6f8ef1ae3d52245b714e5566b59 Mon Sep 17 00:00:00 2001
From: "M. Vefa Bicakci" <vefa.bicakci@windriver.com>
Date: Wed, 2 Mar 2022 14:14:12 -0500
Subject: [PATCH] bnxt_en, bnxt_re: Use irq_update_affinity_hint
Subject: [PATCH 09/10] bnxt_en, bnxt_re: Use irq_update_affinity_hint
This commit updates the bnxt_en and bnxt_re device drivers to use the
irq_update_affinity_hint function instead of the irq_set_affinity_hint
@ -73,15 +73,15 @@ for completeness.
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
---
bnxt_en-1.10.2-220.0.13.0/bnxt.c | 6 +++---
bnxt_re-220.0.12.0/qplib_fp.c | 6 +++---
bnxt_en-1.10.2-227.0.130.0/bnxt.c | 6 +++---
bnxt_re-227.0.130.0/qplib_fp.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/bnxt_en-1.10.2-220.0.13.0/bnxt.c b/bnxt_en-1.10.2-220.0.13.0/bnxt.c
index b0b99338c425..a2f55dfcd0c3 100644
--- a/bnxt_en-1.10.2-220.0.13.0/bnxt.c
+++ b/bnxt_en-1.10.2-220.0.13.0/bnxt.c
@@ -10716,7 +10716,7 @@ static void bnxt_free_irq(struct bnxt *bp)
diff --git a/bnxt_en-1.10.2-227.0.130.0/bnxt.c b/bnxt_en-1.10.2-227.0.130.0/bnxt.c
index 1ccdb79..3a61281 100644
--- a/bnxt_en-1.10.2-227.0.130.0/bnxt.c
+++ b/bnxt_en-1.10.2-227.0.130.0/bnxt.c
@@ -12479,7 +12479,7 @@ static void bnxt_free_irq(struct bnxt *bp)
(defined(HAVE_CPUMASK_LOCAL_FIRST) || \
defined(HAVE_CPUMASK_LOCAL_SPREAD))
if (irq->have_cpumask) {
@ -90,7 +90,7 @@ index b0b99338c425..a2f55dfcd0c3 100644
free_cpumask_var(irq->cpu_mask);
irq->have_cpumask = 0;
}
@@ -10787,10 +10787,10 @@ static int bnxt_request_irq(struct bnxt *bp)
@@ -12554,10 +12554,10 @@ static int bnxt_request_irq(struct bnxt *bp)
break;
}
#endif
@ -103,20 +103,20 @@ index b0b99338c425..a2f55dfcd0c3 100644
irq->vector);
break;
}
diff --git a/bnxt_re-220.0.12.0/qplib_fp.c b/bnxt_re-220.0.12.0/qplib_fp.c
index ef5f279fcb79..60d2eda3727d 100644
--- a/bnxt_re-220.0.12.0/qplib_fp.c
+++ b/bnxt_re-220.0.12.0/qplib_fp.c
@@ -492,7 +492,7 @@ void bnxt_qplib_nq_stop_irq(struct bnxt_qplib_nq *nq, bool kill)
diff --git a/bnxt_re-227.0.130.0/qplib_fp.c b/bnxt_re-227.0.130.0/qplib_fp.c
index d7c6d80..ae50c0b 100644
--- a/bnxt_re-227.0.130.0/qplib_fp.c
+++ b/bnxt_re-227.0.130.0/qplib_fp.c
@@ -518,7 +518,7 @@ void bnxt_qplib_nq_stop_irq(struct bnxt_qplib_nq *nq, bool kill)
bnxt_qplib_ring_nq_db(&nq->nq_db.dbinfo, res->cctx, false);
/* Sync with last running IRQ handler */
synchronize_irq(nq->msix_vec);
- irq_set_affinity_hint(nq->msix_vec, NULL);
+ irq_update_affinity_hint(nq->msix_vec, NULL);
free_irq(nq->msix_vec, nq);
/* Cleanup Tasklet */
@@ -546,10 +546,10 @@ int bnxt_qplib_nq_start_irq(struct bnxt_qplib_nq *nq, int nq_indx,
kfree(nq->name);
nq->name = NULL;
@@ -577,10 +577,10 @@ int bnxt_qplib_nq_start_irq(struct bnxt_qplib_nq *nq, int nq_indx,
cpumask_clear(&nq->mask);
cpumask_set_cpu(nq_indx, &nq->mask);
@ -130,5 +130,5 @@ index ef5f279fcb79..60d2eda3727d 100644
nq->requested = true;
bnxt_qplib_ring_nq_db(&nq->nq_db.dbinfo, res->cctx, true);
--
2.25.1
2.43.0

View File

@ -1,7 +1,7 @@
From c7555e5087afb22752631dd19b357d9e25cd6760 Mon Sep 17 00:00:00 2001
From ff80107e1cca82430eceb5719bbb186e4d9ac480 Mon Sep 17 00:00:00 2001
From: "M. Vefa Bicakci" <vefa.bicakci@windriver.com>
Date: Fri, 15 Apr 2022 04:29:31 +0000
Subject: [PATCH] bnxt_en/Makefile: Allow parallelized build
Subject: [PATCH 10/10] bnxt_en/Makefile: Allow parallelized build
This commit allows bnxt_en's build to be parallelized via the use of
"$(MAKE)" instead of "make". Without this change, make for bnxt_en
@ -13,14 +13,14 @@ manner:
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
---
bnxt_en-1.10.2-220.0.13.0/Makefile | 4 ++--
bnxt_en-1.10.2-227.0.130.0/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bnxt_en-1.10.2-220.0.13.0/Makefile b/bnxt_en-1.10.2-220.0.13.0/Makefile
index fe2c229d17b5..52a25eb11277 100644
--- a/bnxt_en-1.10.2-220.0.13.0/Makefile
+++ b/bnxt_en-1.10.2-220.0.13.0/Makefile
@@ -1083,9 +1083,9 @@ endef
diff --git a/bnxt_en-1.10.2-227.0.130.0/Makefile b/bnxt_en-1.10.2-227.0.130.0/Makefile
index e229cc9..84c16d2 100644
--- a/bnxt_en-1.10.2-227.0.130.0/Makefile
+++ b/bnxt_en-1.10.2-227.0.130.0/Makefile
@@ -1364,9 +1364,9 @@ endef
default:
ifeq ($(CROSS_COMPILE),)
@ -33,5 +33,5 @@ index fe2c229d17b5..52a25eb11277 100644
yocto_all:
--
2.25.1
2.43.0

View File

@ -1,5 +1,10 @@
0001-bnxt_re-Makefile-Adapt-to-mlnx-ofa_kernel-for-Starli.patch
0002-bnxt_en-bnxt_compat.h-Fix-up-a-build-failure.patch
0003-bnxt_en-bnxt_re-Use-irq_update_affinity_hint.patch
0004-bnxt_en-Makefile-Allow-parallelized-build.patch
0005-bnxt_re-Fix-the-version-compatibility-issue.patch
0002-bnxt_en-Rename-page_pool.h-to-page_pool-helpers.h.patch
0003-bnxt_en-fix-the-build-errors.patch
0004-bnxt_en-skb_frag_fill_page_desc-replace-of-__skb_fra.patch
0005-bnxt_en-Drop-redundant-pci_enable_pcie_error_reporti.patch
0006-bnxt_en-Use-64bits-for-used_keys.patch
0007-bnxt_en-remove-module-from-class_create.patch
0008-bnxt_en-correct-the-path-for-auxiliary_bus.h.patch
0009-bnxt_en-bnxt_re-Use-irq_update_affinity_hint.patch
0010-bnxt_en-Makefile-Allow-parallelized-build.patch

View File

@ -30,6 +30,7 @@ kheaders_name=$(shell ls /usr/src | grep linux@KERNEL_TYPE@-headers | grep commo
kbuild_name=$(shell ls /usr/src | grep linux@KERNEL_TYPE@-headers | grep amd64)
kversion=$(shell echo $(kbuild_name) | sed 's/linux@KERNEL_TYPE@-headers-//g')
pkg_common_name=bnxt-en-common
export KSRC_COMMON=/usr/src/$(kheaders_name)
# "dpkg --status mlnx-ofed-kernel-dev" prints a version line
# like the following:

View File

@ -24,8 +24,8 @@
# building.
# Tools needed: mkdir, rm, tar
DL_TARBALL=bcm_220.0.83.0.tar.gz
SRC_TARBALL=Linux/Linux_Driver/netxtreme-bnxt_en-1.10.2-220.0.13.0.tar.gz
DL_TARBALL=bcm_227.1.111.0b.tar.gz
SRC_TARBALL=Linux/Linux_Driver/netxtreme-bnxt_en-1.10.2-227.0.130.0.tar.gz
TMPDIR="bcm_tmp"
DESTDIR="${1}"

View File

@ -1,14 +1,14 @@
---
debver: 1.10.2.220.0.13.0
debver: 1.10.2.227.0.130.0
debname: bnxt-en
dl_hook: dl_hook
dl_files:
bcm_220.0.83.0.tar.gz:
bcm_227.1.111.0b.tar.gz:
topdir: null
url: "https://docs.broadcom.com/docs-and-downloads/\
ethernet-network-adapters/NXE/BRCM_220.0.83.0/\
bcm_220.0.83.0.tar.gz"
sha256sum: 85bdfc30b4bd3e184e3b57a48055c11085e3b97593f7b4a8347fa50a9d571336
ethernet-network-adapters/NXE/BRCM_227.1.111.0/\
bcm_227.1.111.0b.tar.gz"
sha256sum: 184977c9043b64358d65c9412063377ed5fc4d9efb225c31ce5e11f1b16b5418
revision:
dist: $STX_DIST
GITREVCOUNT:

View File

@ -0,0 +1,47 @@
From d05ff19ed3f3bb6bc914135531e4bdb6d332adce Mon Sep 17 00:00:00 2001
From: Jiping Ma <jiping.ma2@windriver.com>
Date: Thu, 11 Apr 2024 02:48:47 +0000
Subject: [PATCH] mlnx-ofa_kernel: fix bnxt_re build error
NETDEV_CHANGEINFODATA already exists as enum 25 in kernel header file
netdevice.h, but it is defined 0x0019 here, so that NETDEV_CHANGEINFODATA
and NETDEV_BONDING_INFO is same value that caused the following errors.
bnxt_re-227.0.130.0/main.c: In function bnxt_re_task:
bnxt_re-227.0.130.0/main.c:5668:2: error: duplicate case value
5668 | case NETDEV_CHANGEINFODATA:
| ^~~~
bnxt_re-227.0.130.0/main.c:5642:2: note: previously used here
5642 | case NETDEV_BONDING_INFO:
| ^~~~
bnxt_re-227.0.130.0/main.c: In function bnxt_re_netdev_event:
bnxt_re-227.0.130.0/main.c:5908:2: error: duplicate case value
5908 | case NETDEV_CHANGEINFODATA:
| ^~~~
bnxt_re-227.0.130.0/main.c:5870:2: note: previously used here
5870 | case NETDEV_BONDING_INFO:
| ^~~~
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
---
include/linux/netdevice.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 277e5a0..756809d 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -24,10 +24,6 @@
( (netdev)->ethtool_ops = (ops) )
#endif
-#ifndef NETDEV_BONDING_INFO
-#define NETDEV_BONDING_INFO 0x0019
-#endif
-
static inline int netdev_set_master(struct net_device *dev,
struct net_device *master)
{
--
2.43.0

View File

@ -1 +1,2 @@
0001-Enable-mlx5-onboard-udev-name.patch
0002-mlnx-ofa_kernel-fix-bnxt_re-build-error.patch

View File

@ -1,3 +1,11 @@
libbnxt-re (227.0.130.0-1) unstable; urgency=medium
* Upgrade the release of the libbnxt_re Infiniband verbs library for StarlingX
to 227.0.130.0 from 220.0.5.0. This library corresponds to
"libbnxt_re-227.0.130.0.tar.gz" in Broadcom's "bcm_227.1.111.0b" release.
-- Jiping Ma <Jiping.ma2@windriver.com> Mon, 15 Apr 2024 09:47:34 +0800
libbnxt-re (220.0.5.0-1) unstable; urgency=medium
* Initial release of the libbnxt_re Infiniband verbs library for StarlingX.

View File

@ -1,118 +0,0 @@
From ffd1f85f70551c897e6e62b89acf8b170c1c82ea Mon Sep 17 00:00:00 2001
From: "M. Vefa Bicakci" <vefa.bicakci@windriver.com>
Date: Thu, 31 Mar 2022 16:14:22 -0400
Subject: [PATCH] configure.ac: Detect rdma-core v36 and v37 too
This commit makes the configure.ac script detect rdma-core v36 and v37
as well. Of these, we are only interested in v37, because Mellanox's
OpenFabrics Enterprise Distribution is based on rdma-core v37.
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
---
configure.ac | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 75 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 9e4e980886d4..3ece437e664a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,6 +68,10 @@ m4_define([rcore_version],[m4_esyscmd(rc=$(grep -o \
_ibv_device_ops verbsincpath/include/infiniband/verbs.h | \
tail -1); \
if test ! -z "$rc"; then \
+ rcverv37=$(grep "IBV_WC_DRIVER3" \
+ verbsincpath/include/infiniband/verbs.h|tail -1); \
+ rcverv36=$(grep "ibv_query_qp_data_in_order" \
+ verbsincpath/include/infiniband/verbs.h|tail -1); \
rcverv35=$(grep "ibv_is_fork_initialized" \
verbsincpath/include/infiniband/verbs.h|tail -1); \
rcverv34=$(grep "ibv_reg_dmabuf_mr" \
@@ -90,7 +94,11 @@ m4_define([rcore_version],[m4_esyscmd(rc=$(grep -o \
verbsincpath/include/infiniband/verbs.h|tail -1); \
rcverv17=$(grep -o ibv_alloc_td \
verbsincpath/include/infiniband/verbs.h|tail -1); \
- if test ! -z "$rcverv35"; then \
+ if test ! -z "$rcverv37"; then \
+ echo -n "v37"; \
+ elif test ! -z "$rcverv36"; then \
+ echo -n "v36"; \
+ elif test ! -z "$rcverv35"; then \
echo -n "v35"; \
elif test ! -z "$rcverv34"; then \
echo -n "v34"; \
@@ -175,6 +183,72 @@ if test "$rc" != ""; then
AC_DEFINE([HAVE_IBV_CMD_MODIFY_QP_EX],[1],[ibv_cmd_modify_qp_ex supported])
RDMA_CORE_HEADERS=`echo -n __include_path__`
case "$(echo -n rcore_version)" in
+ v37)
+ AC_MSG_RESULT(yes using v37)
+ AC_DEFINE([IBV_WC_DRIVER3_IN_IBV_WC_OPCODE],[1],
+ [Rdma-Core Package has IBV_WC_DRIVER3 in ibv_wc_opcode enum])
+ AC_DEFINE([IBV_WC_DRIVER2_IN_IBV_WC_OPCODE],[1],
+ [Rdma-Core Package has IBV_WC_DRIVER2 in ibv_wc_opcode enum])
+ AC_DEFINE([IBV_QUERY_QP_DATA_IN_ORDER_IN_CONTEXT_OPS],[1],
+ [Rdma-Core Package has query_qp_data_in_order in verbs_context_ops])
+ AC_DEFINE([VERBS_ONLY_QUERY_DEVICE_EX_DEFINED],[1],
+ [Rdma-Core Package has only query_device_ex])
+ AC_DEFINE([IBV_CMD_MODIFY_QP_EX_HAS_7_ARG],[1],
+ [Rdma-Core Package ibv_cmd_modify_qp_ex has 7 arguments])
+ AC_DEFINE([IBV_FREE_CONTEXT_IN_CONTEXT_OPS],[1],
+ [Rdma-Core Package has free context in ibv_context_ops])
+ AC_DEFINE([REG_MR_VERB_HAS_5_ARG],[1],
+ [Rdma-Core Package reg_mr has 5 argument])
+ AC_DEFINE([IBV_CMD_ALLOC_MW_HAS_1_ARG],[1],
+ [Rdma-Core Package ibv_cmd_alloc_mw has single argument])
+ AC_DEFINE([PROVIDER_DRIVER_HAS_2_ARGS],[1],
+ [Rdma-Core Package PROVIDER_DRIVER macro has 2 arguments])
+ AC_DEFINE([ALLOC_CONTEXT_HAS_PRIVATE_DATA],[1],
+ [Rdma-Core Package alloc_context has private data])
+ AC_DEFINE([VERBS_MR_DEFINED],[1],
+ [Rdma-Core Package has verbs_mr defined])
+ AC_DEFINE([VERBS_INIT_AND_ALLOC_CONTEXT_HAS_5_ARG],[1],
+ [Rdma-Core Package has 5 Arg for verbs_init_and_alloc_context macro])
+ AC_DEFINE([RCP_HAS_PROVIDER_DRIVER],[1],
+ [Rdma-Core Package has PROVIDER_DRIVER macro])
+ AC_DEFINE([RCP_USE_IB_UVERBS],[1],
+ [Rdma-Core Package uses IB user verbs API])
+ AC_DEFINE([RCP_USE_ALLOC_CONTEXT],[1],
+ [Rdma-Core Package uses alloc_context instead of init_context])
+ rc=`grep -o ibv_read_sysfs_file src/rc-compat/v37/driver.h|tail -1`
+ ;;
+ v36)
+ AC_MSG_RESULT(yes using v36)
+ AC_DEFINE([IBV_WC_DRIVER2_IN_IBV_WC_OPCODE],[1],
+ [Rdma-Core Package has IBV_WC_DRIVER2 in ibv_wc_opcode enum])
+ AC_DEFINE([IBV_QUERY_QP_DATA_IN_ORDER_IN_CONTEXT_OPS],[1],
+ [Rdma-Core Package has query_qp_data_in_order in verbs_context_ops])
+ AC_DEFINE([VERBS_ONLY_QUERY_DEVICE_EX_DEFINED],[1],
+ [Rdma-Core Package has only query_device_ex])
+ AC_DEFINE([IBV_CMD_MODIFY_QP_EX_HAS_7_ARG],[1],
+ [Rdma-Core Package ibv_cmd_modify_qp_ex has 7 arguments])
+ AC_DEFINE([IBV_FREE_CONTEXT_IN_CONTEXT_OPS],[1],
+ [Rdma-Core Package has free context in ibv_context_ops])
+ AC_DEFINE([REG_MR_VERB_HAS_5_ARG],[1],
+ [Rdma-Core Package reg_mr has 5 argument])
+ AC_DEFINE([IBV_CMD_ALLOC_MW_HAS_1_ARG],[1],
+ [Rdma-Core Package ibv_cmd_alloc_mw has single argument])
+ AC_DEFINE([PROVIDER_DRIVER_HAS_2_ARGS],[1],
+ [Rdma-Core Package PROVIDER_DRIVER macro has 2 arguments])
+ AC_DEFINE([ALLOC_CONTEXT_HAS_PRIVATE_DATA],[1],
+ [Rdma-Core Package alloc_context has private data])
+ AC_DEFINE([VERBS_MR_DEFINED],[1],
+ [Rdma-Core Package has verbs_mr defined])
+ AC_DEFINE([VERBS_INIT_AND_ALLOC_CONTEXT_HAS_5_ARG],[1],
+ [Rdma-Core Package has 5 Arg for verbs_init_and_alloc_context macro])
+ AC_DEFINE([RCP_HAS_PROVIDER_DRIVER],[1],
+ [Rdma-Core Package has PROVIDER_DRIVER macro])
+ AC_DEFINE([RCP_USE_IB_UVERBS],[1],
+ [Rdma-Core Package uses IB user verbs API])
+ AC_DEFINE([RCP_USE_ALLOC_CONTEXT],[1],
+ [Rdma-Core Package uses alloc_context instead of init_context])
+ rc=`grep -o ibv_read_sysfs_file src/rc-compat/v36/driver.h|tail -1`
+ ;;
v35)
AC_MSG_RESULT(yes using v35)
AC_DEFINE([VERBS_ONLY_QUERY_DEVICE_EX_DEFINED],[1],
--
2.29.2

View File

@ -1,2 +0,0 @@
0001-rc-compat-Add-headers-from-v37.3.patch
0002-configure.ac-Detect-rdma-core-v36-and-v37-too.patch

View File

@ -24,8 +24,8 @@
# building.
# Tools needed: mkdir, rm, tar
DL_TARBALL=bcm_220.0.83.0.tar.gz
SRC_TARBALL=Linux/Linux_RoCE/RoCE_Lib/libbnxt_re-220.0.5.0.tar.gz
DL_TARBALL=bcm_227.1.111.0b.tar.gz
SRC_TARBALL=Linux/Linux_RoCE/RoCE_Lib/libbnxt_re-227.0.130.0.tar.gz
TMPDIR="bcm_tmp"
DESTDIR="${1}"

View File

@ -1,14 +1,14 @@
---
debver: 220.0.5.0
debver: 227.0.130.0
debname: libbnxt-re
dl_hook: dl_hook
dl_files:
bcm_220.0.83.0.tar.gz:
bcm_227.1.111.0b.tar.gz:
topdir: null
url: "https://docs.broadcom.com/docs-and-downloads/\
ethernet-network-adapters/NXE/BRCM_220.0.83.0/\
bcm_220.0.83.0.tar.gz"
sha256sum: 85bdfc30b4bd3e184e3b57a48055c11085e3b97593f7b4a8347fa50a9d571336
ethernet-network-adapters/NXE/BRCM_227.1.111.0/\
bcm_227.1.111.0b.tar.gz"
sha256sum: 184977c9043b64358d65c9412063377ed5fc4d9efb225c31ce5e11f1b16b5418
revision:
dist: $STX_DIST
GITREVCOUNT: