lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKH8qBsiPNdcPf-20+kKJDpPjLOs=CTvVcNPMAdebJZPQad_qw@mail.gmail.com>
Date:   Fri, 27 Jan 2023 09:59:42 -0800
From:   Stanislav Fomichev <sdf@...gle.com>
To:     Lorenzo Bianconi <lorenzo@...nel.org>
Cc:     Toke Høiland-Jørgensen <toke@...hat.com>,
        bpf@...r.kernel.org, netdev@...r.kernel.org, ast@...nel.org,
        daniel@...earbox.net, andrii@...nel.org, davem@...emloft.net,
        kuba@...nel.org, hawk@...nel.org, pabeni@...hat.com,
        edumazet@...gle.com, memxor@...il.com, alardam@...il.com,
        saeedm@...dia.com, anthony.l.nguyen@...el.com, gospo@...adcom.com,
        vladimir.oltean@....com, nbd@....name, john@...ozen.org,
        leon@...nel.org, simon.horman@...igine.com, aelior@...vell.com,
        christophe.jaillet@...adoo.fr, ecree.xilinx@...il.com,
        mst@...hat.com, bjorn@...nel.org, magnus.karlsson@...el.com,
        maciej.fijalkowski@...el.com, intel-wired-lan@...ts.osuosl.org,
        lorenzo.bianconi@...hat.com, martin.lau@...ux.dev
Subject: Re: [PATCH v3 bpf-next 8/8] selftests/bpf: introduce XDP compliance
 test tool

On Fri, Jan 27, 2023 at 9:58 AM Lorenzo Bianconi <lorenzo@...nel.org> wrote:
>
> On Jan 27, Toke wrote:
> > Stanislav Fomichev <sdf@...gle.com> writes:
> >
> > >> > > +
> > >> > > +   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;
> > >> > > +   }
> > >> > > +
> > >>
> > >> [...]
> > >>
> > >> >
> > >> > 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).
>
> yes, this is what I meant with 'DUT and tester will run on two separated
> devices' (sorry to have not been so clear). Looking at the code server_fd
> is always obtained from start_server(), while here the client on the tester
> just knows the IPv4/IPv6 address and the port of the server running on the DUT.

Ah, in this case yeah, definitely, connect_to_fd can't be applied
here, ignore me.
Thanks for clarifying! In this case let's just make the tool dualstack aware.

> Regards,
> Lorenzo
>
> >
> > -Toke
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ