Skip to content

Conversation

@christophefontaine
Copy link
Collaborator

@christophefontaine christophefontaine commented Nov 12, 2025

Summary by CodeRabbit

  • New Features

    • Interface statistics now include control-plane RX/TX packet and byte counters.
    • CLI interface stats table shows new control-plane metric columns.
  • Bug Fixes

    • IPv6 address handling improved for link-local prefix selection.
    • Safer neighbor discovery processing with an added null-check.
  • Other

    • Interface event reporting updated to include a distinct "add" event and adjusted event ordering.

@coderabbitai
Copy link

coderabbitai bot commented Nov 12, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Adds a new interface lifecycle event GR_EVENT_IFACE_ADD (shifting subsequent iface event values), updates serializers/CLI to include the new event, and adjusts zebra_dplane handling to treat IFACE_ADD as the addition event. Inserts four per-core interface counters (cp_rx_packets, cp_rx_bytes, cp_tx_packets, cp_tx_bytes) into API/control/telemetry/CLI code with initialization and aggregation. Changes iface_create to emit ADD before POST_ADD. Also adjusts IPv6 prefix length for link-local addresses (64 vs 128) and adds an early null-check in an NDP probe callback.

Pre-merge checks

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive Title is vague and generic, using 'Misc fixes' without describing the specific changes or main purpose of the PR. Use a specific title that describes the main change, such as 'Add GR_EVENT_IFACE_ADD event and per-core statistics counters' or 'Refactor interface event lifecycle and add CP stats'
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between adc8203 and c3e60ee.

📒 Files selected for processing (11)
  • frr/zebra_dplane_grout.c (5 hunks)
  • main/api.c (1 hunks)
  • modules/infra/api/gr_infra.h (2 hunks)
  • modules/infra/api/iface.c (1 hunks)
  • modules/infra/api/stats.c (3 hunks)
  • modules/infra/cli/iface.c (4 hunks)
  • modules/infra/control/gr_iface.h (1 hunks)
  • modules/infra/control/iface.c (1 hunks)
  • modules/infra/control/loopback.c (4 hunks)
  • modules/infra/control/netlink.c (1 hunks)
  • modules/ip6/control/nexthop.c (2 hunks)

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

@christophefontaine christophefontaine force-pushed the misc_fixes branch 2 times, most recently from fc46f7e to b36d252 Compare November 17, 2025 10:08
Copy link

@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.

Actionable comments posted: 2

Caution

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

⚠️ Outside diff range comments (1)
modules/infra/control/loopback.c (1)

111-173: Fix mbuf leak on EAGAIN/EWOULDBLOCK in iface_loopback_poll

When read(lo->fd, ...) returns <= 0 with errno == EAGAIN || errno == EWOULDBLOCK, the function returns without freeing mbuf, leaking one mbuf per spurious wakeup. The new cp_rx_* updates are fine, but this branch should also free the buffer.

A minimal fix is to reuse the existing err path:

-	if ((len = read(lo->fd, data, read_len)) <= 0) {
-		if (errno == EAGAIN || errno == EWOULDBLOCK)
-			return;
+	if ((len = read(lo->fd, data, read_len)) <= 0) {
+		if (errno == EAGAIN || errno == EWOULDBLOCK)
+			goto err;

This keeps behavior identical while avoiding the leak.

🧹 Nitpick comments (2)
modules/infra/control/netlink.c (1)

234-243: Consider setting RT_SCOPE_LINK for link-local addresses.

The /64 prefix for link-local addresses is correct per RFC 4291. However, line 244 sets ifa_scope = RT_SCOPE_UNIVERSE for all addresses. Link-local IPv6 addresses (fe80::/10) should typically use RT_SCOPE_LINK instead of RT_SCOPE_UNIVERSE.

Consider this adjustment:

 	ifa = mnl_nlmsg_put_extra_header(nlh, sizeof(*ifa));
 	ifa->ifa_family = is_ipv4 ? AF_INET : AF_INET6;
 	if (is_ipv4) {
 		ifa->ifa_prefixlen = 32;
+		ifa->ifa_scope = RT_SCOPE_UNIVERSE;
 	} else {
 		// For Link local address, a /64 is required
 		// to reach other nodes on the link
-		if (rte_ipv6_addr_is_linklocal(addr))
+		if (rte_ipv6_addr_is_linklocal(addr)) {
 			ifa->ifa_prefixlen = 64;
-		else
+			ifa->ifa_scope = RT_SCOPE_LINK;
+		} else {
 			ifa->ifa_prefixlen = 128;
+			ifa->ifa_scope = RT_SCOPE_UNIVERSE;
+		}
 	}
-	ifa->ifa_scope = RT_SCOPE_UNIVERSE;
 	ifa->ifa_index = ifindex;
modules/infra/cli/iface.c (1)

320-331: CP_ stats columns and row mapping are consistent; consider rates view*

The four CP_* columns are appended after the existing TX columns, and indices 7–10 correctly map to cp_rx_packets/bytes and cp_tx_packets/bytes, matching the existing %lu formatting style.
If you want full symmetry later, you could also expose the CP_* counters in iface rates.

Also applies to: 347-356

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc46f7e and b36d252.

📒 Files selected for processing (11)
  • frr/zebra_dplane_grout.c (5 hunks)
  • modules/infra/api/gr_infra.h (2 hunks)
  • modules/infra/api/iface.c (1 hunks)
  • modules/infra/api/stats.c (3 hunks)
  • modules/infra/cli/iface.c (4 hunks)
  • modules/infra/control/gr_iface.h (1 hunks)
  • modules/infra/control/iface.c (1 hunks)
  • modules/infra/control/loopback.c (3 hunks)
  • modules/infra/control/netlink.c (1 hunks)
  • modules/ip6/control/nexthop.c (1 hunks)
  • subprojects/packagefiles/dpdk/net-ipv6-link-local-compliance-with-rfc-4291.diff (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • frr/zebra_dplane_grout.c
  • subprojects/packagefiles/dpdk/net-ipv6-link-local-compliance-with-rfc-4291.diff
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{c,h}

⚙️ CodeRabbit configuration file

**/*.{c,h}: - gr_vec_*() functions cannot fail. No need to check their return value.

  • gr_vec_free(x) always sets x = NULL. There is no risk of double free.
  • ec_node_*() functions consume their ec_node arguments. No leaks on error.
  • rte_node->ctx is an uint8_t array of size 16, not a pointer.
  • Don't suggest to replace assert() with graceful error checking.
  • We compile with -std=gnu2x. Unnamed parameters in function definitions are valid.

Files:

  • modules/infra/control/netlink.c
  • modules/infra/api/iface.c
  • modules/infra/control/gr_iface.h
  • modules/infra/api/gr_infra.h
  • modules/infra/control/loopback.c
  • modules/infra/control/iface.c
  • modules/infra/api/stats.c
  • modules/ip6/control/nexthop.c
  • modules/infra/cli/iface.c
🧠 Learnings (9)
📓 Common learnings
Learnt from: maxime-leroy
Repo: DPDK/grout PR: 372
File: smoke/cross_vrf_forward_test.sh:18-18
Timestamp: 2025-11-05T13:55:26.189Z
Learning: In the DPDK/grout codebase, VRF interfaces (named gr-vrf<id>) are automatically created when an interface is added to a non-existing VRF using port_add. The VRF creation is handled automatically by the event system in vrf_netlink.c, so no explicit VRF interface creation commands are needed in test scripts.
📚 Learning: 2025-11-05T14:28:28.817Z
Learnt from: rjarry
Repo: DPDK/grout PR: 372
File: modules/infra/datapath/loop_input.c:53-56
Timestamp: 2025-11-05T14:28:28.817Z
Learning: In modules/infra/datapath/loop_input.c, the l3_edges array is intentionally indexed using network byte order (rte_be16_t) for EtherType values. Both loopback_input_add_type() registration and loopback_input_process() lookup use network byte order consistently, so no byte order conversion is needed when accessing l3_edges.

Applied to files:

  • modules/infra/control/loopback.c
📚 Learning: 2025-11-05T13:55:26.189Z
Learnt from: maxime-leroy
Repo: DPDK/grout PR: 372
File: smoke/cross_vrf_forward_test.sh:18-18
Timestamp: 2025-11-05T13:55:26.189Z
Learning: In the DPDK/grout codebase, VRF interfaces (named gr-vrf<id>) are automatically created when an interface is added to a non-existing VRF using port_add. The VRF creation is handled automatically by the event system in vrf_netlink.c, so no explicit VRF interface creation commands are needed in test scripts.

Applied to files:

  • modules/infra/control/iface.c
📚 Learning: 2025-09-25T07:52:17.403Z
Learnt from: rjarry
Repo: DPDK/grout PR: 312
File: frr/rt_grout.c:355-361
Timestamp: 2025-09-25T07:52:17.403Z
Learning: The nexthop_new() function in FRR's zebra codebase cannot fail and return NULL - it will abort() the process if memory allocation fails, so null checks after calling nexthop_new() are unnecessary.

Applied to files:

  • modules/ip6/control/nexthop.c
📚 Learning: 2025-09-22T09:21:51.749Z
Learnt from: rjarry
Repo: DPDK/grout PR: 312
File: modules/ip/control/address.c:102-110
Timestamp: 2025-09-22T09:21:51.749Z
Learning: The rib4_insert() function in modules/ip/control/route.c takes ownership of the nexthop reference by calling nexthop_incref(nh) at the beginning and properly calls nexthop_decref(nh) on any failure paths via the fail: label, so callers don't need to manually decrement the reference count when rib4_insert fails.

Applied to files:

  • modules/ip6/control/nexthop.c
📚 Learning: 2025-09-09T09:22:31.596Z
Learnt from: maxime-leroy
Repo: DPDK/grout PR: 309
File: modules/srv6/datapath/srv6_local.c:97-101
Timestamp: 2025-09-09T09:22:31.596Z
Learning: In SRv6 IPv6 extension header parsing, when is_ipv6_ext[proto] is true, rte_ipv6_get_next_ext() will not return a negative value, making error checking unnecessary. An assert can be used as a defensive measure for future DPDK compatibility.

Applied to files:

  • modules/ip6/control/nexthop.c
📚 Learning: 2025-09-22T09:21:51.749Z
Learnt from: rjarry
Repo: DPDK/grout PR: 312
File: modules/ip/control/address.c:102-110
Timestamp: 2025-09-22T09:21:51.749Z
Learning: The rib4_insert() function in the IP module takes ownership of the nexthop reference and automatically calls nexthop_decref(nh) on failure paths, so callers don't need to manually decrement the reference count when rib4_insert fails.

Applied to files:

  • modules/ip6/control/nexthop.c
📚 Learning: 2025-09-09T06:02:47.703Z
Learnt from: maxime-leroy
Repo: DPDK/grout PR: 309
File: modules/srv6/datapath/srv6_local.c:88-122
Timestamp: 2025-09-09T06:02:47.703Z
Learning: The DPDK function rte_ipv6_get_next_ext() only reads 2 bytes from the extension header, so a 2-byte precheck is sufficient before calling it.

Applied to files:

  • modules/ip6/control/nexthop.c
📚 Learning: 2025-08-27T15:33:22.299Z
Learnt from: rjarry
Repo: DPDK/grout PR: 305
File: modules/ip6/control/route.c:407-413
Timestamp: 2025-08-27T15:33:22.299Z
Learning: DPDK rte_rib6_get_nxt() with RTE_RIB6_GET_NXT_ALL flag does not yield the default route ::/0 if configured. The explicit rte_rib6_lookup_exact() call for the default route is necessary to ensure complete route enumeration.

Applied to files:

  • modules/ip6/control/nexthop.c
🧬 Code graph analysis (4)
modules/infra/control/loopback.c (1)
modules/infra/control/gr_iface.h (2)
  • iface_get_stats (104-106)
  • iface (16-22)
modules/infra/control/iface.c (2)
modules/infra/control/worker_test.c (1)
  • gr_event_push (37-37)
modules/infra/control/gr_iface.h (1)
  • iface (16-22)
modules/infra/api/stats.c (1)
modules/infra/control/gr_iface.h (2)
  • iface_get_stats (104-106)
  • iface (16-22)
modules/infra/cli/iface.c (1)
cli/table.c (1)
  • scols_line_sprintf (10-23)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: build-and-tests (clang-16, none, debugoptimized, ubuntu-24.04, false)
  • GitHub Check: build-and-tests (clang-18, none, debugoptimized, ubuntu-24.04, false)
  • GitHub Check: build-and-tests (clang-15, none, debugoptimized, ubuntu-22.04, false)
  • GitHub Check: build-and-tests (gcc-14, address, debug, ubuntu-24.04, -Dfrr=enabled, true)
  • GitHub Check: build-and-tests (gcc-13, none, debugoptimized, ubuntu-24.04, -Dfrr=enabled, false)
  • GitHub Check: build-cross-aarch64
  • GitHub Check: rpm
  • GitHub Check: deb
🔇 Additional comments (9)
modules/ip6/control/nexthop.c (1)

225-226: Good defensive NULL check.

Prevents dereferencing l3 at line 228 when no L3 nexthop context exists. If l3 is NULL, there are no held packets to flush, so jumping to cleanup is correct.

modules/infra/control/netlink.c (1)

239-239: No issues found. API is available and type-safe.

The rte_ipv6_addr_is_linklocal() function is available in DPDK and is used throughout the codebase. The const void * parameter at line 239 is type-safe because the runtime length check (line 213: addr_len == sizeof(ip4_addr_t)) guarantees that when the IPv6 branch executes, the pointer references a valid IPv6 address. The implicit conversion to const struct rte_ipv6_addr * is safe.

modules/infra/api/iface.c (1)

164-175: Serializer ev_count matches new IFACE_ADD event set

ev_count = 6 matches the six entries in ev_types, and GR_EVENT_IFACE_ADD is correctly added as the first iface event, so the serializer stays consistent with the updated enum.

modules/infra/control/iface.c (1)

130-137: ADD event emitted before POST_ADD on fully initialized iface

Pushing GR_EVENT_IFACE_ADD right after installing the iface and zeroing iface_stats, and before GR_EVENT_IFACE_POST_ADD, is consistent with a “create” then “post‑add” phase for consumers.

modules/infra/cli/iface.c (1)

545-555: CLI event printer now covers GR_EVENT_IFACE_ADD cleanly

iface_event_print handles GR_EVENT_IFACE_ADD ("add") and GR_EVENT_IFACE_POST_ADD ("post add"), and printer.ev_types plus ev_count = 6 are kept in sync, so CLI event output will see both phases without mismatch.

Also applies to: 579-587

modules/infra/control/loopback.c (1)

53-109: CP TX counters integrated into loopback_tx

Using iface_get_stats(rte_lcore_id(), d->iface->id) and bumping cp_tx_packets / cp_tx_bytes after preparing the write keeps control‑plane TX accounting consistent with the per‑lcore iface_stats layout.

modules/infra/control/gr_iface.h (1)

90-99: iface_stats extended with cp_ counters; initialization still correct*

Adding cp_rx_packets/bytes and cp_tx_packets/bytes after the existing fields preserves the struct layout, and the memset(iface_stats[ifid], ...) in iface_create will also zero these new counters, so readers aggregating stats remain consistent.

modules/infra/api/stats.c (2)

269-284: LGTM: Control-plane counter aggregation is correct.

The initialization and aggregation of cp_* counters follows the same pattern as existing rx_* and tx_* counters. The per-core stats are correctly summed into per-interface totals.


397-416: LGTM: Telemetry output correctly includes control-plane counters.

The control-plane counters are properly accumulated across cores and exposed in the telemetry data alongside existing metrics.

@christophefontaine christophefontaine force-pushed the misc_fixes branch 5 times, most recently from cdb8553 to 202346b Compare November 18, 2025 08:55
Copy link

@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.

Actionable comments posted: 0

Caution

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

⚠️ Outside diff range comments (1)
modules/ip6/control/nexthop.c (1)

102-117: LOG uses IPv4 formatter and wrong pointer type for IPv6 destination

LOG(DEBUG, IP4_F " hold queue full", &dst); looks wrong in two ways:

  • Uses IP4_F while dst is an IPv6 address.
  • Passes &dst (pointer to pointer) instead of dst (pointer to the IPv6 address).

This likely prints garbage and may read unintended memory. Consider:

-        LOG(DEBUG, IP4_F " hold queue full", &dst);
+        LOG(DEBUG, IP6_F " hold queue full", dst);
🧹 Nitpick comments (1)
subprojects/packagefiles/dpdk/net-ipv6-link-local-compliance-with-rfc-4291.diff (1)

20-35: Link‑local generation now matches RFC 4291 modified EUI‑64

Switching the reference to RFC 4291 §2.5.1 and XORing the first IID byte with 0x02 fixes the previous non‑compliance and aligns the implementation with the standard modified EUI‑64 mapping from Ethernet MACs.

If you want to make the bit‑twiddle more self‑documenting, you could optionally add a short comment:

-	ip->a[8] = mac->addr_bytes[0];
+	/* Flip the U/L bit per RFC 4291, section 2.5.1. */
+	ip->a[8] = mac->addr_bytes[0] ^ 0x02;
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e8ed6b3 and 202346b.

📒 Files selected for processing (18)
  • Containerfile.frr (1 hunks)
  • debian/control (1 hunks)
  • frr/zebra_dplane_grout.c (5 hunks)
  • main/api.c (1 hunks)
  • meson.build (1 hunks)
  • modules/infra/api/gr_infra.h (2 hunks)
  • modules/infra/api/iface.c (1 hunks)
  • modules/infra/api/stats.c (3 hunks)
  • modules/infra/cli/iface.c (4 hunks)
  • modules/infra/control/gr_iface.h (1 hunks)
  • modules/infra/control/iface.c (1 hunks)
  • modules/infra/control/loopback.c (4 hunks)
  • modules/infra/control/netlink.c (1 hunks)
  • modules/ip6/control/nexthop.c (1 hunks)
  • subprojects/dpdk.wrap (1 hunks)
  • subprojects/frr.wrap (1 hunks)
  • subprojects/packagefiles/dpdk/net-ipv6-link-local-compliance-with-rfc-4291.diff (1 hunks)
  • subprojects/packagefiles/frr/meson-add-dependency-definition.patch (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • subprojects/frr.wrap
🚧 Files skipped from review as they are similar to previous changes (5)
  • modules/infra/control/iface.c
  • modules/infra/api/gr_infra.h
  • modules/infra/control/loopback.c
  • modules/infra/control/netlink.c
  • modules/infra/api/iface.c
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{c,h}

⚙️ CodeRabbit configuration file

**/*.{c,h}: - gr_vec_*() functions cannot fail. No need to check their return value.

  • gr_vec_free(x) always sets x = NULL. There is no risk of double free.
  • ec_node_*() functions consume their ec_node arguments. No leaks on error.
  • rte_node->ctx is an uint8_t array of size 16, not a pointer.
  • Don't suggest to replace assert() with graceful error checking.
  • We compile with -std=gnu2x. Unnamed parameters in function definitions are valid.

Files:

  • frr/zebra_dplane_grout.c
  • modules/infra/cli/iface.c
  • modules/infra/control/gr_iface.h
  • main/api.c
  • modules/infra/api/stats.c
  • modules/ip6/control/nexthop.c
🧠 Learnings (9)
📓 Common learnings
Learnt from: maxime-leroy
Repo: DPDK/grout PR: 372
File: smoke/cross_vrf_forward_test.sh:18-18
Timestamp: 2025-11-05T13:55:26.189Z
Learning: In the DPDK/grout codebase, VRF interfaces (named gr-vrf<id>) are automatically created when an interface is added to a non-existing VRF using port_add. The VRF creation is handled automatically by the event system in vrf_netlink.c, so no explicit VRF interface creation commands are needed in test scripts.
📚 Learning: 2025-11-05T13:55:26.189Z
Learnt from: maxime-leroy
Repo: DPDK/grout PR: 372
File: smoke/cross_vrf_forward_test.sh:18-18
Timestamp: 2025-11-05T13:55:26.189Z
Learning: In the DPDK/grout codebase, VRF interfaces (named gr-vrf<id>) are automatically created when an interface is added to a non-existing VRF using port_add. The VRF creation is handled automatically by the event system in vrf_netlink.c, so no explicit VRF interface creation commands are needed in test scripts.

Applied to files:

  • frr/zebra_dplane_grout.c
📚 Learning: 2025-09-05T07:06:51.554Z
Learnt from: rjarry
Repo: DPDK/grout PR: 294
File: modules/policy/cli/meson.build:4-8
Timestamp: 2025-09-05T07:06:51.554Z
Learning: In this project, cli_src is a global variable that gets populated by individual modules (like modules/policy/cli/meson.build) and is ultimately consumed by an executable() call in the top-level meson.build file. This creates a modular CLI build where each module contributes its CLI sources to the main CLI binary.

Applied to files:

  • subprojects/packagefiles/frr/meson-add-dependency-definition.patch
📚 Learning: 2025-09-09T09:22:31.596Z
Learnt from: maxime-leroy
Repo: DPDK/grout PR: 309
File: modules/srv6/datapath/srv6_local.c:97-101
Timestamp: 2025-09-09T09:22:31.596Z
Learning: In SRv6 IPv6 extension header parsing, when is_ipv6_ext[proto] is true, rte_ipv6_get_next_ext() will not return a negative value, making error checking unnecessary. An assert can be used as a defensive measure for future DPDK compatibility.

Applied to files:

  • subprojects/packagefiles/dpdk/net-ipv6-link-local-compliance-with-rfc-4291.diff
  • modules/ip6/control/nexthop.c
📚 Learning: 2025-09-09T06:02:47.703Z
Learnt from: maxime-leroy
Repo: DPDK/grout PR: 309
File: modules/srv6/datapath/srv6_local.c:88-122
Timestamp: 2025-09-09T06:02:47.703Z
Learning: The DPDK function rte_ipv6_get_next_ext() only reads 2 bytes from the extension header, so a 2-byte precheck is sufficient before calling it.

Applied to files:

  • subprojects/packagefiles/dpdk/net-ipv6-link-local-compliance-with-rfc-4291.diff
📚 Learning: 2025-08-27T15:33:22.299Z
Learnt from: rjarry
Repo: DPDK/grout PR: 305
File: modules/ip6/control/route.c:407-413
Timestamp: 2025-08-27T15:33:22.299Z
Learning: DPDK rte_rib6_get_nxt() with RTE_RIB6_GET_NXT_ALL flag does not yield the default route ::/0 if configured. The explicit rte_rib6_lookup_exact() call for the default route is necessary to ensure complete route enumeration.

Applied to files:

  • subprojects/packagefiles/dpdk/net-ipv6-link-local-compliance-with-rfc-4291.diff
📚 Learning: 2025-11-05T14:28:28.817Z
Learnt from: rjarry
Repo: DPDK/grout PR: 372
File: modules/infra/datapath/loop_input.c:53-56
Timestamp: 2025-11-05T14:28:28.817Z
Learning: In modules/infra/datapath/loop_input.c, the l3_edges array is intentionally indexed using network byte order (rte_be16_t) for EtherType values. Both loopback_input_add_type() registration and loopback_input_process() lookup use network byte order consistently, so no byte order conversion is needed when accessing l3_edges.

Applied to files:

  • subprojects/packagefiles/dpdk/net-ipv6-link-local-compliance-with-rfc-4291.diff
📚 Learning: 2025-09-25T07:52:17.403Z
Learnt from: rjarry
Repo: DPDK/grout PR: 312
File: frr/rt_grout.c:355-361
Timestamp: 2025-09-25T07:52:17.403Z
Learning: The nexthop_new() function in FRR's zebra codebase cannot fail and return NULL - it will abort() the process if memory allocation fails, so null checks after calling nexthop_new() are unnecessary.

Applied to files:

  • modules/ip6/control/nexthop.c
📚 Learning: 2025-09-22T09:21:51.749Z
Learnt from: rjarry
Repo: DPDK/grout PR: 312
File: modules/ip/control/address.c:102-110
Timestamp: 2025-09-22T09:21:51.749Z
Learning: The rib4_insert() function in modules/ip/control/route.c takes ownership of the nexthop reference by calling nexthop_incref(nh) at the beginning and properly calls nexthop_decref(nh) on any failure paths via the fail: label, so callers don't need to manually decrement the reference count when rib4_insert fails.

Applied to files:

  • modules/ip6/control/nexthop.c
🧬 Code graph analysis (2)
modules/infra/cli/iface.c (1)
cli/table.c (1)
  • scols_line_sprintf (10-23)
modules/infra/api/stats.c (1)
modules/infra/control/gr_iface.h (2)
  • iface_get_stats (102-104)
  • iface (16-22)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: build-and-tests (clang-18, none, debugoptimized, ubuntu-24.04, false)
  • GitHub Check: build-and-tests (gcc-13, none, debugoptimized, ubuntu-24.04, -Dfrr=enabled, false)
  • GitHub Check: build-and-tests (clang-16, none, debugoptimized, ubuntu-24.04, false)
  • GitHub Check: build-and-tests (clang-15, none, debugoptimized, ubuntu-22.04, false)
  • GitHub Check: build-and-tests (gcc-14, address, debug, ubuntu-24.04, -Dfrr=enabled, true)
🔇 Additional comments (19)
subprojects/packagefiles/dpdk/net-ipv6-link-local-compliance-with-rfc-4291.diff (1)

7-13: Test expectation correctly updated for modified EUI‑64 IID

The new expected address (0x067b vs 0x047b) matches the ^ 0x02 flip of the MAC’s first byte, so the unit test now accurately reflects the updated link‑local construction.

debian/control (1)

99-99: FRR version bump is consistent.

The version update to 10.5.0 aligns with changes in other packaging files and the FRR patch.

Containerfile.frr (1)

16-16: No issues found. URL is accessible.

The frr-10.5.0 tag exists and the docker-start script is available. The HTTP 200 response confirms the resource is accessible and the line is correct.

subprojects/dpdk.wrap (1)

9-10: Patch file verified and present.

The patch file subprojects/packagefiles/dpdk/net-ipv6-link-local-compliance-with-rfc-4291.diff exists at the expected location and contains valid diff content for IPv6 link-local RFC 4291 compliance updates.

meson.build (1)

68-68: Confirm platform=generic is intentional; it prioritizes portability over per-CPU optimization.

The platform=generic option in DPDK 24.11.1 builds with a minimal CPU/instruction-set baseline (e.g., corei7 on x86) for broad compatibility across machines, rather than machine-specific optimizations. Verify this aligns with your deployment requirements and performance expectations.

subprojects/packagefiles/frr/meson-add-dependency-definition.patch (1)

64-64: FRR 10.5.0 is officially released and available.

FRRouting 10.5.0 was officially released (Nov 9–10, 2025) and is available for download from packages, snaps, Docker, and GitHub release. The version specification is valid.

main/api.c (1)

65-65: LGTM!

Documentation updated to reflect the new event enum.

frr/zebra_dplane_grout.c (4)

240-240: LGTM!

Subscription correctly updated to the new GR_EVENT_IFACE_ADD event.


318-319: LGTM!

String mappings added for new request types.

Also applies to: 332-333


380-381: LGTM!

String mapping added for the new interface addition event.


438-438: LGTM!

Event handling correctly updated to process the new addition event.

modules/infra/api/stats.c (3)

269-272: LGTM!

Control-plane counters properly initialized.


281-284: LGTM!

Per-core control-plane counters correctly aggregated into interface totals.


397-397: LGTM!

Control-plane counters properly exposed in telemetry output.

Also applies to: 404-407, 413-416

modules/infra/cli/iface.c (3)

316-319: LGTM!

Control-plane counter columns properly defined with right alignment.


342-345: LGTM!

Control-plane counter data correctly populated in table output.


539-544: LGTM!

Event printer updated to handle both the new GR_EVENT_IFACE_ADD and existing GR_EVENT_IFACE_POST_ADD events.

Also applies to: 568-570

modules/infra/control/gr_iface.h (1)

93-96: LGTM!

Control-plane counter fields properly added to the interface statistics structure.

modules/ip6/control/nexthop.c (1)

225-227: NULL-guard before flushing held packets avoids NDP crash

Adding if (l3 == NULL) goto free; here is correct and prevents a null dereference when the probe doesn’t resolve to an L3 nexthop (e.g. unspecified/mcast sender, DAD). Control flow remains consistent with other error paths in this function.

Fix a race condition where we get a packet on interface creation
before every thing is properly set up.

Fixes: 35a0677 ("ndp: handle nexthop updates in control plane")
Signed-off-by: Christophe Fontaine <[email protected]>
Reviewed-by: Robin Jarry <[email protected]>
Current synchronisation pushes a /128 for all ip6 addresses.
Yet, a /64 is required for link local addresses, so OSPF6d can
reach its neighbors.

Signed-off-by: Christophe Fontaine <[email protected]>
Reviewed-by: Robin Jarry <[email protected]>
Add new fields in the existing stats structure to track
the number of packets sent/received by the control plane
interfaces, gr-loop included.

Signed-off-by: Christophe Fontaine <[email protected]>
Reviewed-by: Robin Jarry <[email protected]>
We register in grout to the event "GR_EVENT_IFACE_ADD_POST" to
add a link local ipv6 address.
Yet, this action also trigger an event "GR_EVENT_IP6_ADDR_ADD",
with an iface id which doesn't exists yet.

In addition to GR_EVENT_IFACE_ADD_POST, we introduce a new event
"GR_EVENT_IFACE_ADD", which will be pushed before "ADD_POST".

grout# events show
> iface add: gr-loop0 type=loopback id=256 vrf=0 mtu=1500
> iface post add: gr-loop0 type=loopback id=256 vrf=0 mtu=1500
> iface add: p0 type=port id=257 vrf=0 mtu=1500
> route6 add: vrf=0 fe80::7077:78ff:fe2f:c803/64 origin=link via type=L3 iface=257 vrf=0 origin=INTERNAL af=IPv6 addr=fe80::7077:78ff:fe2f:c803/64 mac=72:77:78:2f:c8:03 static local link
> addr6 add: iface=257 fe80::7077:78ff:fe2f:c803/64
> iface post add: p0 type=port id=257 vrf=0 mtu=1500
> iface up: p0 type=port id=257 vrf=0 mtu=1500

Signed-off-by: Christophe Fontaine <[email protected]>
Reviewed-by: Robin Jarry <[email protected]>
On interface creation, use the new GR_EVENT_IFACE_ADD instead
of GR_EVENT_IFACE_POST_ADD to create the interface.

Signed-off-by: Christophe Fontaine <[email protected]>
Reviewed-by: Robin Jarry <[email protected]>
Add missing string in the debug function 'gr_req_type_to_str'.

Fixes: 5e970e0 ("frr: use tunsrc api")
Signed-off-by: Christophe Fontaine <[email protected]>
Reviewed-by: Robin Jarry <[email protected]>
Fix mbuf leak on EAGAIN/EWOULDBLOCK in iface_loopback_poll.

Fixes: d0de3b2 ("loopback: add loopback interface")
Reported-by: coderabbitai
Signed-off-by: Christophe Fontaine <[email protected]>
Reviewed-by: Robin Jarry <[email protected]>
Fix debug message using IP4_F for an IPv6 address.

Fixes: 9cb61fd ("ip6_output: handle unresolved nexthops in control plane")
Reported-by: coderabbitai
Signed-off-by: Christophe Fontaine <[email protected]>
Reviewed-by: Robin Jarry <[email protected]>
@rjarry rjarry merged commit 8e0a691 into DPDK:main Nov 19, 2025
6 of 7 checks passed
@christophefontaine christophefontaine deleted the misc_fixes branch December 12, 2025 08:07
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.

3 participants