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 C5382A00C3; Thu, 12 May 2022 15:44:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AEFB240E64; Thu, 12 May 2022 15:44:52 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 96BDA40DDD for ; Thu, 12 May 2022 15:44:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652363090; x=1683899090; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Jusk8Sd+avljuz1PtUpk5us258YgkXpkKoQ3yRpc10k=; b=lvMS7EKjfuyDp1FMGX85k25GWFLo48cnj/VRprsZkUhPU2Htvrl5myva 7LZuitS6MsN7qYlM8r7uqz0w+esxXNlEhPh2Frk9/PlmVA8Ql0FevGzL6 Vo+PEzk2zy7VgF/YVwpnIn6YwygWAu1O3m/utfQHGthWDPXPlX3OJWCWp RpV1zLaqEisWTXoIXDZoiTqPzV0pv5J3GwjmWgEnrC/V8NMuCLmBKUr1v S1wUzpzDpiPrGip0oNpQX1ddg4NKiO0z4ikqYLaMw3nlGHcFzPtUtqLiA 27B4aWhv88oR+jN7SIMDN/NuHesoLADlMwpc61lvLK6T4pN1XBxC+lOpb Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="295253184" X-IronPort-AV: E=Sophos;i="5.91,219,1647327600"; d="scan'208";a="295253184" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 06:44:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,219,1647327600"; d="scan'208";a="739695973" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga005.jf.intel.com with ESMTP; 12 May 2022 06:44:49 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX606.amr.corp.intel.com (10.22.229.19) 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:44:49 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) 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 06:44:48 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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 via Frontend Transport; Thu, 12 May 2022 06:44:48 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.176) by edgegateway.intel.com (134.134.137.100) 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:44:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lFdV+LfQTK6eM1F4vtkrWANtUBr0p3o6HP1+NZRuDuYhlvui6fKUJq3QNpVmD0GFbTd0bx08ZIx7EnPVhTWDxbf0M0xFfl3CPD84UEOG7EnGwjEcxGhCrWozlIw4ohhtE6WaJuOxQ6Uklm/5JxkQrBTyHHg/9WIEe+jLmGeSeJElWl/bIdDn/AxaGPhHfRdqQMpeUan3a6a2nmNg2xGEVzMEsH0ATwN7FvHfj0fc0SuNSmgXGImTcdLfRQAOn7qanhjob1bB5yZSL5bo6mJsVjqN+pX0UPtYCxm4O29wlwXCnaIHPg0mnzv9a3nYE8HTyXnArP6rgU6EFQLkY2AOhA== 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=u9NkAXc8VZblhhzIrms12tuKX83229RriTGR7lciRbo=; b=O18c8HY8MEEdpp6PIuPXLM8EE87jU1H5NvIcUmLsLOIpd7KubRYEAMp46JBSwlPQJm7P3ldsHQDbebCzUc7/CNc5DKQkKlO5wn9E5RAXWwPwThEobLyqz0LgInfKxjE+qgWGun9/yIqMhMiickOnB6JS8vPNsDwlb5h0CFoZ8cLcf3eYvoo4XWADBZ3X4Kj0e0sgbvPyw3s+gBQfHyaS3Yg0wZNa8aGa3feU15FXy6FXzdnkyeN+UcfZK0lkc27WAzIpdpgidkBzVLCSC594zXB+NneICEXt0uySzghWjcSjHQuXJQyRfZx+zbkQT0N5rGeAJ4/vmuEO7t/yGHSRbQ== 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:44:46 +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:44:46 +0000 From: "Xia, Chenbo" To: "Pei, Andy" , "dev@dpdk.org" CC: "maxime.coquelin@redhat.com" , "Cao, Gang" , "Liu, Changpeng" Subject: RE: [PATCH v7 11/18] vdpa/ifc: add set vring state for blk device Thread-Topic: [PATCH v7 11/18] vdpa/ifc: add set vring state for blk device Thread-Index: AQHYWheEsdCMD/bqUUWocT0w4a2lxK0bWD9A Date: Thu, 12 May 2022 13:44:46 +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-12-git-send-email-andy.pei@intel.com> In-Reply-To: <1651048206-282372-12-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: d6e46f9d-1663-4b0e-beef-08da341d93b6 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: G5TVkqXUetj43Xm7BdIVkl3x8Nf+cHHmbZUbmG4m3rHe975greqImCYq/v5/+YI+HoZmjkpaa58V2tOW/luSiemqwZcPcTOjpptt+GoRha1hXEjWBb09oAGzXkImhLmNzWQ8j8EyiCsPo4XnghmfLtjfSQMq1ySeGyKRB1kpTxX+/HI9J8jG4rMpmHyh8+6eimrBIXJYOaqw8UlONgs3joU7JQlc2nc3DRqSZlVTZueCYozeBNmnzaMVuxYjgeG6ajpcXIv+fibhg418NvuwYm/pYAsCxD0hNIfyGNaMaqx4waM2+HS4V1L7QzWuTi0ihma9ITtyNdbZDODlVKQnfNe9zqItxt3Vt89SizUwYFK5Ds8stEAXixue2tmPr35ZUkGu9r3E5eWokca4oaToIXpjDsPGgvfusuJa6YKV77rw2JdtfsU6s2zY93ZdlbsQmA8aljm3x9nvVxSfpMBCjiNi32Hijg4FW5F5fiz0Wo5dMqBzaQ/q3gep04Ap6RIOVVGq7BGW6/J0BUrqxSP2Ey9PD8uleeu3OEicEKNFvfcdpPsJA/pKcIlSR/PmNAZ0XMqhreWkd8W6iS3K5omlG2DtnW1erxtCTcspS4z9Pt+BVI10UyVDyKfnJynHavnAq+oWVOCInl60023PUoHycQGrZS/nBO4WmK4p7n+2dur4rtMMllnqKIqKS922lSPCwskOI505Dn/uMs6NkGfhiXiZ+JXnn73US3Lrji+2KIA= 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)(66556008)(66946007)(86362001)(66476007)(71200400001)(64756008)(107886003)(4326008)(8676002)(55016003)(186003)(7696005)(76116006)(316002)(2906002)(53546011)(26005)(122000001)(508600001)(38070700005)(83380400001)(38100700002)(5660300002)(66446008)(9686003)(8936002)(33656002)(52536014)(110136005)(54906003)(82960400001)(21314003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?0a9EpsliHDP0Ao/5o86l6js4lNJr1idtgw4Jo1LIMX2s9SBF/AQK3q26TSVK?= =?us-ascii?Q?WWHTecz+xAL5MlLUk8AhD5JhHp5yJlUEjZr9DOWGcSkFEOafOKrDGTwH5dq+?= =?us-ascii?Q?ex0N5pg1ZU4V86DYcRl7n+8RJjyWS4TEO3hvxyBiZwYnscTGQyb17W3YlgRZ?= =?us-ascii?Q?MguWo+WJEsaqI3TKrK8eIDwZMXVCYH+tN6IjUUbn4qVUkBj6XzKCrVLrDQGy?= =?us-ascii?Q?j+5qr/7XN783HxvaSJv2LXxj5dMT/ChmCCVNysBklSUETORK4gIo7QecisP4?= =?us-ascii?Q?6xE7bkcpTj/+4t7fxFGCsq+LNaEBlOxfVoWN4ziqJOitTp0iCj2E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P/Lvf/NE90aPffGI2U9Y2YgmYBUr5EMC+Y+yZP+X6s1kzYXe8wQgP?= =?us-ascii?Q?nl465SNzkwncnfI5oODbuW+UffDAivWZpZHWGYDOZBTyXqwFimCuLo2w2/vF?= =?us-ascii?Q?7E2lmpQP2/iePtUHE9vlWwvYtGox6S4vXHRuwFS+7cFQk2mvjsk3lHOHn7kR?= =?us-ascii?Q?yVpeK42upVHetm8R39ntBf4TtB+5aWkxV8AA3zZojwSOy6zCaZrsWD/mJZFS?= =?us-ascii?Q?gwmrmtpEQBzwnD4cGLXk9LWQdVklxhx4ZWbzqX8wV6PfCURfFdMeOEAiRyPD?= =?us-ascii?Q?rBg6Z3p8Cia/ntVgWWLJM+KTkyZbKTsAqoNFAAHNSjaxZf1jvmcYWpwMGsYM?= =?us-ascii?Q?H6WwXToYS6i1YxFD0oQ4ig3ry4IyfzReUVucCaKOeTXFnXcHJqM91BFevnN6?= =?us-ascii?Q?5WlGrxL2Ee8OCVS9Yq3i6gfkJN6jk9uSEFfH2laUSCKZ/25nN3uId97zCPYg?= =?us-ascii?Q?9KlX0Bs3ORRK9x0dyHYwyMF/34B4dUYL3NpPvKce36jvGjLLI4bg0j0ZQc/E?= =?us-ascii?Q?Qpis0WWFRg=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: d6e46f9d-1663-4b0e-beef-08da341d93b6 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 May 2022 13:44:46.2644 (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: e4H5hF7qMAuZXoqC2+BjS+a0LuNi+tmx93lFC7p1agjBCnJCd7mrGWq7Olvvz2oaXJOLg8NgSJ/N5nW3bjLQYg== 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: 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 11/18] vdpa/ifc: add set vring state for blk device >=20 > Set_vring_state op is mandatory, add set_vring_state for blk device. > Currently set_vring_state for blk device is not implemented. >=20 > Signed-off-by: Andy Pei > --- > drivers/vdpa/ifc/ifcvf_vdpa.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.= c > index 99a6ab0..ca49bc3 100644 > --- a/drivers/vdpa/ifc/ifcvf_vdpa.c > +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c > @@ -1290,6 +1290,16 @@ struct rte_vdpa_dev_info { > } >=20 > static int > +ifcvf_blk_set_vring_state(int vid, int vring, int state) > +{ > + RTE_SET_USED(vid); > + RTE_SET_USED(vring); > + RTE_SET_USED(state); > + > + return 0; > +} > + > +static int > ifcvf_blk_get_protocol_features(struct rte_vdpa_device *vdev, > uint64_t *features) > { > @@ -1316,7 +1326,7 @@ struct rte_vdpa_dev_info { > .get_protocol_features =3D ifcvf_blk_get_protocol_features, > .dev_conf =3D ifcvf_dev_config, > .dev_close =3D ifcvf_dev_close, > - .set_vring_state =3D NULL, > + .set_vring_state =3D ifcvf_blk_set_vring_state, About naming in this driver, if you use two functions for net/blk and name the one for blk as XXX_blk_XXX. Better rename the net one as XXX_net_XXX. In this case, better to rename ifcvf_set_vring_state Thanks, Chenbo > .migration_done =3D NULL, > .get_vfio_group_fd =3D ifcvf_get_vfio_group_fd, > .get_vfio_device_fd =3D ifcvf_get_vfio_device_fd, > -- > 1.8.3.1