Skip to content

Commit

Permalink
selftests: add ncdevmem, netcat for devmem TCP
Browse files Browse the repository at this point in the history
ncdevmem is a devmem TCP netcat. It works similarly to netcat, but it
sends and receives data using the devmem TCP APIs. It uses udmabuf as
the dmabuf provider. It is compatible with a regular netcat running on
a peer, or a ncdevmem running on a peer.

In addition to normal netcat support, ncdevmem has a validation mode,
where it sends a specific pattern and validates this pattern on the
receiver side to ensure data integrity.

Suggested-by: Stanislav Fomichev <[email protected]>
Signed-off-by: Mina Almasry <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
mina authored and kuba-moo committed Sep 12, 2024
1 parent 09d1db2 commit 85585b4
Show file tree
Hide file tree
Showing 4 changed files with 581 additions and 0 deletions.
1 change: 1 addition & 0 deletions tools/net/ynl/lib/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
__pycache__/
*.d
1 change: 1 addition & 0 deletions tools/testing/selftests/net/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ipv6_flowlabel
ipv6_flowlabel_mgr
log.txt
msg_zerocopy
ncdevmem
nettest
psock_fanout
psock_snd
Expand Down
9 changes: 9 additions & 0 deletions tools/testing/selftests/net/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ TEST_PROGS += fq_band_pktlimit.sh
TEST_PROGS += vlan_hw_filter.sh
TEST_PROGS += bpf_offload.py

# YNL files, must be before "include ..lib.mk"
EXTRA_CLEAN += $(OUTPUT)/libynl.a
YNL_GEN_FILES := ncdevmem
TEST_GEN_FILES += $(YNL_GEN_FILES)

TEST_FILES := settings
TEST_FILES += in_netns.sh lib.sh net_helper.sh setup_loopback.sh setup_veth.sh

Expand All @@ -106,6 +111,10 @@ TEST_INCLUDES := forwarding/lib.sh

include ../lib.mk

# YNL build
YNL_GENS := netdev
include ynl.mk

$(OUTPUT)/epoll_busy_poll: LDLIBS += -lcap
$(OUTPUT)/reuseport_bpf_numa: LDLIBS += -lnuma
$(OUTPUT)/tcp_mmap: LDLIBS += -lpthread -lcrypto
Expand Down
Loading

0 comments on commit 85585b4

Please sign in to comment.