From: Jacob Keller <jacob.e.keller@intel.com>
To: I Viswanath <viswanathiyyappan@gmail.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <horms@kernel.org>, <sdf@fomichev.me>,
<kuniyu@google.com>, <ahmed.zaki@intel.com>,
<aleksander.lobakin@intel.com>, <andrew+netdev@lunn.ch>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<skhan@linuxfoundation.org>,
<linux-kernel-mentees@lists.linux.dev>,
<david.hunter.linux@gmail.com>, <khalid@kernel.org>
Subject: Re: [RFC net-next PATCH 0/2] net: Split ndo_set_rx_mode into snapshot and deferred write
Date: Fri, 24 Oct 2025 13:20:33 -0700 [thread overview]
Message-ID: <1349a6d1-f2fb-480f-8879-78ad29dea206@intel.com> (raw)
In-Reply-To: <CAPrAcgOimjOR9T5K07qR4A8Caozq5zimD23Nz4G2R9H_agPgWQ@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1672 bytes --]
On 10/23/2025 10:31 PM, I Viswanath wrote:
> On Thu, 23 Oct 2025 at 05:16, Jacob Keller <jacob.e.keller@intel.com> wrote:
>>
>> Is there any mechanism to make this guarantee either implemented or at
>> least verified by the core? If not that, what about some sort of way to
>> lint driver code and make sure its correct?
>
> From my observations, The sane drivers modify rx_config related
> registers either through the set_rx_mode function or the unlocked
> version (prefixed with __)
> I am not sure how to convert this to a validation of that kind.
>
Right.
> Basically the end result should be that warnings are generated when
> those functions are called
> normally but not when they are called through ops->set_rx_mode.
> Coccinelle might be able to do
> something like this.
>
> Related to this, I don't think a sed would be sufficient as there
> might be (in theory) cases where
> the function has to do a "synchronous" rx write (flush the work queue)
> for correctness
> but it should be good enough for most cases.
>
> I am also not sure what is to be done if the scheduled function just
> never executes.
I'm not sure what the best mechanism is for helping make sure drivers
get it right. I just know that past experience shows that without some
sort of check, we end up burdening reviewers with another thing they
have to double check, and inevitably some drivers will screw it up and
we'll end up with a long tail of fixes.
If we can't come up with something, I don't think it would prevent
moving this forward. I just want to spend a little thought to make sure
nothing obvious was missed.
Thanks,
Jake
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
prev parent reply other threads:[~2025-10-24 20:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 13:48 [RFC net-next PATCH 0/2] net: Split ndo_set_rx_mode into snapshot and deferred write I Viswanath
2025-10-20 13:48 ` [RFC net-next PATCH 1/2] net: Add ndo_write_rx_config and helper structs and functions I Viswanath
2025-10-20 13:48 ` [RFC net-next PATCH 2/2] net: ethernet: Implement ndo_write_rx_config callback for the 8139cp driver I Viswanath
2025-10-22 23:46 ` [RFC net-next PATCH 0/2] net: Split ndo_set_rx_mode into snapshot and deferred write Jacob Keller
2025-10-24 5:31 ` I Viswanath
2025-10-24 20:20 ` Jacob Keller [this message]
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=1349a6d1-f2fb-480f-8879-78ad29dea206@intel.com \
--to=jacob.e.keller@intel.com \
--cc=ahmed.zaki@intel.com \
--cc=aleksander.lobakin@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=david.hunter.linux@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=khalid@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=skhan@linuxfoundation.org \
--cc=viswanathiyyappan@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