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 8891241DFF; Tue, 7 Mar 2023 10:41:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 201EA40E03; Tue, 7 Mar 2023 10:41:33 +0100 (CET) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mails.dpdk.org (Postfix) with ESMTP id 7FB6B4067E for ; Tue, 7 Mar 2023 10:41:31 +0100 (CET) Received: from frapeml500007.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4PW9PR2k52z6JB3Z; Tue, 7 Mar 2023 17:38:51 +0800 (CST) Received: from frapeml500007.china.huawei.com (7.182.85.172) by frapeml500007.china.huawei.com (7.182.85.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 7 Mar 2023 10:41:30 +0100 Received: from frapeml500007.china.huawei.com ([7.182.85.172]) by frapeml500007.china.huawei.com ([7.182.85.172]) with mapi id 15.01.2507.021; Tue, 7 Mar 2023 10:41:30 +0100 From: Konstantin Ananyev To: Kamalakshitha Aligeri , "jerinj@marvell.com" , "thomas@monjalon.net" , "david.marchand@redhat.com" , "sean.morrissey@intel.com" , "Ruifeng.Wang@arm.com" , "Honnappa.Nagarahalli@arm.com" CC: "dev@dpdk.org" , "nd@arm.com" Subject: RE: [PATCH v2 2/3] examples/l3fwd: removed hash entry number Thread-Topic: [PATCH v2 2/3] examples/l3fwd: removed hash entry number Thread-Index: AQHZUEhRXEiXkTveak2BtLy6VVAXLK7vESgA Date: Tue, 7 Mar 2023 09:41:30 +0000 Message-ID: <816437038f9e4203b15da3584a2142cd@huawei.com> References: <20221114212533.2871770-1-kamalakshitha.aligeri@arm.com> <20230306162507.38898-1-kamalakshitha.aligeri@arm.com> <20230306162507.38898-2-kamalakshitha.aligeri@arm.com> In-Reply-To: <20230306162507.38898-2-kamalakshitha.aligeri@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.48.149.130] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected 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 > Fixes: e7e6dd643092 ("examples/l3fwd: support config file for EM") > Cc: stable@dpdk.org >=20 > Signed-off-by: Kamalakshitha Aligeri > Reviewed-by: Honnappa Nagarahalli > --- > examples/l3fwd/l3fwd.h | 1 - > examples/l3fwd/main.c | 37 +------------------------------------ > 2 files changed, 1 insertion(+), 37 deletions(-) >=20 > diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h > index ca1426a687..b55855c932 100644 > --- a/examples/l3fwd/l3fwd.h > +++ b/examples/l3fwd/l3fwd.h > @@ -55,7 +55,6 @@ > /* 32-bit has less address-space for hugepage memory, limit to 1M entrie= s */ > #define L3FWD_HASH_ENTRIES (1024*1024*1) > #endif > -#define HASH_ENTRY_NUMBER_DEFAULT 16 >=20 > struct parm_cfg { > const char *rule_ipv4_name; > diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c > index 71a3018036..a4f061537e 100644 > --- a/examples/l3fwd/main.c > +++ b/examples/l3fwd/main.c > @@ -89,7 +89,6 @@ uint32_t enabled_port_mask; >=20 > /* Used only in exact match mode. */ > int ipv6; /**< ipv6 is false by default. */ > -uint32_t hash_entry_number =3D HASH_ENTRY_NUMBER_DEFAULT; >=20 > struct lcore_conf lcore_conf[RTE_MAX_LCORE]; >=20 > @@ -395,7 +394,6 @@ print_usage(const char *prgname) > " [--eth-dest=3DX,MM:MM:MM:MM:MM:MM]" > " [--max-pkt-len PKTLEN]" > " [--no-numa]" > - " [--hash-entry-num]" > " [--ipv6]" > " [--parse-ptype]" > " [--per-port-pool]" > @@ -419,7 +417,6 @@ print_usage(const char *prgname) > " --eth-dest=3DX,MM:MM:MM:MM:MM:MM: Ethernet destination for port X\n= " > " --max-pkt-len PKTLEN: maximum packet length in decimal (64-9600)\n" > " --no-numa: Disable numa awareness\n" > - " --hash-entry-num: Specify the hash entry number in hexadecimal to b= e setup\n" > " --ipv6: Set if running ipv6 packets\n" > " --parse-ptype: Set to use software to analyze packet type\n" > " --per-port-pool: Use separate buffer pool per port\n" > @@ -479,22 +476,6 @@ parse_portmask(const char *portmask) > return pm; > } >=20 > -static int > -parse_hash_entry_number(const char *hash_entry_num) > -{ > - char *end =3D NULL; > - unsigned long hash_en; > - /* parse hexadecimal string */ > - hash_en =3D strtoul(hash_entry_num, &end, 16); > - if ((hash_entry_num[0] =3D=3D '\0') || (end =3D=3D NULL) || (*end !=3D = '\0')) > - return -1; > - > - if (hash_en =3D=3D 0) > - return -1; > - > - return hash_en; > -} > - > static int > parse_config(const char *q_arg) > { > @@ -852,14 +833,7 @@ parse_args(int argc, char **argv) > break; >=20 > case CMD_LINE_OPT_HASH_ENTRY_NUM_NUM: > - ret =3D parse_hash_entry_number(optarg); > - if ((ret > 0) && (ret <=3D L3FWD_HASH_ENTRIES)) { > - hash_entry_number =3D ret; > - } else { > - fprintf(stderr, "invalid hash entry number\n"); > - print_usage(prgname); > - return -1; > - } > + fprintf(stderr, "Hash entry number will be ignored\n"); > break; >=20 > case CMD_LINE_OPT_PARSE_PTYPE_NUM: > @@ -963,15 +937,6 @@ parse_args(int argc, char **argv) > lookup_mode =3D L3FWD_LOOKUP_LPM; > } >=20 > - /* > - * hash flag is valid only for > - * exact match, reset it to default for > - * longest-prefix match. > - */ > - if (lookup_mode =3D=3D L3FWD_LOOKUP_LPM) { > - hash_entry_number =3D HASH_ENTRY_NUMBER_DEFAULT; > - } > - > /* For ACL, update port config rss hash filter */ > if (lookup_mode =3D=3D L3FWD_LOOKUP_ACL) { > port_conf.rx_adv_conf.rss_conf.rss_hf |=3D > -- > 2.25.1 Acked-by: Konstantin Ananyev =20 >=20