From: Stephen Hemminger <stephen@networkplumber.org>
To: spinler@cesnet.cz
Cc: dev@dpdk.org
Subject: Re: [PATCH v4 0/8] net/nfb: rework to real multiport
Date: Thu, 22 Jan 2026 17:01:17 -0800 [thread overview]
Message-ID: <20260122170117.1ff34114@phoenix.local> (raw)
In-Reply-To: <20260122072719.505185-1-spinler@cesnet.cz>
On Thu, 22 Jan 2026 08:27:11 +0100
spinler@cesnet.cz wrote:
> From: Martin Spinler <spinler@cesnet.cz>
>
> This series implements real multiport for better user experience.
>
> The existing driver creates one ethdev/port for one PCI device.
> As the CESNET-NDK based cards aren't capable to represent each
> Ethernet port by own PCI device, new driver implementation
> processes real port configuration from firmware/card and switches
> from rte_eth_dev_pci_generic_probe to multiple rte_eth_dev_create calls.
>
> ---
> v4:
> * Cleaned usage of sprintf
> * Updated commit message for doc cleanup
Second AI opinion:
=== Patch Review: bundle-1675-nfb-multiport.mbox (via Grok) ===
### Review of DPDK Patch Series 'bundle-1675-nfb-multiport.mbox'
Below is a detailed review of the patch series against the DPDK coding standards and contribution guidelines as outlined in `AGENTS.md`. The feedback is organized by severity level: **Error**, **Warning**, and **Info**.
---
### **Errors (Must Fix)**
1. **Commit Message Body Missing for All Patches (All 8 Patches)**
- **Issue**: The commit messages for all patches lack a detailed body describing the issue being fixed or the feature being added. According to the guidelines, the commit body must provide context for reviewers, describe the changes, and should not start with "It". Currently, the body only contains the `Signed-off-by` line after a brief one-liner in some cases.
- **Location**: All patches (1/8 to 8/8).
- **Action**: Add a detailed commit message body for each patch explaining the purpose, context, and impact of the changes. Ensure the body is wrapped at 75 characters.
2. **Missing Release Notes for Significant Driver Changes (Patches 2/8, 3/8, 4/8, 5/8)**
- **Issue**: Patches introducing significant driver changes (multi-port support, VDEV support, port argument, MAC initialization per device) do not update the release notes adequately except for patch 8/8. The guidelines require release notes for API changes, new drivers, or significant subsystem updates to be updated in the current release notes file.
- **Location**: Patches 2/8, 3/8, 4/8, 5/8.
- **Action**: Ensure that significant changes are documented in the release notes file for the current release. Patch 8/8 updates `release_26_03.rst`, which is good, but earlier patches should also reference or contribute to this update if they are part of the same series.
3. **Missing Tests for New Features (Patches 2/8, 3/8, 4/8, 7/8)**
- **Issue**: New features such as multi-port support, VDEV probing, port selection argument, and firmware version reporting do not mention accompanying tests in the `app/test` directory or hooks in `app/testpmd`. The guidelines mandate that new APIs and significant features must have corresponding tests and `testpmd` hooks.
- **Location**: Patches 2/8, 3/8, 4/8, 7/8.
- **Action**: Add unit tests in the `app/test` directory using the `TEST_ASSERT` macros and `unit_test_suite_runner` infrastructure. Ensure `testpmd` hooks are implemented for new features like port selection and firmware version reporting.
---
### **Warnings (Should Fix)**
1. **Documentation Gaps and Mismatches (Patches 2/8, 3/8, 4/8, 7/8)**
- **Issue**: While patch 8/8 updates the documentation, earlier patches introducing new features (multi-port, VDEV, port argument, firmware version) do not update documentation atomically. The guidelines require that code and documentation updates be in the same patch. Additionally, ensure that PMD features match the `doc/guides/nics/features/` matrix.
- **Location**: Patches 2/8, 3/8, 4/8, 7/8.
- **Action**: Move relevant documentation updates into the respective patches introducing the features. Verify that `doc/guides/nics/features/nfb.ini` reflects all new features (e.g., multi-port support, VDEV) as introduced. Ensure device operations are documented per `features.rst` mappings.
2. **New APIs Not Marked as `__rte_experimental` (Patches 2/8, 3/8, 4/8, 7/8)**
- **Issue**: New functions such as `nfb_eth_common_probe`, `nfb_eth_common_remove`, `nfb_eth_fw_version_get`, and others introduced in the patches are not marked as `__rte_experimental` in header files. The guidelines require new APIs to be marked as experimental.
- **Location**: `drivers/net/nfb/nfb.h` and related patches (2/8, 3/8, 4/8, 7/8).
- **Action**: Mark new public APIs as `__rte_experimental` in header files, ensuring the tag is alone on the line preceding the return type.
3. **Inappropriate Use of `rte_calloc` and `rte_zmalloc` (All Patches)**
- **Issue**: The patches use `rte_calloc` and `rte_zmalloc` for allocations that do not necessarily require hugepage memory (e.g., `priv->queue_map_rx` in patch 1/8, `internals` in patch 2/8). The guidelines state that `rte_malloc` should only be used for DMA-accessible memory or shared memory between processes.
- **Location**: Multiple locations across patches (e.g., `drivers/net/nfb/nfb_ethdev.c` in patch 1/8, line 579; patch 2/8, line 542).
- **Action**: Replace `rte_calloc` and `rte_zmalloc` with standard `calloc` or `malloc` for control path allocations unless hugepage memory is explicitly required for DMA or multi-process sharing.
4. **Driver Global Variables Without Unique Prefixes (All Patches)**
- **Issue**: Global variables and structures (e.g., `nfb_eth_dev_list` in patch 2/8) do not use a unique driver-specific prefix (e.g., `nfb_`). The guidelines require unique prefixes for global symbols to avoid clashes during static linking.
- **Location**: `drivers/net/nfb/nfb_ethdev.c` (patch 2/8, line 29).
- **Action**: Add a driver-specific prefix (e.g., `nfb_`) to global variables and structures to prevent namespace collisions.
5. **Missing `Cc: stable@dpdk.org` for Potential Backports (Patches 1/8, 6/8)**
- **Issue**: Patches that could be candidates for stable backports (e.g., queue mapping preparation in 1/8, PCI ID updates in 6/8) do not include `Cc: stable@dpdk.org` as required by the guidelines.
- **Location**: Commit messages of patches 1/8 and 6/8.
- **Action**: Add `Cc: stable@dpdk.org` to commit messages for patches that fix issues or add compatibility and are suitable for backporting.
6. **Use of `snprintf` Return Value Without Proper Check (Patches 2/8, 3/8, 4/8)**
- **Issue**: The return value of `snprintf` is checked for overflow in some cases but not consistently handled for errors (e.g., negative return values). The guidelines encourage explicit error handling.
- **Location**: `drivers/net/nfb/nfb_ethdev.c` (patch 2/8, line 781); `drivers/net/nfb/nfb_vdev.c` (patch 3/8, line 67).
- **Action**: Ensure `snprintf` return values are checked for both overflow and error conditions (< 0).
---
### **Info (Consider)**
1. **Minor Style Preferences for Commit Messages (All Patches)**
- **Issue**: While the subject lines are generally within 60 characters and follow the correct prefix (`net/nfb:`), some could be more descriptive (e.g., patch 6/8: "add compatible cards to driver PCI ID table" could specify key cards like "add FB2CGHH and COMBO-400G1 to PCI ID table").
- **Location**: Commit messages of all patches.
- **Action**: Consider refining subject lines for clarity and specificity while maintaining the length limit and imperative mood.
2. **Optimization Suggestion for Queue Mapping Initialization (Patch 1/8)**
- **Issue**: The initialization of `queue_map_rx` and `queue_map_tx` uses a simple 1:1 mapping loop. This could potentially be optimized using `memcpy` if the mapping is always linear in the default case.
- **Location**: `drivers/net/nfb/nfb_ethdev.c` (patch 1/8, lines 587-590).
- **Action**: Consider using `memcpy` or a similar approach for initializing large arrays if performance is a concern in this path (though this is a control path, so impact may be negligible).
3. **Alternative Approach for Port Selection Logic (Patch 4/8)**
- **Issue**: The port selection logic using a bitmask (`port_mask`) is functional but could potentially be simplified by using a dynamic array or list for selected ports if the number of ports grows significantly in future hardware.
- **Location**: `drivers/net/nfb/nfb_ethdev.c` (patch 4/8, lines 694-718).
- **Action**: Consider if a more flexible data structure (e.g., a dynamic array) would be better for future scalability, though the current bitmask approach is acceptable for the current scope.
4. **Code Duplication in MAC Initialization (Patch 5/8)**
- **Issue**: The `nfb_nc_rxmac_init` and `nfb_nc_txmac_init` functions have similar logic for iterating over interfaces and initializing MACs. This could be refactored into a common helper function to reduce duplication.
- **Location**: `drivers/net/nfb/nfb_ethdev.c` (patch 5/8, lines 54-75 and 79-100).
- **Action**: Consider refactoring the common logic into a helper function to improve maintainability.
---
### **Summary of Compliance with Guidelines**
- **Commit Message Format**: Non-compliant due to missing detailed bodies (Error). Subject lines are mostly compliant with minor improvements suggested (Info).
- **License/Copyright Compliance**: Compliant. All new files (e.g., `nfb_vdev.c` in patch 3/8) include proper SPDX identifiers and copyright notices.
- **C Coding Style Issues**: Mostly compliant with minor issues around `rte_malloc` usage and global variable naming (Warnings).
- **API and Documentation Requirements**: Non-compliant due to missing `__rte_experimental` tags, incomplete documentation updates in individual patches, and missing tests (Errors and Warnings).
- **Other Guideline Violations**: Missing release notes updates in relevant patches and potential backport tags (Errors and Warnings).
---
### **Action Plan for Contributors**
1. **Immediate Fixes (Errors)**:
- Add detailed commit message bodies to all patches.
- Ensure release notes are updated atomically with feature patches or reference the final documentation patch (8/8) explicitly.
- Add tests and `testpmd` hooks for new features.
2. **High-Priority Improvements (Warnings)**:
- Update documentation in the same patch as code changes.
- Mark new APIs as `__rte_experimental`.
- Replace inappropriate `rte_malloc`/`rte_calloc` usage with standard `malloc`/`calloc`.
- Add driver-specific prefixes to global variables.
- Add `Cc: stable@dpdk.org` where applicable.
3. **Optional Enhancements (Info)**:
- Refine commit message subject lines for clarity.
- Consider optimization and refactoring suggestions for maintainability and scalability.
Please address the **Errors** and **Warnings** before resubmission to ensure compliance with DPDK guidelines. If you have any questions or need further clarification on specific issues, feel free to ask.
next prev parent reply other threads:[~2026-01-23 1:01 UTC|newest]
Thread overview: 131+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 15:16 [PATCH 0/8] net/nfb: rework to real multiport spinler
2026-01-15 15:16 ` [PATCH 1/8] net/nfb: prepare for indirect queue mapping scheme spinler
2026-01-16 17:34 ` Stephen Hemminger
2026-01-20 15:16 ` Martin Spinler
2026-01-15 15:16 ` [PATCH 2/8] net/nfb: create ethdev for every eth port/channel spinler
2026-01-15 15:16 ` [PATCH 3/8] net/nfb: add vdev as alternative device probe method spinler
2026-01-15 15:16 ` [PATCH 4/8] net/nfb: add device argument "port" to limit used ports spinler
2026-01-16 17:36 ` Stephen Hemminger
2026-01-20 15:16 ` Martin Spinler
2026-01-16 17:36 ` Stephen Hemminger
2026-01-16 17:37 ` Stephen Hemminger
2026-01-15 15:16 ` [PATCH 5/8] net/nfb: init only MACs associated with device spinler
2026-01-15 15:16 ` [PATCH 6/8] net/nfb: add compatible cards to driver PCI ID table spinler
2026-01-15 15:16 ` [PATCH 7/8] net/nfb: report firmware version spinler
2026-01-15 15:16 ` [PATCH 8/8] doc/nfb: cleanup and update guide spinler
2026-01-16 5:50 ` [PATCH 0/8] net/nfb: rework to real multiport Stephen Hemminger
2026-01-16 16:44 ` [PATCH v2 " spinler
2026-01-16 16:44 ` [PATCH v2 1/8] net/nfb: prepare for indirect queue mapping scheme spinler
2026-01-16 16:44 ` [PATCH v2 2/8] net/nfb: create ethdev for every eth port/channel spinler
2026-01-16 16:44 ` [PATCH v2 3/8] net/nfb: add vdev as alternative device probe method spinler
2026-01-16 16:44 ` [PATCH v2 4/8] net/nfb: add device argument "port" to limit used ports spinler
2026-01-16 16:44 ` [PATCH v2 5/8] net/nfb: init only MACs associated with device spinler
2026-01-16 16:44 ` [PATCH v2 6/8] net/nfb: add compatible cards to driver PCI ID table spinler
2026-01-16 16:44 ` [PATCH v2 7/8] net/nfb: report firmware version spinler
2026-01-16 16:44 ` [PATCH v2 8/8] doc/nfb: cleanup and update guide spinler
2026-01-20 2:25 ` [PATCH v2 0/8] net/nfb: rework to real multiport Stephen Hemminger
2026-01-20 15:16 ` Martin Spinler
2026-01-21 17:03 ` [PATCH v3 " spinler
2026-01-21 17:03 ` [PATCH v3 1/8] net/nfb: prepare for indirect queue mapping scheme spinler
2026-01-21 17:03 ` [PATCH v3 2/8] net/nfb: create ethdev for every eth port/channel spinler
2026-01-21 17:03 ` [PATCH v3 3/8] net/nfb: add vdev as alternative device probe method spinler
2026-01-21 17:40 ` Stephen Hemminger
2026-01-21 17:03 ` [PATCH v3 4/8] net/nfb: add device argument "port" to limit used ports spinler
2026-01-21 17:03 ` [PATCH v3 5/8] net/nfb: init only MACs associated with device spinler
2026-01-21 17:03 ` [PATCH v3 6/8] net/nfb: add compatible cards to driver PCI ID table spinler
2026-01-21 17:03 ` [PATCH v3 7/8] net/nfb: report firmware version spinler
2026-01-21 17:03 ` [PATCH v3 8/8] doc/nfb: cleanup and update guide spinler
2026-01-21 17:41 ` Stephen Hemminger
2026-01-21 17:42 ` [PATCH v3 0/8] net/nfb: rework to real multiport Stephen Hemminger
2026-01-22 7:27 ` [PATCH v4 " spinler
2026-01-22 7:27 ` [PATCH v4 1/8] net/nfb: prepare for indirect queue mapping scheme spinler
2026-01-22 7:27 ` [PATCH v4 2/8] net/nfb: create ethdev for every eth port/channel spinler
2026-01-22 7:27 ` [PATCH v4 3/8] net/nfb: add vdev as alternative device probe method spinler
2026-01-22 7:27 ` [PATCH v4 4/8] net/nfb: add device argument "port" to limit used ports spinler
2026-01-22 7:27 ` [PATCH v4 5/8] net/nfb: init only MACs associated with device spinler
2026-01-22 7:27 ` [PATCH v4 6/8] net/nfb: add compatible cards to driver PCI ID table spinler
2026-01-22 7:27 ` [PATCH v4 7/8] net/nfb: report firmware version spinler
2026-01-22 7:27 ` [PATCH v4 8/8] doc/nfb: cleanup and update guide spinler
2026-01-23 1:00 ` [PATCH v4 0/8] net/nfb: rework to real multiport Stephen Hemminger
2026-01-23 1:01 ` Stephen Hemminger [this message]
2026-01-23 1:14 ` Stephen Hemminger
2026-01-23 17:34 ` Martin Spinler
2026-01-23 17:22 ` [PATCH v5 " spinler
2026-01-23 17:22 ` [PATCH v5 1/8] net/nfb: prepare for indirect queue mapping scheme spinler
2026-01-23 17:22 ` [PATCH v5 2/8] net/nfb: create one ethdev per ethernet port spinler
2026-01-27 0:37 ` Stephen Hemminger
2026-01-27 8:12 ` Martin Spinler
2026-01-27 14:09 ` Stephen Hemminger
2026-01-23 17:22 ` [PATCH v5 3/8] net/nfb: add vdev as alternative device probe method spinler
2026-01-23 17:22 ` [PATCH v5 4/8] net/nfb: add device argument "port" to limit used ports spinler
2026-01-23 17:22 ` [PATCH v5 5/8] net/nfb: init only MACs associated with device spinler
2026-01-23 17:22 ` [PATCH v5 6/8] net/nfb: add compatible cards to driver PCI ID table spinler
2026-01-23 17:22 ` [PATCH v5 7/8] net/nfb: report firmware version spinler
2026-01-23 17:22 ` [PATCH v5 8/8] doc/nfb: cleanup and update guide spinler
2026-01-24 19:10 ` [REVIEW] " Stephen Hemminger
2026-01-24 19:19 ` [PATCH v5 0/8] net/nfb: rework to real multiport Stephen Hemminger
2026-02-02 15:34 ` [PATCH v6 " spinler
2026-02-02 15:34 ` [PATCH v6 1/8] net/nfb: prepare for indirect queue mapping scheme spinler
2026-02-02 17:50 ` Stephen Hemminger
2026-02-02 15:34 ` [PATCH v6 2/8] net/nfb: create one ethdev per ethernet port spinler
2026-02-02 15:34 ` [PATCH v6 3/8] net/nfb: add vdev as alternative device probe method spinler
2026-02-02 15:34 ` [PATCH v6 4/8] net/nfb: add device argument "port" to limit used ports spinler
2026-02-02 15:34 ` [PATCH v6 5/8] net/nfb: init only MACs associated with device spinler
2026-02-02 15:34 ` [PATCH v6 6/8] net/nfb: add compatible cards to driver PCI ID table spinler
2026-02-02 15:34 ` [PATCH v6 7/8] net/nfb: report firmware version spinler
2026-02-02 15:34 ` [PATCH v6 8/8] doc/nfb: cleanup and update guide spinler
2026-02-02 17:42 ` [REVIEW] " Stephen Hemminger
2026-02-02 17:51 ` Stephen Hemminger
2026-02-02 17:52 ` Stephen Hemminger
2026-02-02 17:54 ` Stephen Hemminger
2026-02-02 17:54 ` Stephen Hemminger
2026-02-04 12:31 ` [PATCH v7 0/8] net/nfb: rework to real multiport spinler
2026-02-04 12:31 ` [PATCH v7 1/8] net/nfb: prepare for indirect queue mapping scheme spinler
2026-02-04 12:31 ` [PATCH v7 2/8] net/nfb: create one ethdev per ethernet port spinler
2026-02-04 12:31 ` [PATCH v7 3/8] net/nfb: add vdev as alternative device probe method spinler
2026-02-04 12:31 ` [PATCH v7 4/8] net/nfb: add device argument "port" to limit used ports spinler
2026-02-04 12:31 ` [PATCH v7 5/8] net/nfb: init only MACs associated with device spinler
2026-02-04 12:31 ` [PATCH v7 6/8] net/nfb: add compatible cards to driver PCI ID table spinler
2026-02-04 12:31 ` [PATCH v7 7/8] net/nfb: report firmware version spinler
2026-02-04 12:31 ` [PATCH v7 8/8] doc/nfb: cleanup and update guide spinler
2026-02-10 0:35 ` [PATCH v7 0/8] net/nfb: rework to real multiport Stephen Hemminger
2026-02-13 18:53 ` Martin Špinler
2026-02-12 18:35 ` Stephen Hemminger
2026-02-13 18:53 ` Martin Špinler
2026-02-13 18:53 ` [PATCH v8 " spinler
2026-02-13 18:53 ` [PATCH v8 1/8] net/nfb: prepare for indirect queue mapping scheme spinler
2026-02-13 18:53 ` [PATCH v8 2/8] net/nfb: create one ethdev per ethernet port spinler
2026-02-13 19:33 ` Stephen Hemminger
2026-02-13 18:53 ` [PATCH v8 3/8] net/nfb: add vdev as alternative device probe method spinler
2026-02-13 18:53 ` [PATCH v8 4/8] net/nfb: add device argument "port" to limit used ports spinler
2026-02-13 18:53 ` [PATCH v8 5/8] net/nfb: init only MACs associated with device spinler
2026-02-13 18:53 ` [PATCH v8 6/8] net/nfb: add compatible cards to driver PCI ID table spinler
2026-02-13 18:53 ` [PATCH v8 7/8] net/nfb: report firmware version spinler
2026-02-13 18:53 ` [PATCH v8 8/8] doc/nfb: cleanup and update guide spinler
2026-02-13 19:39 ` [PATCH v8 0/8] net/nfb: rework to real multiport Stephen Hemminger
2026-02-13 20:13 ` Martin Špinler
2026-02-16 16:24 ` [PATCH v9 " spinler
2026-02-16 16:24 ` [PATCH v9 1/8] net/nfb: prepare for indirect queue mapping scheme spinler
2026-02-16 16:25 ` [PATCH v9 2/8] net/nfb: create one ethdev per ethernet port spinler
2026-02-16 16:25 ` [PATCH v9 3/8] net/nfb: add vdev as alternative device probe method spinler
2026-02-16 16:25 ` [PATCH v9 4/8] net/nfb: add device argument "port" to limit used ports spinler
2026-02-16 16:25 ` [PATCH v9 5/8] net/nfb: init only MACs associated with device spinler
2026-02-16 16:25 ` [PATCH v9 6/8] net/nfb: add compatible cards to driver PCI ID table spinler
2026-02-16 16:25 ` [PATCH v9 7/8] net/nfb: report firmware version spinler
2026-02-16 16:25 ` [PATCH v9 8/8] doc/nfb: cleanup and update guide spinler
2026-02-16 22:11 ` [PATCH v9 0/8] net/nfb: rework to real multiport Stephen Hemminger
2026-02-17 7:09 ` Martin Spinler
2026-02-17 7:10 ` [PATCH v10 " spinler
2026-02-17 7:10 ` [PATCH v10 1/8] net/nfb: prepare for indirect queue mapping scheme spinler
2026-02-17 7:10 ` [PATCH v10 2/8] net/nfb: create one ethdev per ethernet port spinler
2026-02-17 7:10 ` [PATCH v10 3/8] net/nfb: add vdev as alternative device probe method spinler
2026-02-17 7:10 ` [PATCH v10 4/8] net/nfb: add device argument "port" to limit used ports spinler
2026-02-17 7:10 ` [PATCH v10 5/8] net/nfb: init only MACs associated with device spinler
2026-02-17 7:10 ` [PATCH v10 6/8] net/nfb: add compatible cards to driver PCI ID table spinler
2026-02-17 7:10 ` [PATCH v10 7/8] net/nfb: report firmware version spinler
2026-02-17 7:10 ` [PATCH v10 8/8] doc/nfb: cleanup and update guide spinler
2026-03-13 16:48 ` Thomas Monjalon
2026-02-17 14:58 ` [PATCH v10 0/8] net/nfb: rework to real multiport Stephen Hemminger
2026-02-17 15:05 ` Martin Spinler
2026-02-17 15:22 ` Martin Spinler
2026-02-19 0:12 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260122170117.1ff34114@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=spinler@cesnet.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox