|SUCCESS| iavf: cap max_pkt_len to what the pf reports

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Fri Nov 27 10:52:18 CET 2026


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

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-27

Info

1. The comment on the new check does not explain why a field named `max_mtu` is compared against a frame length.

   ```c
   /* the PF reports its max frame size in max_mtu, 0 if unknown */
   if (vf->vf_res->max_mtu != 0 && vf->vf_res->max_mtu < vf->max_pkt_len)
   ```

   `vf->max_pkt_len` is MTU plus `IAVF_ETH_OVERHEAD`, while `vf_res->max_mtu` is, by name, an MTU. Without context, a later reader is likely to see this as MTU/frame-length confusion and "fix" it back.

   Consider expanding the comment to say the following:
   - Linux PFs put the max frame size, minus the port VLAN tag, in this field.
   - The PF re-adds the tag on its side.

   For example:

   ```c
   /*
    * Linux PFs report the max frame size (minus 4 bytes when a port
    * VLAN is configured) in max_mtu and reject larger max_pkt_size in
    * CONFIG_VSI_QUEUES; the PF accounts for the port VLAN itself.
    * A value of 0 means not reported.
    */
   ```

Review-Result: CLEAN


More information about the test-report mailing list