Files
integ/kernel/kernel-modules/mlnx-ofa_kernel/centos/patches/Disable-use-of-page-pool.patch
Jim Somerville 424ba94a9a Mellanox Driver: Disable use of kernel page pool functionality
Problem:  The out-of-tree Mellanox driver detects the presence
of page pool support in the new kernel, and thus wants to use it.
However, page pools are not configured to be on in the new kernel
by default (CONFIG_PAGE_POOL), and not only that, the config
option is hidden ie. it is not user selectable. The built-in
Mellanox driver selects it, but we don't use the built-in driver.
The out-of-tree driver does compile but not all pieces of it
will load properly, specifically the mlx5 pieces which rely on
page pool functionality being enabled in the kernel.

Solution: Simply disable kernel page pool use in the
out-of-tree Mellanox driver, making it work the same way as
it did with the older kernel.

Change-Id: If7e7155867d539352fcd0ea3acd5a17dd9d9579f
Closes-Bug: 1860347
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
2020-01-24 12:36:06 -05:00

78 lines
2.5 KiB
Diff

From 470e37909b707b2209ae3ed1a9d82758b114691c Mon Sep 17 00:00:00 2001
Message-Id: <470e37909b707b2209ae3ed1a9d82758b114691c.1579638263.git.Jim.Somerville@windriver.com>
From: Jim Somerville <Jim.Somerville@windriver.com>
Date: Tue, 21 Jan 2020 14:42:03 -0500
Subject: [PATCH 1/1] Disable use of page pool
Don't use it until they are configured on by default
in the kernel, else you may get undefined symbols and
some of the mlx5 related modules fail to load.
The header file is there in CentOS 7.7, but the
CONFIG_PAGE_POOL option isn't enabled. So the simplistic
configure test passes here but the kernel doesn't have the
required procedures.
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
---
source/compat/aclocal.m4 | 4 +---
source/compat/config/rdma.m4 | 4 +---
source/compat/configure | 4 ++--
3 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/source/compat/aclocal.m4 b/source/compat/aclocal.m4
index 192f6a0..31520d4 100644
--- a/source/compat/aclocal.m4
+++ b/source/compat/aclocal.m4
@@ -12330,9 +12330,7 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
],[
return 0;
],[
- AC_MSG_RESULT(yes)
- MLNX_AC_DEFINE(HAVE_NET_PAGE_POOL_H, 1,
- [net/page_pool.h is defined])
+ AC_MSG_RESULT(no)
],[
AC_MSG_RESULT(no)
])
diff --git a/source/compat/config/rdma.m4 b/source/compat/config/rdma.m4
index 5fbe4f7..e502f8d 100644
--- a/source/compat/config/rdma.m4
+++ b/source/compat/config/rdma.m4
@@ -10226,9 +10226,7 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
],[
return 0;
],[
- AC_MSG_RESULT(yes)
- MLNX_AC_DEFINE(HAVE_NET_PAGE_POOL_H, 1,
- [net/page_pool.h is defined])
+ AC_MSG_RESULT(no)
],[
AC_MSG_RESULT(no)
])
diff --git a/source/compat/configure b/source/compat/configure
index 68ceff5..2e955b3 100755
--- a/source/compat/configure
+++ b/source/compat/configure
@@ -102487,7 +102487,7 @@ if { ac_try='env $CROSS_VARS $MAKE -d modules ${LD:+"LD=$CROSS_COMPILE$LD"} CC="
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
cat >>CONFDEFS_H_DIR/confdefs.h.${CONFDEFS_H_INDEX} <<\_ACEOF
-#define HAVE_NET_PAGE_POOL_H 1
+/* Intentionally removed #define HAVE_NET_PAGE_POOL_H 1 */
_ACEOF
@@ -102546,7 +102546,7 @@ if { ac_try='env $CROSS_VARS $MAKE -d modules ${LD:+"LD=$CROSS_COMPILE$LD"} CC="
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
cat >>CONFDEFS_H_DIR/confdefs.h.${CONFDEFS_H_INDEX} <<\_ACEOF
-#define HAVE_NET_PAGE_POOL_H 1
+/* Intentionally removed #define HAVE_NET_PAGE_POOL_H 1 */
_ACEOF
--
1.8.3.1