* [PATCH] selftests: mptcp: add comment for getaddrinfo
@ 2025-04-07 8:51 zhenwei pi
2025-04-07 10:10 ` MPTCP CI
2025-04-08 1:43 ` Geliang Tang
0 siblings, 2 replies; 5+ messages in thread
From: zhenwei pi @ 2025-04-07 8:51 UTC (permalink / raw)
To: linux-kernel, mptcp, linux-kselftest, netdev
Cc: matttbe, martineau, geliang, viktor.soderqvist, zhenwei pi,
zhenwei pi
mptcp_connect.c is a startup tutorial of MPTCP programming, however
there is a lack of ai_protocol(IPPROTO_MPTCP) usage. Add comment for
getaddrinfo MPTCP support.
Signed-off-by: zhenwei pi <zhenwei.pi@linux.dev>
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
---
tools/testing/selftests/net/mptcp/mptcp_connect.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
index c83a8b47bbdf..6b9031273964 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
@@ -179,6 +179,18 @@ static void xgetnameinfo(const struct sockaddr *addr, socklen_t addrlen,
}
}
+/* There is a lack of MPTCP support from glibc, these code leads error:
+ * struct addrinfo hints = {
+ * .ai_protocol = IPPROTO_MPTCP,
+ * ...
+ * };
+ * err = getaddrinfo(node, service, &hints, res);
+ * ...
+ * So using IPPROTO_TCP to resolve, and use TCP/MPTCP to create socket.
+ *
+ * glibc starts to support MPTCP since v2.42.
+ * Link: https://sourceware.org/git/?p=glibc.git;a=commit;h=a8e9022e0f82
+ */
static void xgetaddrinfo(const char *node, const char *service,
const struct addrinfo *hints,
struct addrinfo **res)
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] selftests: mptcp: add comment for getaddrinfo
2025-04-07 8:51 [PATCH] selftests: mptcp: add comment for getaddrinfo zhenwei pi
@ 2025-04-07 10:10 ` MPTCP CI
2025-04-08 1:43 ` Geliang Tang
1 sibling, 0 replies; 5+ messages in thread
From: MPTCP CI @ 2025-04-07 10:10 UTC (permalink / raw)
To: zhenwei pi; +Cc: mptcp
Hi zhenwei,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Unstable: 1 failed test(s): bpftest_test_progs-no_alu32_mptcp 🔴
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/14305331599
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/39e4cffd418a
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=950432
If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-normal
For more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] selftests: mptcp: add comment for getaddrinfo
2025-04-07 8:51 [PATCH] selftests: mptcp: add comment for getaddrinfo zhenwei pi
2025-04-07 10:10 ` MPTCP CI
@ 2025-04-08 1:43 ` Geliang Tang
2025-04-08 3:09 ` zhenwei pi
1 sibling, 1 reply; 5+ messages in thread
From: Geliang Tang @ 2025-04-08 1:43 UTC (permalink / raw)
To: zhenwei pi, linux-kernel, mptcp, linux-kselftest, netdev
Cc: matttbe, martineau, viktor.soderqvist, zhenwei pi
Hi zhenwei,
On Mon, 2025-04-07 at 16:51 +0800, zhenwei pi wrote:
> mptcp_connect.c is a startup tutorial of MPTCP programming, however
> there is a lack of ai_protocol(IPPROTO_MPTCP) usage. Add comment for
> getaddrinfo MPTCP support.
>
> Signed-off-by: zhenwei pi <zhenwei.pi@linux.dev>
> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
> ---
> tools/testing/selftests/net/mptcp/mptcp_connect.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c
> b/tools/testing/selftests/net/mptcp/mptcp_connect.c
> index c83a8b47bbdf..6b9031273964 100644
> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
> @@ -179,6 +179,18 @@ static void xgetnameinfo(const struct sockaddr
> *addr, socklen_t addrlen,
> }
> }
>
> +/* There is a lack of MPTCP support from glibc, these code leads
> error:
> + * struct addrinfo hints = {
> + * .ai_protocol = IPPROTO_MPTCP,
> + * ...
> + * };
> + * err = getaddrinfo(node, service, &hints, res);
> + * ...
> + * So using IPPROTO_TCP to resolve, and use TCP/MPTCP to create
> socket.
> + *
> + * glibc starts to support MPTCP since v2.42.
> + * Link:
> https://sourceware.org/git/?p=glibc.git;a=commit;h=a8e9022e0f82
Thanks for adding getaddrinfo mptcp support to glibc. I think we should
not only add a comment for getaddrinfo mptcp here, but also add an
example of using it in mptcp_connect.c. I will work with you to
implement this example in v2.
Thanks,
-Geliang
> + */
> static void xgetaddrinfo(const char *node, const char *service,
> const struct addrinfo *hints,
> struct addrinfo **res)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: [PATCH] selftests: mptcp: add comment for getaddrinfo
2025-04-08 1:43 ` Geliang Tang
@ 2025-04-08 3:09 ` zhenwei pi
2025-04-08 10:57 ` Paolo Abeni
0 siblings, 1 reply; 5+ messages in thread
From: zhenwei pi @ 2025-04-08 3:09 UTC (permalink / raw)
To: Geliang Tang, linux-kernel, mptcp, linux-kselftest, netdev
Cc: matttbe, martineau, viktor.soderqvist, zhenwei pi
On 4/8/25 09:43, Geliang Tang wrote:
> Hi zhenwei,
>
> On Mon, 2025-04-07 at 16:51 +0800, zhenwei pi wrote:
>> mptcp_connect.c is a startup tutorial of MPTCP programming, however
>> there is a lack of ai_protocol(IPPROTO_MPTCP) usage. Add comment for
>> getaddrinfo MPTCP support.
>>
>> Signed-off-by: zhenwei pi <zhenwei.pi@linux.dev>
>> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
>> ---
>> tools/testing/selftests/net/mptcp/mptcp_connect.c | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c
>> b/tools/testing/selftests/net/mptcp/mptcp_connect.c
>> index c83a8b47bbdf..6b9031273964 100644
>> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
>> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
>> @@ -179,6 +179,18 @@ static void xgetnameinfo(const struct sockaddr
>> *addr, socklen_t addrlen,
>> }
>> }
>>
>> +/* There is a lack of MPTCP support from glibc, these code leads
>> error:
>> + * struct addrinfo hints = {
>> + * .ai_protocol = IPPROTO_MPTCP,
>> + * ...
>> + * };
>> + * err = getaddrinfo(node, service, &hints, res);
>> + * ...
>> + * So using IPPROTO_TCP to resolve, and use TCP/MPTCP to create
>> socket.
>> + *
>> + * glibc starts to support MPTCP since v2.42.
>> + * Link:
>> https://sourceware.org/git/?p=glibc.git;a=commit;h=a8e9022e0f82
>
> Thanks for adding getaddrinfo mptcp support to glibc. I think we should
> not only add a comment for getaddrinfo mptcp here, but also add an
> example of using it in mptcp_connect.c. I will work with you to
> implement this example in v2.
>
> Thanks,
> -Geliang
>
Good idea, thank you Geliang!
>> + */
>> static void xgetaddrinfo(const char *node, const char *service,
>> const struct addrinfo *hints,
>> struct addrinfo **res)
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] selftests: mptcp: add comment for getaddrinfo
2025-04-08 3:09 ` zhenwei pi
@ 2025-04-08 10:57 ` Paolo Abeni
0 siblings, 0 replies; 5+ messages in thread
From: Paolo Abeni @ 2025-04-08 10:57 UTC (permalink / raw)
To: zhenwei pi, Geliang Tang, linux-kernel, mptcp, linux-kselftest,
netdev
Cc: matttbe, martineau, viktor.soderqvist, zhenwei pi
On 4/8/25 5:09 AM, zhenwei pi wrote:
> On 4/8/25 09:43, Geliang Tang wrote:
>> On Mon, 2025-04-07 at 16:51 +0800, zhenwei pi wrote:
>>> mptcp_connect.c is a startup tutorial of MPTCP programming, however
>>> there is a lack of ai_protocol(IPPROTO_MPTCP) usage. Add comment for
>>> getaddrinfo MPTCP support.
>>>
>>> Signed-off-by: zhenwei pi <zhenwei.pi@linux.dev>
>>> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
>>> ---
>>> tools/testing/selftests/net/mptcp/mptcp_connect.c | 12 ++++++++++++
>>> 1 file changed, 12 insertions(+)
>>>
>>> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c
>>> b/tools/testing/selftests/net/mptcp/mptcp_connect.c
>>> index c83a8b47bbdf..6b9031273964 100644
>>> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
>>> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
>>> @@ -179,6 +179,18 @@ static void xgetnameinfo(const struct sockaddr
>>> *addr, socklen_t addrlen,
>>> }
>>> }
>>>
>>> +/* There is a lack of MPTCP support from glibc, these code leads
>>> error:
>>> + * struct addrinfo hints = {
>>> + * .ai_protocol = IPPROTO_MPTCP,
>>> + * ...
>>> + * };
>>> + * err = getaddrinfo(node, service, &hints, res);
>>> + * ...
>>> + * So using IPPROTO_TCP to resolve, and use TCP/MPTCP to create
>>> socket.
>>> + *
>>> + * glibc starts to support MPTCP since v2.42.
>>> + * Link:
>>> https://sourceware.org/git/?p=glibc.git;a=commit;h=a8e9022e0f82
>>
>> Thanks for adding getaddrinfo mptcp support to glibc. I think we should
>> not only add a comment for getaddrinfo mptcp here, but also add an
>> example of using it in mptcp_connect.c. I will work with you to
>> implement this example in v2.
While at that, please also clean-up the tag area: only a single SoB is
required. If you submit using a different mail address WRT the SoB tag,
you should add a 'From: ' header. See
Documentation/process/submitting-patches.rst for the details.
Thanks,
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-08 10:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07 8:51 [PATCH] selftests: mptcp: add comment for getaddrinfo zhenwei pi
2025-04-07 10:10 ` MPTCP CI
2025-04-08 1:43 ` Geliang Tang
2025-04-08 3:09 ` zhenwei pi
2025-04-08 10:57 ` Paolo Abeni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.