[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a208ed96-20e5-43d3-13e9-122776230da1@linux.dev>
Date: Fri, 27 Jan 2023 00:19:54 -0800
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: 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, toke@...hat.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,
sdf@...gle.com
Subject: Re: [PATCH v3 bpf-next 8/8] selftests/bpf: introduce XDP compliance
test tool
On 1/26/23 10:36 AM, sdf@...gle.com 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.
Powered by blists - more mailing lists