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 142B0A04FD; Mon, 23 May 2022 10:32:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A7B754014F; Mon, 23 May 2022 10:32:00 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 10FF040041 for ; Mon, 23 May 2022 10:31:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653294718; x=1684830718; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=FvZB5SnBwe2MczhziOG+f2m030fBKW/Twcx7QVHlB5c=; b=Ej6z4DkUVh3HuOMA5Bmlbs9QInjIQtZemAH7GrYtXYpYsaDEi1f4ShKm wBKworYR+KtTUr2+gjI0ZiMHmwlNAmEIsEUMwfZsHJiYU6NxczmJ1AcwD t6Zz6ZG5uzbUlj8rwOxJQfnXClOgRn2iR+Du7A440IeDc7IXxtdYFMS9S IMYNQAwJ7JvuvRuO1utyfCnYtOkqjhg6LC8KB8Ogr7bTidCIbV0H9QreJ NVUBMXPDfi5maShqHowOyoD/qXZPB3bSxQZXpdwtqfaeWmo/+BltXK3BQ F2sNVlSlfeftigHFxEmcyhSUQBsd0O0SJTtVEgT/VdtPBSTAgV+kliMO9 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10355"; a="253024120" X-IronPort-AV: E=Sophos;i="5.91,246,1647327600"; d="scan'208";a="253024120" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 01:31:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,246,1647327600"; d="scan'208";a="675757975" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga002.fm.intel.com with ESMTP; 23 May 2022 01:31:57 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 23 May 2022 01:31:56 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 23 May 2022 01:31:56 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 23 May 2022 01:31:56 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 23 May 2022 01:31:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C3dx4KXbz2zALoPq0CormH2O5g7NRH7iHLAx9VQm4qyeHg9/gosJUCy8tLamaTeEVtWtewmcyHqc1zvoLymFbsFtBOM6o1bRLqrwmMZqUdf30sk704UawzUw0cTMRafiUCbpgCb71+tF5QkS0cspC42g9RMFsznHMxP1dWFG6RpCycCjb4ydntz3LFRB+qjf1+IDHe40uMTdGGKL5PiY4P71JhdsKpSs5YchA9yNSwqK6EkOZq1JLDH14FuX7Kj26HkjUmAbOMrfKexr9xAhjPkLqAmqmWSXR7be6t5uV5if8o1RAPG8M7HTKPZHI/sduA3obqtrkOgHuV+l9JBL4w== 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=/iVH8z2X/MI1kN0hfgpa7uje+hvRA+C9DFqygka1JcA=; b=ULMcMtL6pAWxFGEEPh8cXMUzl722ZOruE9vdpVR0b7yYLX81ZwOjPFd2O9rnjnglIEkauQdDPo9Z7l54bsAtecOesAD7E5C3Od9DeZN4P+MiJJpa/n8SIZLrrU6bRBPqvYM5Snf+9kRMh6upNKodZ4ATsh3YgTCQlpy7Dhsyw5IPkJlq4qYBFfnfvR2MHA6oAjRKTtwANc6BU+cKcm3/C3VmvmO3/EMeoHLmtC6PAru09IvXkEPh3oenwspbTQwDYe3Vyxponk3sP6s3sCGoig417yClMTPuhIbSYikfMuJ9nbqVHpqLLD707eFSNg6HFuhSVlhxSh6uWql4kza4+A== 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 DM5PR11MB1739.namprd11.prod.outlook.com (2603:10b6:3:111::22) by MW3PR11MB4747.namprd11.prod.outlook.com (2603:10b6:303:2f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.16; Mon, 23 May 2022 08:31:52 +0000 Received: from DM5PR11MB1739.namprd11.prod.outlook.com ([fe80::8c3b:8a54:d186:b555]) by DM5PR11MB1739.namprd11.prod.outlook.com ([fe80::8c3b:8a54:d186:b555%11]) with mapi id 15.20.5273.022; Mon, 23 May 2022 08:31:51 +0000 From: "Pei, Andy" To: "Xia, Chenbo" , "dev@dpdk.org" CC: "maxime.coquelin@redhat.com" , "Cao, Gang" , "Liu, Changpeng" , "Xu, Rosen" , "Xiao, QimaiX" Subject: RE: [PATCH v8 08/13] vdpa/ifc: add get device type ops to ifc driver Thread-Topic: [PATCH v8 08/13] vdpa/ifc: add get device type ops to ifc driver Thread-Index: AQHYarda8EX/UTF3hUa2C41tZJdM6a0sGB6ggAARg4A= Date: Mon, 23 May 2022 08:31:51 +0000 Message-ID: References: <1643093258-47258-2-git-send-email-andy.pei@intel.com> <1652876035-70513-1-git-send-email-andy.pei@intel.com> <1652876035-70513-9-git-send-email-andy.pei@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.401.20 dlp-reaction: no-action 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: 666bb685-6ddd-4ea6-e91f-08da3c96afca x-ms-traffictypediagnostic: MW3PR11MB4747:EE_ 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: PI6wBQakd6KQceomCH+UEDS2pIJQm5j2VdD8zTllV9SjGaHRDJU/fuv4QajUtEEQydL8oM9e09seeVouaGfWY/nGhwdY0KufUtpXOKONbmJ74Pq7o7LkDbrzV81sU3UNg9+wAMLGfzRegWDFDmh65ZfakQvPDqv2NdxCobo0cBCQQHck4Eb2Fx0D6aIL4CbgwyppBkpyrewPv8DAy3OOVdTA2WTe8ZlnU85ItHGKcHWgTL5pEpQ4gDolKlHeymQajrDawG1HXSytrIs/Bbnpj5v7TdDkf1CsmpW1kHQMrg47wYXUF7FKSQzT6HET2eqRqr2SZOjeLHbFcASW4JZdur7OuodO3Ly2J7ilVKyd0qN5NNAWriUFtQOPBRql1sLm5iaDc/rpwP0yseJKFpwVi1eS2qi2OYB1kWHbqChifS5VM1A7ZPdcBEP4RDJGoAFa95o5xt3nOAUYlTeZVK0SND3aO+wxhnB61cSp1H2+RP1PDYeC3PAhOlvhm7thbm58gHRu/nCUD5Q6TUZo3QjT+oM/8rVAXc2YRvz9B5DkCtIs2qlOE/X7v30WnliYc3UITC0bPTZNTir8jIXsITah8mSPTjv5U+dFQArNieTVuC5/m/sOpfrFCMXfQGBpk9QLL9P6EXWJE/32wMZ5XjhlIZtq/Ex3l44ZnrmU+cFGU4lo26uQO+ej3C5eEjbJJIwfwyflJBXYqr9Uf9HfSdGeTA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR11MB1739.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(7696005)(8936002)(82960400001)(86362001)(110136005)(5660300002)(6506007)(55016003)(53546011)(52536014)(54906003)(508600001)(316002)(122000001)(71200400001)(38070700005)(186003)(107886003)(2906002)(83380400001)(38100700002)(33656002)(26005)(9686003)(76116006)(8676002)(4326008)(66446008)(66556008)(66476007)(64756008)(66946007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?WIrnS6foFC0Z5mTWNQVEo6JzHqXDQpsRqddWhWuafOxxwCiEBSsIL6tngf04?= =?us-ascii?Q?hiDGgJUfRfXyTKHNk4//yUnHhbbshPhMvwmYDGzIytMaq8DjmCnfGvpCOKhO?= =?us-ascii?Q?cENAhyo2/umpBhgAX60xtKMIy4SjTAAudhkQPQzlsPY2Ed5/oRTa280XKf6L?= =?us-ascii?Q?0F2+l4MkjM3xHRr6W+5Aw9Z/Q1Owb7xTFrFsOyQ6Bz7Y3SkYaAzrdOIZgoN+?= =?us-ascii?Q?LBjB3OFm/EVMSQnAEv3i5m9f6IhgvKBwobN8dDa2isOKYhYURizVtfb512ph?= =?us-ascii?Q?+ikrvmifByJ46vpPg2Kep0TBVH41sQItAYG4BwAtsT7R1JRVgbYTdbQZpmJD?= =?us-ascii?Q?W4E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d4fTMvjM459I51DjFnz3eilo1tQBfg?= =?us-ascii?Q?CxjK3BJ3DECBBDSAS4U28oh87ISLV9IxXHwILvhJ22KRPBNo7OENXSm1Bbqm?= =?us-ascii?Q?rub7v+mx5NjGqp4zCrYHSreZ9BuRPqARXxxEoU4U/2sVbVGZf70e6vkjKIdy?= =?us-ascii?Q?azx23MJzx3sT2M5RjLJ8viwxGxELyZ8EE0n8dgG19NxVBmHEFJrrkDvu5hk4?= =?us-ascii?Q?naM/e+fKJv6F1RKBl+tXssZd09Uw4PW1tsKgKLOq+IxcH/JSXSLX0VDTLIOD?= =?us-ascii?Q?AnPI/s2W+zPiUmAL1T+3Zb0s6N9ed3tzRH/eYodiyPRLLc727OR4uYrGxPuI?= =?us-ascii?Q?f4RD1JaWXyspzt/GWiV7fVC46VYWdE0EXxd1ckhA8pZKqhczVmUWRL6/29zI?= =?us-ascii?Q?W3QqijHiLillRKrTTaKiWmPsqwsjtlEEteW12z+gPJ5KTqiP8YjDFa4f0ub4?= =?us-ascii?Q?+EhM+XT5+zJ22DVUtXUK2eqSSP1j6oVDqs9Ew3LbNvA/FqyN0/AG19JOOQCz?= =?us-ascii?Q?E3Asy+viNA=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: DM5PR11MB1739.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 666bb685-6ddd-4ea6-e91f-08da3c96afca X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2022 08:31:51.8105 (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: +vRh7hAwoqEQjeLVyUSk3Rhou0rChTiLz8REQ9bCUszAkk5u1ODj6aUOj9exML1BNy//IgTAX3ZMDD7mrhUiHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4747 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 Sure > -----Original Message----- > From: Xia, Chenbo > Sent: Monday, May 23, 2022 3:30 PM > To: Pei, Andy ; dev@dpdk.org > Cc: maxime.coquelin@redhat.com; Cao, Gang ; Liu, > Changpeng ; Xu, Rosen ; > Xiao, QimaiX > Subject: RE: [PATCH v8 08/13] vdpa/ifc: add get device type ops to ifc dr= iver >=20 > > -----Original Message----- > > From: Pei, Andy > > Sent: Wednesday, May 18, 2022 8:14 PM > > To: dev@dpdk.org > > Cc: Xia, Chenbo ; maxime.coquelin@redhat.com; > > Cao, Gang ; Liu, Changpeng > > ; Xu, Rosen ; Xiao, > > QimaiX > > Subject: [PATCH v8 08/13] 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 | 25 +++++++++++++++++++++++++ > > 1 file changed, 25 insertions(+) > > > > diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c > > b/drivers/vdpa/ifc/ifcvf_vdpa.c index 3e78c7d..0acfa8c 100644 > > --- a/drivers/vdpa/ifc/ifcvf_vdpa.c > > +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c > > @@ -1189,6 +1189,29 @@ struct rte_vdpa_dev_info { > > return 0; > > } > > > > +static int > > +ifcvf_get_device_type(struct rte_vdpa_device *vdev, > > + uint32_t *type) > > +{ > > + struct ifcvf_internal *internal; > > + struct internal_list *list; > > + > > + list =3D find_internal_resource_by_vdev(vdev); > > + if (list =3D=3D NULL) { > > + DRV_LOG(ERR, "Invalid vDPA device: %p", vdev); > > + return -1; > > + } > > + > > + internal =3D list->internal; > > + > > + if (internal->hw.device_type =3D=3D IFCVF_BLK) > > + *type =3D VDPA_DEVICE_TYPE_BLK; > > + else > > + *type =3D VDPA_DEVICE_TYPE_NET; > > + > > + return 0; > > +} > > + > > static struct rte_vdpa_dev_ops ifcvf_ops =3D { > > .get_queue_num =3D ifcvf_get_queue_num, > > .get_features =3D ifcvf_get_vdpa_features, @@ -1201,6 +1224,7 @@ > > struct rte_vdpa_dev_info { > > .get_vfio_group_fd =3D ifcvf_get_vfio_group_fd, > > .get_vfio_device_fd =3D ifcvf_get_vfio_device_fd, > > .get_notify_area =3D ifcvf_get_notify_area, > > + .get_dev_type =3D ifcvf_get_device_type, > > }; > > > > static inline int > > @@ -1327,6 +1351,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_get_device_type, > > }; > > > > struct rte_vdpa_dev_info dev_info[] =3D { > > -- > > 1.8.3.1 >=20 > With renaming fixed mentioned in patch 7: >=20 > Reviewed-by: Chenbo Xia