On Mon, 12 Jan 2026 11:24:35 +0200
Maayan Kashani <[email protected]> wrote:

> SWS (software steering) will be disabled on future hardware generations.
> This fix should check for SWS capability bits and return relevant error.
> Update the defaults for the dv_flow_en and allow_duplicate_pattern
> devargs accordingly.
> 
> - Default dv_flow_en devarg value will be chosen based on whether
>   NIC supports SW steering and/or HW steering.
> - If DV flow is not supported and allow_duplicate_pattern is
>   set by the user, forcibly disable it and emit a clear log message.
> 
> This change improves reliability by ensuring only valid
> configurations are applied, and provides clear feedback to
> the user when fallbacks are triggered.
> 
> Fixes: 1b55eeb7b76f ("common/mlx5: add ConnectX-9 SuperNIC")
> Cc: [email protected]
> 
> Signed-off-by: Maayan Kashani <[email protected]>
> ---

Experimental AI review was generally happy with this patch.

The only thing it squawked about was:



## Revised Patch Review: `[PATCH 1/4] drivers: fix flow devarg handling for 
future HW`

### Commit Message Review

| Check | Status | Notes |
|-------|--------|-------|
| Subject ≤60 chars | ✅ Pass | 47 characters |
| Imperative mood | ✅ Pass | "fix" is imperative |
| No trailing period | ✅ Pass | |
| Lowercase after colon | ✅ Pass | |
| Body line wrap ≤75 chars | ✅ Pass | |
| Body doesn't start with "It" | ✅ Pass | |
| Signed-off-by present | ✅ Pass | |
| Fixes tag format | ✅ Pass | 12-char SHA with quoted subject |
| Cc: [email protected] | ✅ Pass | |
| Tag order | ✅ Pass | |

#### ⚠️ Warning: Subject Prefix
`drivers:` is generic. Since this primarily affects `net/mlx5` with supporting 
changes in `common/mlx5`, consider:
- **Suggested**: `net/mlx5: fix flow devarg handling for future HW`

---

### Code Style Review

| Check | Status |
|-------|--------|
| Line length ≤100 chars | ✅ Pass |
| Explicit NULL comparisons | ✅ Pass |
| Comment formatting | ✅ Pass |
| Function naming | ✅ Pass |
| Documentation updated atomically | ✅ Pass |

#### ⚠️ Warning: Implicit Boolean Tests on Integer Bitfields

In `mlx5_sws_is_any_supported()`:
```c
if (hca_attr->rx_sw_owner_v2 || hca_attr->rx_sw_owner)
    return true;
```

These are `uint8_t` bitfields, not `bool`. Per AGENTS.md guidelines, prefer 
explicit comparisons:
```c
if (hca_attr->rx_sw_owner_v2 != 0 || hca_attr->rx_sw_owner != 0)
```

Same pattern appears for `tx_sw_owner*` and `esw_sw_owner*` checks.

---

### Summary

| Severity | Issue | Location |
|----------|-------|----------|
| **Warning** | Subject prefix `drivers:` could be more specific | Commit 
message |
| **Warning** | Implicit boolean tests on integer bitfields | `mlx5.c` |

---

### Recommendation

**Acceptable for merge** — No blocking errors. The warnings are minor style 
preferences. The patch is well-structured with proper documentation updates and 
correct tag formatting.

Reply via email to