-
Notifications
You must be signed in to change notification settings - Fork 120
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
Adding Doca Communication Channel API #190
Open
EldarShalev
wants to merge
2
commits into
Mellanox:sockperf_v2
Choose a base branch
from
EldarShalev:doca_comm_channel
base: sockperf_v2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,6 +157,11 @@ typedef unsigned short int sa_family_t; | |
#endif // USING_XLIO_EXTRA_API | ||
#endif // !defined(__windows__) && !defined(__FreeBSD__) && !defined(__APPLE__) | ||
|
||
#ifdef USING_DOCA_COMM_CHANNEL_API | ||
#include "doca_cc_helper.h" | ||
#pragma clang diagnostic ignored "-Wdeprecated-declarations" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will remove it, only for compilation purpose |
||
#endif /* USING_DOCA_COMM_CHANNEL_API */ | ||
|
||
#define MIN_PAYLOAD_SIZE (MsgHeader::EFFECTIVE_SIZE) | ||
extern int MAX_PAYLOAD_SIZE; | ||
extern int max_fds_num; | ||
|
@@ -291,8 +296,15 @@ enum { | |
OPT_LOAD_XLIO, // 47 | ||
OPT_TCP_NB_CONN_TIMEOUT_MS, // 48 | ||
#if defined(DEFINED_TLS) | ||
OPT_TLS | ||
OPT_TLS, | ||
#endif /* DEFINED_TLS */ | ||
#if defined(USING_DOCA_COMM_CHANNEL_API) | ||
OPT_DOCA, | ||
OPT_PCI, | ||
OPT_PCI_REP, | ||
OPT_DOCA_FAST_PATH | ||
#endif /* USING_DOCA_COMM_CHANNEL_API */ | ||
|
||
}; | ||
|
||
static const char *const round_trip_str[] = { "latency", "rtt" }; | ||
|
@@ -571,6 +583,9 @@ struct fds_data { | |
#if defined(DEFINED_TLS) | ||
void *tls_handle = nullptr; | ||
#endif /* DEFINED_TLS */ | ||
#if defined(USING_DOCA_COMM_CHANNEL_API) | ||
struct cc_ctx *doca_cc_ctx = nullptr; | ||
#endif /* USING_DOCA_COMM_CHANNEL_API */ | ||
|
||
fds_data() | ||
{ | ||
|
@@ -804,6 +819,14 @@ struct user_params_t { | |
#if defined(DEFINED_TLS) | ||
bool tls = false; | ||
#endif /* DEFINED_TLS */ | ||
#if defined(USING_DOCA_COMM_CHANNEL_API) | ||
bool doca_comm_channel = false; /* Flag to indicate using Com Channel*/ | ||
bool doca_cc_fifo = false; /* Flag to indicate using fast path*/ | ||
char cc_dev_pci_addr[PCI_ADDR_LEN]; /* Comm Channel DOCA device PCI address */ | ||
char cc_dev_rep_pci_addr[PCI_ADDR_LEN]; /* Comm Channel DOCA device representor PCI address */ | ||
struct doca_pe *pe = nullptr; /* Progress engine for doca, one per thread*/ | ||
struct doca_pe *pe_underload = nullptr; /* Progress engine for doca, one per thread, underload mode */ | ||
#endif /* USING_DOCA_COMM_CHANNEL_API */ | ||
|
||
user_params_t() { | ||
memset(&client_bind_info, 0, sizeof(client_bind_info)); | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to use AC_ARG_WITH here to allow specifying alternative library installation path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pay attention that DOCA should not be configured at the same time with
--with-tls
. See https://github.com/Mellanox/sockperf/blob/sockperf_v2/config/m4/tls.m4#L10Look at potential issue in this case: https://github.com/Mellanox/sockperf/pull/190/files#diff-649a0b286b520f22da501867c812f1acbc760fe028ea70edb14b60672ba7c716R116