From: Paolo Abeni <pabeni@redhat.com>
To: ouster@cs.stanford.edu
Cc: horms@kernel.org, netdev@vger.kernel.org, kuba@kernel.org,
pabeni@redhat.com, edumazet@google.com
Subject: Re: [net-next,v17,03/14] net: homa: create shared Homa header files
Date: Wed, 18 Mar 2026 08:20:22 +0100 [thread overview]
Message-ID: <20260318072022.268417-1-pabeni@redhat.com> (raw)
In-Reply-To: <20260316223228.2611-4-ouster@cs.stanford.edu>
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
net: homa: create shared Homa header files
homa_impl.h defines "struct homa", which contains overall information
about the Homa transport, plus various odds and ends that are used
throughout the Homa implementation. homa_stub.h is a temporary header
file that provides stubs for facilities that have omitted for this first
patch series. This file will go away once Homa is fully upstreamed.
> diff --git a/net/homa/homa_impl.h b/net/homa/homa_impl.h
> new file mode 100644
> index 000000000000..f55a7b80431d
> --- /dev/null
> +++ b/net/homa/homa_impl.h
[ ... ]
> @@ -0,0 +1,512 @@
[ ... ]
> +/**
> + * homa_set_doff() - Fills in the doff TCP header field for a Homa packet.
> + * @h: Packet header whose doff field is to be set.
> + * @size: Size of the "header", bytes (must be a multiple of 4). This
> + * information is used only for TSO; it's the number of bytes
> + * that should be replicated in each segment. The bytes after
> + * this will be distributed among segments.
> + */
> +static inline void homa_set_doff(struct homa_data_hdr *h, int size)
> +{
> + /* Drop the 2 low-order bits from size and set the 4 high-order
> + * bits of doff from what's left.
> + */
> + h->common.doff = size << 2;
> +}
Does the comment in homa_set_doff() accurately describe what the code
does? The comment says "Drop the 2 low-order bits from size" which would
be a right shift (size >> 2), but the code performs a left shift
(size << 2).
Looking at similar usage patterns in TCP where the doff field stores
header length in 4-byte word units, the code appears correct - it's
converting a byte size to 4-byte word units by shifting left.
The comment should probably say "Shift size left by 2 bits to store in
4-byte word units" or "Multiply size by 4 and store in doff field" to
match what the code actually does.
[ ... ]
next prev parent reply other threads:[~2026-03-18 7:21 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 22:32 [PATCH net-next v17 00/14] Begin upstreaming Homa transport protocol John Ousterhout
2026-03-16 22:32 ` [PATCH net-next v17 01/14] net: homa: define user-visible API for Homa John Ousterhout
2026-03-17 10:10 ` kernel test robot
2026-03-17 18:40 ` kernel test robot
2026-03-16 22:32 ` [PATCH net-next v17 02/14] net: homa: create homa_wire.h John Ousterhout
2026-03-16 22:32 ` [PATCH net-next v17 03/14] net: homa: create shared Homa header files John Ousterhout
2026-03-18 7:20 ` Paolo Abeni [this message]
2026-03-19 20:37 ` [net-next,v17,03/14] " John Ousterhout
2026-03-16 22:32 ` [PATCH net-next v17 04/14] net: homa: create homa_pool.h and homa_pool.c John Ousterhout
2026-03-16 22:32 ` [PATCH net-next v17 05/14] net: homa: create homa_peer.h and homa_peer.c John Ousterhout
2026-03-18 7:21 ` [net-next,v17,05/14] " Paolo Abeni
2026-03-20 17:13 ` John Ousterhout
2026-03-20 17:20 ` Paolo Abeni
2026-03-16 22:32 ` [PATCH net-next v17 06/14] net: homa: create homa_sock.h and homa_sock.c John Ousterhout
2026-03-16 22:32 ` [PATCH net-next v17 07/14] net: homa: create homa_interest.h and homa_interest.c John Ousterhout
2026-03-18 7:21 ` [net-next,v17,07/14] " Paolo Abeni
2026-03-16 22:32 ` [PATCH net-next v17 08/14] net: homa: create homa_rpc.h and homa_rpc.c John Ousterhout
2026-03-18 7:21 ` [net-next,v17,08/14] " Paolo Abeni
2026-03-23 22:43 ` John Ousterhout
2026-03-24 8:55 ` Paolo Abeni
2026-03-16 22:32 ` [PATCH net-next v17 09/14] net: homa: create homa_outgoing.c John Ousterhout
2026-03-18 7:21 ` [net-next,v17,09/14] " Paolo Abeni
2026-03-20 18:21 ` John Ousterhout
2026-03-16 22:32 ` [PATCH net-next v17 10/14] net: homa: create homa_utils.c John Ousterhout
2026-03-16 22:32 ` [PATCH net-next v17 11/14] net: homa: create homa_incoming.c John Ousterhout
2026-03-18 7:21 ` [net-next,v17,11/14] " Paolo Abeni
2026-03-20 20:51 ` John Ousterhout
2026-03-16 22:32 ` [PATCH net-next v17 12/14] net: homa: create homa_timer.c John Ousterhout
2026-03-16 22:32 ` [PATCH net-next v17 13/14] net: homa: create homa_plumbing.c John Ousterhout
2026-03-18 7:21 ` [net-next,v17,13/14] " Paolo Abeni
2026-03-20 21:49 ` John Ousterhout
2026-03-16 22:32 ` [PATCH net-next v17 14/14] net: homa: create Makefile and Kconfig John Ousterhout
2026-03-17 18:51 ` kernel test robot
2026-03-17 19:26 ` kernel test robot
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=20260318072022.268417-1-pabeni@redhat.com \
--to=pabeni@redhat.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ouster@cs.stanford.edu \
/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