From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id D73FBA046B for ; Tue, 25 Jun 2019 09:04:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AA2BE4C77; Tue, 25 Jun 2019 09:04:29 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10060.outbound.protection.outlook.com [40.107.1.60]) by dpdk.org (Postfix) with ESMTP id 045A44C77; Tue, 25 Jun 2019 09:04:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rGhiFewngDZppBDJuYTun9DqUtGIrT1fNQuWO6zf8Sc=; b=LIrVngGVQtFw89nlnUg3JieDMdodc3ivLwYK8OTxoJfLy+Wh3UlhhysrM5MVse+FbAMZLModyviQ/y3atqbjY/dX0pEYQIFUJsjWeqihkg+Y6Hk/9L9I9jQ9ymPouFEj2tzZKSToNy5BaAQTQYToMxmVNkRGjOCrSmy0nS1FyIU= Received: from AM0PR05MB4388.eurprd05.prod.outlook.com (52.134.94.17) by AM0PR05MB6179.eurprd05.prod.outlook.com (20.178.113.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.15; Tue, 25 Jun 2019 07:04:26 +0000 Received: from AM0PR05MB4388.eurprd05.prod.outlook.com ([fe80::94a6:a0e7:b411:ed30]) by AM0PR05MB4388.eurprd05.prod.outlook.com ([fe80::94a6:a0e7:b411:ed30%6]) with mapi id 15.20.2008.017; Tue, 25 Jun 2019 07:04:26 +0000 From: Noa Ezra To: Noa Ezra , "maxime.coquelin@redhat.com" CC: Matan Azrad , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [Suspected-Phishing][PATCH] net/vhost: fix redundant queue state event Thread-Index: AQHVJmZ7NbW23SaJZEekB7O0u3qVyKar+1vw Date: Tue, 25 Jun 2019 07:04:26 +0000 Message-ID: References: <1560924960-221163-1-git-send-email-noae@mellanox.com> In-Reply-To: <1560924960-221163-1-git-send-email-noae@mellanox.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=noae@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d61375a7-dac9-424d-4917-08d6f93b5c1e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM0PR05MB6179; x-ms-traffictypediagnostic: AM0PR05MB6179: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4303; x-forefront-prvs: 0079056367 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(366004)(39860400002)(136003)(396003)(13464003)(189003)(199004)(6116002)(8676002)(14444005)(53546011)(316002)(86362001)(256004)(7736002)(229853002)(6436002)(66066001)(66446008)(64756008)(4326008)(76116006)(66476007)(66946007)(71190400001)(66556008)(73956011)(68736007)(5660300002)(74316002)(71200400001)(52536014)(478600001)(25786009)(81166006)(14454004)(76176011)(7696005)(53936002)(81156014)(55016002)(33656002)(8936002)(305945005)(99286004)(3846002)(102836004)(110136005)(54906003)(2906002)(2501003)(186003)(9686003)(11346002)(446003)(486006)(26005)(476003)(6246003)(6506007); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB6179; H:AM0PR05MB4388.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 3rJwVNBjxq5NbqRFmZnnb4LcKdtN5WA8Xef0jJNKRPcRw3q+kWOHrhIaas0+zGz28FxgDZ2L9UiZefnoAC9+MZ14gI7lT1CbTYzAgG5pL+9fpqMZxDVd7Tqc9xNLIWoEV2xa4+w+cSnO5JT0+EIxwym8vvSvCixQq/xZ7vSza5aracx66lrgliZZSZac2o+RLfKVjiA5GsdED+RYeOS0zIYuicyOubcABVwLt3kQWNhz7c4wxEOcxHtEfRIJ5fZKzBtsqNfQTIji3wIwhX4oAQlroiixx6mKmczCUIiqsrfm5k9Kf3lNsMigmjSVylvWJevDvMbAWpWzbrXLcs9Uwdnsg6zP7VBWX7zUWrDZss/xbcvKECel3KQ6yUvpN0GOTM+jQIiMA9P8wYOw/+to6KPji1NFt7K24amRM2B1jfQ= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: d61375a7-dac9-424d-4917-08d6f93b5c1e X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jun 2019 07:04:26.2729 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: noae@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6179 Subject: Re: [dpdk-stable] [Suspected-Phishing][PATCH] net/vhost: fix redundant queue state event X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 ; dev@dpdk.org; Noa Ezra > ; stable@dpdk.org > Subject: [Suspected-Phishing][PATCH] net/vhost: fix redundant queue state > event >=20 > In some situations, when a virtual machine is starting, vring_state_chang= ed > can be called while there was no change in the queue state. This fix make= s > sure that there was really a change in the queue state before calling the > callback for EVENT_QUEUE_STATE. >=20 > Fixes: ee584e9710b9 ("vhost: add driver on top of the library") > Cc: stable@dpdk.org > Reviewed-by: Matan Azrad > --- > drivers/net/vhost/rte_eth_vhost.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > 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 =3D vring_states[eth_dev->data->port_id]; > rte_spinlock_lock(&state->lock); > + if (state->cur[vring] =3D=3D enable) { > + rte_spinlock_unlock(&state->lock); > + return 0; > + } >=20 > state->cur[vring] =3D enable; > state->max_vring =3D RTE_MAX(vring, state->max_vring); > -- > 1.8.3.1