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 C9E5B424F4; Tue, 5 Sep 2023 19:14:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 63C8A40E03; Tue, 5 Sep 2023 19:14:49 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 7D85F400D7 for ; Tue, 5 Sep 2023 19:14:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693934087; x=1725470087; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=2tDxMCVafOLxfhT9jlvsOEmh+grzzi8iktScl7c16Ho=; b=CtDjRiuw7l0h6G4LX7QJ9eKcjBBpOQP/HZbUfNJX/TkkgaX6AYoyQLAk L9FOwgHnydCQ9qNuMUC2krdyPGAicQRieoeBDcXRUGgC5ccvZ0y/91wBd 4VIwbKNTOcmkRu4hnKmIdDpxxbbsQn02EGiy/zxqWwfIDkzTpyB/9FCmu kY/XD1tDp53LnPtB/NJl6wOk2fwKRzkeGmBh5s9COqpf1rfYWyxJrpU51 2ilDjOMf15rA1fPJSTG+TPruLzxh4X6H7RCaekwGnuCP8gYpW+BjGAaOx QNCmZHP6HyVhnsAbryMSLfiFRSE5CSIjaISqFB9gNlrpwo/XSAlSp0zyU A==; X-IronPort-AV: E=McAfee;i="6600,9927,10824"; a="407845890" X-IronPort-AV: E=Sophos;i="6.02,229,1688454000"; d="scan'208";a="407845890" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2023 10:12:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10824"; a="744339275" X-IronPort-AV: E=Sophos;i="6.02,229,1688454000"; d="scan'208";a="744339275" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga007.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 05 Sep 2023 10:10:06 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 5 Sep 2023 10:10:05 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 5 Sep 2023 10:08:39 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Tue, 5 Sep 2023 10:08:39 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Tue, 5 Sep 2023 10:07:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BJH/DLHevqZdkw8c3SX0/ndaoMUjp46BHtBYZi1y1BsTGMt+RL4MDZcWY3v+sM+gL9UToAkmdAf2P1us/4gGAvSRHwqAPnDhLX9VKuO/VTtoWvVjsKOXLQpOViDgkq0eOjxY2rlGQ6zE8VHubuoa+CkkG4AW0B6WYlJA6t25fEUSWIReHnnNCbeI1Rhwn1ho8EJMpfHqzci77uf8pqDVRqJ05Y+A1K50CITuIRkSmR2wXN0fc59+Q0zBAxbtT8E60jRDJvN1UwQyScn52QGm99nh2TE3KoQ7r0XHRQHLcy2JwIIn5MKgSjM8ohqup4Xv0tL6QZ9rW6Jc0GWYkB9DEQ== 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=ozHzJWBiOl+pBi26Gxdr22gh05btKicqyPuDf7JuxhM=; b=Tc3NYIRUPr6yHLFty1vy1qoFZgWeDU1wb5PBCTw73qp072yWRN1hw6gAJSEf26pFk74DWi5xe85MozpDHFxOJ0IrkB3P2F44jyHLTxKVXLYvRKcmRALD0C5Qps3rkqVKdfIifPibtCZ/DHZ65uBvuzihxODJtWC+cEDKyfKyr2G6yNxP0U7TpVR3F5kPgM1SG8vYy2EK05lv16UepuTDVpo6G/vIo91XeqUbNXBojAKsJMeG1tlconRYNZMLqVJ8tZDuDXafXnAsBZaXjtKz1W/XRe9Ux0W8HZS7unzg6dxR1BO6iyyWDjcOVsHFDgzUQKaPw8Q4bquFnQHN55Q1AQ== 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 BYAPR11MB3366.namprd11.prod.outlook.com (2603:10b6:a03:7f::20) by CY8PR11MB7289.namprd11.prod.outlook.com (2603:10b6:930:99::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.33; Tue, 5 Sep 2023 17:07:39 +0000 Received: from BYAPR11MB3366.namprd11.prod.outlook.com ([fe80::1f83:8715:507c:7a6d]) by BYAPR11MB3366.namprd11.prod.outlook.com ([fe80::1f83:8715:507c:7a6d%4]) with mapi id 15.20.6745.030; Tue, 5 Sep 2023 17:07:39 +0000 From: "Pattan, Reshma" To: Jie Hai , "dev@dpdk.org" CC: "lihuisong@huawei.com" Subject: RE: [PATCH 5/5] app/proc-info: support querying RSS hash algorithm Thread-Topic: [PATCH 5/5] app/proc-info: support querying RSS hash algorithm Thread-Index: AQHZ3wH70EfkcP3RGk2HXiChJXQG/rAMd6jw Date: Tue, 5 Sep 2023 17:07:39 +0000 Message-ID: References: <20230826074607.16771-1-haijie1@huawei.com> <20230904072851.7384-1-haijie1@huawei.com> <20230904072851.7384-6-haijie1@huawei.com> In-Reply-To: <20230904072851.7384-6-haijie1@huawei.com> Accept-Language: en-GB, en-US 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-traffictypediagnostic: BYAPR11MB3366:EE_|CY8PR11MB7289:EE_ x-ms-office365-filtering-correlation-id: 98ab8e69-abf8-42ce-608e-08dbae329c0f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: if7h1BPJUkyos6f+xXtC4bGMiualK8o94WmgiZgPxc1iqkPXaJf1vARFFFd0r7ztYPgPh0fH29Z3BltlOXSKbAgp35W1MT6ND+guKCjELhaWwvVjXEZevc0fGMy7Ng1yOdvKHgMXPERcla6LqegMCesLWDuY+WvSVtQLjSIZS4zOYnlp+LoGcA+ixbIsIHfhaavcEznz/DBjIWztW1tkR0j//ep0W9i7e3rIEyk7tEcAVf7lG6UefiqEB3bqJ1leFpFb+556mvO52hvNLuvJo540+GGvd+JWCngDZ8Y4hbyPl4G6pF0SAwAL0o6rWqJF/NGgDig/cs2ARtzXqgt+RehsqQh6FyhOWkgwi5eWyg90iEq1eKBLsobNkOiNZZuu4duYE71pjG3EXKRkUjQvoXtMdHA+e1huIKxEkJlOXvWWS+gBmiMccSlV/WYlIU/ycJvCrB7+6Mq9NONqVr2j0tK+rZ5mWJTNZJ5k7aSW4eqycGQqjnPJ8SikotL6ho3p4yWeQHZjLNHBtGmQ8jli/zWqQARnY+80wjCnE05KAd00QNt+S44k5AXrTEz1hWK8R0y8c3lFW42xVIKEsSvzdVPeWN35U679RR0rzvWCVrHYR8Up2MUzfShg7pWBNmRR x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3366.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(396003)(39860400002)(366004)(136003)(376002)(186009)(1800799009)(451199024)(41300700001)(26005)(38100700002)(122000001)(71200400001)(82960400001)(33656002)(86362001)(38070700005)(478600001)(83380400001)(7696005)(6506007)(9686003)(55016003)(66476007)(76116006)(66946007)(66446008)(64756008)(110136005)(316002)(2906002)(66556008)(8676002)(8936002)(5660300002)(52536014)(4326008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?IRCjZFRwAL0BI+DXFUAcwNUm0Sx0B/pg6BplWQIG6W8axtRUw3wzP0cKLXwv?= =?us-ascii?Q?QKy2iyYMqypwLCF2IBdIrFBZlX6s1gerwohnyPKqEJjUXim9K2hVJpW5xTf4?= =?us-ascii?Q?G/8gyAarOeLrSKhzmGIaukx5qhISWg5fsGdMh1QDMiVtjUbPys3cy+IWfGQH?= =?us-ascii?Q?eSzujddgmXHKovUtfYjAyt692kQKMuDwOgORVxo4X9IDTIFNpJN8SSRvh8fN?= =?us-ascii?Q?RaAzRNwbdCor3WCbQviD8wu58gBb800jHQR4KdgKTKY8cWk5HZF8++bnFyyT?= =?us-ascii?Q?mA/WWza8arHhVeSAcmkk137thn0iiPeLgJ+xV5OV2R/r/U/KCKy5Ml10J8O2?= =?us-ascii?Q?ipqLB24b0L3yxTJrZOLw+Z8Q5X6UYctrMcp4qpmG2RRU4qiyVCIMcBOn3gb/?= =?us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sMBlWDoINDvkNXO0fElucLE/hHt?= =?us-ascii?Q?9wtHO8y66tEKIBdmgu+dwOghbvCET07xczsBF3Vqb8lbM+TIlCLUkk4OHCoK?= =?us-ascii?Q?fr96Vmc+pZHrkg4pg4g0N2Nqeo/CVU6PH9T9V+CCnclGzOk7QO2ZniV+sxPP?= =?us-ascii?Q?JdRGOpJtPxOWz72ZxGEMqNUXIa2CFVccdiROTQ3xSjMule7rxQ7QPBzghW8f?= =?us-ascii?Q?/ZvgGgikXk+aA3N8gR0+SzESk/CbXJsnGzvgolvLwb6PAX1tWytKu+5+XLVN?= =?us-ascii?Q?YEYVUwY3YQc+JgNqOoOID5CPiOz619sMDYlDER4P?= 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: BYAPR11MB3366.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98ab8e69-abf8-42ce-608e-08dbae329c0f X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Sep 2023 17:07:39.2492 (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: pEMBMpJGjU6F3pSHWQxS1hXMk5aOgiZdxTMxTmmXRCVc3s5ZAlYnnXTCLXxBKv2omtfJmOsFjofL+Kv2s9VlVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB7289 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: Jie Hai >=20 > +static const char * > +rss_func_to_str(enum rte_eth_hash_function func) { > + switch (func) { > + case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR: > + return "simple_xor"; > + case RTE_ETH_HASH_FUNCTION_TOEPLITZ: > + return "toeplitz"; > + case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ: > + return "symmetric_toeplitz"; > + case RTE_ETH_HASH_FUNCTION_DEFAULT: > + return "default"; > + default: > + return "unknown"; > + } > +} > + Instead of above function you can declare const array of strings as below t= o map hash function names. static const char * const hf_names[] =3D { [RTE_ETH_HASH_FUNCTION_SIMPLE_XOR] =3D " simple_xor ", [RTE_ETH_HASH_FUNCTION_TOEPLITZ] =3D " toeplitz ", [RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ] =3D " symmetric_toeplitz= ", [RTE_ETH_HASH_FUNCTION_DEFAULT] =3D "default" }; > + printf("\t -- hash algorithm : %s\n", > + rss_func_to_str(rss_conf.func)); > } >=20 And then print as below ? printf("\t -- hash algorithm : %s\n", hf_names [rss_conf.func]);