Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Marcin Szycik <marcin.szycik@linux.intel.com>,
	<intel-wired-lan@lists.osuosl.org>,
	"Ertman, David M" <david.m.ertman@intel.com>
Cc: netdev@vger.kernel.org, jiri@resnulli.us, leon@kernel.org,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: Block switchdev mode when ADQ is active and vice versa
Date: Tue, 8 Aug 2023 10:55:05 -0700	[thread overview]
Message-ID: <4e8adb44-1f75-6c46-d7e9-a8ea5f3921fd@intel.com> (raw)
In-Reply-To: <20230804142654.9729-1-marcin.szycik@linux.intel.com>

On 8/4/2023 7:26 AM, Marcin Szycik wrote:
> ADQ and switchdev are not supported simultaneously. Enabling both at the
> same time can result in nullptr dereference.
> 
> To prevent this, check if ADQ is active when changing devlink mode to
> switchdev mode, and check if switchdev is active when enabling ADQ.
> 
> Fixes: fbc7b27af0f9 ("ice: enable ndo_setup_tc support for mqprio_qdisc")
> Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> ---

...

> @@ -8834,6 +8834,12 @@ ice_setup_tc(struct net_device *netdev, enum tc_setup_type type,
>   			}
>   		}
>   
> +		if (ice_is_eswitch_mode_switchdev(pf)) {
> +			netdev_err(netdev, "TC MQPRIO offload not supported, switchdev is enabled\n");
> +			err = -EOPNOTSUPP;
> +			goto adev_unlock;

Does this need to be checked under adev locks?

> +		}
> +
>   		/* setup traffic classifier for receive side */
>   		mutex_lock(&pf->tc_mutex);
>   		err = ice_setup_tc_mqprio_qdisc(netdev, type_data);
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  reply	other threads:[~2023-08-08 18:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04 14:26 [Intel-wired-lan] [PATCH iwl-net v2] ice: Block switchdev mode when ADQ is active and vice versa Marcin Szycik
2023-08-08 17:55 ` Tony Nguyen [this message]
2023-08-10  8:14   ` Marcin Szycik

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=4e8adb44-1f75-6c46-d7e9-a8ea5f3921fd@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=david.m.ertman@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jiri@resnulli.us \
    --cc=leon@kernel.org \
    --cc=marcin.szycik@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=przemyslaw.kitszel@intel.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