commit d308dafa4cd5d8bcefeb287123faec5c92a0fcf63e7f80bedb135157b97cc0b5
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2026-05-09T20:36:48Z |
| subject | Missing files |
commit d308dafa4cd5d8bcefeb287123faec5c92a0fcf63e7f80bedb135157b97cc0b5
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2026-05-09T20:36:48Z
Missing files
---
...fail-module-init-for-absent-optional-offl.patch | 73 ++++++++++++++++++----
1 file changed, 60 insertions(+), 13 deletions(-)
diff --git a/patches/ask/cdx/0002-cdx-do-not-fail-module-init-for-absent-optional-offl.patch b/patches/ask/cdx/0002-cdx-do-not-fail-module-init-for-absent-optional-offl.patch
index fb2ba39..a4347b4 100644
--- a/patches/ask/cdx/0002-cdx-do-not-fail-module-init-for-absent-optional-offl.patch
+++ b/patches/ask/cdx/0002-cdx-do-not-fail-module-init-for-absent-optional-offl.patch
@@ -1,14 +1,28 @@
-From 919ea304abf495a7142639e51555508fa1b23a30 Mon Sep 17 00:00:00 2001
-From: test <test@example.com>
-Date: Sat, 9 May 2026 16:59:28 +0000
-Subject: [PATCH 2/2] cdx: do not fail module init for absent optional offloads
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: builder <builder@localhost>
+Date: Sun, 10 May 2026 00:00:00 +0000
+Subject: [PATCH] cdx: keep optional offload init failures non-fatal
+The CDX module currently treats several board-specific acceleration paths as
+mandatory. On boards without VWD/WiFi OH ports, fragmentation BMan pools, or
+DPA IPsec OH ports, module init either fails or can crash before returning an
+error.
+
+Keep the CDX core loadable when those optional resources are absent:
+
+ - warn and continue when VWD/WiFi init fails;
+ - skip the vendor fragmentation module on this platform, because it can
+ dereference a missing BMan pool;
+ - warn and continue when DPA IPsec init fails;
+ - only initialize DPA IPsec follow-up buffer pools when IPsec init succeeds.
+---
+ cdx/cdx_main.c | 47 +++++++++++++++++++++--------------------------
+ 1 file changed, 21 insertions(+), 26 deletions(-)
diff --git a/cdx/cdx_main.c b/cdx/cdx_main.c
-index ec763cb..641121b 100644
--- a/cdx/cdx_main.c
+++ b/cdx/cdx_main.c
-@@ -195,16 +195,17 @@ static int __init cdx_module_init(void)
+@@ -178,31 +178,36 @@ static int __init cdx_module_init(void)
#ifdef CFG_WIFI_OFFLOAD
rc = dpaa_vwd_init();
if (rc != 0) {
@@ -25,15 +39,48 @@ index ec763cb..641121b 100644
- rc = -EIO;
- goto exit;
- }
++
+ /*
-+ * The vendor fragmentation path assumes its BMan pool/config exists and
-+ * can crash in bman_free_pool() when this board profile does not provide
-+ * it. Keep CDX usable without the optional fragmentation offload path.
++ * The vendor fragmentation path is optional for this platform and can
++ * dereference a missing BMan pool before returning an error. Do not let a
++ * missing fragmentation pool prevent the CDX core from loading.
+ */
-+ printk(KERN_WARNING "%s::skipping cdx_init_frag_module on this platform\n", __func__);
++ printk(KERN_WARNING "%s::skipping cdx_init_frag_module on this platform\n",
++ __func__);
#ifdef DPA_IPSEC_OFFLOAD
- if (cdx_dpa_ipsec_init()) {
+- if (cdx_dpa_ipsec_init()) {
+- printk("%s::dpa_ipsec start failed\n", __func__);
+- goto exit;
+- }
+-
+- if (cdx_init_scatter_gather_bpool()) {
+- printk("%s::cdx_init_scatter_gather_bpool failed\n",__func__);
+- rc = -ENOMEM;
+- goto exit;
+- }
+- if (cdx_init_skb_2bfreed_bpool()) {
+- printk("%s(%d) : cdx_init_skb_2bfreed_bpool failed\n", __func__,__LINE__);
+- rc = -ENOMEM;
+- goto exit;
++ rc = cdx_dpa_ipsec_init();
++ if (rc) {
++ printk(KERN_WARNING "%s::dpa_ipsec start failed rc %d; continuing without DPA IPsec offload\n",
++ __func__, rc);
++ rc = 0;
++ } else {
++ if (cdx_init_scatter_gather_bpool()) {
++ printk("%s::cdx_init_scatter_gather_bpool failed\n", __func__);
++ rc = -ENOMEM;
++ goto exit;
++ }
++ if (cdx_init_skb_2bfreed_bpool()) {
++ printk("%s(%d) : cdx_init_skb_2bfreed_bpool failed\n", __func__, __LINE__);
++ rc = -ENOMEM;
++ goto exit;
++ }
+ }
+ #endif
+
--
-2.47.3
-
+2.45.0