Skip to content

Conversation

@walking-machine
Copy link
Owner

@walking-machine walking-machine commented Oct 28, 2025

  • pseudo header split not yet integrated
  • lacks segment support in AF_XDP TX
  • wakeup works through interrupts, because IPIs are not properly handled yet

Similarly as in commit 5384467 ("iavf: kill "legacy-rx" for good"),
drop skb construction logic in favor of only using napi_build_skb() as a
superior option that reduces the need to allocate and copy memory.

When compared to iavf changes, ixgbevf has a single complication: MAC type
82599 cannot finely limit the DMA write size with RXDCTL.RLPML, only 1024
increments through SRRCTL are available, see commit fe68195
("ixgbevf: Require large buffers for build_skb on 82599VF") and commit
2bafa8f ("ixgbe: don't set RXDCTL.RLPML for 82599"). Therefore, this
is a special case requiring legacy RX unless large buffers are used. For
now, solve this by always using large buffers for this MAC type.

Suggested-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Again, same as in the related iavf commit 920d86f ("iavf: drop page
splitting and recycling"), as an intermediate step, drop the page sharing
and recycling logic in a preparation to offload it to page_pool.

Instead of the previous sharing and recycling, just allocate a new page
every time.

Suggested-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Use page_pool buffers by the means of libeth in the Rx queues, this
significantly reduces code complexity of the driver itself.

Suggested-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Add likely/unlikely markers for better branch prediction. While touching
some functions, cleanup the code a little bit.

This patch is not supposed to make any logic changes.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Implement XDP support for received fragmented packets, this requires using
some helpers from libeth_xdp.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Use libeth to support XDP_TX action for segmented packets.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
To fully support XDP_REDIRECT, utilize more libeth helpers in XDP Rx path,
hence save cached_ntu in the ring structure instead of stack.

ixgbevf-supported VFs usually have few queues, so use libeth_xdpsq_lock
functionality for XDP queue sharing. Adjust filling-in of XDP Tx
descriptors to use data from xdp frame. Otherwise, simply use libeth
helpers to implement .ndo_xdp_xmit().

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
The same register write operation is already used twice in code, it will be
used again by AF_XDP configuration. Wrap it in a helper function.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
AF_XDP ZC Rx path is also required to implement skb creation. Move all
common functions to a header file as inlines.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Plenty of code can be shared between ZC and normal XDP Tx queues. Expose
such code through the previously added header file.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Before starting transmission XDP queue first fills a single context
descriptor, on which we cannot check DD bit later. This is not a problem in
case of XDP_TX and .ndo_xdp_xmit(), because preparation happens only if we
already have packets to send.

This is different for ZC though. Wakeup must trigger queue preparation even
if no new packets are queued, hence a single context descriptor can block
completions. Modify RS-setting logic to account for handle such case.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Implement xsk_buff_pool configuration and supporting functionality, such as
a single queue pair reconfiguration. Also, properly initialize Rx buffers.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Add code that handles Tx ZC queues inside of napi_pool(), utilize libeth.
As NIC's multiple buffer conventions do not play nicely with AF_XDP's,
leave handling of segments for later.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Add code that handles AF_XDP ZC Rx queues inside of napi_poll(), utilize
libeth helpers.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
To finalize basic AF_XDP implementation, set features and add
.ndo_xsk_wakeup() handler.

TMP NOTE: IPI variant is incomplete, works through interrupts.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
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