Skip to content

Fix XDP documentation to a unified location for ICSSG and CPSW#642

Open
MeghanaMalladiTI wants to merge 2 commits intoTexasInstruments:masterfrom
MeghanaMalladiTI:xdp-doc-fixes
Open

Fix XDP documentation to a unified location for ICSSG and CPSW#642
MeghanaMalladiTI wants to merge 2 commits intoTexasInstruments:masterfrom
MeghanaMalladiTI:xdp-doc-fixes

Conversation

@MeghanaMalladiTI
Copy link
Copy Markdown
Contributor

Add new centralized XDP documentation at Kernel/Kernel_Drivers/Network/XDP.rst for CPSW and ICSSG

@MeghanaMalladiTI
Copy link
Copy Markdown
Contributor Author

@danish-ti and @daolin can you please review this PR

MeghanaMalladiTI and others added 2 commits March 26, 2026 12:16
…CSSG and CPSW

- Add new centralized XDP documentation at
  Kernel/Kernel_Drivers/Network/XDP.rst
- Add kernel_xdp reference label that can be used throughout the docs
- Update PRU_ICSSG_XDP.rst to redirect to the consolidated XDP docs
- Update features supported in PRU_ICSSG_Ethernet.rst
- Update CPSW-Ethernet.rst to reference kernel_xdp instead of
  pru_icssg_xdp
- Add XDP.rst to AM64X device-specific table of contents
- Add XDP.rst to main Kernel Drivers toctree

The new XDP documentation covers:
- XDP introduction and concepts
- Use cases and kernel configuration
- AF_XDP sockets and zero-copy mode
- Testing with xdp-tools (xdp-bench, xdp-trafficgen)
- Performance comparison for CPSW and ICSSG drivers

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Meghana Malladi <m-malladi@ti.com>
Add XDP documentation support to the following SoC platforms by
including Network/XDP.rst in their device-specific table of contents:

- AM62AX (am62axx_sk-fs)
- AM62PX (am62pxx_sk-fs)
- AM62X (am62xx_sk-fs)
- J7200 (j7200-evm)
- J721E (j721e-idk-gw)
- J722S (j722s_evm-fs)

Note: AM64X (am64xx-evm, am64xx-hsevm) already has XDP support from
the initial commit.

This ensures that users of these platforms can access the consolidated
XDP documentation covering Native XDP, Generic XDP, and Zero-copy modes.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Meghana Malladi <m-malladi@ti.com>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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


.. code-block:: console

xdp-trafficgen udp -m ff:ff:ff:ff:ff:ff <interface>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

4. **Core Affinity**: Bind application threads to specific CPU cores to reduce cache contention
5. **NUMA Awareness**: Consider NUMA topology when allocating memory for packet buffers
The XDP documentation has been consolidated. Please refer to
:ref:`kernel_xdp` for CPSW and ICSSG XDP setup and testing.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Introduction
============

XDP (eXpress Data Path) provides a framework for BPF that enables high-performance programmable packet processing in the Linux kernel. It runs the BPF program at the earliest possible point in software, namely at the moment the network driver receives the packet.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Acronym definitions are supposed to come before the acronym.

Suggested change
XDP (eXpress Data Path) provides a framework for BPF that enables high-performance programmable packet processing in the Linux kernel. It runs the BPF program at the earliest possible point in software, namely at the moment the network driver receives the packet.
eXpress Data Path (XDP) provides a framework for extended Berkeley Packet Filters (eBPF) that enables high-performance programmable packet processing in the Linux kernel. It runs the eBPF program at the earliest possible point in software, namely at the moment the network driver receives the packet.


XDP (eXpress Data Path) provides a framework for BPF that enables high-performance programmable packet processing in the Linux kernel. It runs the BPF program at the earliest possible point in software, namely at the moment the network driver receives the packet.

XDP allows running a BPF program just before the skbs are allocated in the driver, the BPF program can look at the packet and return the following things.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You should probably explain what a skb is in this context.

- XDP_ABORTED :- Similar to drop, an exception is generated.
- XDP_PASS :- Pass the packet to kernel stack, i.e. the skbs are allocated and it works normally.
- XDP_TX :- Send the packet back to same NIC with modification(if done by the program).
- XDP_REDIRECT :- Send the packet to another NIC or to the user space through AF_XDP Socket(discussed below).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Underscores are a reserved character in RST. The parser can normally figure out what you mean, but you should wrap words that contain them with inline code sections to prevent unintended parsing:

``XDP_DROP``

Introduction
============

XDP (eXpress Data Path) provides a framework for BPF that enables high-performance programmable packet processing in the Linux kernel. It runs the BPF program at the earliest possible point in software, namely at the moment the network driver receives the packet.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's part of the BPF subsystem in the kernel, but it's technically built on eBFP. The kernel seems to switch back and forth about whether they acknowledge it's a part of eBPF vs just standard BPF. I dunno what we should call it.

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.

9 participants