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 AE3EFA00C3; Fri, 13 May 2022 04:55:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D9DD842840; Fri, 13 May 2022 04:55:36 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id A904B42831 for ; Fri, 13 May 2022 04:55:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652410533; x=1683946533; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=KlyzqD4PQThW5ycym30e7A2ml5ZCnMBleq1ncrS5xZ8=; b=Thkya/+DDkPUkIRF7aRI20KSggm5AB7TJjLRiM7+22gnK+KyeaMlssZ+ lBt8nYRUlUz/SjHd7GYgPfZfYBG560iJsR0r6IEAUUolk87XVmAoVJd43 7zU/oTCWEiEg1iRYktjLHn/jedsz02kUwIn1i5enCidsIMLmnVtCcBcy1 phCQb+WBj50DLdfDKNY+LDDuiqZ40d2x7HB4Gjz776uis3Iko7ye7q2MU dlq32kNOGcKmPFjXSwklxFyH1orhhyio79S00dZUIqGN8/iBGqskMmIr9 3WabZCMGKFyd34ArvzTlKmgetvT9Z9KChxMRfFCbqcaSa7ALYCmrAOraB w==; X-IronPort-AV: E=McAfee;i="6400,9594,10345"; a="252244156" X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="252244156" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 19:55:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="815195334" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga006.fm.intel.com with ESMTP; 12 May 2022 19:55:32 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX601.amr.corp.intel.com (10.22.229.14) 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 19:55:32 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX608.amr.corp.intel.com (10.22.229.21) 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 19:55:31 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx608.amr.corp.intel.com (10.22.229.21) 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 19:55:31 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.177) by edgegateway.intel.com (134.134.137.103) 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 19:55:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P6GaniXeiW/TOO51llm2fSiHSVBDMsLIG3BY1rVHb5vy8aL6xrWf1oixRXKrWnjhvSy0clEh0P/2h6Ri9Vg2f1Hu/iIAAq1HZ/d5unlWbtnmWvDZCQjiaebUfa5u/Y689xez1oVUNmr5uuLnzrMnwJfTZXhUJSBLql8YGJY6pHB+L24/+Ilv4uqwD53bLvejw/vgNHXyqMlLTrloa3LNN6ZIAMln5YhVAUTrrORuL8DBi9FpPQ/sVTXpJwtvFX1Sj3Zt/X0pDpoTFz52rvDdHw64OiLa3QLTxhuy84DGBltXatyifGI4pacaxgIP3ybxvJqdalViCFNScYwfgMhvFw== 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=M0/oCt7IAduxK4D0Wje+ZFhnh2HHweOjWsh+2Br3Z1o=; b=eLg+0Sg0YZlxqi87Ge4mGpt7alU5evkhuAD9s3MZc6mmTfBjUqCqhTuaebz7fk+qGOsJYZYFpQYVPffnkz/hXRJT7eyNfsLpu04c8JYTOt279GBb97/K6kGYjE0J2A7bo5J3Cxqoat0C1Otf8TWeWneMv5lEOE1tEcA8qjpuhAtf1dFaiVZQ/SnlyMk49jKD8qk2I+hXJtU5uGqmpuEKhDQYntI+nk0aalKjB4YAyR04rz+rKcqGCsRT1GXoKQeMCmgWmpjo9PpOilYcemcOqiIqSKeYW0qnexBFuzWIQveuIeo8HQaBfjdinEkKpiVHATjB6eO9kAOOzE+6IgTPTg== 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 BYAPR11MB2807.namprd11.prod.outlook.com (2603:10b6:a02:c3::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.21; Fri, 13 May 2022 02:55:24 +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 02:55:24 +0000 From: "Xia, Chenbo" To: "Pei, Andy" , "dev@dpdk.org" CC: "maxime.coquelin@redhat.com" , "Cao, Gang" , "Liu, Changpeng" Subject: RE: [PATCH v7 15/18] vdpa/ifc: add is blk flag to ifcvf HW struct Thread-Topic: [PATCH v7 15/18] vdpa/ifc: add is blk flag to ifcvf HW struct Thread-Index: AQHYWheI1khHSJkxckaxc9MxRlDz+q0cNPvQ Date: Fri, 13 May 2022 02:55:23 +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-16-git-send-email-andy.pei@intel.com> In-Reply-To: <1651048206-282372-16-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: 55a52ff2-87c1-40aa-3c52-08da348c06c9 x-ms-traffictypediagnostic: BYAPR11MB2807: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: UgtybdFBsbxYbt+Cw28HiEb1z+guV26ExPxarO86vsKJdsJRewNuC9IqbY0H21l5hRVZtE2oboQWpj/nMt/noDWMA3m58q2HEE78Nx7xGZthPE7wSUlqpHM9lTZqENvJk/a3ymt1Z7Yol8bB3EvKc4HA6R6YQUqnA7f6WnP53PqEeM0zb2/cIm24HLiNdvFWOE5h9JmogyDVoSo4lQbjcIzaveH7JyapRSJO+M2lh0sdSQgkjfoCxWRIUFjeCZPcV/ykENq/FdR4ODCYYoH25Z9rRoMPdlT6Qxi4SLqYsSbM0Wbm1+z+9ZoYM6zauCqh1GKftZg2Cg5kgbxBlnsrs9hlwMg5MTF4fu/1YQinUNlTlLNllWq/hxGYiFtt4ViD4ZSfyD/hJnW9+GhFGgfrAoKeNF6qpsuRCAkrm54+wAUFrvsyOBada1rElHsmfJK4fUBRvpXNPusOFycmuOERCI+Ras5BmaGH7uK5ejmHM8oyMpzHT23vhTdR89ObEjDYYsfQpkhJEENL8BofD95x0Ydu+dFr71qqq1c7dH51yHcKsmJNfOkZ0p7Dbad5r2CoCw/hMrNmUG0hYD4W6JjcrvUE3DFdxIyaq1Oi+/6QH+n9ymTBVxq+UffG5+3teoLDEfn56nhQzydLkS9aQtV/qRDGHtgcTINsutTY3UbgN/nWYUM9T4DW3JL2VzliuWkWTCrAtLwutqX0E4LH3rqGSA== 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)(64756008)(8936002)(107886003)(66946007)(76116006)(66556008)(8676002)(52536014)(66446008)(66476007)(110136005)(86362001)(4326008)(316002)(2906002)(82960400001)(122000001)(53546011)(9686003)(6506007)(7696005)(26005)(71200400001)(508600001)(38070700005)(33656002)(54906003)(55016003)(83380400001)(5660300002)(186003)(38100700002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?CJqKhkAJs+Sk2/PQxDnyZoy7GL4Vb1H3XIkaCUadd9nJ+5osLCqDHu0cdmUD?= =?us-ascii?Q?Jg0HOREC0AUL6eP31PcDkPeDNFaexIyVm9A7V7Gm9FUECAxNWRoovEuMAUpK?= =?us-ascii?Q?hVqk5PmxEHBzG8hMrE5WbG82t4ElNPgJC4h2nR65cSXGyfi325Q7P4so9Kwu?= =?us-ascii?Q?mJdBM7UejNBeIA4Mce+FB0EwtfJTwS5WNy5J3mgwgZnlMPK4IigUE3N0UNMT?= =?us-ascii?Q?wX4yAJe87NiBNPbsqgUzqTLeTimsbC36oV1YTNpkD5s/ZIwis3CyjkqJETqX?= =?us-ascii?Q?GYcKB1d31fjx1/eLphXmJEookRASWYy98V01T2WhFS5fdOsowPbTyVDiHo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cIR7PnCOwW73WRxeiX91HbTnAtU5nqnERr?= =?us-ascii?Q?JGsaehyQoEh0EaqlWUm1efzVBqWJwxIlHVBDuvwg1VuJfQI8W3U2rWTLoeBr?= =?us-ascii?Q?XGxgOfNeJFvwmeIoFeiqC3x9FAiRgsgltL5GUjQu6fp1nDtodKqGn+hVS5XC?= =?us-ascii?Q?SB9nVEmcse4J3T5aWQWps5O4x5ROtm3g1wmFeydgHAd168YXO4Jlt9SKygbx?= =?us-ascii?Q?dA8r5IO1knECZRK2xafUoKCVAvfKBECWS8O1M9//IJHT1oj0mhYPK0VVvGKl?= =?us-ascii?Q?LA2BygTtVoRytX3/i7v0Hr81kk/nVXOtGhLjN6pRFe36I8IGKaSmYbiYtCbq?= =?us-ascii?Q?T7gi7PReKZbLZnikpNeALYt5CnQrHzDfVrpjzN36n/PmsR81pEza/PPhVu9e?= =?us-ascii?Q?HB4rsWYCdtrebv5hZ1gtUCgwgbJdFQkyurMkX/BzbwcJ/8pA3A8ZWjGq6o5z?= =?us-ascii?Q?pApkju8bSD/rgb+FnlD2JYiTegWfwuYMuHkPc3RhFtWa+H8xc3XHXPs708/V?= =?us-ascii?Q?7P8vuALqVw=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: 55a52ff2-87c1-40aa-3c52-08da348c06c9 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2022 02:55:23.9638 (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: kWF7VGD20k7vJcxKo1g4b2gC8MaJM7D1q5kefFQWTMk22MlY7MPhZrdw3iD7Rrvr418HViZvXxLBxSOJlnZQ1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2807 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 15/18] vdpa/ifc: add is blk flag to ifcvf HW struct >=20 > Add is_blk flag to ifcvf_hw, and init is_blk during probe. >=20 > Signed-off-by: Andy Pei > --- > drivers/vdpa/ifc/base/ifcvf.h | 1 + > drivers/vdpa/ifc/ifcvf_vdpa.c | 2 ++ > 2 files changed, 3 insertions(+) >=20 > diff --git a/drivers/vdpa/ifc/base/ifcvf.h b/drivers/vdpa/ifc/base/ifcvf.= h > index 769c603..8591ef1 100644 > --- a/drivers/vdpa/ifc/base/ifcvf.h > +++ b/drivers/vdpa/ifc/base/ifcvf.h > @@ -149,6 +149,7 @@ struct ifcvf_hw { > u8 *lm_cfg; > struct vring_info vring[IFCVF_MAX_QUEUES * 2]; > u8 nr_vring; > + u8 is_blk; > struct ifcvf_pci_mem_resource mem_resource[IFCVF_PCI_MAX_RESOURCE]; > }; >=20 > diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.= c > index 0e94e1f..4923bc1 100644 > --- a/drivers/vdpa/ifc/ifcvf_vdpa.c > +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c > @@ -1536,11 +1536,13 @@ struct rte_vdpa_dev_info dev_info[] =3D { >=20 > if (device_id =3D=3D VIRTIO_ID_NET) { > internal->device_type =3D IFCVF_NET; > + internal->hw.is_blk =3D IFCVF_NET; I believe it's enough to keep only device_type. Device type can be defined = in internal or internal->hw. Choose the way you prefer. Thanks, Chenbo > internal->features =3D features & > ~(1ULL << VIRTIO_F_IOMMU_PLATFORM); > internal->features |=3D dev_info[IFCVF_NET].features; > } else if (device_id =3D=3D VIRTIO_ID_BLOCK) { > internal->device_type =3D IFCVF_BLK; > + internal->hw.is_blk =3D IFCVF_BLK; > internal->features =3D features & > ~(1ULL << VIRTIO_F_IOMMU_PLATFORM); > internal->features |=3D dev_info[IFCVF_BLK].features; > -- > 1.8.3.1