netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Allison Henderson <allison.henderson@oracle.com>
To: "horms@kernel.org" <horms@kernel.org>,
	"ujwal.kundur@gmail.com" <ujwal.kundur@gmail.com>,
	"edumazet@google.com" <edumazet@google.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>
Cc: "rds-devel@oss.oracle.com" <rds-devel@oss.oracle.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v2 3/4] rds: Fix endianness annotation for RDS_MPATH_HASH
Date: Fri, 22 Aug 2025 00:56:24 +0000	[thread overview]
Message-ID: <35c7c1aad491504a4da79aee079ce7a4743a5778.camel@oracle.com> (raw)
In-Reply-To: <20250820175550.498-4-ujwal.kundur@gmail.com>

On Wed, 2025-08-20 at 23:25 +0530, Ujwal Kundur wrote:
> jhash_1word accepts host endian inputs while rs_bound_port is a be16
> value (sockaddr_in6.sin6_port). Use ntohs() for consistency.
> 
> Flagged by Sparse.
> 
> Signed-off-by: Ujwal Kundur <ujwal.kundur@gmail.com>
This looks fine.  Thank you!
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>

> ---
>  net/rds/rds.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/rds/rds.h b/net/rds/rds.h
> index dc360252c515..5b1c072e2e7f 100644
> --- a/net/rds/rds.h
> +++ b/net/rds/rds.h
> @@ -93,7 +93,7 @@ enum {
>  
>  /* Max number of multipaths per RDS connection. Must be a power of 2 */
>  #define	RDS_MPATH_WORKERS	8
> -#define	RDS_MPATH_HASH(rs, n) (jhash_1word((rs)->rs_bound_port, \
> +#define	RDS_MPATH_HASH(rs, n) (jhash_1word(ntohs((rs)->rs_bound_port), \
>  			       (rs)->rs_hash_initval) & ((n) - 1))
>  
>  #define IS_CANONICAL(laddr, faddr) (htonl(laddr) < htonl(faddr))


  reply	other threads:[~2025-08-22  1:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 17:55 [PATCH net-next v2 0/4] rds: Fix semantic annotations Ujwal Kundur
2025-08-20 17:55 ` [PATCH net-next v2 1/4] rds: Replace POLLERR with EPOLLERR Ujwal Kundur
2025-08-22  0:56   ` Allison Henderson
2025-08-20 17:55 ` [PATCH net-next v2 2/4] rds: Fix endianness annotation of jhash wrappers Ujwal Kundur
2025-08-22  0:56   ` Allison Henderson
2025-08-20 17:55 ` [PATCH net-next v2 3/4] rds: Fix endianness annotation for RDS_MPATH_HASH Ujwal Kundur
2025-08-22  0:56   ` Allison Henderson [this message]
2025-08-20 17:55 ` [PATCH net-next v2 4/4] rds: Fix endianness annotations for RDS extension headers Ujwal Kundur
2025-08-22  0:56   ` Allison Henderson
2025-08-22 23:50 ` [PATCH net-next v2 0/4] rds: Fix semantic annotations patchwork-bot+netdevbpf

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=35c7c1aad491504a4da79aee079ce7a4743a5778.camel@oracle.com \
    --to=allison.henderson@oracle.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rds-devel@oss.oracle.com \
    --cc=ujwal.kundur@gmail.com \
    /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).