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

issue: 3623390 Implementing DOCA Flow steering creation #150

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

Conversation

AlexanderGrissik
Copy link
Collaborator

Description

Adds RX steering through DOCA and enables receiving first packets with multi process application.
This PR is based on PR 138.
This PR requires DOCA 2.7, commit <17ad5454c600b487bb5e7b63b5d406f196f48922 ([devtools]: fix error in binary compatibility script)> with the attached patch.
0001-TEMP-Enable-Multiprocess-DPDK.patch

What
  1. Adds Steering through DOCA
  2. Adds DOCA RXQ creation/destruction and initial usage
  3. Enables fork() to work with DOCA/DPDK for Nginx
Why ?

DOCA integration

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)

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>
@AlexanderGrissik AlexanderGrissik force-pushed the doca_tcp_steering branch 2 times, most recently from 75069a6 to b78d0b5 Compare May 29, 2024 08:29
AlexanderGrissik and others added 6 commits May 30, 2024 07:46
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>
hwqrx_logerr("DOCA RXQ CPU-path REGULAR-type is not supported");
return false;
}
hwqrx_loginfo("RXQ caps MaxBurstSize %u, MaxPacketSize %u, Dev:%s", max_burst_size,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remember to make it log debug, and not info sometime in the future PRs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. We will revisit all the info logs one we have a more stable version. Now it is convenient for debugging on initial stages of DOCA integration.

@@ -2005,6 +2005,13 @@ void mce_sys_var::get_env_params()

void set_env_params()
{
#if defined(DEFINED_NGINX)
// We must not call setenv for Nginx master process.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it only for doca branch?
Is it permanent? or will be removed later?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently it is only for DOCA. But looks like it is needed also for regular XLIO. Today it seems to work by luck in regular XLIO.

@@ -799,7 +799,7 @@ extern mce_sys_var &safe_mce_sys();
#define MCE_DEFAULT_CQ_AIM_MAX_PERIOD_USEC (250)
#define MCE_DEFAULT_CQ_AIM_INTERVAL_MSEC (250)
#define MCE_DEFAULT_CQ_AIM_INTERRUPTS_RATE_PER_SEC (5000)
#define MCE_DEFAULT_CQ_POLL_BATCH (16)
#define MCE_DEFAULT_CQ_POLL_BATCH (128)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to change it at this point?

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

2 participants