From: Noa Ezra <noae@mellanox.com>
To: Noa Ezra <noae@mellanox.com>,
"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>
Cc: Matan Azrad <matan@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [Suspected-Phishing][PATCH] net/vhost: fix redundant queue state event
Date: Tue, 25 Jun 2019 07:04:26 +0000 [thread overview]
Message-ID: <AM0PR05MB438806149187B67C0652A016A0E30@AM0PR05MB4388.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1560924960-221163-1-git-send-email-noae@mellanox.com>
Hi,
What do you think about this patch?
Thanks,
Noa.
> -----Original Message-----
> From: Noa Ezra [mailto:noae@mellanox.com]
> Sent: Wednesday, June 19, 2019 9:16 AM
> To: maxime.coquelin@redhat.com
> Cc: Matan Azrad <matan@mellanox.com>; dev@dpdk.org; Noa Ezra
> <noae@mellanox.com>; stable@dpdk.org
> Subject: [Suspected-Phishing][PATCH] net/vhost: fix redundant queue state
> event
>
> In some situations, when a virtual machine is starting, vring_state_changed
> can be called while there was no change in the queue state. This fix makes
> sure that there was really a change in the queue state before calling the
> callback for EVENT_QUEUE_STATE.
>
> Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
> Cc: stable@dpdk.org
> Reviewed-by: Matan Azrad <matan@mellanox.com>
> ---
> drivers/net/vhost/rte_eth_vhost.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/vhost/rte_eth_vhost.c
> b/drivers/net/vhost/rte_eth_vhost.c
> index cad1e5c..fbe7a37 100644
> --- a/drivers/net/vhost/rte_eth_vhost.c
> +++ b/drivers/net/vhost/rte_eth_vhost.c
> @@ -855,6 +855,10 @@ struct vhost_xstats_name_off {
> /* won't be NULL */
> state = vring_states[eth_dev->data->port_id];
> rte_spinlock_lock(&state->lock);
> + if (state->cur[vring] == enable) {
> + rte_spinlock_unlock(&state->lock);
> + return 0;
> + }
>
> state->cur[vring] = enable;
> state->max_vring = RTE_MAX(vring, state->max_vring);
> --
> 1.8.3.1
next prev parent reply other threads:[~2019-06-25 7:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-19 6:16 [dpdk-dev] [PATCH] " Noa Ezra
2019-06-20 6:33 ` [dpdk-dev] [PATCH v2] " Noa Ezra
2019-09-27 8:49 ` Maxime Coquelin
2019-09-27 9:49 ` Maxime Coquelin
2019-06-25 7:04 ` Noa Ezra [this message]
2019-06-25 8:23 ` [dpdk-dev] [Suspected-Phishing][PATCH] " Maxime Coquelin
2019-06-26 6:37 ` Noa Ezra
2019-06-26 7:01 ` Maxime Coquelin
2019-06-26 8:03 ` Noa Ezra
2019-06-26 8:54 ` Maxime Coquelin
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=AM0PR05MB438806149187B67C0652A016A0E30@AM0PR05MB4388.eurprd05.prod.outlook.com \
--to=noae@mellanox.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
/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).