Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert the ice driver to Page Pool [POC] #8

Open
wants to merge 4 commits into
base: libeth
Choose a base branch
from

Conversation

michalQb
Copy link
Owner

@michalQb michalQb commented Dec 9, 2024

No description provided.

The commit 5384467 ("iavf: kill "legacy-rx" for good") removes
the legacy Rx in iavf driver. Now it is time for ice.
Converting the page management to page_pool is a good opportunity to
remove an obsolete code per the arguments listed in the original iavf
commit.

Co-developed-by: Alexander Lobakin <[email protected]>
Signed-off-by: Michal Kubiak <[email protected]>
As in case of iavf driver, the commit 920d86f ("iavf: drop page
splitting and recycling") introduces an intermediate step in page_pool
conversion, perform the same step for ice.
Remove all page splitting/recycling code. Just always allocate a new
page and don't touch its refcount, so that it gets freed by the core
stack later.

Co-developed-by: Alexander Lobakin <[email protected]>
Signed-off-by: Michal Kubiak <[email protected]>
The patch is the ice version of the IAVF commit 5fa4caf ("iavf:
switch to Page Pool"), enhanced with XDP stuff conversion. Generic Rx
path changes can be described in exactly the same way as the original
IAVF commit.
Now that the ice driver simply uses dev_alloc_page() + free_page()
with no custom recycling logics, it can easily be switched to using Page
Pool / libeth API instead.
This allows to removing the whole dancing around headroom, HW buffer
size, and page order. All DMA-for-device is now done in the PP core,
for-CPU -- in the libeth helper.
Use skb_mark_for_recycle() to bring back the recycling and restore the
performance.
In terms of XDP, use basic XDP helpers provided by the libeth_xdp
module. For XDP_TX skip DMA mapping for each xmitted frame. Instead,
map all buffers as bi-directional and rely on the page_pool page
management mechanism. Thanks to this, performance of XDP_TX can be
improved, especially in scenarios when IOMMU is enabled.

Suggested-by: Maciej Fijalkowski <[email protected]>
Suggested-by: Alexander Lobakin <[email protected]>
Signed-off-by: Michal Kubiak <[email protected]>
Since the ice driver uses the same Rx path for handling regular NAPI Rx
queues as well as control VSI flow director queues, the page_pool could
not be applied in a generic way.
Skip that design issue temporarily, just to avoid the POC crashes, by
disabling the flow director completely.

The issue has to be addressed after we decide to upstream that page_pool
solution.

Signed-off-by: Michal Kubiak <[email protected]>
@michalQb michalQb requested a review from alobakin December 9, 2024 14:09
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.

1 participant