From: John Ousterhout <ouster@cs.stanford.edu>
To: "D. Wythe" <alibuda@linux.alibaba.com>
Cc: netdev@vger.kernel.org, linux-api@vger.kernel.org
Subject: Re: [PATCH net-next v2 11/12] net: homa: create homa_plumbing.c homa_utils.c
Date: Wed, 4 Dec 2024 11:54:59 -0800 [thread overview]
Message-ID: <CAGXJAmysiRx3VNDxXitPOn+yg2ck_+7fbd1XSsQQqZnwUEkvPQ@mail.gmail.com> (raw)
In-Reply-To: <07647363-622b-4023-ba71-da213754a7ae@linux.alibaba.com>
On Mon, Nov 25, 2024 at 9:32 PM D. Wythe <alibuda@linux.alibaba.com> wrote:
> On 11/12/24 7:40 AM, John Ousterhout wrote:
> > +static struct proto homav6_prot = {
> > ...
> > + .obj_size = sizeof(struct homa_sock) + sizeof(struct ipv6_pinfo),
>
> The implementation of inet6_sk_generic() has already changed, you should set
> .ipv6_pinfo_offset.
Fixed.
> > +static int __init homa_load(void)
> > ...
> > + inet_register_protosw(&homa_protosw);
> > + inet6_register_protosw(&homav6_protosw);
>
>
> better to check the retval of inet6_register_protosw().
Fixed.
> > +out_cleanup:
> > + homa_destroy(homa);
> > + inet_del_protocol(&homa_protocol, IPPROTO_HOMA);
> > + inet_unregister_protosw(&homa_protosw);
> > + inet6_del_protocol(&homav6_protocol, IPPROTO_HOMA);
> > + inet6_unregister_protosw(&homav6_protosw);
> > + proto_unregister(&homa_prot);
> > + proto_unregister(&homav6_prot);
>
>
> It's a bit strange for me that this relies on a premise: that every reverse operation can correctly
> identify whether the corresponding forward operation has been executed. Currently, perhaps every
> function includes this capability. It's up to you, I don't insist.
Actually, not all of the cleanup functions are safe if the initializer
hasn't been invoked; good catch. I've fixed this now.
> Perhaps you can try adding MODULE_ALIAS_NET_PF_PROTO_TYPE so that the kernel will automatically load
> the module when creating IPPROTO_HOMA socket. A functional suggestion, It's up to you.
Done; thanks for the suggestion (I wasn't aware of this feature).
> Is binding multiple times legal? For example, bind 80 first and then bind 8080. If not, I think
> you might need to check the inet_num.
Yes, it's legal.
> I noticed that homa_sock_init() contains a memory allocation action, perhaps you should add a return
> value check.
Oops; I've fixed this now.
Thanks for all the comments.
-John-
next prev parent reply other threads:[~2024-12-04 19:55 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-11 23:39 [PATCH net-next v2 00/12] Begin upstreaming Homa transport protocol John Ousterhout
2024-11-11 23:39 ` [PATCH net-next v2 01/12] net: homa: define user-visible API for Homa John Ousterhout
2024-11-11 23:39 ` [PATCH net-next v2 02/12] net: homa: define Homa packet formats John Ousterhout
2024-11-11 23:39 ` [PATCH net-next v2 03/12] net: homa: create shared Homa header files John Ousterhout
2024-11-11 23:39 ` [PATCH net-next v2 04/12] net: homa: create homa_pool.h and homa_pool.c John Ousterhout
2024-11-11 23:39 ` [PATCH net-next v2 05/12] net: homa: create homa_rpc.h and homa_rpc.c John Ousterhout
2024-11-11 23:39 ` [PATCH net-next v2 06/12] net: homa: create homa_peer.h and homa_peer.c John Ousterhout
2024-11-11 23:40 ` [PATCH net-next v2 07/12] net: homa: create homa_sock.h and homa_sock.c John Ousterhout
2024-11-11 23:40 ` [PATCH net-next v2 08/12] net: homa: create homa_incoming.c John Ousterhout
2024-11-11 23:40 ` [PATCH net-next v2 09/12] net: homa: create homa_outgoing.c John Ousterhout
2024-11-11 23:40 ` [PATCH net-next v2 10/12] net: homa: create homa_timer.c John Ousterhout
2024-11-11 23:40 ` [PATCH net-next v2 11/12] net: homa: create homa_plumbing.c homa_utils.c John Ousterhout
2024-11-26 5:32 ` D. Wythe
2024-12-04 19:54 ` John Ousterhout [this message]
2024-12-02 3:51 ` D. Wythe
2024-12-03 1:51 ` Andrew Lunn
2024-12-09 6:45 ` D. Wythe
2024-12-05 19:49 ` John Ousterhout
2024-12-09 6:56 ` D. Wythe
2024-12-09 16:53 ` John Ousterhout
2024-12-09 17:03 ` John Ousterhout
2024-12-10 5:14 ` D. Wythe
2024-12-10 5:50 ` John Ousterhout
2024-12-10 6:13 ` D. Wythe
2024-11-11 23:40 ` [PATCH net-next v2 12/12] net: homa: create Makefile and Kconfig John Ousterhout
2024-11-11 23:52 ` Randy Dunlap
2024-11-12 0:11 ` John Ousterhout
2024-11-12 9:36 ` kernel test robot
2024-11-12 9:36 ` kernel test robot
2024-11-12 11:32 ` kernel test robot
2024-11-13 13:52 ` kernel test robot
2024-11-18 21:23 ` John Ousterhout
2024-11-26 4:13 ` D. Wythe
2024-11-26 4:27 ` D. Wythe
2024-12-02 23:27 ` John Ousterhout
2024-11-12 0:15 ` [PATCH net-next v2 00/12] Begin upstreaming Homa transport protocol Joe Damato
2024-11-12 6:06 ` John Ousterhout
2024-11-13 1:48 ` Jakub Kicinski
2024-11-13 18:18 ` John Ousterhout
2024-11-13 17:07 ` Cong Wang
2024-11-14 16:59 ` John Ousterhout
2024-11-14 19:36 ` Randy Dunlap
2024-11-19 21:13 ` John Ousterhout
2024-11-22 21:42 ` Cong Wang
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=CAGXJAmysiRx3VNDxXitPOn+yg2ck_+7fbd1XSsQQqZnwUEkvPQ@mail.gmail.com \
--to=ouster@cs.stanford.edu \
--cc=alibuda@linux.alibaba.com \
--cc=linux-api@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).