diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2018-08-28 14:44:34 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-08-29 12:25:53 -0700 |
commit | 1328dcddbd53900481994f4c4d8b79e64477965e (patch) | |
tree | 545afb0764c2764022bd0a215e91a4ebf0b28e0f /samples | |
parent | a96e7472732842d76af0132c5f87f531f312d7a9 (diff) |
i40e: add AF_XDP zero-copy Tx support
This patch adds zero-copy Tx support for AF_XDP sockets. It implements
the ndo_xsk_async_xmit netdev ndo and performs all the Tx logic from a
NAPI context. This means pulling egress packets from the Tx ring,
placing the frames on the NIC HW descriptor ring and completing sent
frames back to the application via the completion ring.
The regular XDP Tx ring is used for AF_XDP as well. This rationale for
this is as follows: XDP_REDIRECT guarantees mutual exclusion between
different NAPI contexts based on CPU id. In other words, a netdev can
XDP_REDIRECT to another netdev with a different NAPI context, since
the operation is bound to a specific core and each core has its own
hardware ring.
As the AF_XDP Tx action is running in the same NAPI context and using
the same ring, it will also be protected from XDP_REDIRECT actions
with the exact same mechanism.
As with AF_XDP Rx, all AF_XDP Tx specific functions are added to
i40e_xsk.c.
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions