[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1ec74f2a-3a63-4093-bea8-64d3d196eac6@lunn.ch>
Date: Wed, 30 Oct 2024 02:13:25 +0100
From: Andrew Lunn <andrew@...n.ch>
To: John Ousterhout <ouster@...stanford.edu>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next 08/12] net: homa: create homa_incoming.c
> +int homa_copy_to_user(struct homa_rpc *rpc)
> +{
> +#ifdef __UNIT_TEST__
> +#define MAX_SKBS 3
> +#else
> +#define MAX_SKBS 20
> +#endif
I see you have dropped most of your unit test code. I would remove
this all well. I suspect your unit test code is going to result in a
lot of discussion. So i think you want to remove it all.
> +struct homa_rpc *homa_wait_for_message(struct homa_sock *hsk, int flags,
> + __u64 id)
> +{
> + int error;
> + struct homa_rpc *result = NULL;
> + struct homa_interest interest;
> + struct homa_rpc *rpc = NULL;
> +
> + /* Each iteration of this loop finds an RPC, but it might not be
> + * in a state where we can return it (e.g., there might be packets
> + * ready to transfer to user space, but the incoming message isn't yet
> + * complete). Thus it could take many iterations of this loop
> + * before we have an RPC with a complete message.
> + */
> + while (1) {
> + error = homa_register_interests(&interest, hsk, flags, id);
> + rpc = (struct homa_rpc *)atomic_long_read(&interest.ready_rpc);
> + if (rpc)
> + goto found_rpc;
> + if (error < 0) {
> + result = ERR_PTR(error);
> + goto found_rpc;
> + }
> +
> +// tt_record3("Preparing to poll, socket %d, flags 0x%x, pid %d",
> +// hsk->client_port, flags, current->pid);
I also think your tt_record code will be rejected, or at least there
will be a lot of push back. I expect you will be asked to look at
tracepoints.
> + UNIT_HOOK("found_rpc");
I would also take all such calls out.
Andrew
Powered by blists - more mailing lists