From: Paolo Abeni <pabeni@redhat.com>
To: zhenwei pi <pizhenwei@bytedance.com>,
Geliang Tang <geliang@kernel.org>,
linux-kernel@vger.kernel.org, mptcp@lists.linux.dev,
linux-kselftest@vger.kernel.org, netdev@vger.kernel.org
Cc: matttbe@kernel.org, martineau@kernel.org,
viktor.soderqvist@est.tech, zhenwei pi <zhenwei.pi@linux.dev>
Subject: Re: [PATCH] selftests: mptcp: add comment for getaddrinfo
Date: Tue, 8 Apr 2025 12:57:07 +0200 [thread overview]
Message-ID: <c4b1219d-a42d-4339-93aa-89987cc6ad2f@redhat.com> (raw)
In-Reply-To: <0de20ab7-9f1c-4a13-a8d2-295f94161c4e@bytedance.com>
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
prev parent reply other threads:[~2025-04-08 10:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 8:51 zhenwei pi
2025-04-08 1:43 ` Geliang Tang
2025-04-08 3:09 ` zhenwei pi
2025-04-08 10:57 ` Paolo Abeni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c4b1219d-a42d-4339-93aa-89987cc6ad2f@redhat.com \
--to=pabeni@redhat.com \
--cc=geliang@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martineau@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pizhenwei@bytedance.com \
--cc=viktor.soderqvist@est.tech \
--cc=zhenwei.pi@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®