From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 77DF9A0350; Tue, 30 Jun 2020 12:40:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C6DF81BEA3; Tue, 30 Jun 2020 12:40:41 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 603A82C01 for ; Tue, 30 Jun 2020 12:40:40 +0200 (CEST) IronPort-SDR: LibVaTG+FqsC8FpgFO6NBHoK6Dk7VdZMuuGMoYXXCI5S0NY0cnMNTPjm0snx9AF+K/k207gDMX 7caW67SMUAYw== X-IronPort-AV: E=McAfee;i="6000,8403,9666"; a="164210330" X-IronPort-AV: E=Sophos;i="5.75,297,1589266800"; d="scan'208";a="164210330" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 03:40:39 -0700 IronPort-SDR: 6za8c4sfrstJXdPfjHxvC8dKl61TiYtLewEhLSXuRUusCqzZj39aqJ9+5vNS+wo4EsbS+Ds4pc SPnyuhcYGnkw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,297,1589266800"; d="scan'208";a="266441084" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga008.fm.intel.com with ESMTP; 30 Jun 2020 03:40:38 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 30 Jun 2020 03:40:38 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 30 Jun 2020 03:40:38 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 30 Jun 2020 03:40:37 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 30 Jun 2020 03:40:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jfstM327FSHFoAyt9BWzSdUaVxdJp9lsE7KxWR2hGzdjSWrbL3m0Ek++2B2sznLRkwRBi8XeUaDe2nlPJ923cz+PjdrLIwOwdkiIJsNTgs/OthxwA1q60WihIYO3lla9pdCMsw3MkYhW+gXLFrc0GqMvaXWsnLhs+ps1LgX+DZFPGRhNGFxW0h/YVfgKsJ/Dl+b3lL/S4bvijY8gvBz0cPLvLVZdF8khXd/zi35wJXU0wtdOGhksWTX5X9qVFMCuu25YrfIAQ5vj6lp0MP1KCmBicIaahzb5sv6F/INNg0yzQtvwwpmL8naKvdlCgcDjThphflexrINHD/Q13UWkBw== 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-SenderADCheck; bh=4Nk4THKWuvwK78ji+jfWVFm61wZGNaTuVrbtTeAgCHs=; b=CkAoxVYjKlW1u44kDOvDgjqxVGqkFYUDdT/eZd98oZhrW8d6iS1nZsIWTe2+wat78lFnx8Es4jr9G0MxRDhGpi7hLYIgxO73uCNG7D1Isf0Ol4FEYrUlg8H/X83CHz3ZuIs35mpqGTDrQJetfZVR+LdUpeUlylLdq48O6nC277kd3PE5i3xq5kxKEcnvEYYqArdBIGsVHJm4Mh2aifl//DDjBMJcXdQOQgBGtIb/YnXwRdo4/FMXI1d/+4+iA5I1LwGTtmkGBW0/1nbFyGiRByvuO4y53q2tnEgx1SE9oLX5+2BmUYvqms81UHtPNZDBtXG8s7hfis1bmelr4mZqtw== 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=4Nk4THKWuvwK78ji+jfWVFm61wZGNaTuVrbtTeAgCHs=; b=v0QO1PQXRBrK6eFxhdRG+QibSGV4D21UQKoFqvyZ+jMXjc2QKBZjpSwkZdRyPVpQ9sieb9lXVzzVUNp6H1YuQdxSAitOLdKM+J/eJakT3pv2rvL5kTox9OPOh0y01Kp6o9ZF8WIZqWBjSULTWS+abMJ3aUlHAGhLeBa0T40G5tU= Received: from BN6PR11MB0017.namprd11.prod.outlook.com (2603:10b6:405:6c::34) by BN8PR11MB3649.namprd11.prod.outlook.com (2603:10b6:408:84::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.23; Tue, 30 Jun 2020 10:40:33 +0000 Received: from BN6PR11MB0017.namprd11.prod.outlook.com ([fe80::c8eb:f4c9:5b58:3120]) by BN6PR11MB0017.namprd11.prod.outlook.com ([fe80::c8eb:f4c9:5b58:3120%6]) with mapi id 15.20.3131.028; Tue, 30 Jun 2020 10:40:33 +0000 From: "Yang, Qiming" To: "Di, ChenxuX" , "dev@dpdk.org" CC: "Xing, Beilei" Thread-Topic: [PATCH v2 5/5] app/testpmd: support query RSS config in flow query Thread-Index: AQHWQr4CK5xABy6u0U2lHM9K77shH6jxDp8Q Date: Tue, 30 Jun 2020 10:40:33 +0000 Message-ID: References: <20200611060142.75465-1-chenxux.di@intel.com> <20200615021858.13985-1-chenxux.di@intel.com> <20200615021858.13985-6-chenxux.di@intel.com> In-Reply-To: <20200615021858.13985-6-chenxux.di@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.38] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a99f0ca0-a447-458d-56b5-08d81ce20476 x-ms-traffictypediagnostic: BN8PR11MB3649: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:268; x-forefront-prvs: 0450A714CB x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +Ttbd4iY0bwSf8T62rWb78l4gL7vez98aNrUhJP04uZ9+PSByvHXQFZKKX1TJi65GsO8QVy3U14Qq743W/0kXPuqctvE9kxdUmbKBW7Cf35dRZ708Tt9pT9CCcq7g1cUlcZcq6ZYhitZbOPvy04GLO1ZZVZZtehdmR02cuYmpDxIra7SjR/HgRhy4GHSUkgOx/OUbhRQN2Wn3COqxLQAQXyDPqdthrma47JTkdExbTT089KJc/ImQHp6PgH/U13di8TwNrxzrbyXOObJCzOyN6RNV4oWUyQu74W2lFxu5uodrOFf5HKh69yTPqOlcDVQ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB0017.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(366004)(346002)(39860400002)(136003)(376002)(9686003)(55016002)(26005)(316002)(8676002)(53546011)(83380400001)(7696005)(478600001)(6506007)(76116006)(66946007)(4326008)(66446008)(186003)(33656002)(2906002)(64756008)(52536014)(107886003)(71200400001)(110136005)(66556008)(5660300002)(86362001)(8936002)(66476007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: aKYDvjyg01qeZHmLgjAVc71v5teu3A+Td0R4LcWbrNljPrNXzqAEcyFc3JI/hkc44UhwJ0FVo+d5aDQqqN6PjGzURpXKe/sakssI+ErzfkvDzFglho20FDbDXL5wVCktBRfbZOQsAzbvP8Mtbq2CBiq5TdsZh0YE+uVMmzVKYa0/31B/3wLU7UI/+F9v6uSfDH27EPLOOFs7aMVtG2H3ol/k+jh9BrZ2iJp2SqZrHAZUAXXH6SjLKds5iOv/19h8SM3TdmNRPgsjcN38G88LNOzH5yxdJncjegTgkWGwACF2YmlY1saG5h9ofSOzxYNs/1Xcl9HLJLAukXBsQGe4+U45sUqRM2Tb9DqlJVsCdeaxtvF3lpLhjCEB8wgxCW+kdjomUgS68IaMDQhgt8AuwkjF20734kJ8U4eviGuUf+rtjMFo5wbGbELruK2feZWXGt2zlcMpLl2M8jfBqLYOGQp8RzVmONXffEkYRrGumOHne2yOA/C5k/v6ADG9YHPm 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: BN6PR11MB0017.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a99f0ca0-a447-458d-56b5-08d81ce20476 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2020 10:40:33.5266 (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: BeyCeTfF2NbNHRnFQuFJt9Bpqs85inne7IJCplA14VhP3CwvPns5Y6MWMArqpmBLSRKJXyeZgIqKhAOa5WT4Nw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3649 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 5/5] app/testpmd: support query RSS config in flow query X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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: Di, ChenxuX > Sent: Monday, June 15, 2020 10:19 > To: dev@dpdk.org > Cc: Xing, Beilei ; Yang, Qiming > ; Di, ChenxuX > Subject: [PATCH v2 5/5] app/testpmd: support query RSS config in flow que= ry >=20 > This patch support RSS action in flow query. > It can display the RSS configuration of the specified rule. >=20 > Signed-off-by: Chenxu Di > --- > app/test-pmd/config.c | 55 > +++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 55 insertions(+) >=20 > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index > f519246c7..7e3cccf9a 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -1378,6 +1378,56 @@ port_flow_complain(struct rte_flow_error *error) > return -err; > } >=20 > +static void > +rss_config_display(struct rte_flow_action_rss *rss_conf) { > + uint8_t i; > + > + if (rss_conf =3D=3D NULL) { > + printf("Invalid rule\n"); > + return; > + } > + > + printf("RSS:\n" > + " queues:"); Two lines needed? And why don't you add the space in the end of this printf= ? > + if (rss_conf->queue_num =3D=3D 0) If(!rss_conf->queue_num) > + printf(" none"); > + for (i =3D 0; i < rss_conf->queue_num; i++) > + printf(" %d", rss_conf->queue[i]); > + > + printf("\n function:"); > + switch (rss_conf->func) { > + case RTE_ETH_HASH_FUNCTION_DEFAULT: > + printf(" default\n"); No needed space > + break; > + case RTE_ETH_HASH_FUNCTION_TOEPLITZ: > + printf(" toeplitz\n"); Same > + break; > + case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR: > + printf(" simple_xor\n"); ... > + break; > + case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ: > + printf(" symmetric_toeplitz\n"); .. > + break; > + default: > + printf(" Unknown function\n"); ... > + return; > + } > + > + printf(" types:\n"); Same... > + if (rss_conf->types =3D=3D 0) { > + printf(" none\n"); Same... > + return; > + } > + for (i =3D 0; rss_type_table[i].str; i++) { > + if ((rss_conf->types & > + rss_type_table[i].rss_type) =3D=3D > + rss_type_table[i].rss_type && > + rss_type_table[i].rss_type !=3D 0) > + printf(" %s\n", rss_type_table[i].str); All the same.. > + } > +} > + > /** Validate flow rule. */ > int > port_flow_validate(portid_t port_id, > @@ -1564,6 +1614,7 @@ port_flow_query(portid_t port_id, uint32_t rule, > const char *name; > union { > struct rte_flow_query_count count; > + struct rte_flow_action_rss rss_conf; > } query; > int ret; >=20 > @@ -1585,6 +1636,7 @@ port_flow_query(portid_t port_id, uint32_t rule, > return port_flow_complain(&error); > switch (action->type) { > case RTE_FLOW_ACTION_TYPE_COUNT: > + case RTE_FLOW_ACTION_TYPE_RSS: > break; > default: > printf("Cannot query action type %d (%s)\n", @@ -1609,6 > +1661,9 @@ port_flow_query(portid_t port_id, uint32_t rule, > query.count.hits, > query.count.bytes); > break; > + case RTE_FLOW_ACTION_TYPE_RSS: > + rss_config_display(&query.rss_conf); > + break; > default: > printf("Cannot display result for action type %d (%s)\n", > action->type, name); > -- > 2.17.1