From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E06FEA00C3; Fri, 13 May 2022 05:10:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DC5F40DDE; Fri, 13 May 2022 05:10:56 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 4F7E740698 for ; Fri, 13 May 2022 05:10:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652411455; x=1683947455; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=K3Zlp5wbwvGYdURhv9/4sv7OzUOaKpgLeIO94Yatii0=; b=a/zNaJWhyXf4Xo08c+F3vjLh0c4YvSYWX5f1wjsCUXVMt5rtKUWp6vQY +3M41Wpn5nWm1x6dKNWrzbILBXh/RiH8pdrni1wZIJ9FAx/dw5zP4LSDx +d9cO94q+iLSIKy+JeGzus271pGgBrG8DgGTBm8n0gnDNEWM4PxyaShlt OKqD8kM/9qjTUMCorSfxL+3NtDsfCBdTys4orusyKGYtx1zFKi6cAlMNJ gpVhDslVKUBE4+asq8S653NybD7650J4fEp+13Gobvc4dZUQE8T38J6jk 4gY1HQbGYLXBKTESL6suXwciejHQc80rbc459871tUx23o55uaRU4Evae g==; X-IronPort-AV: E=McAfee;i="6400,9594,10345"; a="270333318" X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="270333318" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 20:10:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="566993554" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga007.jf.intel.com with ESMTP; 12 May 2022 20:10:43 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 12 May 2022 20:10:42 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Thu, 12 May 2022 20:10:42 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.102) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 12 May 2022 20:10:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Eoa3miacpoxu3W4TOR97sw997SM6H9taGeM2ueAzsSxXc+3+t7v7lhAboTbJ6M9q4ChiCuCO9H7uLwz/H4fIkOSTAS6kvvpq/dsW5/R2u7CXe2uqsgVNg+ecpQkCoEO7hah4GW0xDJBOAG3pCyDZsy0p0W2+ATHRS5X8GHkXLJDpOsu/jgmiOK+TZB9ba4l3+liUgSeviB8WukLakrkuf3R75YWpdwLmqzxCXbEcKGvIf6GThLvsjyQGXqSZ84IWOkvTLJxQgl0E7jaUEQZT7Na+gBqFJ1xDvJAVq3601bGbVM9MWNKWigokNeiM5XV/djPUQ5UHMr8vmYiFGU1pFw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=i7cPwjZhBGJ8mmzXg50isnuiwn0KramvdR02uPY6Pd0=; b=FTqZ9fTkOaWqycsPHc+xi4sRhgr8Tvl8FhyIEgsCux0t+XK+RvRgr0BuXLJJRnX4b6TEhQ1g43PqPPNe8wU9uys2RFQxiFv1ZKfAESlWMZWDA6vPvvxTzZ/Gy/YuZsvW+8NuuBNrlPX6BbL9tefyLAQOA3kWPQawbdFcULp1lvU2xK95Jr6C8szS74hYwyL72fy8OPYGrM+1SPbZjMAPB24BwVmHbsPas2tDrOKhoLjMCPaff6kN2CfWG+K0pDt9UaCSAZE/kzj+gLjcMHLgI5OJ3erXfpX6QTmRR9eKxbsZR1WSCjppxBXdxeYFY7+TdGxNm9RFGNri/IH7OLcPHA== 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 Received: from SN6PR11MB3504.namprd11.prod.outlook.com (2603:10b6:805:d0::17) by SA0PR11MB4560.namprd11.prod.outlook.com (2603:10b6:806:93::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13; Fri, 13 May 2022 03:10:40 +0000 Received: from SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::2c8f:42df:ed85:99e5]) by SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::2c8f:42df:ed85:99e5%4]) with mapi id 15.20.5227.023; Fri, 13 May 2022 03:10:40 +0000 From: "Xia, Chenbo" To: "Pei, Andy" , "dev@dpdk.org" CC: "maxime.coquelin@redhat.com" , "Cao, Gang" , "Liu, Changpeng" Subject: RE: [PATCH v7 18/18] vhost: make sure each queue callfd is configured Thread-Topic: [PATCH v7 18/18] vhost: make sure each queue callfd is configured Thread-Index: AQHYWheafXPRgoSqHkameazQC1e3660cOWtA Date: Fri, 13 May 2022 03:10:40 +0000 Message-ID: References: <1643093258-47258-2-git-send-email-andy.pei@intel.com> <1651048206-282372-1-git-send-email-andy.pei@intel.com> <1651048206-282372-19-git-send-email-andy.pei@intel.com> In-Reply-To: <1651048206-282372-19-git-send-email-andy.pei@intel.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a6aed627-d5e0-4d68-50bd-08da348e2934 x-ms-traffictypediagnostic: SA0PR11MB4560:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zroDkFng9iEUXaN7lyDMdT2iV36DNFowiQJxMDevUHITwTdptlpHXBBu+BEcVV9xfYj/h7VF1m3axq7bxlCBhr9JuH6P0dIRb0JaW+r+AVnoqkwBByXt8tpplcIGE/sc+VdEHK+K+3vSvE/ffotK6WS1vdkIRvUanwesfxIjY38Q0HvEs6zxkwys17PKAEJkkaw2oQU3DmQD3snDoFewR2wrXQ0zmIfi3UTBxLTQBpcgzOCoEgkrhNXf2Y93hl+cuADvKiYLq1Bt93mwk3NVXFBiHRXXsftyP5zJMo1Q3EFavdPHk6VT1qufCh7f04lPMJpzqY7NlwyHjpdJwAb0OfykihzB0nkj8+mIMZm8kQOMAhDO1MqoYzsZ6/B6II55qWxSiKdZzgh7WToYYoWvbtrwynrbpB9VxE/QjJHLocbht3Jla+6JVmNyMGO2IjmkvBq0U9hYZ/4PPD7pH/Z0+S0W7lCUMT7IbQ4pEhzJvfwSFWwxr5YhWxDgAspxgtkoeUVDgvZjlGkbbHdFw061wutCskbP8UKYytVFWwYZGax7ZYE0ffQBtwy8ZcSKtP/TFLmtdI5JzGuBjLGwQM7qOOQWRjTi/ANQNUCok4aKMENcp6pHxgw+k9FZoREZf6y1XxPYO+2WDF8Me6wBSdSSE3YdHcqwZnPRlR0xPbhoqA+YjH/Xkqu2Q/R7FCVQ9dqRFxmHvybzGcAio7M7ZfnH4Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3504.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(52536014)(66946007)(66556008)(8936002)(33656002)(82960400001)(66476007)(4326008)(76116006)(64756008)(66446008)(5660300002)(53546011)(508600001)(86362001)(71200400001)(55016003)(38100700002)(107886003)(38070700005)(122000001)(6506007)(8676002)(7696005)(316002)(2906002)(54906003)(110136005)(186003)(26005)(9686003)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?hgqOGXIkK1g3lNt9efQAHu8oJ38F9riXET28dvOLLRfMsbKDmT7bX6Y+T+au?= =?us-ascii?Q?g37gN3wesjpzkA8QKqCeh2qwcGNvPtSR70JTTbaiSmO2TOJNbEzt+7KqX6sJ?= =?us-ascii?Q?OYj9ze8RYqQFr6MJEeYjfSqTLJkqteMzuFhpsqiZT08Caog6O2F67IOA0izy?= =?us-ascii?Q?vC+0xFzyoiwRqI0MvBaKGKr8zoUjXICrYQahE8PEi0nFcO8Xu3kLXgmGJE43?= =?us-ascii?Q?g9uP6ihDm0fZ43ZoQrxOBqaLj2x7dl/kedfDd4/zsvEmXy+rnk9pJvcAHn8Y?= =?us-ascii?Q?HjHOD6991yCK7YqjTmKwDPBDek8Gnk3ZDiXgM1+cdDyTRY6QZUVPUQQFjjS9?= =?us-ascii?Q?AehTZ6dB5jt9zBrFvNpULj2coE3ltLQinohMT+DuLZ2AK4IAoeYHsim+hUmy?= =?us-ascii?Q?ZoJKOaeXSCJ7gOdsGE72nrqDBsQuUPYT1jLFuIZLdUTPvc7ARDDzl4+0bbCK?= =?us-ascii?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kgQbB44DqkV50T?= =?us-ascii?Q?UmtPYTG2cwTLdgFlbgi8rDROsg/bNupMLjY9Ad3suVqqYpdutIczfWNhr+Zw?= =?us-ascii?Q?RpLfIGnIT50VPYzXwjxqUXtRH8h3H+oxFUjGBVVzel042fnzQVPVq9K9N5fC?= =?us-ascii?Q?ngnvz96vk+bWupxzBMCgfs+IdqdDES9ceywYlww/VdNliEn+UptW2Zv/rCEM?= =?us-ascii?Q?Molux9UQ0yNPUUTej0HMyxY7BgV6+PA+R+r3aw/9lkjwsOwCJajqLmWWFk3j?= =?us-ascii?Q?4LfnyWu6hKR3YUZShaJ4RX33bk0JzLySYp/5GiZSkt8SSLrmTwZMpxUDclUj?= =?us-ascii?Q?/kGmctgkQfJJnZhQedAmqHC+9sQqlwmZo1uTieOB6TwMK0595fW9AdXsiEF3?= =?us-ascii?Q?89D3nsmJrA=3D=3D?= 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: SN6PR11MB3504.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6aed627-d5e0-4d68-50bd-08da348e2934 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2022 03:10:40.7016 (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: 0Ea8XjIoxJvb7Ng3tGu3HeYQDK7fN1MWNUNpW8/v5e3/1kgI6Xg6VeZiLBP0LPCoajnshhORbOwTsk7eiLZBqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4560 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Pei, Andy > Sent: Wednesday, April 27, 2022 4:30 PM > To: dev@dpdk.org > Cc: Xia, Chenbo ; maxime.coquelin@redhat.com; Cao, > Gang ; Liu, Changpeng > Subject: [PATCH v7 18/18] vhost: make sure each queue callfd is configure= d >=20 > During the vhost data path building process, qemu will create > a call fd at first, and create another call fd in the end. > The final call fd will be used to relay notify. > In the original code, after kick fd is set, dev_conf will > set the first call fd. Even though the actual call fd will set, > the data path will not work correctly. I don't understand the problem. If callfd reset, we should re-configure in the set_vring_state callback, and issue can be handled there. Thanks, Chenbo >=20 > Signed-off-by: Andy Pei > --- > lib/vhost/vhost_user.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) >=20 > diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c > index e925428..82122b6 100644 > --- a/lib/vhost/vhost_user.c > +++ b/lib/vhost/vhost_user.c > @@ -3230,12 +3230,26 @@ typedef int (*vhost_message_handler_t)(struct > virtio_net **pdev, > if (!vdpa_dev) > goto out; >=20 > + if (request !=3D VHOST_USER_SET_VRING_CALL) > + goto out; > + > if (!(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED)) { > if (vdpa_dev->ops->dev_conf(dev->vid)) > VHOST_LOG_CONFIG(ERR, "(%s) failed to configure vDPA > device\n", > dev->ifname); > else > dev->flags |=3D VIRTIO_DEV_VDPA_CONFIGURED; > + } else { > + /* when VIRTIO_DEV_VDPA_CONFIGURED already configured > + * close the device and config the device again, > + * make sure the call fd of each queue is configured correctly. > + */ > + if (vdpa_dev->ops->dev_close(dev->vid)) > + VHOST_LOG_CONFIG(ERR, > + "Failed to close vDPA device\n"); > + if (vdpa_dev->ops->dev_conf(dev->vid)) > + VHOST_LOG_CONFIG(ERR, > + "Failed to re-config vDPA device\n"); > } >=20 > out: > -- > 1.8.3.1