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

tcpdirect support #41

Open
wants to merge 82 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
9abda64
tcpdirect initial commit
gfantom Aug 23, 2023
1ceae04
tcpdirect: discard frags and bind cuda rx bufs
gfantom Aug 25, 2023
15b5cee
tcpd: create page pool for host
gfantom Sep 12, 2023
82737ea
tcpd: create page_pool for cuda host
gfantom Sep 12, 2023
23cb22a
tcpd: specify link to use with cuda tcpdirect
gfantom Sep 12, 2023
342846f
tcpd: add multi_neper.py
gfantom Sep 14, 2023
d70af00
tcpd-multi:print throughputs of each link
gfantom Sep 14, 2023
cebb661
tcpd: force device index when allocating CUDA bufs
gfantom Sep 15, 2023
67e41db
tcpd: attempt at some basic data validation
gfantom Sep 19, 2023
d05bfb5
tcpd: toggle header-split on Rx
gfantom Sep 19, 2023
8fd9b35
tcpd: toggle header-split
gfantom Sep 20, 2023
6277841
tcpd: minor fix
gfantom Sep 20, 2023
032b6f7
tcpd: allocate gpu buffer earlier
gfantom Sep 20, 2023
4fb36d3
tcpd: fill client cuda buf with a char earlier
gfantom Sep 20, 2023
5398c56
tcpd: install flow-steer after cudaMalloc
gfantom Sep 20, 2023
0b1feef
tcpd: reset device state before running neper
gfantom Sep 20, 2023
1f61d4d
tcpd: minor changes
gfantom Sep 21, 2023
51292ba
tcpd: change default neper-dir to .
gfantom Sep 21, 2023
94f61d9
tcpd: don't hardcode eth1, change every dev's port
gfantom Sep 21, 2023
1d4662c
tcpd: add queue_start and queue_num flags
gfantom Sep 21, 2023
ac0203b
tcpd: use tcpdirect properly on Tx
gfantom Sep 22, 2023
a1f6bc8
tcpd: don't print out each frag received
gfantom Sep 22, 2023
af783cf
fill tx cuda buffer with [1-111] repeating
gfantom Oct 2, 2023
8e11a8c
adding rx-buffer-cpy and rx-data-validation
gfantom Oct 3, 2023
a8d203e
copy each fragment to cp_buffer
gfantom Oct 3, 2023
fb78051
keep track of bytes_sent for tcpdirect Tx
gfantom Oct 4, 2023
8665354
co-opt num_ports option for flow-steer compat
gfantom Oct 5, 2023
1ed0f55
fixing segfault
gfantom Oct 5, 2023
c36aa25
clean up Makefile and build target
gfantom Oct 10, 2023
7087697
rx-copy using block/thread CUDA programming
gfantom Oct 12, 2023
b44fef3
change WITH_TCPDIRECT to WITH_TCPDEVMEM
gfantom Oct 12, 2023
5366563
tcpdirect filename to tcpdevmem filename
gfantom Oct 12, 2023
b717eff
UDMAbuf support, splitting cuda/udma into diff files
gfantom Oct 25, 2023
70923a6
remove comment block & extraneous macros
gfantom Oct 25, 2023
d8c9098
removing udma-related printfs
gfantom Oct 25, 2023
54808d7
temporary workaround for malformed devmemvecs
gfantom Oct 27, 2023
bba962b
Initial Dockerfile
gfantom Oct 27, 2023
51fe161
add run_neper script to use with Docker container
gfantom Oct 31, 2023
452e947
tcpd: build UDMA tcp_stream -static
gfantom Nov 23, 2023
1afbd7f
tcpdevmem: build CUDA-version image on workstation
gfantom Dec 20, 2023
ce1120d
tcpd: UDMA reference usr/include folder
gfantom Dec 22, 2023
8f18373
tcpd: add tcpdevmem README
gfantom Jan 2, 2024
fee98c2
tcpd: refining tcpdevmem readme file
gfantom Jan 2, 2024
fc6e017
tcpd: readme minor changes according to comments
gfantom Jan 2, 2024
262a313
tcpd: short-lived container
gfantom Jan 3, 2024
d1c385a
Merge pull request #46 from google/build_cuda_on_workstation
gfantom Jan 4, 2024
5735fe7
increase msg_control buffer size
gfantom Feb 9, 2024
c228fae
Merge pull request #52 from google/fix_devmemvec_workaround
gfantom Feb 12, 2024
712f0ad
driver reset in neper binary, not multi_neper.py
gfantom Feb 12, 2024
2852410
catch driver_reset return value and log
gfantom Feb 12, 2024
9d340ad
Merge pull request #53 from google/tcpdevmem_driver_reset_in_neper
gfantom Feb 28, 2024
e8ae584
update readme, default image under stable
gfantom Feb 28, 2024
7928b69
Merge pull request #57 from google/stable_vs_dev_build
gfantom Mar 5, 2024
9e3ee46
various code quality improvements
gfantom Mar 14, 2024
a036a16
Merge pull request #58 from google/tcpd_git_comments
gfantom Apr 3, 2024
1c1ef8d
manually override kernel hdrs dir when making
gfantom Apr 9, 2024
448b4fb
Merge pull request #61 from google/tcpd_git_comments
gfantom Apr 9, 2024
8d119b9
avoid collision with existing Dockerfile in main branch
gfantom Apr 9, 2024
9793ada
update tcpdevmem README to specify correct Dockerfile
gfantom Apr 9, 2024
d017626
Merge pull request #62 from google/tcpd_git_comments
gfantom Apr 10, 2024
38c6c2f
neper: support 64 bit for pacing, also allowed on server
luigirizzo Nov 29, 2023
c4ba1ff
neper: new option --iostat-ms N prints io statistics periodically
luigirizzo Nov 30, 2023
a27d552
neper: use one socket per flow in bidirectional stream mode
Nov 30, 2023
8c5f1cb
explicit cast from sockaddr_{in,in6} to sockaddr
gfantom Dec 12, 2023
fbd2fb5
use neper in a container image
aojea Jan 6, 2024
3606589
numlist: remove unused component
Jan 5, 2024
60b0af7
rr: remove incorrect division by MILLION csv printing
Jan 4, 2024
b3007ef
histo: de-virtualize histogram methods. No functional change.
Jan 4, 2024
f48bb72
histo: replace threshold table with faster bit-based logarithms
Jan 4, 2024
da65b51
histograms: allow arbitrary percentiles
Jan 4, 2024
9f72daa
histo: only scan necessary buckets when computing percentiles
Jan 4, 2024
521cd24
snaps: de-virtualize methods. No functional change.
Jan 5, 2024
06cf175
neper: new option --wait-start to delay starting client data flows
semkait Feb 8, 2024
8b2f1ba
fixing minor lint complaints regarding imports
gfantom Feb 21, 2024
fc67937
[Fix] Prevent skipping the last latency percentile list argument
Biggy54321 Mar 17, 2024
79eaf56
Reduce # of snapshots captured on stream client
gfantom Feb 21, 2024
cc96940
include header, brief changelog to README
gfantom Feb 21, 2024
54f1e0b
Merge remote-tracking branch 'origin/master' into tcpd
gfantom Apr 15, 2024
a32203b
addressing pull request comments
gfantom Apr 18, 2024
f2849c2
Merge pull request #63 from google/tcpd_git_comments
gfantom Apr 18, 2024
e92168c
Add tcpdevmem README
gfantom Jun 25, 2024
5714163
Merge pull request #65 from google/lint_tidy
gfantom Sep 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions tcpdirect.cu
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this commit removing a lot of code? If so, why?

Copy link
Collaborator

Choose a reason for hiding this comment

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

commenting out code is not very clean. Either it's needed, or needs to be removed?

Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,12 @@ int tcpdirect_cuda_setup_alloc(const struct options *opts, void **f_mbuf, struct
alloc_size += GPUMEM_ALIGNMENT - (alloc_size % GPUMEM_ALIGNMENT);
}

ret = cudaSetDevice(opts->tcpdirect_gpu_idx);
if (ret != 0) {
printf("cudaSetDevice failed: index %i", opts->tcpdirect_gpu_idx);
exit(70);
}
// unnecessary if CUDA_VISIBLE_DEVICES env var is set
gfantom marked this conversation as resolved.
Show resolved Hide resolved
// ret = cudaSetDevice(opts->tcpdirect_gpu_idx);
// if (ret != 0) {
// printf("cudaSetDevice failed: index %i", opts->tcpdirect_gpu_idx);
// exit(70);
// }

cudaMalloc(&gpu_tx_mem_, alloc_size);
unsigned int flag = 1;
Expand All @@ -216,6 +217,7 @@ int tcpdirect_cuda_setup_alloc(const struct options *opts, void **f_mbuf, struct
if (!is_client) {
/* TODO hardcoded num_queues */
int num_queues = 15;
printf("Bind to queue %i\n", num_queues);
struct dma_buf_pages_bind_rx_queue bind_cmd;

strcpy(bind_cmd.ifname, opts->tcpdirect_link_name);
Expand Down Expand Up @@ -330,6 +332,12 @@ int udmabuf_setup_alloc(const struct options *opts, void **f_mbuf) {
num_queues);
exit(78);
}

system("ethtool --set-priv-flags eth1 enable-header-split on");
system("ethtool --set-priv-flags eth1 enable-header-split off");
system("ethtool --set-priv-flags eth1 enable-header-split on");
sleep(1);
printf("toggled header-split\n");
}

struct dma_buf_sync sync = { 0 };
Expand Down