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 117A1A00C3; Thu, 12 May 2022 15:40:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF91140E64; Thu, 12 May 2022 15:40:42 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 323FE40DDD for ; Thu, 12 May 2022 15:40:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652362841; x=1683898841; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=APyTsZULT5x4ascK82pcwNo++LiXUlfS09K1EzxTw6I=; b=XlaF+tzGszcUcT3XrnFGCUseCGQrcNUFOpgltPLzYZdJGJOYhdHsaEkz T2LUfVA02trJizj+WDl6gc/ekFTcJof8gdrRSS/YgWIiiUazda2dspSRX 171j0g7hQY8oi0Y1yDt6dwtPHY2Bca59FghAZetkN+zcgvnk37Qdxbj3K Auf58Q9AMUzpgoN7xRghYZFL2bTXnlLLKzDwX9uO+GwZ5y+VbnhVHW5/V 2itYywpHXSg7hGetizN7Bx+teFxeOKBcxakSvddZQHsscUfzKMrjQwJL5 pSY+ilCxH5tGTCIulcuEH81R8Cg3aRxRfkOqm1L+UKRj9pkViG0159i2i g==; X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="270132258" X-IronPort-AV: E=Sophos;i="5.91,219,1647327600"; d="scan'208";a="270132258" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 06:40:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,219,1647327600"; d="scan'208";a="670850168" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga002.fm.intel.com with ESMTP; 12 May 2022 06:40:40 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx604.amr.corp.intel.com (10.18.126.84) 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 06:40:39 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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 via Frontend Transport; Thu, 12 May 2022 06:40:39 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.171) 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 06:40:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RmwZSasAGKSVwk9DHmeYWgaqwLOks8P6I1oMgneWvGuSzcuFH9W7lP9SvJaxINv9huUA8xKT+jhQgyYfTuKMuA1OcojFOFxmIUkoeH7SEAHGaaU6zETzapCQ5jiKuZqBGwlXP+Wd8ZYn6GrVciMwhYFEEYjCeUfkiEp+Z2qJ1EJG8YyBtmN/yU2jJGvlZ7gIxCS99RJ64fWp7h2lorseTDsnexbPpAaPoCUXPuTjE+6ZczmeUVhAuWdbhbAk+CVZupt2ZEs5mPxUYdfYzCPZDXpBuVjx6kKHh+pntUnbf8hoLEb+BaEZtJ/RIXfJ7Wh+QysTG8CqCDORuHRJdCd63Q== 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=SmtzmwK7EWVwe7BYHeyQMiAnk/3WO9c7My95Bd8a1Xo=; b=iQfLtEyCFBtGvishCTb9PhpjM7jW+U7jeVr30vlRugRSgOfiCf+Ir1BRXym2kEra4w+quENchYnTZGMh59k407SpCXB5gfuwZcsOqW/M/i3sq5glA6T1z/P0uztwHCIQBmm0T932Pwr/mNwqkCKOrUXYpnw4SwNNBLYRVrm9DMrOdhLo17dLuiXh/Y/6Dnu+9XdmIoPzsn2Ru+ssqi+FcgmvO5uL1UwVcooGQY1xVeLbYv0FbrMntDh2gPQP5nFtf5Z8SWyf0622aA5fvztYcyeQXWCaseiBBrns9s4hvGICZK5lFd7H1vizCYFcu2EzNavxdCRXd01FkVKr/szfiw== 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 PH0PR11MB5806.namprd11.prod.outlook.com (2603:10b6:510:14b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.24; Thu, 12 May 2022 13:40:38 +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; Thu, 12 May 2022 13:40:38 +0000 From: "Xia, Chenbo" To: "Xia, Chenbo" , "Pei, Andy" , "dev@dpdk.org" CC: "maxime.coquelin@redhat.com" , "Cao, Gang" , "Liu, Changpeng" Subject: RE: [PATCH v7 08/18] vdpa/ifc: add get device type ops to ifc driver Thread-Topic: [PATCH v7 08/18] vdpa/ifc: add get device type ops to ifc driver Thread-Index: AQHYWheFPgG+LFiGMkWmoyHmrHUSKq0bUJ7wgAAGTvA= Date: Thu, 12 May 2022 13:40:37 +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-9-git-send-email-andy.pei@intel.com> In-Reply-To: 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: 5844812d-fa1d-448d-3db8-08da341cffc1 x-ms-traffictypediagnostic: PH0PR11MB5806: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: YC9slVKzBGBUbONnotlbgZBWoNYrWk9DBWYx8lr2l5T2VkM9M0PYAQeTt83sYJA0lCTmBGvLT/k0jhCbZMpHJX8+4gLx4WeNkigu1V5G1Hko8W/ZQI8tbcHtRnlUCdBk5XvjV/UjvYoXnojb1xCiFN97y47R7O2xCagxXnHawpkfuAeCNhpqDkPT1TCehVcJ/fE7IM3UytsSpBp3kVVDr2m4t1oAtrSThhULq1nPHvmzDkfWIQxSDCh+g4ihGxYV/2wLznb4P6JJYPd7HqoaVKArn2SfnJw0AP+fiYoNpDUL1HbPYPt25QYk1c5cRHgfs3IMT9BEXt5daqm9KL3csR7ywVr9Y4W0pQwuYcrGrcidfK8iMq/HAKN/cqi4K9AaXGsmPsoj0EO/2Dr28D1BWc/zuJnquEppbYdNYTpzbpocUq1m2+A2q0OPLLJZM+6hoY5OOSBKj0orNhfDLfIl8vsNnhM6g+qx/ZBqTJ+gQChLGAD/KrTTRwV8AIHlg67VFpWpb0Z1NW+Ctu1pKhKL6au6f5Ud+TwiqJsGdbwmhtb5y1n6KGnsE8uAm7+YCIEuJ1tK9QxuIOHCG9SKmokqzhqs8mppM9HHxMTv04tuAjbHC9czxOm+4+QDJUgnEMmXpM/eY9J9ReOI+UP/CxyYTxvoHwIuzxWg3p4qwmRNsdKpQEHbgeOc+2lltGNky4gu8wBGKx6xGLRCm1HUjVpqYA== 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)(66446008)(2940100002)(52536014)(9686003)(8936002)(33656002)(5660300002)(508600001)(122000001)(38100700002)(38070700005)(83380400001)(82960400001)(110136005)(54906003)(71200400001)(66476007)(8676002)(4326008)(107886003)(64756008)(6506007)(66556008)(66946007)(86362001)(53546011)(2906002)(26005)(7696005)(186003)(55016003)(316002)(76116006); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?DDHaKWL2t2a/0NoFJed5+7gjuw//O6AxpvT1sLECI7njhWPfK4QEYa32KO32?= =?us-ascii?Q?d74fr8gOXHP7hYNhXt3OupCNNeR2es8jFFlYklblmRknVVG2xWtyjmDmCIo1?= =?us-ascii?Q?RMy+J/IwSn9yIaXcJ2/bBXpwNkgXSlAd/LptCaxE72TaXZPGsFnfF67CHent?= =?us-ascii?Q?vhtj4ok9NQ8aSS6tqTdXlrqVp6wVVQk0s4cdpFJLtfepbVoM9iTAnLh8Np3y?= =?us-ascii?Q?C3Ax24tBcKFjy3gVIMDh3Ja0Zqn6pcR/V2/bU+dOeLDTJpfKE27waDy1sRnw?= =?us-ascii?Q?F9FK2nf2Zt3DA6WAVbtLz/K1GOBdazX3YiHs0nihHxguDWn+tZ1hDogQNubo?= =?us-ascii?Q?a/UJ1v160G+rbhGvM3U2eSNIdv7H8SHREpG9fkmiH7qIyiCjF3nlGbJXaO9B?= =?us-ascii?Q?j0b4fFzUNXXtIeI/rllixSA5LF8CTllBOAlBxFGhW4FKKYBhq7nPOAVftSd8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jvY9/0a1XNDJrPkzGGyIb5IH/rVE2?= =?us-ascii?Q?jpC+qAopZqu/LLgpX3QzSKK9vqbIc01CuPGMj2VV/Kz3KlsLBJxplek097AS?= =?us-ascii?Q?+5zzUQmSzqp7nfTRHpERr/TjtBhr09bh+irY4iItZ48gKyXKPOWRhV6FZH7Q?= =?us-ascii?Q?NyD74RuBK/QxaWhhJRD1pUnZpXbVA+ln4JSd3U+514OKrlk63O1LWPFwY5Nm?= =?us-ascii?Q?vKy7ZBc5qkTzHKz/Vsqw6GHSIAcECflmjBkTaFlsm/dbz2WLdA6PiaXUGJk3?= =?us-ascii?Q?9Gx+Z4egUMu6pxxVdqDw1AK7EGI02CKRXY6KpgMdkVyG+eYLiVC5flrAhbAT?= =?us-ascii?Q?D9X9Hmjj6+jHkU8GT/+F0lNbbWKc5MRS29PRtUZrBfIWUacnRKd6f0hG39M9?= =?us-ascii?Q?B4OOdlTFgA=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: 5844812d-fa1d-448d-3db8-08da341cffc1 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 May 2022 13:40:38.0304 (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: JC28Jxv9SlRcC6PPX09HSEdPqPsy7EXxW5BCWGv16jBANgYgExqmyfBLJ3tkGHUUARFjpQt9OOmjDR41qocXvA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5806 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: Xia, Chenbo > Sent: Thursday, May 12, 2022 9:22 PM > To: Pei, Andy ; dev@dpdk.org > Cc: maxime.coquelin@redhat.com; Cao, Gang ; Liu, > Changpeng > Subject: RE: [PATCH v7 08/18] vdpa/ifc: add get device type ops to ifc > driver >=20 > > -----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 08/18] vdpa/ifc: add get device type ops to ifc > driver > > > > Add get device type ops to ifc driver. > > > > Signed-off-by: Andy Pei > > --- > > drivers/vdpa/ifc/ifcvf_vdpa.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c > b/drivers/vdpa/ifc/ifcvf_vdpa.c > > index 8a260b7..99a6ab0 100644 > > --- a/drivers/vdpa/ifc/ifcvf_vdpa.c > > +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c > > @@ -1300,6 +1300,15 @@ struct rte_vdpa_dev_info { > > return 0; > > } > > > > +static int > > +ifcvf_blk_get_device_type(struct rte_vdpa_device *vdev, > > + uint32_t *type) > > +{ > > + RTE_SET_USED(vdev); > > + *type =3D VDPA_DEVICE_TYPE_BLK; > > + return 0; >=20 > This is not right. Remember net and blk are both using the driver? > This will lead to using net also returns BLK. Correct a bit for above: will lead to net not working. So implement callback for both (although in the API, NULL callback can return NET type) Thanks, Chenbo >=20 > And I suggest the patch-set validated with both blk and net... >=20 > Besides, ifcvf_blk_get_device_type should be ifcvf_get_device_type >=20 > Thanks, > Chenbo >=20 > > +} > > + > > static struct rte_vdpa_dev_ops ifcvf_blk_ops =3D { > > .get_queue_num =3D ifcvf_get_queue_num, > > .get_features =3D ifcvf_get_vdpa_features, > > @@ -1313,6 +1322,7 @@ struct rte_vdpa_dev_info { > > .get_vfio_device_fd =3D ifcvf_get_vfio_device_fd, > > .get_notify_area =3D ifcvf_get_notify_area, > > .get_config =3D ifcvf_blk_get_config, > > + .get_dev_type =3D ifcvf_blk_get_device_type, > > }; > > > > struct rte_vdpa_dev_info dev_info[] =3D { > > -- > > 1.8.3.1