Thread (21 messages) 21 messages, 5 authors, 2023-01-28

Re: [PATCH v3 bpf-next 8/8] selftests/bpf: introduce XDP compliance test tool

From: Toke Høiland-Jørgensen <hidden>
Date: 2023-01-27 17:54:01
Also in: bpf, intel-wired-lan

Stanislav Fomichev [off-list ref] writes:
quoted
quoted
quoted
+
+   ctrl_sockfd = accept(sockfd, (struct sockaddr *)&ctrl_addr, &len);
+   if (ctrl_sockfd < 0) {
+           fprintf(stderr, "Failed to accept connection on DUT socket\n");
+           close(sockfd);
+           return -errno;
+   }
+
[...]
quoted
There is also connect_to_fd, maybe we can use that? It should take
care of the timeouts.. (requires plumbing server_fd, not sure whether
it's a problem or not)
please correct me if I am wrong, but in order to have server_fd it is mandatory
both tester and DUT are running on the same process, right? Here, I guess 99% of
the times DUT and tester will run on two separated devices. Agree?
Yes, it's targeting more the case where you have a server fd and a
bunch of clients in the same process. But I think it's still usable in
your case, you're not using fork() anywhere afaict, so even if these
are separate devices, connect_to_fd should still work. (unless I'm
missing something, haven't looked too closely)
Just to add a bit of context here, "separate devices" can refer to the
hosts as well as the netdevs. I.e., it should also be possible to run
this in a mode where the client bit runs on a different physical machine
than the server bit (as it will not be feasible in any case to connect
things with loopback cables).

-Toke
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help