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 7DC9FA00C3; Thu, 12 May 2022 15:21:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2286E410EE; Thu, 12 May 2022 15:21:54 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 0304140DDD for ; Thu, 12 May 2022 15:21:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652361712; x=1683897712; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=OsYqj2U63xgveO8hQDTLk2+HbibAA7YK/FQ/Gb2m2aE=; b=WmRNHZmdswx4++8JxXxB3SyDg0hvYb4MmXr+5x3Fkuk/JJkQLtNfM54J sTEdOOTUu4r84D1tbCIrcwRv8+RqU7TVHPkxZFikLIPKoOapGehXjYmjT js8H3dbql5s3N+ON1A2ywCVnBFJvjOuEJava6IH9tUM2AaAiZN7YZ+cx5 MHXsCtuVD0iDcRt3U3IOYlvhauI8hIlvJOkCfC2szEzzY7uU04v+pWN4F gF2UvZLkAXPnmKctT2r1cilD8KMP5ld6i97RuqKNNykUjvdg2M00Hl6yY 18nhuC2iIGL1tPYmkCoCCH5zVHbyjFq4BBiFok/c95MaQeYyrg7aEGdA6 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="270128067" X-IronPort-AV: E=Sophos;i="5.91,219,1647327600"; d="scan'208";a="270128067" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 06:21:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,219,1647327600"; d="scan'208";a="658598943" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by FMSMGA003.fm.intel.com with ESMTP; 12 May 2022 06:21:51 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) 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:21:50 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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:21:50 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.44) 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:21:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VgJsiJoANJKMKCadTPI0hGcQdvASuMC6oJBQdQE5LGXoDaR9DtPj3UbnYYis24+J61AU9vTUBYDw/E5NlErjsrespMVblCeptR2/GONu1OSASH4cHjICR0kruhcvyVjHyodU7fyjRMM91puArOzzrA2RZoh24ZLGfopjB7IuM9/74nMI83JqpAj2UQZFbUVzTyaKhmB4pq8qXsnz+FjGJzhCkzUPHdgZvHNoZr9HEEVYpo3aq9/5XVrbE+k8alInZLo69r/GbL/gycJ36XPMLGKJFDuEG4yKqyxM8JTksK2SqibtbLLQoxaOJBw+NoV8fvUIW3DEcJR8UyqZzFfXlA== 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=/BpOMGRLA5qj/slnTDuTKROO6p0ND+Y384z8av+j5Vs=; b=i2e+kxsP8hV5ELgVLlGZ6oIB4rqvxsX0jh0hbi3OO8YSAsdgWxbtd4swReJByCex7NZQIdacUTRzVaRnRSOJZFrS/dyL183N3TyPIaklwxudzgDf1EWgfrSGCh3yV32MWVXRgk55Z1rVYMph15EKMXDx4oL7qI1jFtSdFbbUX7rktkbK3OZEZBKNkplpWGDVyeR3MreOYQjosfD0HknSyMyy0C9/J5Oxl7xFYQUI40FDYyOeG73BOof5nQ8oxGw9cAZUj+fmHBiez2X4S9uTbzxHXJOa3p+BEGNVRy3CoQGEt6cGMdhXZw1OxQFEoPvW1jXCIynNvYkQg28zwMCUOg== 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 CO1PR11MB4980.namprd11.prod.outlook.com (2603:10b6:303:98::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.14; Thu, 12 May 2022 13:21:44 +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:21:44 +0000 From: "Xia, Chenbo" 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 Thread-Topic: [PATCH v7 08/18] vdpa/ifc: add get device type ops to ifc driver Thread-Index: AQHYWheFPgG+LFiGMkWmoyHmrHUSKq0bUJ7w Date: Thu, 12 May 2022 13:21:43 +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: <1651048206-282372-9-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: 585c381d-a839-4485-4347-08da341a5bcc x-ms-traffictypediagnostic: CO1PR11MB4980: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: OHHpDAO9o+YxoFm/jwV340BQpHJ0/FHchxmTfjkbHoqpxi1L+O2bAqA+buuLvNFCiS5+0zMscvryFs/eYMykZKLnYtBhlDT9goIxD9sMolcMW2QTGrZYTEh5OfmTlOY8I4T0/xSI2G59EuSloVLEOOxFxtLOiPp08LhwFuB1souQW0m3NDH42i9fos/qOfHTj+4vwbTMuqG3w30vULjgrcvV+ZRtaGOuQ1Aga47gyeMuunuje3PZdBh9S0m8MXe7AdpM7c55F75RK0UKFc2454MDh2Ja60Y83iIfnG7C46JM/d7gF6pUmmQUJkjw8HO+gLBBS+K0abpVk/brr+NSAVukNoYKw7lcYpoNj0MgJt9c3eNRVmZJuw7askUKxVpABETzDWRe06921Q7pCz3XXpvsGN+m0WVtJO3E2z8CwS4fxpJVob2PHBxoPucSxaIpOfJalJVqnMAHzGnrCCgHb3AJZPzE+CsRSj+x05Vy1c5lYg3OsKYzALxhnizju4Z6KKmaUEUsT5czG09fK2ALLm8nkQeCwVMTnvWplYOTxEXruNNgbjTMc10pLpopbGmi7nqjroagH84/yf6fgubT4tRgcOPd0gCOTmJ+W5ilegphPI9IdidAJGfpVmZRsP2ZAFzPija+nmHG6TJQjuqxpoOuRlzGBOCU75A3aWAAXbhQRd5G+j/dryZoqgUnsT9MdHV+9Zt17ABS+idNw30pOA== 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)(6506007)(55016003)(9686003)(33656002)(7696005)(66946007)(71200400001)(2906002)(508600001)(52536014)(8936002)(53546011)(26005)(5660300002)(186003)(38100700002)(38070700005)(86362001)(110136005)(83380400001)(316002)(82960400001)(54906003)(122000001)(8676002)(107886003)(64756008)(66446008)(76116006)(66476007)(66556008)(4326008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?rwe1B7nelHOt2pI6T1iGBcOaTkOR4OTc9jLfqqV6G9HGmR3KVEyGMlV3VTKd?= =?us-ascii?Q?hUKUjh7qP1iXjgsS9oMO7/O2CcQ51UbVKDgHKbP/chounA+AfaGavuxl4ZqP?= =?us-ascii?Q?l90GoMTPhS/FK0VT5l3jgRL4a3Jgez3srcrjZKT4aAZUKbvSCUCMNbYA5wEk?= =?us-ascii?Q?TcSgJhtJ/DKHq3YeKoj5fDeIZgBc9SYaAXPfmGrkNI//IetM9bhMHqwSW3My?= =?us-ascii?Q?UZQgfe8tJNhG7To7NdSrAIC4hNXx4zTWtMzYIauGaLFwxkBheeq0F4Rnisbi?= =?us-ascii?Q?Zg/HgGGjLa2BZZaX9avOlweiefcDxx8odYEyncUBKOT+zeY1KhppSK/366Bg?= =?us-ascii?Q?36axYwK/Lm6yyyymcbgLQX4KbGzGi100VO0gswp3tn3ysOgQUobnyjDyk4G6?= =?us-ascii?Q?XKYTMQM8klEPcsX0OpyCDStvYr2+P2pb4i0efbARVkyt98LEVBzydLF1GZfd?= =?us-ascii?Q?PIbNaBLv/830pUh7ZJa/a9rljmSLPTEI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?= =?us-ascii?Q?eIChhvbP6BuRUBrXVoFMaCOEGTCucUw51wXQsIdqnypbDZyL1ZcyxIr5UBpH?= =?us-ascii?Q?Yyh/zsQh8U/g9O4kzgb8VqUiVEqxtq0GTu7RkGaOH9lM+evz1Z7WuOoaKmBV?= =?us-ascii?Q?2aPf6/42ug7KHRvkLo0WInEJ0kR1dzk4pSwgSh1z9EJrwRy53u4XGEUGUV5X?= =?us-ascii?Q?62CWn/0/ys+f/zIrMaTnNQ5DEcU2ZniTNXSCmmhPysPEDcw7UG8Z3czfTl21?= =?us-ascii?Q?xoOkpQdBr8C9//Swtndiik2ezY6aDERWZ5FVMBCgAJxvBjQ7kb4ifjLbzp/1?= =?us-ascii?Q?R6EDZ0ZH6lFrHyr1Kqsc5HZLTt6f0qB/AGa2PtlZxDYG6lOydw99Lv4JiLr3?= =?us-ascii?Q?4q6xNyvT7g=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: 585c381d-a839-4485-4347-08da341a5bcc X-MS-Exchange-CrossTenant-originalarrivaltime: 12 May 2022 13:21:43.9941 (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: VlFWdVg+v+DGQqfGaSw9mGu3SQWUUyJNxH3L5V08LVyQbDfGchzfzHALxL7jxrFEFuP+QL01h3yOFF/XlVW8ag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4980 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 08/18] vdpa/ifc: add get device type ops to ifc driver >=20 > Add get device type ops to ifc driver. >=20 > Signed-off-by: Andy Pei > --- > drivers/vdpa/ifc/ifcvf_vdpa.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) >=20 > 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; > } >=20 > +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; This is not right. Remember net and blk are both using the driver? This will lead to using net also returns BLK. And I suggest the patch-set validated with both blk and net... Besides, ifcvf_blk_get_device_type should be ifcvf_get_device_type Thanks, Chenbo > +} > + > 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, > }; >=20 > struct rte_vdpa_dev_info dev_info[] =3D { > -- > 1.8.3.1