Skip to content

Commit

Permalink
docs: XDP update requirements
Browse files Browse the repository at this point in the history
Added "Header push and pop" and "RX bulking"

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
  • Loading branch information
netoptimizer committed Sep 19, 2016
1 parent eb41286 commit cbfbf08
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions kernel/Documentation/networking/XDP/design/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,44 @@ into the stack again).
Write access to packet-data
===========================

Need the ability to modify packet-data. This is unfortunately
Need the ability to modify packet-data. This is unfortunately often
difficult to obtain, as it requires fundamental changes to the drivers
memory model.

Unfortunately most driver don't have "writable" packet-data as
default. The packet-data is not writable, because choose to
work-arounds performance bottlenecks in both the page-allocator and
DMA APIs, which side-effect is read-only packet-pages.
default. The packet-data in drivers is often not writable, because
the drivers likely have choosen to work-arounds performance
bottlenecks in both the page-allocator and DMA APIs, which side-effect
is read-only packet-pages.

Instead most drivers, allocate both a SKB and a writable memory
buffer, which the packet headers are copied into (and for placing
``skb_shared_info``). Then, the SKB (and ``skb_shared_info``) is
``skb_shared_info``). Afterwards the SKB (and ``skb_shared_info``) is
adjusted to point into the remaining payload (pointing past the
headers just copied).


Header push and pop
===================

The ability to push (add) or pop (remove) packet headers indirectly
depend on write acces to packet-data. (One could argue that a pure
pop, could be implemented by only adjusting the payload offset, thus
no write-access).

This requirement goes hand-in-hand with tunnel encapsulation or
decapsulation. It is also relevant for e.g adding a VLAN head as
needed by the :doc:`../use-cases/xdp_use_case_ddos_scrubber` in-order
to workaround the :ref:`XDP_TX` single NIC limitation.

This requirement implies the ability to adjust the packet-data start
offset/pointer and packet length. This requires additional data to be
returned

This also have implication for how much headroom drivers should
reserve.


Page per packet
===============

Expand All @@ -54,3 +77,6 @@ demonstrating superior performance. For the shear ability to compare
against DPDK, XDP also need a forwarding capability.


RX bulking
==========

0 comments on commit cbfbf08

Please sign in to comment.