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 07A4EA0350; Sun, 28 Jun 2020 05:19:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D12DD1C042; Sun, 28 Jun 2020 05:19:24 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 0790A1BFE9 for ; Sun, 28 Jun 2020 05:19:22 +0200 (CEST) IronPort-SDR: hhtHCVqKdOABJR4E6KOFH9y3iYGm2xcnsnFt9El3IY1O9jUjdly00tpbLVNZ/p1A5B+RhG0f3t BL98LvN/sN9A== X-IronPort-AV: E=McAfee;i="6000,8403,9665"; a="207268245" X-IronPort-AV: E=Sophos;i="5.75,290,1589266800"; d="scan'208";a="207268245" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2020 20:19:22 -0700 IronPort-SDR: O92RCTkUFN3fMVY90zDkM+YYVY3psaaJ00xTlVreCsiDh3pJZulGz3WnxC9fb/AP+oM6JGBxFx 0gGP1vUUSIbA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,290,1589266800"; d="scan'208";a="424463471" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 27 Jun 2020 20:19:21 -0700 Received: from fmsmsx104.amr.corp.intel.com (10.18.124.202) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 27 Jun 2020 20:19:21 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sat, 27 Jun 2020 20:19:18 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 27 Jun 2020 20:19:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jZVhrZnYCNR0g9YEAQe1lW18f6pHKRJGU9sb8Mjp6vDoHNTvs43jOWpHa9oSab1SksHx15D1eUiXgbwEvquL10PP5UpvjDcfDMeVqUw26RXiReGKt9fKRdQvNnFkhmM5vGSxj7iWqcuSF9Xn0/iPr5XHbLOCCIb1bxUMeHZgiPR80mg002aD5YGIjhZ5QsOPp9DFGnNmrgJrQUpTOxyV0NXVQMqMBFTFqtQMnrm4nKmkdYaYhehwayD6i4u+wHH/D3oWmGHDi20pCXw3xj8i1/sjc4BqFpPdeaSuf61SojOebaZkBMSFBppGG9aJ9bBQQXkAf9krajYj5WAH68HCeQ== 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=N4qtbEujDSXxYTxK8/I2OgLr29zd4flDwh6iW+rTvv4=; b=MVfiTIGsN+p9NAIEyImhVsx63i8weLqfNk0z3X/HuE8CAKK1jjfbzObEA24pdLKpfX7J7rFVZ6fftbcuirSkZdNEAhr/Puem/OenIIBJB4TP/pWbuEx4nyhChbvQXdPpkDizx+UbTBUS8vdb8KJ09lfJTq+/Me7ZdChIq+FnW2Y+1VrmaHkCqYELIacdgDPaV8Z7st8V68kIDivHFeGnyIR7od6KWGaAp4pKK6K/6pgcgSUas7N2jyLV87SeY54MR4VziDjZgSoCiEqP43dsJ3PtAXX9vCw+3BCdEVtx6SuqPpdV85VXGAAgaHzZWTa3XJorZJB5l+2P1Hr9WnRUoQ== 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=N4qtbEujDSXxYTxK8/I2OgLr29zd4flDwh6iW+rTvv4=; b=wUD1pm2a94VEG/To4k4jM9nEZP3WroRrce6Xg8jfsqRk0mI2ah5JbmcoBnAJmSm3/jAyxXGkT3xh+FSarXC5ZyKzEvFGqODnEhCR7GRtlPY4Q71wrm6fAsUBytjCjEjzyjcU89zbXPubcfzv3UG7kBJX8tHlYTdaXApKhqemZyg= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB3646.namprd11.prod.outlook.com (2603:10b6:208:f4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.23; Sun, 28 Jun 2020 03:19: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.3131.026; Sun, 28 Jun 2020 03:19:17 +0000 From: "Xia, Chenbo" To: Matan Azrad , Maxime Coquelin CC: "dev@dpdk.org" , "Wang, Xiao W" Thread-Topic: [dpdk-dev] [PATCH v2 4/5] vhost: notify virtq file descriptor update Thread-Index: AQHWSvYT0gw343kf+Eui/GoX5oODnKjtX8WA Date: Sun, 28 Jun 2020 03:19:17 +0000 Message-ID: References: <1592497686-433697-1-git-send-email-matan@mellanox.com> <1593092298-52257-1-git-send-email-matan@mellanox.com> <1593092298-52257-5-git-send-email-matan@mellanox.com> In-Reply-To: <1593092298-52257-5-git-send-email-matan@mellanox.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.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: 657a0024-fd79-4a7d-9bb2-08d81b120a95 x-ms-traffictypediagnostic: MN2PR11MB3646: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3968; x-forefront-prvs: 0448A97BF2 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uFFLLOsLvFQX37CTaKSfwMvc5tsc2IZm/C52nBrkk7loHAhg5QPtZvDbRhofmNfpYThkg0uBETSEnmHYRnGEGcPfrc1IsyjFQifsM15Yj7RXqcp9OHg8uLgwxgpauoKCx+9uXhD4gmOa3fwc/RFq9T6tREE5n/dWmHltT3XSu+KDTAPWfnlKLGwYiq/0tce2L0abRsSHx26qrlJX+lyPf4vf8SOOvlE64Yph8MzWiv7QcGE40p17v+veVkvCwZ0dk6VBiLo3mBWHBIHJGbMvp1tKW36YXQUfUfOLRKeD0bKazSwbQHl8Uw45ha2fH1+sG+F+UPM3gP+jxtb/0mMywQ== 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)(396003)(136003)(346002)(39860400002)(66556008)(478600001)(66446008)(66476007)(4326008)(8676002)(8936002)(76116006)(110136005)(66946007)(52536014)(2906002)(15650500001)(107886003)(7696005)(54906003)(6506007)(86362001)(26005)(83380400001)(53546011)(186003)(64756008)(316002)(9686003)(71200400001)(5660300002)(55016002)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: rQpZL7Lxk8kVY6a0kFkifS3JfLwnXuXocH8TkPygBAC79ZsaS8VPehcLg0qrYkA+mvc9SIyT3GVuZ19hN0Y5dfzXN9QShKvY00vh8FoCvrYkF7hG7Cc5hgsYty8f0LkAzSg7YYafPw/15s4qBCBYeDP3bOOG/HP5j3PiJWSNyPCIvc58ftjFjwG5Idi7uXgEj0yq3vIlTHAMkq4hCdn0mIdTUBd/Qb+Uy5ED6yTSWKUtPuqKUpWx7SejJ51Mq79n2WK0HI94G/XhEhALcf/zNeeu7pcQIZ6P+wT3qKBwmBjKbqD6GBiJhPOxCwflKEpQvvDdORL8LBm5CH03QragoTJvuHa9Lg2ORFEnNyYplCHV1Pks2rykLsZl8EY1OO0V/LuBYL5ZTgor8bQ+TAPWunJQ2m7B2vM3tCBERHjNyRbm6Eq1qRCuf3AX2ENuPcNzjQaSu0DeMvmR1eC/sWkn1r4zqPsqeVY5kd2zazNvMcpGZ2ofnm4/6mKlTHB847bS 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: 657a0024-fd79-4a7d-9bb2-08d81b120a95 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2020 03:19:17.3263 (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: HQb3tnmIqT701vBfq7aUe6tPG5Gupx+1UbjHYDU3cK6HLvyL5PvwmZ2N9y4dlPTo5goXvT5KlwPchaQWsZc8cQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3646 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 4/5] vhost: notify virtq file descriptor update 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: dev On Behalf Of Matan Azrad > Sent: Thursday, June 25, 2020 9:38 PM > To: Maxime Coquelin > Cc: dev@dpdk.org; Wang, Xiao W > Subject: [dpdk-dev] [PATCH v2 4/5] vhost: notify virtq file descriptor up= date >=20 > When virtq call or kick file descriptors are changed in the device config= uration > when the queue is ready, the application and the vDPA driver should be no= tified > to be aligned to the new file descriptors. >=20 > Notify the state to be disabled before the file descriptor update and ret= urn it > back to be enabled after the update. >=20 > Signed-off-by: Matan Azrad > --- > lib/librte_vhost/vhost_user.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.= c index > f690fdb..f3966b6 100644 > --- a/lib/librte_vhost/vhost_user.c > +++ b/lib/librte_vhost/vhost_user.c > @@ -1624,6 +1624,12 @@ > "vring call idx:%d file:%d\n", file.index, file.fd); >=20 > vq =3D dev->virtqueue[file.index]; > + > + if (vq->ready) { > + vhost_user_notify_queue_state(dev, file.index, 0); > + vq->ready =3D 0; > + } > + > if (vq->callfd >=3D 0) > close(vq->callfd); >=20 > @@ -1882,6 +1888,11 @@ static int vhost_user_set_vring_err(struct virtio_= net > **pdev __rte_unused, > dev->vid, file.index, 1); > } >=20 > + if (vq->ready) { > + vhost_user_notify_queue_state(dev, file.index, 0); > + vq->ready =3D 0; > + } > + > if (vq->kickfd >=3D 0) > close(vq->kickfd); > vq->kickfd =3D file.fd; > -- > 1.8.3.1 Reviewed-by: Chenbo Xia