From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F2909A00BE; Tue, 7 Jul 2020 05:21:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 333451DC30; Tue, 7 Jul 2020 05:21:26 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 9AD6D1DC30; Tue, 7 Jul 2020 05:21:24 +0200 (CEST) IronPort-SDR: L/mUlCWupw5GX3utnV7lF1dHskTemM0JWp1nWV9rKioBF3k2OOCBEkAg4GXzrpWY3Wghq+IQ8r QF/yX1oD06vw== X-IronPort-AV: E=McAfee;i="6000,8403,9674"; a="212505330" X-IronPort-AV: E=Sophos;i="5.75,321,1589266800"; d="scan'208";a="212505330" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 20:21:23 -0700 IronPort-SDR: rXGkymju1wwnjJkiRJ9eSg0KuCAdHALiVakFwqT6qtk654y78zhNPLwjvC9QAxuch51FYHvDdp UXPL3HVAKZBA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,321,1589266800"; d="scan'208";a="483353376" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 06 Jul 2020 20:21:23 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Jul 2020 20:21:22 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 6 Jul 2020 20:21:21 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 6 Jul 2020 20:21:21 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 6 Jul 2020 20:21:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZHXufSim3MYxAdnCfC5RDSNtdd5f0XOY6+LKmVqrbWcZEc6LXrpKPyyR2+/bgxE9AOcVLiFHVALR9C7W4EBPDEA+CfyE5GM9XVszygAVLXduvCNBSJJptEgt8kzdHsscjCPFOaKKNb4/8qaFNUrxfNm7d4k+cvl2ClH///tgLj9Q617ek4XtO5CSJpmBSSyrRez2Gt+ICRTfWZQgY0UZAuflSAGqE0G+/3McTVCj36yRG83XEoHKg3dic6k/e5X5yZV9oLK2+cGBMxXpdR5J1IOeFgjUOvzxJQ2Cd6WYPEzm31hCn5lFvuO7UO6f57+H5M7FWXT3IUsnXqZEcZvWRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uf49Uvq7fNprlZ0eykNinyw00eEg9OtHJuc7xHkNnQo=; b=dbzutQxO/Vj8Mm1gFyg7In0DKBwEc1CDcH0Sz/wARPzjDriR2P3vZNYi/mcUUyaqvsy5zX3qPa2OwFvimlwMkvI/4MTw18keHgbbYpERRL+QmZ60amE5ANOzWavxz0pSMbT9QJXdnW2VK+4nJ7kKpRoCrKLWLeB+drn+nA8PlrZh2R7H4EmJQP1iK02gsKc3LtKTXmuzh0T8ZUbzXBoHMgzYxtoAPd1VkPyVhyZwwfzTXd57/wNZn+1TY09hNF4BQ4D22p++1H0CWDdnClfMdYRDkHHJ+SU4EYalZTaHXRxiR2PuHZKuYPLHFOQEaeqfdet6+CcAS/PssPcfiLcBuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uf49Uvq7fNprlZ0eykNinyw00eEg9OtHJuc7xHkNnQo=; b=Y9vvIkvv3Kru4tOVnAP6R3O3JQwGL6QNegnEO0CYUTgYj28pluIsuZIwaHTub14pf7JAosL+JdmuGnVRhWjJ3iZugOH6toUtJE657GKCaCu4/vMNeLe8g+q4OtPoHROuWZYkvJJ/wHe0K4NJ8mHc8xTW2beFYfiHe7nNQZDlXg4= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB3709.namprd11.prod.outlook.com (2603:10b6:208:f3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21; Tue, 7 Jul 2020 03:21:17 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::7cde:8326:5010:c47e]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::7cde:8326:5010:c47e%7]) with mapi id 15.20.3153.029; Tue, 7 Jul 2020 03:21:17 +0000 From: "Xia, Chenbo" To: Adrian Moreno , "dev@dpdk.org" , "Ye, Xiaolong" , "shahafs@mellanox.com" , "matan@mellanox.com" , "maxime.coquelin@redhat.com" , "Wang, Xiao W" , "viacheslavo@mellanox.com" CC: "jasowang@redhat.com" , "lulu@redhat.com" , "stable@dpdk.org" Thread-Topic: [PATCH v3 1/8] vhost: fix virtio ready flag check Thread-Index: AQHWU4gs7u8C+KZ6cUaIoGh9gK+K36j7dB5A Date: Tue, 7 Jul 2020 03:21:16 +0000 Message-ID: References: <20200706112452.1474533-1-amorenoz@redhat.com> <20200706112452.1474533-2-amorenoz@redhat.com> In-Reply-To: <20200706112452.1474533-2-amorenoz@redhat.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.218] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e1b5d40d-6643-44fb-b4d0-08d82224cfb3 x-ms-traffictypediagnostic: MN2PR11MB3709: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-forefront-prvs: 0457F11EAF x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yrwWETHYiYsKUuF/NkeEjdsw/kwubQVeVo4zde/8mOk0RWdIpW7aK5TkbzhNDkF5RSHUuPiRU17ng5wtI/AQion9lFlTY78uWd8+8YkImK7qEChM6NVJcPD8vvLEPgrtZ6gM54vYSU1ZyyPHgeRy4dfxTU4yioCaKLFxTWdEPNaRSbtgNE+mZDcP1dC6ehZMMTkal2nuC8P0n3Op2mLi2trLW/lF1zEFIvXUFOQ7KV9e94PKRyGPSFUCqiAq/wgo6eAtgSFn1IqxBIdncqF5rnvaYFJo5i6BPCJ5RR74fzF9Cp4zgzYjqrdNVjpZpOj6APrRXjDyQWVFCBItXEu2p5UUov8GH/MITN7H8PjHyPVqEiFfi7/69h7CkLQQSKcG x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(366004)(346002)(39860400002)(136003)(396003)(83380400001)(8936002)(478600001)(4326008)(316002)(33656002)(110136005)(5660300002)(54906003)(52536014)(2906002)(9686003)(55016002)(8676002)(53546011)(7696005)(6506007)(76116006)(86362001)(66446008)(64756008)(66556008)(186003)(66476007)(71200400001)(26005)(66946007)(921003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: 9rpW6c387Ptuy3Kaq9+V8V1M/6L+Em0HGmms0bjJ7bjPnELSDCBPCjtlJ5hLm3df/gjKFFLKdUGZBrjc/9ysE/HxsqkkiIAVbbT97CGEgdxxgyuMZX7+axfXh4bDVuzsAZjlKSs+7ISpEj7/rxve3z199dygrpiKTd/qLxsSXN+lCaewiu9MXOrmMlI+3aZM+ms+0JqDtIt6pRJhpcwSZ8BZR6SgwMEJo8c4Oq/L9OcX4X+PO/Tk2Gzbd41oY1QCw0U8JNBd1aEQcZPJy1PoTO1aaYW+SJA5rAzFtXf8Yrosfn4ffflID1EGs+ycbBQBfqfQfxs1snOTDMA+XT7nrGu/cmqp781zc5dHyQlfHtApic+x4JVTpCXWY8EG8PVx72HwSKgkDblF4LngAF/EAdETLZezH3Ts23tAQNthveHbhz9p7pdO4OXE+z4r4mpzkALJWW2k7QjdufcwNCDc+SCh5orI6zo58vqUSfqSnVccb/cdA7Id868eJaM93OPU Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB4063.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1b5d40d-6643-44fb-b4d0-08d82224cfb3 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jul 2020 03:21:16.9774 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: eGeUCbn9XzeCmzXWSRSSo7G7gCR1c82B2YMXAnTlBKXo/1++pxHz49bjDyHsYW7/gWl6QuJIMyJDpohjYLriMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3709 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 1/8] vhost: fix virtio ready flag check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Adrian Moreno > Sent: Monday, July 6, 2020 7:25 PM > To: dev@dpdk.org; Xia, Chenbo ; Ye, Xiaolong > ; shahafs@mellanox.com; matan@mellanox.com; > maxime.coquelin@redhat.com; Wang, Xiao W ; > viacheslavo@mellanox.com > Cc: jasowang@redhat.com; lulu@redhat.com; stable@dpdk.org > Subject: [PATCH v3 1/8] vhost: fix virtio ready flag check >=20 > From: Maxime Coquelin >=20 > Before checking whether the device is ready is done a check on whether th= e > RUNNING flag is set. Then the READY flag is set if virtio_is_ready() retu= rns true. >=20 > While it seems to not cause any issue, it makes more sense to check wheth= er the > READY flag is set and not the RUNNING one. >=20 > Fixes: c0674b1bc898 ("vhost: move the device ready check at proper place"= ) > Cc: stable@dpdk.org >=20 > Signed-off-by: Maxime Coquelin > --- > lib/librte_vhost/vhost_user.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.= c index > 6039a8fdb..5750dde6d 100644 > --- a/lib/librte_vhost/vhost_user.c > +++ b/lib/librte_vhost/vhost_user.c > @@ -2825,7 +2825,7 @@ vhost_user_msg_handler(int vid, int fd) > } >=20 >=20 > - if (!(dev->flags & VIRTIO_DEV_RUNNING) && virtio_is_ready(dev)) { > + if (!(dev->flags & VIRTIO_DEV_READY) && virtio_is_ready(dev)) { > dev->flags |=3D VIRTIO_DEV_READY; >=20 > if (!(dev->flags & VIRTIO_DEV_RUNNING)) { > -- > 2.26.2 Reviewed-by: Chenbo Xia