netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Cosmin Ratiu <cratiu@nvidia.com>, Stanislav Fomichev <sdf@fomichev.me>
Cc: <netdev@vger.kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Tariq Toukan <tariqt@nvidia.com>,
	Dragos Tatulea <dtatulea@nvidia.com>
Subject: Re: [PATCH net v2] net: Lock lower level devices when updating features
Date: Thu, 8 May 2025 09:04:45 -0700	[thread overview]
Message-ID: <20250508090445.3b235bcc@kernel.org> (raw)
In-Reply-To: <20250508145459.1998067-1-cratiu@nvidia.com>

On Thu, 8 May 2025 17:54:59 +0300 Cosmin Ratiu wrote:
>  			lower->wanted_features &= ~feature;
> +			netdev_lock_ops(lower);
>  			__netdev_update_features(lower);
> +			netdev_unlock_ops(lower);
>  
>  			if (unlikely(lower->features & feature))

I'd be slightly tempted to try to cover the accesses to members of
lower, because why not:

			netdev_lock_ops(lower);
 			lower->wanted_features &= ~feature;
 			__netdev_update_features(lower);
			still_enabled = lower->features & feature;
			netdev_unlock_ops(lower);

 			if (unlikely(still_enabled))

WDYT?

  reply	other threads:[~2025-05-08 16:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08 14:54 [PATCH net v2] net: Lock lower level devices when updating features Cosmin Ratiu
2025-05-08 16:04 ` Jakub Kicinski [this message]
2025-05-08 16:12 ` Stanislav Fomichev
2025-05-08 18:24   ` Cosmin Ratiu
2025-05-09 15:04     ` Stanislav Fomichev

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=20250508090445.3b235bcc@kernel.org \
    --to=kuba@kernel.org \
    --cc=cratiu@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dtatulea@nvidia.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=sdf@fomichev.me \
    --cc=tariqt@nvidia.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).