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 52623A0547; Mon, 27 Sep 2021 09:21:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4AF040686; Mon, 27 Sep 2021 09:21:44 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 11B414003D for ; Mon, 27 Sep 2021 09:21:42 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10119"; a="203914404" X-IronPort-AV: E=Sophos;i="5.85,325,1624345200"; d="scan'208";a="203914404" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2021 00:21:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,325,1624345200"; d="scan'208";a="615667446" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga001.fm.intel.com with ESMTP; 27 Sep 2021 00:21:41 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 27 Sep 2021 00:21:40 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.2242.12 via Frontend Transport; Mon, 27 Sep 2021 00:21:40 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.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.2242.12; Mon, 27 Sep 2021 00:21:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BIW4Pbt/Wbylp95BY0hAUH5FdeJvdNxgbMEIggQwGvr87owr1LeMVZZtLd546vPVKKtPB1R6STwgcvDndTZqf9Zp0MgLzM4TMdH7HUp7wPGKbLQXqOt3y1i9UHBJHkaN0zuv8TPLv3R3zT+V8FwTumxXizJAsmE8RdowN0jRFKhhJgHVKaMrppsFcTisn/3+qEa5jQspfaO4F7zgnhDgf6tAQjv5F1p4QZUoYAtjwBk6BUnuOiq+ECIVrmaregymIIH/PBssXO+i8EwVMhlK4bUELq+gqHm1NwlT2wX32jPZtfNJBQftmqLH2liqY40zThnTxnmyrhD2w/54wDnK1w== 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; bh=FESOzkkxntP5Fl5jYjkmOQahPyW+gAm8TOHACFlzqSM=; b=WbfnHpUmKSN0kCt064npTedS0y3bqNG1gu0y1eFTRnznfSQrgQo+HydgBHsFMmpuylSTKp5JNLWs+Yu7OYuz/2WOSij5N7mxdLm/ONXOVxEdkvW9Yi0bdaErzfT4e1XclltzOcncATJnX9K8i+5VtoHxFR48iChS+gpF6TjZRRZh60ead/NpDyLIKtIW7smA4KfJYVNhvldyYiEGsL58igEK1AhnRIDCnR2a5MOENu4MYM9Z2+HD4ia25AoPL9macdwbMt0LIHFtkaG0HzDpxmkMaHB0GVsC0DdhJj5SxllF+a43/KAa2ElLFw5WgW+mlggvLp/Qjgk3wY0+b190pQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FESOzkkxntP5Fl5jYjkmOQahPyW+gAm8TOHACFlzqSM=; b=O9OBhYci0WrIOws+fJdmq/vNnBphX1eutgCfoQmlt0EekaIIAHZLjK7rsBE2MqFXmZTVKT22dPRQnDnyAEJEi/3UWY7QrsRx5ZttVV5FdIttEfKl//eNyY0B6Z/3qWqC8WXwBW4fKg6Pc0vAgZ18K8NKLBlD3kkGiV08d4D0Bw8= Received: from DM8PR11MB5639.namprd11.prod.outlook.com (2603:10b6:8:24::15) by DM8PR11MB5656.namprd11.prod.outlook.com (2603:10b6:8:38::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.14; Mon, 27 Sep 2021 07:21:38 +0000 Received: from DM8PR11MB5639.namprd11.prod.outlook.com ([fe80::813c:c498:c3a2:7309]) by DM8PR11MB5639.namprd11.prod.outlook.com ([fe80::813c:c498:c3a2:7309%7]) with mapi id 15.20.4544.021; Mon, 27 Sep 2021 07:21:38 +0000 From: "Wang, Jie1X" To: Thomas Monjalon CC: "dev@dpdk.org" , "Yigit, Ferruh" , "andrew.rybchenko@oktetlabs.ru" , "Li, Xiaoyun" , "Yang, SteveX" Thread-Topic: [PATCH v9 1/3] ethdev: add an API to get device configuration info Thread-Index: AQHXsrfw44m68RaXMUSHPUy3ZKUwyKu3aciAgAAIyIA= Date: Mon, 27 Sep 2021 07:21:38 +0000 Message-ID: References: <20210827081740.365037-1-jie1x.wang@intel.com> <20210926092055.495322-1-jie1x.wang@intel.com> <20210926092055.495322-2-jie1x.wang@intel.com> <2103588.zk1eQJicq0@thomas> In-Reply-To: <2103588.zk1eQJicq0@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.200.16 dlp-reaction: no-action authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9b54c30c-80c9-4f18-f303-08d9818771f4 x-ms-traffictypediagnostic: DM8PR11MB5656: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 42g6Jhe5ds710/eoOM4cc89k8X6LjVDeoW2u9nRmYl4gc2/GtJ2TKMHhg5hrMiA2AREngxaQiIBEZhjCjhQfMezR4BPDV3e83xExiR2vONO8HP01u75raRr2rO9NnYYpzi4HyXBlla/o+oyLjLhcYsJRU1Vh+UkOLB7F9SS9QFkLf+0rdUkZMHIvpHFs2X4eAGqQ+v3wV+6fi6gdVKz+BXmXsMmyWW+r7tY7dGFOG02BTDScVi+fpoVMnWPN9KsJg2iIe/Qb3gu0zs+HicrLG4+TIYU4t0KfSk4QYhOQ2YczYsMUOuhWW5MUoBhWY/LpEp/E/E+ir8JyHspdhxi1209x8BhTNoTqa8m+J6V5D/XgFBO8k9gJvMXpHPlJkDSpMHDqP0m4bpes7pLKxzoMAzDUqbq78v1l6uEqZSWMk9sjFDiJitszVzhJeRfQ7KWRIOGPFDok52lm/CmDYNfdw8gl+bdOe7GyamYdH9bMa2slMjZpChPEEjaT14tWLY9fOXPeHmBHcm7aKTyMaOV//0BR0TICGJDRkS2GlynSyJlUz0C0WycRHawX3I4/rm2woDFHLdDIAvdF3drMThyeEZLJgNknm0aC4PSIUw+Pge48BBeaDtqWulncp1SRAacyFCgSmog8GGM/D+1MS0mn4BOMPMK9QOOZQ2Z1vjvYfOpuE/eQ/G2FThWBHAvr8CfCxBRmapfPYuJ29APKxhNjhA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR11MB5639.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(7696005)(66556008)(66446008)(5660300002)(55016002)(64756008)(9686003)(508600001)(38070700005)(186003)(66946007)(33656002)(66476007)(54906003)(316002)(38100700002)(8936002)(26005)(8676002)(2906002)(71200400001)(83380400001)(86362001)(76116006)(6506007)(4326008)(52536014)(107886003)(53546011)(6916009)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?7WQk8g9rqyEbAnwikzKLs6VOb0yzGml8hKdVGXjp/9nsmoSGy+wrAAZYQY2W?= =?us-ascii?Q?RCXXLH+dBiB0rmf92f6FrBhVrv0umQh8DCJx3OQ3gq0ZBajyXXBYp0JlfvGW?= =?us-ascii?Q?JhavieIjlu7Mfi4HZYcmM0MtMR8EBIsEh0QYLShSuw+Btdw4If4AFMof6Bed?= =?us-ascii?Q?C72qiewOGmBoYftQPjF+EyqVRk8HWJKXVig2lBzXF7E5W6vf1MI+70GJEL26?= =?us-ascii?Q?upIoxEh5avNDOIGWz+o+osox/sX8nHcvrBkJUcpxBCWy4WnV/DbPZ7jzz39r?= =?us-ascii?Q?NNy4vXkq0/JDYN1omFgugxC+pA49yxzP3d2qvt2iPMp27cwSDnvC8Kb/K8nI?= =?us-ascii?Q?f8Ld1Ft4/glmF45asrzeLsCbHPJvH+NPKmRGr9L4w8x8sT/40b2ewkgYB00e?= =?us-ascii?Q?VVmydP82y1bTWUDa82sx8sRJwgBBlFQLgHvzMcs+JzjbpVZEHxCFLt4XoT36?= =?us-ascii?Q?a78mIAzJGwky4Bu+RIauR+SL/3BxnY7nmyLCjMDLJRNc/Q3WDy2gvfRLaY6Y?= =?us-ascii?Q?MqudtWTRbaP7avW7cnT7XFySQH+K82KACkLOy9/ULutfJQc/tphdWQFWBW1H?= =?us-ascii?Q?R6awluuNqbygh9L3qSg89cPmac/kjRDBBnVVSayPFGohO/1yilBPUkmM04sp?= =?us-ascii?Q?nyU0Ilgc2Tcf+5812ZBXlNCFRN/woKThPPLzG22n85Nf58tPBOq65+e4hPjL?= =?us-ascii?Q?eV9GJTHC+He1MgWnx1S2DQvT8RxsQq37cuqGBp5S3j1/x4nrTbQqcB7yLO0m?= =?us-ascii?Q?lh+d8nTSCm6f2zDCYgivFzJHSufBg8O589dJ5W3ZO61E8yL1P5sYFxVVTFuY?= =?us-ascii?Q?J1IMhJXVB6V/PpuZzSBO4gSJMOBgpk6PBtGwZyCjwUUkGS3wF4kDTshnQfR4?= =?us-ascii?Q?UUUnyA+kjq8nDZu7xC3rKPUxU5GT2bxIB8uRGh/q3+r/5Cg1er1dXUc5GD+S?= =?us-ascii?Q?OZgyOETHWtFqK+RujGXYK3kIWj5Aq3TeNKhN3LDX9dtHNJNsN/RzbUXnEEbr?= =?us-ascii?Q?EAv2B3sDkjARKJrvfSE1UdpMVzH8Z/zp0jlff6aB1bljYtkxgQawo/1Ld9Yp?= =?us-ascii?Q?O2lQ+7fJUiRe8v30uKiIykNaCQsRFYEMdpIP4egMDURLB20eLPiyDpyITgC4?= =?us-ascii?Q?Nl0837irXxlwrskD3iXiS3QhEtJf0xOofl1q3iYm+8UUZgwGYSBYxwyZEEhZ?= =?us-ascii?Q?PtxQ9EXjFarDDEioMGhAdSw3IEEktuWmCEO5RDROgXWHPrxQLmUMJeqXKGQ+?= =?us-ascii?Q?STiVFKnobazLz+rMFG/1WJ9lqVmabpHUo35oWHEBCD3NB7yqcra4qEK527iU?= =?us-ascii?Q?yBM=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: DM8PR11MB5639.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b54c30c-80c9-4f18-f303-08d9818771f4 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Sep 2021 07:21:38.0987 (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: 55N45+/PsUmCc+5RFer7g6GRKhL5ULZZ8qn21GDULJBA9B6NqoETpvPQB8F8g5VFOM2KvTzBDRAHqJx5eQirIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR11MB5656 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v9 1/3] ethdev: add an API to get device configuration info 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 Sender: "dev" > -----Original Message----- > From: Thomas Monjalon > Sent: Monday, September 27, 2021 2:19 PM > To: Wang, Jie1X > Cc: dev@dpdk.org; Yigit, Ferruh ; > andrew.rybchenko@oktetlabs.ru; Li, Xiaoyun ; Yang, > SteveX > Subject: Re: [PATCH v9 1/3] ethdev: add an API to get device configuratio= n info >=20 > 26/09/2021 11:20, Jie Wang: > > This patch adds a new API "rte_eth_dev_conf_info_get()" to help users > > get device configuration info. > > > > Cc: stable@dpdk.org >=20 > No we don't backport new features. Ok, I'll remove 'Cc: stable@dpdk.org'. >=20 > > Signed-off-by: Jie Wang > [...] > > + * Retrieve the configuration of an Ethernet device. > > + * > > + * @param port_id > > + * The port identifier of the Ethernet device. > > + * @param dev_conf_info > > + * A pointer to a structure of type *rte_eth_conf* to be filled with > > + * the configuration of the Ethernet device. > > + * And the memory of the structure should be allocated by the caller= . > > + * @return > > + * - (0) if successful. > > + * - (-ENODEV) if *port_id* invalid. > > + * - (-EINVAL) if bad parameter. > > + */ > > +__rte_experimental > > +int rte_eth_dev_conf_info_get(uint16_t port_id, > > + struct rte_eth_conf *dev_conf_info); >=20 > It does not make sense to me. > rte_eth_conf is passed by the app to rte_eth_dev_configure. > Why the app would need to get the same info back? >=20 >=20 In rte_eth_dev_configure, dev->data->dev_conf copies the info from port->de= v_conf, and then the driver updates it. It doesn't same as port->dev_conf. We need to get the updated device configuration.