|SUCCESS| eal: prefix lcore role values

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Tue Oct 13 10:33:25 CEST 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/171097

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-13

# DPDK Patch Review

## Summary

This patch renames lcore role enum values to follow DPDK naming conventions by adding the `RTE_LCORE_` prefix. The old names are preserved as macro aliases for backward compatibility.

---

## ERRORS

None.

---

## WARNINGS

None.

---

## INFO

**Pre-existing issue in `lib/eal/common/eal_common_lcore.c` line 481:**

```c
default:
	return "UNKNOWN";
```

The `lcore_role_str()` function's switch statement does not have a case for `RTE_LCORE_ROLE_OFF`. When called with `RTE_LCORE_ROLE_OFF`, it falls through to the default case and returns "UNKNOWN" instead of a descriptive string like "OFF". This is a pre-existing gap in coverage that predates this patch (the patch renames the enum values but does not add the missing case).

**Suggested addition:**

```c
static const char *
lcore_role_str(enum rte_lcore_role_t role)
{
	switch (role) {
	case RTE_LCORE_ROLE_RTE:
		return "RTE";
	case RTE_LCORE_ROLE_SERVICE:
		return "SERVICE";
	case RTE_LCORE_ROLE_NON_EAL:
		return "NON_EAL";
	case RTE_LCORE_ROLE_OFF:
		return "OFF";
	default:
		return "UNKNOWN";
	}
}
```

This is informational only as it is not introduced by this patch.

---

## REVIEW SUMMARY

The patch correctly implements the enum value renaming with appropriate backward compatibility macros. All usages throughout the codebase are consistently updated to use the new prefixed names. The changes are mechanical and preserve existing behavior. No correctness bugs, resource leaks, or ABI issues were identified.

Review-Result: CLEAN


More information about the test-report mailing list