Skip to content

dpdk: update to 25.11.1 stable#604

Open
rjarry wants to merge 1 commit intoDPDK:mainfrom
rjarry:dpdk-update
Open

dpdk: update to 25.11.1 stable#604
rjarry wants to merge 1 commit intoDPDK:mainfrom
rjarry:dpdk-update

Conversation

@rjarry
Copy link
Copy Markdown
Collaborator

@rjarry rjarry commented Apr 21, 2026

Update to the latest bugfix release. Remove patches which have been accepted upstream. Rebase the remaining two patches on top of 25.11.1.

There is a regression in rte_net_get_ptype(). Include a fix that was sent upstream.

Link: https://inbox.dpdk.org/announce/20260421160029.327781-1-ktraynor@redhat.com/
Link: https://patches.dpdk.org/project/dpdk/patch/20260422103838.649578-2-rjarry@redhat.com/

Update DPDK to 25.11.1 stable

Updated subprojects/dpdk.wrap to fetch and extract dpdk-25.11.1.tar.xz from the dpdk-stable-25.11.1 directory with updated source hash and filename.

Removed five patches that have been accepted upstream in DPDK 25.11.1:

  • hash-avoid-leaking-entries-on-RCU-defer-queue-failur.patch
  • hash-free-replaced-data-on-overwrite-when-RCU-is-con.patch
  • iavf-fix-reported-max-TX-and-RX-queues-in-ethdev-inf.patch
  • net-tap-add-software-MAC-address-filtering.patch
  • Removed one of the two FIB patches (the fib-fix-prefix-addition-handling based on dpdk.wrap diff_files reduction)

Rebased two remaining patches on top of 25.11.1:

  • fib-expose-tbl8-usage-statistics.patch: Adds experimental API functions rte_fib_tbl8_get_stats() and rte_fib6_tbl8_get_stats() to expose TBL8 group usage statistics for DIR24-8 and trie FIB implementations respectively.
  • fib-fix-prefix-addition-handling.patch: Fixes early-return behavior in FIB prefix insertion to ensure reserved TBL8 counter (dp->rsvd_tbl8s) is consistently updated during prefix addition for both IPv4 and IPv6 FIB implementations.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3a4ce632-acb6-4aea-ba32-5ca2a63bd047

📥 Commits

Reviewing files that changed from the base of the PR and between 94c17f1 and 4c1b793.

📒 Files selected for processing (8)
  • subprojects/dpdk.wrap
  • subprojects/packagefiles/dpdk/fib-expose-tbl8-usage-statistics.patch
  • subprojects/packagefiles/dpdk/fib-fix-prefix-addition-handling.patch
  • subprojects/packagefiles/dpdk/hash-avoid-leaking-entries-on-RCU-defer-queue-failur.patch
  • subprojects/packagefiles/dpdk/hash-free-replaced-data-on-overwrite-when-RCU-is-con.patch
  • subprojects/packagefiles/dpdk/iavf-fix-reported-max-TX-and-RX-queues-in-ethdev-inf.patch
  • subprojects/packagefiles/dpdk/net-fix-L2-ptype-assignment-in-VLAN-loop.patch
  • subprojects/packagefiles/dpdk/net-tap-add-software-MAC-address-filtering.patch
💤 Files with no reviewable changes (4)
  • subprojects/packagefiles/dpdk/fib-fix-prefix-addition-handling.patch
  • subprojects/packagefiles/dpdk/hash-avoid-leaking-entries-on-RCU-defer-queue-failur.patch
  • subprojects/packagefiles/dpdk/iavf-fix-reported-max-TX-and-RX-queues-in-ethdev-inf.patch
  • subprojects/packagefiles/dpdk/hash-free-replaced-data-on-overwrite-when-RCU-is-con.patch
🚧 Files skipped from review as they are similar to previous changes (2)
  • subprojects/dpdk.wrap
  • subprojects/packagefiles/dpdk/fib-expose-tbl8-usage-statistics.patch

📝 Walkthrough

Walkthrough

Updates the DPDK Meson wrap to download dpdk-25.11.1 (directory dpdk-stable-25.11.1) and changes the wrap's diff_files list. Several prior patches were removed (hash RCU dequeue fallback, hash RCU overwrite free, iavf queue-reporting change, and others), while the fib-expose-tbl8-usage-statistics patch is retained. A new patch adds an L2 ptype assignment fix in the VLAN parsing loop and a unit test exercising L2/pkt-type and header-lengths. The TAP driver patch introducing software MAC filtering and related MAC/storage changes is included.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
subprojects/packagefiles/dpdk/net-tap-add-software-MAC-address-filtering.patch (2)

158-167: ⚠️ Potential issue | 🟠 Major

rte_realloc failure leaks the previous mc_addrs buffer.

Assigning the result of rte_realloc(pmd->mc_addrs, ...) directly back to pmd->mc_addrs loses the original pointer when realloc fails. DPDK's rte_realloc does not free the old allocation on failure—it returns NULL and leaves the original buffer allocated. The overwrite causes a memory leak with no remaining pointer to the old buffer. Use a temporary variable and only update pmd->mc_addrs after confirming success.

Proposed fix
-	pmd->mc_addrs = rte_realloc(pmd->mc_addrs,
-				    nb_mc_addr * sizeof(*pmd->mc_addrs), 0);
-	if (pmd->mc_addrs == NULL) {
-		pmd->nb_mc_addrs = 0;
-		return -ENOMEM;
-	}
-
-	memcpy(pmd->mc_addrs, mc_addr_set,
-	       nb_mc_addr * sizeof(*pmd->mc_addrs));
+	struct rte_ether_addr *new_addrs = rte_realloc(pmd->mc_addrs,
+				    nb_mc_addr * sizeof(*pmd->mc_addrs), 0);
+	if (new_addrs == NULL)
+		return -ENOMEM;
+
+	memcpy(new_addrs, mc_addr_set, nb_mc_addr * sizeof(*new_addrs));
+	pmd->mc_addrs = new_addrs;
 	pmd->nb_mc_addrs = nb_mc_addr;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@subprojects/packagefiles/dpdk/net-tap-add-software-MAC-address-filtering.patch`
around lines 158 - 167, The current code assigns the result of rte_realloc
directly to pmd->mc_addrs which loses the original pointer on failure; change it
to use a temporary pointer (e.g., tmp = rte_realloc(pmd->mc_addrs, nb_mc_addr *
sizeof(*pmd->mc_addrs), 0)), check tmp for NULL and return -ENOMEM without
touching pmd->mc_addrs or pmd->nb_mc_addrs if allocation fails, and only on
success assign pmd->mc_addrs = tmp, memcpy from mc_addr_set into pmd->mc_addrs
and then set pmd->nb_mc_addrs = nb_mc_addr.

107-125: ⚠️ Potential issue | 🔴 Critical

Critical memory leak: mac_addrs not freed after allocation change.

The patch allocates data->mac_addrs independently via rte_calloc_socket() for TAP_MAX_MAC_ADDRS entries but removes its cleanup from tap_dev_close(). Unlike the old code where mac_addrs pointed into dev_private (and therefore could not be freed alone), the new standalone allocation must be explicitly freed. The normal close path leaks this memory. The error path in eth_dev_tap_create() relies on rte_eth_dev_release_port(), which is an internal function designed for secondary process detach—not full port teardown—and does not document explicit cleanup of dev->data or its contents. Add rte_free(dev->data->mac_addrs) before calling rte_eth_dev_release_port() in the error path and in tap_dev_close() to prevent leaks.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@subprojects/packagefiles/dpdk/net-tap-add-software-MAC-address-filtering.patch`
around lines 107 - 125, The mac_addrs buffer allocated via rte_calloc_socket for
TAP_MAX_MAC_ADDRS is now standalone and must be freed to avoid leaks; update
tap_dev_close (function tap_dev_close) to call rte_free(dev->data->mac_addrs)
and set dev->data->mac_addrs = NULL and nb_mc_addrs = 0 (or
internals->nb_mc_addrs = 0) before releasing other resources, and also add the
same rte_free(dev->data->mac_addrs) cleanup in the error path of
eth_dev_tap_create() before calling rte_eth_dev_release_port(); reference the
allocation site (rte_calloc_socket) and use rte_free to free the buffer.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In
`@subprojects/packagefiles/dpdk/net-tap-add-software-MAC-address-filtering.patch`:
- Around line 158-167: The current code assigns the result of rte_realloc
directly to pmd->mc_addrs which loses the original pointer on failure; change it
to use a temporary pointer (e.g., tmp = rte_realloc(pmd->mc_addrs, nb_mc_addr *
sizeof(*pmd->mc_addrs), 0)), check tmp for NULL and return -ENOMEM without
touching pmd->mc_addrs or pmd->nb_mc_addrs if allocation fails, and only on
success assign pmd->mc_addrs = tmp, memcpy from mc_addr_set into pmd->mc_addrs
and then set pmd->nb_mc_addrs = nb_mc_addr.
- Around line 107-125: The mac_addrs buffer allocated via rte_calloc_socket for
TAP_MAX_MAC_ADDRS is now standalone and must be freed to avoid leaks; update
tap_dev_close (function tap_dev_close) to call rte_free(dev->data->mac_addrs)
and set dev->data->mac_addrs = NULL and nb_mc_addrs = 0 (or
internals->nb_mc_addrs = 0) before releasing other resources, and also add the
same rte_free(dev->data->mac_addrs) cleanup in the error path of
eth_dev_tap_create() before calling rte_eth_dev_release_port(); reference the
allocation site (rte_calloc_socket) and use rte_free to free the buffer.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2ca0d4ec-b07e-4aed-9791-e71be437fc3e

📥 Commits

Reviewing files that changed from the base of the PR and between 46807d1 and 94c17f1.

📒 Files selected for processing (7)
  • subprojects/dpdk.wrap
  • subprojects/packagefiles/dpdk/fib-expose-tbl8-usage-statistics.patch
  • subprojects/packagefiles/dpdk/fib-fix-prefix-addition-handling.patch
  • subprojects/packagefiles/dpdk/hash-avoid-leaking-entries-on-RCU-defer-queue-failur.patch
  • subprojects/packagefiles/dpdk/hash-free-replaced-data-on-overwrite-when-RCU-is-con.patch
  • subprojects/packagefiles/dpdk/iavf-fix-reported-max-TX-and-RX-queues-in-ethdev-inf.patch
  • subprojects/packagefiles/dpdk/net-tap-add-software-MAC-address-filtering.patch
💤 Files with no reviewable changes (4)
  • subprojects/packagefiles/dpdk/hash-avoid-leaking-entries-on-RCU-defer-queue-failur.patch
  • subprojects/packagefiles/dpdk/iavf-fix-reported-max-TX-and-RX-queues-in-ethdev-inf.patch
  • subprojects/packagefiles/dpdk/fib-fix-prefix-addition-handling.patch
  • subprojects/packagefiles/dpdk/hash-free-replaced-data-on-overwrite-when-RCU-is-con.patch

Update to the latest bugfix release. Remove patches which have been
accepted upstream. Rebase the remaining two patches on top of 25.11.1.

There is a regression in rte_net_get_ptype(). Include a fix that was
sent upstream.

Link: https://inbox.dpdk.org/announce/20260421160029.327781-1-ktraynor@redhat.com/
Link: https://patches.dpdk.org/project/dpdk/patch/20260422103838.649578-2-rjarry@redhat.com/
Signed-off-by: Robin Jarry <rjarry@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant