From: Jakub Kicinski <kuba@kernel.org>
To: Gal Pressman <gal@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>, <netdev@vger.kernel.org>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Dragos Tatulea <dtatulea@nvidia.com>,
Jianbo Liu <jianbol@nvidia.com>
Subject: Re: [PATCH net] ethtool: Fix context creation with no parameters
Date: Wed, 7 Aug 2024 07:21:37 -0700 [thread overview]
Message-ID: <20240807072137.34d300a8@kernel.org> (raw)
In-Reply-To: <20240807132541.3460386-1-gal@nvidia.com>
At a glance I think you popped it into the wrong place.
On Wed, 7 Aug 2024 16:25:41 +0300 Gal Pressman wrote:
> - if ((rxfh.indir_size &&
> + if (!create && ((rxfh.indir_size &&
> rxfh.indir_size != ETH_RXFH_INDIR_NO_CHANGE &&
> rxfh.indir_size != dev_indir_size) ||
This condition just checks if indir_size matches the device
expectations, is reset or is zero. Even if we're creating the
context, at present, the indir table size is fixed for the device.
> (rxfh.key_size && (rxfh.key_size != dev_key_size)) ||
similarly this checks the key size
> (rxfh.indir_size == ETH_RXFH_INDIR_NO_CHANGE &&
> rxfh.key_size == 0 && rxfh.hfunc == ETH_RSS_HASH_NO_CHANGE &&
> - rxfh.input_xfrm == RXH_XFRM_NO_CHANGE))
> + rxfh.input_xfrm == RXH_XFRM_NO_CHANGE)))
only this validates the "is this a nop", so you gotta add the &&
!create here
That's why I (perhaps not very clearly) suggested that we should split
this if into two. Cause the first two conditions check "sizes" while
the last chunk checks for "nop". And readability suffers.
Feel free to send the new version tomorrow without a full 24h wait.
next prev parent reply other threads:[~2024-08-07 14:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-07 13:25 [PATCH net] ethtool: Fix context creation with no parameters Gal Pressman
2024-08-07 14:21 ` Jakub Kicinski [this message]
2024-08-07 14:38 ` Gal Pressman
2024-08-07 16:14 ` Gal Pressman
2024-08-07 16:30 ` Jakub Kicinski
2024-08-07 16:48 ` Gal Pressman
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=20240807072137.34d300a8@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=jianbol@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 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.