From: Stanislav Fomichev <sdf@fomichev.me>
To: Petr Machata <petrm@nvidia.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, Shuah Khan <shuah@kernel.org>,
Joe Damato <jdamato@fastly.com>,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v2 1/2] selftests: net-drv: exercise queue stats when the device is down
Date: Thu, 1 Aug 2024 08:34:24 -0700 [thread overview]
Message-ID: <ZqurACK6FdrxiISt@mini-arch> (raw)
In-Reply-To: <874j847hfy.fsf@nvidia.com>
On 08/01, Petr Machata wrote:
>
> Stanislav Fomichev <sdf@fomichev.me> writes:
>
> > On 07/31, Jakub Kicinski wrote:
> >> On Wed, 31 Jul 2024 13:34:58 +0200 Petr Machata wrote:
> >> > > + qstat = netfam.qstats_get({"ifindex": cfg.ifindex}, dump=True)
> >> > > + except NlError as e:
> >> > > + if e.error == 95:
> >> >
> >> > Could you do this as if e.error == errno.ENOTSUP?
> >>
> >> just to be clear EOPNOTSUPP ..
> >
> > That might be the reason it's coded explicitly as 95? :-D
>
> Both exist, I just didn't notice the latter.
>
> >>> import errno
> >>> errno.ENOTSUP
> 95
> >>> errno.EOPNOTSUPP
> 95
I believe Jakub was talking about kernel's ENOTSUPP (524) vs EOPNOTSUPP (95):
$ grep ENOTSUPP include/linux/errno.h
#define ENOTSUPP 524 /* Operation is not supported */
$ grep EOPNOTSUPP include/uapi/asm-generic/errno.h
#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
These two are frequently confused.
OTOH, ENOTSUP looks like a userspace/libc invention:
$ grep -w ENOTSUP /usr/include/bits/errno.h
# ifndef ENOTSUP
# define ENOTSUP EOPNOTSUPP
I'm gonna stick to kernel's EOPNOTSUPP to make it look similar to what
we have on the kernel side.
next prev parent reply other threads:[~2024-08-01 15:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 22:39 [PATCH net-next v2 1/2] selftests: net-drv: exercise queue stats when the device is down Stanislav Fomichev
2024-07-30 22:39 ` [PATCH net-next v2 2/2] selftests: net: ksft: support marking tests as disruptive Stanislav Fomichev
2024-07-31 11:55 ` Petr Machata
2024-07-31 20:47 ` Stanislav Fomichev
2024-08-01 8:36 ` Petr Machata
2024-08-01 14:07 ` Jakub Kicinski
2024-08-01 21:31 ` Petr Machata
2024-07-31 11:34 ` [PATCH net-next v2 1/2] selftests: net-drv: exercise queue stats when the device is down Petr Machata
2024-08-01 0:32 ` Jakub Kicinski
2024-08-01 1:23 ` Stanislav Fomichev
2024-08-01 8:50 ` Petr Machata
2024-08-01 15:34 ` Stanislav Fomichev [this message]
2024-08-01 21:38 ` Petr Machata
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=ZqurACK6FdrxiISt@mini-arch \
--to=sdf@fomichev.me \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jdamato@fastly.com \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=shuah@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.