|WARNING| drivers: remove driver alias macro

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Fri Oct 9 09:55:52 CEST 2026


Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/170896

_AI Code Review_

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

# DPDK Patch Review

## Overall Assessment

This patch removes the `RTE_PMD_REGISTER_ALIAS` macro and replaces it with direct assignment to `.driver.alias` in driver structure initializers. The changes are mostly mechanical and consistent across all affected drivers.

---

## Errors

None identified.

---

## Warnings

### 1. Missing trailing comma in crypto/ipsec_mb/pmd_zuc.c (lines 372-374)

**Location:** `drivers/crypto/ipsec_mb/pmd_zuc.c`

The driver structure initialization is missing a trailing comma after the last member, which is inconsistent with the pattern used in all other driver structure changes in this patch.

```c
/* Current (inconsistent) */
static struct rte_vdev_driver cryptodev_zuc_pmd_drv = {
	.driver.alias = "cryptodev_zuc_pmd",
	.probe = zuc_probe,
	.remove = ipsec_mb_remove,   /* <-- has trailing comma */
};

/* Other files show the pattern with trailing comma */
static struct rte_vdev_driver bbdev_null_pmd_drv = {
	.driver.alias = "bbdev_null",
	.probe = null_bbdev_probe,
	.remove = null_bbdev_remove,   /* <-- trailing comma */
};
```

**Suggested fix:** Add trailing comma after `ipsec_mb_remove` for consistency with the rest of the patch.

---

## Info

### 1. Patch demonstrates good code hygiene

The patch removes a confusing preprocessor trick (static pointer redefinition) and replaces it with straightforward structure member initialization. This improves code clarity and eliminates a preprocessor limitation (aliases with commas).

### 2. Consistent mechanical transformation

All 24 driver files follow the same pattern:
- Add `.driver.alias = "..."` as first member
- Remove `RTE_PMD_REGISTER_ALIAS()` call
- Add trailing comma after last structure member (with one exception noted above)

### 3. No functional changes expected

The transformation is semantically equivalent - the alias is still set, just via direct initialization instead of macro side-effect. Binary compatibility is preserved.

---

## Summary

- **Errors:** 0
- **Warnings:** 1 (missing trailing comma in pmd_zuc.c)
- **Info:** 3

The patch is functionally correct. The only issue is a minor style inconsistency in one file that should be corrected for uniformity.


More information about the test-report mailing list