linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Ujwal Kundur <ujwal.kundur@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	allison.henderson@oracle.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, netdev@vger.kernel.org,
	linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] rds: Fix endian annotations across various assignments
Date: Sun, 10 Aug 2025 22:13:02 +0100	[thread overview]
Message-ID: <20250810211302.GQ222315@ZenIV> (raw)
In-Reply-To: <20250810210058.GP222315@ZenIV>

On Sun, Aug 10, 2025 at 10:00:58PM +0100, Al Viro wrote:
> On Mon, Aug 11, 2025 at 01:01:01AM +0530, Ujwal Kundur wrote:
> 
> > > It took me about 60 seconds to prove the POLLERR change was wrong, and
> > > i know nothing about this code base. So it is in fact not a lot of
> > > effort.
> > I looked up the definition of POLLERR on Elixir [1] and it seemed like
> > a valid Sparse report to me. I wasn't aware of EPOLLERR, and now
> > realize all the other operations are prefixed with EPOLL* in af_rds.c.
> > I look forward to reviews/critiques to learn from them but being
> > accused of using LLMs is kinda disheartening.
> 
> As for the POLLERR part of that, the thing about POLL* constants is that
> beyond the first 6 (IN/PRI/OUT/ERR/HUP/NVAL) they are arch-dependent,
> and not just in a sense of bit assignments.

> generic:
> IN  PRI  OUT  ERR  HUP  NVAL  RDNORM  RDBAND WRNORM  WRBAND  MSG  REMOVE  RDHUP
> 0   1    2    3    4    5     6       7      8       9       10   11      12
> sparc:
> 0   1    2    3    4    5     6       7      =OUT    8       9    10      11
> mips,m68k:
> 0   1    2    3    4    5     6       7      =OUT    8       10   11      13
> xtensa:
> 0   1    2    3    4    5     6       7      =OUT    8       10   11      12

Ugh...

My apologies - messed table above in the last two columns.

REMOVE is 10 for sparc, 11 for xtensa and 12 for everybody else.
RDHUP is 11 for sparc and 13 for everybody else.

generic:
IN  PRI  OUT  ERR  HUP  NVAL  RDNORM  RDBAND WRNORM  WRBAND  MSG  REMOVE  RDHUP
0   1    2    3    4    5     6       7      8       9       10   12      13
sparc:
0   1    2    3    4    5     6       7      =OUT    8       9    10      11
mips,m68k:
0   1    2    3    4    5     6       7      =OUT    8       10   12      13
xtensa:
0   1    2    3    4    5     6       7      =OUT    8       10   11      13

  reply	other threads:[~2025-08-10 21:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-10 17:11 [PATCH net] rds: Fix endian annotations across various assignments Ujwal Kundur
2025-08-10 17:32 ` Andrew Lunn
2025-08-10 17:47 ` Al Viro
2025-08-10 18:25   ` Al Viro
2025-08-10 18:27     ` Al Viro
2025-08-10 18:41     ` Andrew Lunn
2025-08-10 19:26       ` Al Viro
2025-08-10 19:31       ` Ujwal Kundur
2025-08-10 20:19         ` Andrew Lunn
2025-08-10 21:00         ` Al Viro
2025-08-10 21:13           ` Al Viro [this message]
2025-08-10 18:38   ` Al Viro

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=20250810211302.GQ222315@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=allison.henderson@oracle.com \
    --cc=andrew@lunn.ch \
    --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).