Skip to content

Commit 85585b4

Browse files
minakuba-moo
authored andcommitted
selftests: add ncdevmem, netcat for devmem TCP
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]>
1 parent 09d1db2 commit 85585b4

File tree

4 files changed

+581
-0
lines changed

4 files changed

+581
-0
lines changed

tools/net/ynl/lib/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
__pycache__/
2+
*.d

tools/testing/selftests/net/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ipv6_flowlabel
1717
ipv6_flowlabel_mgr
1818
log.txt
1919
msg_zerocopy
20+
ncdevmem
2021
nettest
2122
psock_fanout
2223
psock_snd

tools/testing/selftests/net/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ TEST_PROGS += fq_band_pktlimit.sh
9797
TEST_PROGS += vlan_hw_filter.sh
9898
TEST_PROGS += bpf_offload.py
9999

100+
# YNL files, must be before "include ..lib.mk"
101+
EXTRA_CLEAN += $(OUTPUT)/libynl.a
102+
YNL_GEN_FILES := ncdevmem
103+
TEST_GEN_FILES += $(YNL_GEN_FILES)
104+
100105
TEST_FILES := settings
101106
TEST_FILES += in_netns.sh lib.sh net_helper.sh setup_loopback.sh setup_veth.sh
102107

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

107112
include ../lib.mk
108113

114+
# YNL build
115+
YNL_GENS := netdev
116+
include ynl.mk
117+
109118
$(OUTPUT)/epoll_busy_poll: LDLIBS += -lcap
110119
$(OUTPUT)/reuseport_bpf_numa: LDLIBS += -lnuma
111120
$(OUTPUT)/tcp_mmap: LDLIBS += -lpthread -lcrypto

0 commit comments

Comments
 (0)