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

[DOCA] Remove RX obsolete extra APIs and merge 3.31.0 changes #154

Open
wants to merge 21 commits into
base: doca_xlio
Choose a base branch
from

Conversation

AlexanderGrissik
Copy link
Collaborator

Description

Based on PR150 (issue: 3623390 Implementing DOCA Flow steering creation)

What

Removed APIs:

  1. Removal of RX obsolete extra APIs
    a. Socketxtreme
    b. Callback API
    c. RX Zero Copy
  2. Merge changes of 3.31.0
Why ?

Cleanup

Change type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

Check list

  • Code follows the style de facto guidelines of this project
  • Comments have been inserted in hard to understand places
  • Documentation has been updated (if necessary)
  • Test has been added (if possible)

AlexanderGrissik and others added 21 commits April 18, 2024 08:46
Adding --with-doca=<path-to-doca> configure flag.
This flag is set by default and points to /opt/mellanox/doca

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
Enumerate DOCA devices to find the correct doca_devinfo object which will be used to open the device.

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
Open DOCA device in ib_ctx_handler.

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
Open DOCA ETH regular RXQ with basic configuration.

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
1. Moving to DOCA 2.7
2. Initialization of DOCA Flow
3. Nginx fork() support

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
DPDK changes CPU affinity inside doca_flow_init.
This workaround stores the CPU affinity before the call and restores it after.

Signed-off-by: Iftah Levi <iftahl@nvidia.com>
1. Start DOCA flow port on demand. Starting DOCA Flow port takes significant amount of time, so we prefer to avoid starting it always on all devices.
2. Handle DOCA flow termination. DOCA Flow creates DPDK threads and DPDK infinite internal thread which uses epoll which is offloaded by XLIO itself.
   For this, we need first termiante all DOCA flow related elements and then destroy the fd_collection while not allowing new epolls to go through XLIO.

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
Creating root control pipe without any mask as entry point for adding rules per device.

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
1. Isolated mode DOCA Flow steering for multi-process
2. Start DOCA RXQ and attach with DOCA FLow

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
Legacy mechanism to disable all locks brute forcefully is never used.

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
Removing legacy mechanism to track lock statistics which is never used and became rotten.

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
Removing Socketxtreme API support completely.

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
Removing Callback API support completely.

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
Removing RX Zero Copy API support completely.

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
When sock_stats was static its destructor was called before xlio_exit that destroys the internal-thread which destroys sockets.
We should avoid having global objects with untrivial constructors/destructors, since there is no control of their execution order.

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
When TCP socket is destroyed it frees the preallocated buffers after dst_entry is deleted.
This returns the buffers to the global pool directly and breaks m_tx_num_bufs,m_zc_num_bufs ring counters.

1. Move the preallocated buffers cleanup before dst_entry destruction.
2. Add ring stats for m_tx_num_bufs and m_zc_num_bufs.

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
1. Removing hardcoded check that switches AIM to latency mode.
In case of low packet rate the calculation will result in 0 count anyway.
In case packet rate is higher than the desired interrupt rate we do want to utilize the AIM correctly.
2. Changing default AIM values to more reasonable.
3. Removing default values for Nginx and use AIM by default.
This improves CPU utilization in low congested cases significantly.:

Signed-off-by: Alexander Grissik <agrissik@nvidia.com>
These parameters are deprecated and will be removed in the future. Use
XLIO_MEMORY_LIMIT instead.

Signed-off-by: Dmytro Podgornyi <dmytrop@nvidia.com>
MCE_MAX_CQ_POLL_BATCH usage requires it to be small enough. However,
this is a logical upper limit and we want be able to raise it if
necessary.

Remove unused cq_mgr_tx::clean_cq() which uses MCE_MAX_CQ_POLL_BATCH
for an array on stack.

Adjust condition for RX buffers compensation to remove
MCE_MAX_CQ_POLL_BATCH. However, this changes the logic and now, we
forcibly compensate only the last RX buffer in RQ.

Signed-off-by: Dmytro Podgornyi <dmytrop@nvidia.com>
MCE_MAX_CQ_POLL_BATCH is a logical upper limit for CQ polling batch
size. There is no hard limitation for it, so raise it to maximum
CQ size.

This value can even exceed CQ size, because HW continue receiving
packets during polling.

Be default, this change doesn't have effect unless a higher value
for XLIO_CQ_POLL_BATCH_MAX is set explicitly. This can be helpful
in a scenario when a high traffic rate stops for a long time and
number of packets in an RQ exceeds the batch size.

Signed-off-by: Dmytro Podgornyi <dmytrop@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants