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

XDP support #63

Merged
merged 19 commits into from
Dec 21, 2024
Merged

XDP support #63

merged 19 commits into from
Dec 21, 2024

Conversation

marcomole00
Copy link
Contributor

Key Improvements

  • Added extended statistics for packet adapter layer via ethtool -S
  • Implemented per-CPU network device statistics
  • Enhanced ethtool functionality:
    • Support for modifying RSS indirection table
    • Support for changing RSS hash key
  • Introduced XDP (eXpress Data Path) support
    • XDP statistics now accessible through ethtool -S
  • Replaced packet page memory allocator with page-pool

Kernel Compatibility

Currently tested and supported on:

  • Kernel v5.15 (Ubuntu 22.04 LTS)

For now the only kernel tested/supported is v5.15 (Ubuntu 22.04 LTS). Porting it to other versions is not hard but it's a tedious process. Could we agree on some specific kernel version to support? Maybe the kernel versions of the last 2-3 Ubuntu LTS?

For now there is no way to "opt out" from XDP support, neither at compile or load time.
But by not inserting any XDP program the execution path is mostly unchanged, apart from the page pool code.

Performance analysis

In the following tables i show that there significant performance improvements, thanks to the page pooling.

In the first table we analyze the performance of a single flow UDP. 

The setup was composed of two machines:

  • Tx side:  DPDK packet generator that produced packets at 100Gbps, except for the 64B and the 250B in which it produced packets at ~25Gbps and ~75Gbps due to hw limitations.

  • Rx side: A server with frequency scaling disabled and a simple C program that reads from a UDP socket. The numbers in the table are computed at the receiving socket.

Thexdp-support pass case is a XDP program that passes all the packets up to the stack.

size baseline xdp-support xdp-support pass
1518 10.53 Gbps 13.47 Gbps 13.64 Gbps
1000 7.70 Gbps 9.12 Gbps 8.97 Gbps
500 3.56 Gbps 4.43 Gbps 4.42 Gbps
250 1.69 Gbps 2.00 Gbps 2.02 Gbps
64 0.18 Gbps 0.19 Gbps 0.18 Gbps

This setup is not meant to showcase the maximum performance case, but it just shows how the page pooling improves baseline performances.

In the second table there the results of a TCP single flow test done with iperf3.

measurement on 30s main xdp-support xdp-support pass
bitrate 12.30 Gbps 32.70 Gbps 32.60 Gbps

In the third table there are the results of the test where all packets were dropped with no further processing. 

The TX setup was identical to the first experiment. 

The interesting conclusion here is that the opennic driver can drop packet a line rate for big enough packets.

size rx throughput xdp drop
64 B 10.02 Gbps
250 B 40.94 Gbps
1000 B 94.53 Gbps
1500 B 97.73 Gbps

marcomole00 and others added 16 commits December 5, 2024 19:11
Co-authored-by: Alexandru Gabriel Bradatan <[email protected]>
Co-authored-by: marcomole00 <[email protected]>
Co-authored-by: Alexandru Gabriel Bradatan <[email protected]>
Co-authored-by: marcomole00 <[email protected]>
Co-authored-by: Alexandru Gabriel Bradatan <[email protected]>
Co-authored-by: marcomole00 <[email protected]>
Co-authored-by: Alexandru Gabriel Bradatan <[email protected]>
Co-authored-by: marcomole00 <[email protected]>
Co-authored-by: Alexandru Gabriel Bradatan <[email protected]>
Co-authored-by: marcomole00 <[email protected]>
Co-authored-by: Alexandru Gabriel Bradatan <[email protected]>
Co-authored-by: marcomole00 <[email protected]>
Co-authored-by: Alexandru Gabriel Bradatan <[email protected]>
Co-authored-by: marcomole00 <[email protected]>
Co-authored-by: Alexandru Gabriel Bradatan <[email protected]>
Co-authored-by: marcomole00 <[email protected]>
Co-authored-by: Alexandru Gabriel Bradatan <[email protected]>
Co-authored-by: marcomole00 <[email protected]>
Co-authored-by: Alexandru Gabriel Bradatan <[email protected]>
Co-authored-by: marcomole00 <[email protected]>
* idea: dma sync for cpu in napi_poll

* save dma address in onic_rx_buffer
@cneely-amd
Copy link
Collaborator

Hi @marcomole00 . Sorry for the delay, the past couple of weeks have been especially busy. I still need to try this out, but I have a newer kernel version on my 22.04 at the moment. I need to set up a test environment but this will take at least a few more days. Right now it won't fully compile for me. The following is what I have on one of my test machines.

uname -a
Linux boxer 6.8.0-48-generic #48~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 7 11:24:13 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy

@marcomole00
Copy link
Contributor Author

Hi @cneely-amd, I'm preparing a patch for 6.8 support. It should be ready in a couple of days.

@marcomole00
Copy link
Contributor Author

@cneely-amd i added 3 commits that fixed compilation issues, now it should compile correctly.

@cneely-amd
Copy link
Collaborator

Hi @marcomole00, thanks! I did a quick test on 22.04. I'll go ahead and merge in the changes.

@cneely-amd cneely-amd merged commit 659b6b7 into Xilinx:main Dec 21, 2024
1 check passed
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.

3 participants