[2/3] Add CIBIR, XDP, and XSK maps support to the sample tools#5999
[2/3] Add CIBIR, XDP, and XSK maps support to the sample tools#5999ProjectsByJackHe wants to merge 19 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5999 +/- ##
==========================================
+ Coverage 84.97% 85.38% +0.41%
==========================================
Files 60 60
Lines 18792 18792
==========================================
+ Hits 15968 16046 +78
+ Misses 2824 2746 -78 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
It seems like a great idea to add those features in a sample. I have no problem with an incremental implementation. I'd consider having multiple samples instead, focused on demonstrating one way of using MsQuic, and avoid putting everything in a single one. A sample focused on XDP / CIBIR / XDP maps could be a nice unit. |
6322b35 to
542af1f
Compare
The new tools (quicxskmapcreator) require XdpMapCreate and XDP_MAP_TYPE_XSKMAP which are available in the newer XDP SDK. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ub.com/microsoft/msquic into jackhe/extend-sample-include-xdp-cibir
| add_subdirectory(etw) | ||
| add_subdirectory(recvfuzz) | ||
| add_subdirectory(quicxskmapcreator) | ||
| add_subdirectory(quicadvanced) |
There was a problem hiding this comment.
We can come up with a better name.
This sample is about using XDP with maps, and potentially CIBIR? Let's call it something with XDP in the name.
I'd also consider making a subfolder to contain both quicxskmapcreator and quicadvanced, since they are meant to work together.
|
|
||
| Usage: | ||
| 1. Start the QUIC server: | ||
| quicsample -server -cert_hash:<hash> -xdp -xdp_map_ifindex:<N> |
| printf("\n"); | ||
| printf("Press ENTER to detach the program and exit.\n"); | ||
| fflush(stdout); | ||
| (void)getchar(); |
There was a problem hiding this comment.
Is there a reason to wait? If this process is closed, the map stays open as long as the target process runs?
|
|
||
| Abstract: | ||
|
|
||
| Provides a very simple MsQuic API sample server and client application. |
There was a problem hiding this comment.
Please update this comment
| // QUIC_PARAM_GLOBAL_XDP_MAP_CONFIG must be set before LazyInitComplete. | ||
| // | ||
| #ifdef _WIN32 | ||
| if (GetFlag(argc, argv, "server") && GetFlag(argc, argv, "xdp")) { |
There was a problem hiding this comment.
Make this a helper function.
| } | ||
|
|
||
| void | ||
| WriteSslKeyLogFile( |
There was a problem hiding this comment.
We probably don't need this in the XDP sample
|
|
||
| printf("\n"); | ||
|
|
||
| if (MapMode) { |
There was a problem hiding this comment.
Please extract this in a helper.
This is boilerplate code that is not helpful to a reader to understand what they need to do to implement a connection, let's not have it in the way.
| MsQuic->ConnectionClose(Connection); | ||
| } | ||
| break; | ||
| case QUIC_CONNECTION_EVENT_RESUMPTION_TICKET_RECEIVED: |
There was a problem hiding this comment.
We probably don't need this in the xdp sample.
| const char* CibirIdHex = GetValue(argc, argv, "cibir_id"); | ||
| if (CibirIdHex != NULL) { | ||
| // | ||
| // CIBIR requires shared binding (so the connection uses source CIDs). |
There was a problem hiding this comment.
Are you sure of that? Wouldn't a client connection put the CIBIR id on the destination CID?
| #ifdef QUIC_API_ENABLE_PREVIEW_FEATURES | ||
|
|
||
| void | ||
| RunMultiClient( |
There was a problem hiding this comment.
Let's remove this, there is nothing XDP specific to it.
Description
Full E2E demo: DEMO
Adds 2 new sample tools to support changes in PR :
Testing
Local testing on a VM with XDP
Documentation
No