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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On 1/26/23 10:36 AM, sdf@xxxxxxxxxx wrote:
> > 
> > > +    sockfd = socket(AF_INET, SOCK_DGRAM, 0);
> > > +    if (sockfd < 0) {
> > > +        fprintf(stderr, "Failed to create echo socket\n");
> > > +        return -errno;
> > > +    }
> > > +
> > > +    err = setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &optval,
> > > +             sizeof(optval));
> > > +    if (err < 0) {
> > > +        fprintf(stderr, "Failed sockopt on echo socket\n");
> > > +        return -errno;
> > > +    }
> > > +
> > > +    err = bind(sockfd, (struct sockaddr *)&addr, sizeof(addr));
> > > +    if (err) {
> > > +        fprintf(stderr, "Failed to bind echo socket\n");
> > > +        return -errno;
> > > +    }
> > 
> > IIRC, Martin mentioned IPv6 support in the previous version. Should we
> > also make the userspace v6 aware by at least using AF_INET6 dualstack
> > sockets? I feel like listening on inaddr_any with AF_INET6 should
> > get us there without too much pain..
> 
> Yeah. Think about host that only has IPv6 address. A tool not supporting
> IPv6 is a no-go nowadays.

ack, I will add it in v4.

Regards,
Lorenzo

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux