Skip to content

[PWCI] "doc/guides/nics: split pcap_ring into separate documentation files"#609

Open
ovsrobot wants to merge 1 commit intomainfrom
series_36996
Open

[PWCI] "doc/guides/nics: split pcap_ring into separate documentation files"#609
ovsrobot wants to merge 1 commit intomainfrom
series_36996

Conversation

@ovsrobot
Copy link
Owner

@ovsrobot ovsrobot commented Jan 8, 2026

NOTE: This is an auto submission for "doc/guides/nics: split pcap_ring into separate documentation files".

See "http://patchwork.dpdk.org/project/dpdk/list/?series=36996" for details.

Summary by Sourcery

Documentation:

  • Create separate NIC documentation pages for pcap and ring drivers, replacing the previous combined pcap_ring guide.

Summary by CodeRabbit

Documentation

  • Documentation
    • Reorganized NIC driver documentation structure with updated index
    • Published new dedicated guides for Pcap Poll Mode Driver and Ring-Based Poll Mode Driver
    • Added comprehensive configuration references, runtime options, and usage examples for both drivers

✏️ Tip: You can customize this high-level summary in your review settings.

The documentation had combined to unrelated drivers together.
Use AI to split into two separate files:
pcap.rst for the pcap PMD and ring.rst for the ring PMD.

Changes to pcap.rst:
- Use "pcap" consistently instead of mixed "libpcap/pcap/PCAP" naming
- Remove Linux-specific references; document support for Linux, FreeBSD,
  and Windows
- Add reference to upstream libpcap documentation
- Add multi-queue support section explaining queue count determination
  and file handle limitations
- Use ``--vdev=net_pcap0`` format consistently
- Remove deprecated rte_eth_from_pcaps() API section
- Improve technical documentation style throughout

Changes to ring.rst:
- Use ``--vdev=net_ring0`` format consistently
- Fix inconsistent "Rings-based/Ring-based" naming
- Retain rte_eth_from_rings() API section with usage examples
- Improve technical documentation style throughout

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: 0-day Robot <robot@bytheb.org>
@sourcery-ai
Copy link

sourcery-ai bot commented Jan 8, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Splits the combined pcap_ring NIC documentation into two separate guides (pcap and ring) and wires them into the NIC guides index while removing the old consolidated file.

File-Level Changes

Change Details Files
Split the existing combined pcap_ring NIC documentation into separate pcap and ring docs.
  • Create a new pcap NIC documentation file with content extracted from the old combined pcap_ring documentation.
  • Create a new ring NIC documentation file with content extracted from the old combined pcap_ring documentation.
  • Remove the legacy combined pcap_ring NIC documentation file now that its content has been split.
doc/guides/nics/pcap.rst
doc/guides/nics/ring.rst
doc/guides/nics/pcap_ring.rst
Update NIC guide index to reference the new individual documentation files.
  • Add entries for the new pcap NIC documentation to the NIC guides index.
  • Add entries for the new ring NIC documentation to the NIC guides index.
doc/guides/nics/index.rst

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link

coderabbitai bot commented Jan 8, 2026

📝 Walkthrough

Walkthrough

The pull request reorganizes NIC driver documentation by splitting the combined pcap_ring.rst file into two separate documentation files—pcap.rst for the Pcap Poll Mode Driver and ring.rst for the Ring Based Poll Mode Driver—and updates the driver index accordingly.

Changes

Cohort / File(s) Summary
Documentation Index Update
doc/guides/nics/index.rst
Updated toctree entries: renamed pcap_ring to pcap and added new ring entry to reflect the documentation split.
Pcap PMD Documentation
doc/guides/nics/pcap.rst
New comprehensive documentation file covering the Pcap Poll Mode Driver, including overview, device naming, stream options, multi-queue support, runtime configuration options, usage examples, and RX flushing behavior.
Ring PMD Documentation
doc/guides/nics/ring.rst
New comprehensive documentation file covering the Ring Based Poll Mode Driver, including EAL command-line usage, device creation, testpmd examples, runtime initialization via rte_eth_from_rings(), configuration flow, performance notes, and C usage examples.
Legacy Combined Documentation
doc/guides/nics/pcap_ring.rst
Removed file that previously documented both the Pcap and Ring-based PMDs in a single document.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A tale of documentation refined,
One file split in two, so well designed!
Pcap and ring, now each their own,
The index updated, new seeds have been sown! 🌱✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: splitting the combined pcap_ring documentation file into separate pcap and ring documentation files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd60dcd and 56231f9.

📒 Files selected for processing (4)
  • doc/guides/nics/index.rst
  • doc/guides/nics/pcap.rst
  • doc/guides/nics/pcap_ring.rst
  • doc/guides/nics/ring.rst
💤 Files with no reviewable changes (1)
  • doc/guides/nics/pcap_ring.rst
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Sourcery review
🔇 Additional comments (3)
doc/guides/nics/pcap.rst (1)

1-220: ✅ Comprehensive and well-organized Pcap PMD documentation.

The documentation is clear, complete, and follows RST conventions consistently. Structure flows logically from overview through examples. All 6 stream types are documented with usage syntax. Runtime options cover important use cases (infinite RX, drop packets, dummy RX). Examples demonstrate practical configurations (file-to-file, interface-to-file, multi-queue, RX filtering). The testpmd-specific RX flushing section and final note about interface status are particularly helpful.

One minor observation: The documentation correctly references the upstream libpcap documentation and notes OS support (Linux, FreeBSD, Windows), which is helpful context for users.

doc/guides/nics/index.rst (1)

63-63: ✅ Index entries correctly positioned and ordered.

The renaming of pcap_ring to pcap (line 63) and addition of new ring entry (line 67) maintains alphabetical ordering and properly reflects the documentation split. Both entries are correctly formatted within the toctree.

Also applies to: 67-67

doc/guides/nics/ring.rst (1)

1-116: ✅ Well-documented Ring PMD API with clear examples.

The documentation effectively covers both EAL CLI and programmatic API usage. The testpmd output example (lines 28-61) provides concrete context. The C code examples are clear: loopback configuration (lines 87-93) and cross-switching (lines 102-103) show practical patterns. The performance note (lines 108-110) explaining function pointer overhead vs. native ring calls is valuable for developers making architectural decisions. Configuration sequence is properly documented.

Minor note: Line 52 references img/forward_stats.* image. Verify this image exists in the documentation build system.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 4 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `doc/guides/nics/pcap.rst:24-26` </location>
<code_context>
+using the pcap driver, to be created at application startup time during EAL initialization.
+
+To do so, pass the ``--vdev=net_pcap0`` parameter to the EAL.
+This parameter accepts options to allocate and use pcap-based Ethernet transparently by the application.
+This can be used, for example, for testing on a virtual machine where there are no Ethernet ports.
+
</code_context>

<issue_to_address>
**suggestion (typo):** Consider rephrasing "transparently by the application" to the more idiomatic "transparently to the application".

The current phrasing is grammatically awkward; consider wording like "in a way that is transparent to the application" for smoother readability.

```suggestion
To do so, pass the ``--vdev=net_pcap0`` parameter to the EAL.
This parameter accepts options to allocate and use pcap-based Ethernet in a way that is transparent to the application.
This can be used, for example, for testing on a virtual machine where there are no Ethernet ports.
```
</issue_to_address>

### Comment 2
<location> `doc/guides/nics/pcap.rst:218-219` </location>
<code_context>
+
+.. note::
+
+   The network interface provided to the PMD should be up. The PMD will return
+   an error if interface is down, and the PMD itself won't change the status
+   of the external network interface.
</code_context>

<issue_to_address>
**issue (typo):** Add "the" before "interface" for correct grammar.

Consider updating this sentence to: "an error if the interface is down" for correct grammar.

```suggestion
   The network interface provided to the PMD should be up. The PMD will return
   an error if the interface is down, and the PMD itself won't change the status
```
</issue_to_address>

### Comment 3
<location> `doc/guides/nics/ring.rst:90` </location>
<code_context>
-    ring[0] = rte_ring_create("R0", RING_SIZE, SOCKET0, RING_F_SP_ENQ|RING_F_SC_DEQ);
-    ring[1] = rte_ring_create("R1", RING_SIZE, SOCKET0, RING_F_SP_ENQ|RING_F_SC_DEQ);
-
-    /* create two ethdev's */
-
-    port0 = rte_eth_from_rings("net_ring0", ring, NUM_RINGS, ring, NUM_RINGS, SOCKET0);
</code_context>

<issue_to_address>
**issue (typo):** Use the correct plural form "ethdevs" instead of "ethdev's".

The apostrophe implies possession rather than plurality. Please update the comment text to use the plural form, e.g. `/* create two ethdevs */`.

```suggestion
    /* create two ethdevs */
```
</issue_to_address>

### Comment 4
<location> `doc/guides/nics/ring.rst:115` </location>
<code_context>
+Once an ethdev has been created for a ring-based PMD,
+it should be configured and started in the same way as a regular Ethernet device:
+call rte_eth_dev_configure() to set the number of receive and transmit queues,
+then call rte_eth_rx_queue_setup() / tx_queue_setup() for each of those queues,
+and finally call rte_eth_dev_start() to allow transmission and reception of packets to begin.
</code_context>

<issue_to_address>
**issue:** The TX queue setup API name appears incomplete; likely should be rte_eth_tx_queue_setup().

To match the RX API and actual DPDK ethdev names, this should reference `rte_eth_rx_queue_setup() / rte_eth_tx_queue_setup()`. The current `tx_queue_setup()` form may mislead readers searching for the correct API.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +218 to +219
The network interface provided to the PMD should be up. The PMD will return
an error if interface is down, and the PMD itself won't change the status
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (typo): Add "the" before "interface" for correct grammar.

Consider updating this sentence to: "an error if the interface is down" for correct grammar.

Suggested change
The network interface provided to the PMD should be up. The PMD will return
an error if interface is down, and the PMD itself won't change the status
The network interface provided to the PMD should be up. The PMD will return
an error if the interface is down, and the PMD itself won't change the status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants