|
|
9b2893 |
From 23408827f9f74062a43041154a78505bc9fa4ed8 Mon Sep 17 00:00:00 2001
|
|
|
9b2893 |
From: Honggang Li <honli@redhat.com>
|
|
|
9b2893 |
Date: Tue, 3 Nov 2020 20:21:33 +0800
|
|
|
9b2893 |
Subject: [PATCH] Only load i40iw for i40e device with specific PCI IDs
|
|
|
9b2893 |
|
|
|
9b2893 |
This a redhat specific hack to handle i40iw huge memory consuming issue.
|
|
|
9b2893 |
|
|
|
9b2893 |
rdma-core upstream maintainer believes this issue should be handled in
|
|
|
9b2893 |
kernel space with i40e/i40iw driver. Unfortunately, Intel does not care
|
|
|
9b2893 |
about this request.
|
|
|
9b2893 |
|
|
|
9b2893 |
<snip>
|
|
|
9b2893 |
Just for the record, why is it a bad idea to use the original udev
|
|
|
9b2893 |
rule that contained "kmod load i40iw". Two reasons:
|
|
|
9b2893 |
a) for most i40e NICs i40iw is irrelevant and we have the memory issue
|
|
|
9b2893 |
that Intel won't fix.
|
|
|
9b2893 |
b) if i40iw is loaded you can no longer unload i40e by itself.
|
|
|
9b2893 |
$ modprobe i40iw
|
|
|
9b2893 |
$ modprobe -r i40e
|
|
|
9b2893 |
modprobe: FATAL: Module i40e is in use.
|
|
|
9b2893 |
|
|
|
9b2893 |
Bad user experience and we may break existing user scripts!
|
|
|
9b2893 |
Even worse unloading i40iw unloads i40e implicitly.
|
|
|
9b2893 |
Also i40iw is going away upstream at some point.
|
|
|
9b2893 |
<snip>
|
|
|
9b2893 |
|
|
|
9b2893 |
Resolves: bz1850462
|
|
|
9b2893 |
|
|
|
9b2893 |
Signed-off-by: Honggang Li <honli@redhat.com>
|
|
|
9b2893 |
---
|
|
|
9b2893 |
kernel-boot/rdma-hw-modules.rules | 20 +++++++++++++++++++-
|
|
|
9b2893 |
1 file changed, 19 insertions(+), 1 deletion(-)
|
|
|
9b2893 |
|
|
|
9b2893 |
diff --git a/kernel-boot/rdma-hw-modules.rules b/kernel-boot/rdma-hw-modules.rules
|
|
|
9b2893 |
index 95eaf7206702..541516eb98f4 100644
|
|
|
9b2893 |
--- a/kernel-boot/rdma-hw-modules.rules
|
|
|
9b2893 |
+++ b/kernel-boot/rdma-hw-modules.rules
|
|
|
9b2893 |
@@ -11,11 +11,29 @@ ENV{ID_NET_DRIVER}=="be2net", RUN{builtin}+="kmod load ocrdma"
|
|
|
9b2893 |
ENV{ID_NET_DRIVER}=="bnxt_en", RUN{builtin}+="kmod load bnxt_re"
|
|
|
9b2893 |
ENV{ID_NET_DRIVER}=="cxgb4", RUN{builtin}+="kmod load iw_cxgb4"
|
|
|
9b2893 |
ENV{ID_NET_DRIVER}=="hns", RUN{builtin}+="kmod load hns_roce"
|
|
|
9b2893 |
-ENV{ID_NET_DRIVER}=="i40e", RUN{builtin}+="kmod load i40iw"
|
|
|
9b2893 |
ENV{ID_NET_DRIVER}=="mlx4_en", RUN{builtin}+="kmod load mlx4_ib"
|
|
|
9b2893 |
ENV{ID_NET_DRIVER}=="mlx5_core", RUN{builtin}+="kmod load mlx5_ib"
|
|
|
9b2893 |
ENV{ID_NET_DRIVER}=="qede", RUN{builtin}+="kmod load qedr"
|
|
|
9b2893 |
|
|
|
9b2893 |
+# Because most of X722 don't support RDMA, only load i40iw for X722 with specific device IDs.
|
|
|
9b2893 |
+#define I40E_INTEL_VENDOR_ID 0x8086
|
|
|
9b2893 |
+#define I40E_DEV_ID_X722 0x37CC
|
|
|
9b2893 |
+#define I40E_DEV_ID_KX_X722 0x37CE
|
|
|
9b2893 |
+#define I40E_DEV_ID_QSFP_X722 0x37CF
|
|
|
9b2893 |
+#define I40E_DEV_ID_SFP_X722 0x37D0
|
|
|
9b2893 |
+#define I40E_DEV_ID_1G_BASE_T_X722 0x37D1
|
|
|
9b2893 |
+#define I40E_DEV_ID_10G_BASE_T_X722 0x37D2
|
|
|
9b2893 |
+#define I40E_DEV_ID_SFP_I_X722 0x37D3
|
|
|
9b2893 |
+#define I40E_DEV_ID_X722_VF 0x37CD
|
|
|
9b2893 |
+ENV{ID_NET_DRIVER}=="i40e", ENV{ID_VENDOR_ID}=="0x8086", ENV{ID_MODEL_ID}=="0x37cc", RUN{builtin}+="kmod load i40iw"
|
|
|
9b2893 |
+ENV{ID_NET_DRIVER}=="i40e", ENV{ID_VENDOR_ID}=="0x8086", ENV{ID_MODEL_ID}=="0x37ce", RUN{builtin}+="kmod load i40iw"
|
|
|
9b2893 |
+ENV{ID_NET_DRIVER}=="i40e", ENV{ID_VENDOR_ID}=="0x8086", ENV{ID_MODEL_ID}=="0x37cf", RUN{builtin}+="kmod load i40iw"
|
|
|
9b2893 |
+ENV{ID_NET_DRIVER}=="i40e", ENV{ID_VENDOR_ID}=="0x8086", ENV{ID_MODEL_ID}=="0x37d0", RUN{builtin}+="kmod load i40iw"
|
|
|
9b2893 |
+ENV{ID_NET_DRIVER}=="i40e", ENV{ID_VENDOR_ID}=="0x8086", ENV{ID_MODEL_ID}=="0x37d1", RUN{builtin}+="kmod load i40iw"
|
|
|
9b2893 |
+ENV{ID_NET_DRIVER}=="i40e", ENV{ID_VENDOR_ID}=="0x8086", ENV{ID_MODEL_ID}=="0x37d2", RUN{builtin}+="kmod load i40iw"
|
|
|
9b2893 |
+ENV{ID_NET_DRIVER}=="i40e", ENV{ID_VENDOR_ID}=="0x8086", ENV{ID_MODEL_ID}=="0x37d3", RUN{builtin}+="kmod load i40iw"
|
|
|
9b2893 |
+ENV{ID_NET_DRIVER}=="i40e", ENV{ID_VENDOR_ID}=="0x8086", ENV{ID_MODEL_ID}=="0x37cd", RUN{builtin}+="kmod load i40iw"
|
|
|
9b2893 |
+
|
|
|
9b2893 |
# The user must explicitly load these modules via /etc/modules-load.d/ or otherwise
|
|
|
9b2893 |
# rxe
|
|
|
9b2893 |
|
|
|
9b2893 |
--
|
|
|
9b2893 |
2.25.4
|
|
|
9b2893 |
|