From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 3ACE8FEB for ; Fri, 10 Aug 2018 09:37:26 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Aug 2018 00:37:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,218,1531810800"; d="scan'208";a="75434741" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 10 Aug 2018 00:37:25 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 10 Aug 2018 00:37:24 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 10 Aug 2018 00:37:24 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.205]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.143]) with mapi id 14.03.0319.002; Fri, 10 Aug 2018 15:37:22 +0800 From: "Xing, Beilei" To: Jerin Jacob CC: "Lu, Wenzhuo" , "Wu, Jingjing" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: support bitmask for RSS and FDIR Thread-Index: AQHULUkF21YKgo8dWkGzdBpD39YeMKS32GOAgADDT0A= Date: Fri, 10 Aug 2018 07:37:21 +0000 Message-ID: <94479800C636CB44BD422CB454846E013220D72B@SHSMSX101.ccr.corp.intel.com> References: <1533534335-119817-1-git-send-email-beilei.xing@intel.com> <20180810034507.GA3295@jerin> In-Reply-To: <20180810034507.GA3295@jerin> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support bitmask for RSS and FDIR 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: , X-List-Received-Date: Fri, 10 Aug 2018 07:37:26 -0000 Hi Jacob, > -----Original Message----- > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Friday, August 10, 2018 11:45 AM > To: Xing, Beilei > Cc: Lu, Wenzhuo ; Wu, Jingjing > ; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support bitmask for RSS and > FDIR >=20 > -----Original Message----- > > Date: Mon, 6 Aug 2018 13:45:35 +0800 > > From: Beilei Xing > > To: wenzhuo.lu@intel.com, jingjing.wu@intel.com > > CC: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH] app/testpmd: support bitmask for RSS and > > FDIR > > X-Mailer: git-send-email 2.5.5 > > > > > > This patch adds bitmask support for RSS, FDIR and FDIR flexible > > payload. > > > > Signed-off-by: Beilei Xing > > --- > > app/test-pmd/cmdline.c | 199 ++++++++++++++++++++= +++++--- > > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 8 +- > > 2 files changed, 187 insertions(+), 20 deletions(-) > > > > +#ifdef RTE_LIBRTE_I40E_PMD >=20 >=20 > How about moving all driver specific tests to driver/net//? > I think, it wont scale if everyone starts adding their own driver specifi= c tests > to testpmd. >=20 > How about creating > #A generic string parser in testpmd? something like, port config (port_i= d) > .... > # and do driver_name to port_id lookup > # and introduce "test" or "self_test" ops in ethdev # and call "test" op = on the > selected port_id >=20 Thanks for the comment, but if so, then will remove and redesign all existe= d commands. I think it can be discussed in another thread. Thanks, Beilei >=20 > > + if (!strcmp(res->inset_type, "hash_inset")) > > + inset_type =3D INSET_HASH; > > + else if (!strcmp(res->inset_type, "fdir_inset")) > > + inset_type =3D INSET_FDIR; > > + else if (!strcmp(res->inset_type, "fdir_flx_inset")) > > + inset_type =3D INSET_FDIR_FLX; > > + ret =3D rte_pmd_i40e_inset_get(res->port_id, res->pctype_id, > > + &inset, inset_type); > > + if (ret) { > > + printf("Failed to get input set.\n"); > > + return; > > + } > > + > > + if (!strcmp(res->opt, "get")) { > > + ret =3D rte_pmd_i40e_inset_field_get(inset.inset, > > + res->field_idx); > > + if (ret) { > > + printf("Field index %d is enabled.\n", res->fie= ld_idx); > > + for (i =3D 0; i < 2; i++) { > > + if (inset.mask[i].field_idx =3D=3D res-= >field_idx) { > > + printf("Mask is: 0x%x\n", > > + inset.mask[i].mask); > > + break; > > + } > > + } > > + } else { > > + printf("Field index %d is disabled.\n", res->fi= eld_idx); > > + } > > + return; > > + } else if (!strcmp(res->opt, "clear")) { > > + ret =3D rte_pmd_i40e_inset_field_clear(&inset.inset, > > + res->field_idx); > > + if (ret) { > > + printf("Failed to clear input set field.\n"); > > + return; > > + } > > + for (i =3D 0; i < 2; i++) { > > + if (inset.mask[i].field_idx =3D=3D res->field_i= dx) { > > + inset.mask[i].mask =3D 0; > > + break; > > + } > > + } > > + } > > + > > + ret =3D rte_pmd_i40e_inset_set(res->port_id, res->pctype_id, > > + &inset, inset_type); > > + if (ret) { > > + printf("Failed to configure input set.\n"); > > + return; > > + } > > +#endif > > + > > + if (ret =3D=3D -ENOTSUP) > > + printf("Function not supported\n"); > > +}