All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Shahar Shitrit" <shshitrit@nvidia.com>
Cc: virtualization@lists.linux.dev,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH net-next v24 06/14] virtio_net: Query and set flow filter caps
Date: Thu, 03 Dec 2026 15:05:58 +0000	[thread overview]
Message-ID: <sashiko-outbox-248060@kernel.org> (raw)
In-Reply-To: <20261202150502.3350030-7-shshitrit@nvidia.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] virtio_net: unbalanced disable_rx_mode_work() in
  virtnet_restore_up()
--

commit b9f5c14eec9c7ae78f244671bac272d4a36c28f1
Author: Shahar Shitrit <shshitrit@nvidia.com>

virtio_net: Query and set flow filter caps

This commit adds UAPI definitions for VirtIO 1.4 flow filters and queries
and sets flow filter capabilities during device probe and restore.

> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 5eef2c3159638..03aea14da492e 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c

[ ... ]

> @@ -5838,6 +6050,20 @@ static int virtnet_restore_up(struct virtio_device *vdev)
>  			goto err_destroy_pools;
>  	}
>  
> +	/*
> +	 * Initialize flow filters. Not supported is an acceptable and common
> +	 * return code
> +	 */
> +	rtnl_lock();
> +	err = virtnet_ff_init(&vi->ff, vi->vdev);
> +	if (err && err != -EOPNOTSUPP) {
> +		rtnl_unlock();
> +		virtnet_freeze_down(vi->vdev);
> +		remove_vq_common(vi);
> +		return err;
> +	}
> +	rtnl_unlock();

[Severity: Medium]
Does calling virtnet_freeze_down() on this error path leave
vi->rx_mode_work's disable depth unbalanced?

virtnet_freeze_down() calls disable_rx_mode_work()
(disable_work_sync(&vi->rx_mode_work)), which already ran during freeze,
and enable_rx_mode_work() is not reached until the end of
virtnet_restore_up().  If virtnet_ff_init() fails, calling
virtnet_freeze_down() increments the work item's disable count a second
time without a matching enable_work().

Initializing flow filters right after virtio_device_ready() (as in
virtnet_probe()) and jumping to err_destroy_pools on error would avoid
calling virtnet_freeze_down() here.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261202150502.3350030-1-shshitrit@nvidia.com?part=6

  parent reply	other threads:[~2026-12-03 15:05 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 15:04 [PATCH net-next v24 00/14] virtio_net: Add ethtool flow rules support Shahar Shitrit
2026-12-02 15:04 ` [PATCH net-next v24 01/14] virtio_pci: Remove supported_caps cache and build assert Shahar Shitrit
2026-12-02 15:04 ` [PATCH net-next v24 02/14] virtio_pci: Fix sleeping under spinlock in admin command path Shahar Shitrit
2026-12-03 15:05   ` sashiko-bot
2026-12-03 15:51   ` netdev-bot+sashiko
2026-12-02 15:04 ` [PATCH net-next v24 03/14] virtio: Add config_op for admin commands Shahar Shitrit
2026-12-03 15:51   ` netdev-bot+sashiko
2026-12-02 15:04 ` [PATCH net-next v24 04/14] virtio: Expose generic device capability operations Shahar Shitrit
2026-12-03 15:05   ` sashiko-bot
2026-12-03 15:51   ` netdev-bot+sashiko
2026-12-02 15:04 ` [PATCH net-next v24 05/14] virtio: Expose object create and destroy API Shahar Shitrit
2026-12-03 15:51   ` netdev-bot+sashiko
2026-12-02 15:04 ` [PATCH net-next v24 06/14] virtio_net: Query and set flow filter caps Shahar Shitrit
2026-12-03 13:16   ` Michael S. Tsirkin
2026-12-03 15:05   ` sashiko-bot [this message]
2026-12-03 15:51   ` netdev-bot+sashiko
2026-12-02 15:04 ` [PATCH net-next v24 07/14] virtio_net: Create a FF group for ethtool steering Shahar Shitrit
2026-12-03 15:05   ` sashiko-bot
2026-12-03 15:51   ` netdev-bot+sashiko
2026-12-02 15:04 ` [PATCH net-next v24 08/14] ethtool: Introduce ethtool_flow_type_mask() Shahar Shitrit
2026-12-02 15:04 ` [PATCH net-next v24 09/14] virtio_net: Implement layer 2 ethtool flow rules Shahar Shitrit
2026-12-03 13:19   ` Michael S. Tsirkin
2026-12-03 15:05   ` sashiko-bot
2026-12-03 15:51   ` netdev-bot+sashiko
2026-12-02 15:04 ` [PATCH net-next v24 10/14] virtio_net: Use existing classifier if possible Shahar Shitrit
2026-12-03 13:20   ` Michael S. Tsirkin
2026-12-02 15:04 ` [PATCH net-next v24 11/14] virtio_net: Implement IPv4 ethtool flow rules Shahar Shitrit
2026-12-03 15:51   ` netdev-bot+sashiko
2026-12-02 15:05 ` [PATCH net-next v24 12/14] virtio_net: Add support for IPv6 ethtool steering Shahar Shitrit
2026-12-02 15:05 ` [PATCH net-next v24 13/14] virtio_net: Add support for TCP and UDP ethtool rules Shahar Shitrit
2026-12-03 15:06   ` sashiko-bot
2026-12-03 15:51   ` netdev-bot+sashiko
2026-12-02 15:05 ` [PATCH net-next v24 14/14] virtio_net: Add get ethtool flow rules ops Shahar Shitrit
2026-12-03 15:51   ` netdev-bot+sashiko
2026-12-02 15:08 ` [PATCH net-next v24 00/14] virtio_net: Add ethtool flow rules support netdev-bot+sinfo
     [not found]   ` <BL0PR12MB5505B05C081539D249C49DCCDA4B2@BL0PR12MB5505.namprd12.prod.outlook.com>
2026-12-03 11:06     ` Shahar Shitrit
2026-12-03 15:06 ` sashiko-bot

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=sashiko-outbox-248060@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=shshitrit@nvidia.com \
    --cc=virtualization@lists.linux.dev \
    /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.