|WARNING| [v2,2/2] net/bnxt: fix MAC address removal

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Mon Sep 7 13:38:06 CEST 2026


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

_AI Code Review_

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

# DPDK Patch Review

## Patch 1/2: net/i40e: fix MAC address removal

### Errors

None identified.

### Warnings

None identified.

### Info

**Variable declaration placement**: The variable `vmdq` is declared mid-block (after `pool_sel`), while other variables are declared at the start. While both C99 styles are acceptable per guidelines, consider grouping all declarations for better consistency:

```c
struct rte_ether_addr *macaddr;
int ret;
uint32_t i;
bool vmdq;
uint64_t pool_sel;

macaddr = &(data->mac_addrs[index]);

vmdq = (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
```

---

## Patch 2/2: net/bnxt: fix MAC address removal

### Errors

None identified.

### Warnings

None identified.

### Info

**Variable declaration placement**: Similar to patch 1/2, the `vmdq` variable is declared after other variables in `bnxt_mac_addr_remove_op()` and mid-block in `bnxt_restore_mac_filters()`. Consider declaring it with the other variables at the start of each function for consistency.

---

## Overall Assessment

Both patches correctly address the MAC address removal issue when VMDq is not enabled. The logic is sound:

1. When VMDq is disabled, `pool_sel`/`pool_mask` is set to 1 (single pool)
2. When VMDq is enabled, the original pool selection array is used
3. The explicit comparison `!= 0` follows DPDK style guidelines for non-bool types

The code quality is good. The only minor observation is about variable declaration placement, which is a style preference rather than a requirement (both declaration styles are acceptable per guidelines).

No correctness bugs, resource leaks, race conditions, or forbidden token usage identified. The patches are ready for submission pending any maintainer feedback on the Info-level style observations.


More information about the test-report mailing list