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 871E4A04DD; Mon, 23 Dec 2019 17:14:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 79D2F1C01; Mon, 23 Dec 2019 17:14:47 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id EE53E1252 for ; Mon, 23 Dec 2019 17:14:45 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Dec 2019 08:14:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,348,1571727600"; d="scan'208";a="223045278" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 23 Dec 2019 08:14:44 -0800 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Dec 2019 08:14:44 -0800 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Dec 2019 08:14:44 -0800 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (104.47.44.58) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Dec 2019 08:14:43 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZvVPMbn9cYM1cjoY4kXrfS36pguTOvCds2bBfT7wmMV4IHbi5iNJYFG/bCQNRy453xUvTHLv3HAuuzmq3Jx8bxfMArxsHLiOvzPuV0wcShJ3bHHe9SYFEKU9CKq+yA2fQMmVdX+IlaKPOpShomK/leXjM72NEIu0oApeMkvV1EuudP3qkThel2MuXHvCXfMe48a0Cb8QfhgBleUIiSotG+f4wJaE/md6OCCpZ7Rx9JKzWnG3RqCpZvIwxhKDp4w3Y21tEJS9C8MmQYXRyCUgFdRUL9Ftm8RH3gUcnIEoLCvp0nLpLZCTKb6WMOSgalLG97BMxpDabwRkwQX/AFtqRQ== 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=0GACkk9PH+vV77jjEtOfHEhcXm3WBda+eWhR4TCSe5s=; b=JAIyl/tAkGemGk3PwHWJbKF4NozIkDxYC20vIJx+dJ9kcgDb3FUdlitmw799sdD0aANE1+yVtjuR6zvbr4n975aR7M3ctBsVyQV3mgZoe3BVh1UNOPSRBScYopvXuz6CI3ApV+DAhOmWbXglZsVBkbTYidwlQLHkrzdsFu3uCyIrmaEBVUb6Z5F2YZ0lNURAcdrcPcNqsPN47Eu7vR1Cw6w5MDXEguGBqf4aXplcrM4vzDqyjvKcU63s/qnhup/J7jf26mEbJIdHoV95dE/bgV4WZGbKW2MZ5mG3eGcfrg8HViiBWw4DqSIW2KvdQ7EGKmsTkAXeZuQTCZ4EongqBQ== 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=0GACkk9PH+vV77jjEtOfHEhcXm3WBda+eWhR4TCSe5s=; b=pktVOZsGL4jK9sjoTTTG56tqYVfvoVdGV18ixnUwc/bz43Z9LxeKS+2gbhSfRgTqdqshOqzhI1ZKqWSTNf9sp2JDEDxjqe3poN2FfZkEzyaPilX0wi2fvhyOa9SsUViZ6FlhywlykFEss7SwYhNU8S2TqHxAjkGoX5DN0rkYA0E= Received: from SN6PR11MB2558.namprd11.prod.outlook.com (52.135.94.19) by SN6PR11MB2879.namprd11.prod.outlook.com (52.135.93.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2559.14; Mon, 23 Dec 2019 16:14:42 +0000 Received: from SN6PR11MB2558.namprd11.prod.outlook.com ([fe80::4d86:362a:13c3:8386]) by SN6PR11MB2558.namprd11.prod.outlook.com ([fe80::4d86:362a:13c3:8386%7]) with mapi id 15.20.2559.017; Mon, 23 Dec 2019 16:14:42 +0000 From: "Ananyev, Konstantin" To: Anoob Joseph , Akhil Goyal , "Nicolau, Radu" , Thomas Monjalon CC: Lukasz Bartosik , Jerin Jacob , Narayana Prasad , Ankur Dwivedi , Archana Muniganti , Tejasree Kondoj , Vamsi Attunuru , "dev@dpdk.org" Thread-Topic: [PATCH 14/14] examples/ipsec-secgw: add cmd line option for bufs Thread-Index: AQHVrcOirZvxp3kAPk2ORSs8ZZPny6fH+/Iw Date: Mon, 23 Dec 2019 16:14:42 +0000 Message-ID: References: <1575808249-31135-1-git-send-email-anoobj@marvell.com> <1575808249-31135-15-git-send-email-anoobj@marvell.com> In-Reply-To: <1575808249-31135-15-git-send-email-anoobj@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGNhZjRhYWMtMTM1OC00OWRkLWI2ZDMtMjQ2NDNhYWU5OGY4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRDhqUGZUbmM5eU4yOEJtaGpRU1ZrOFwvRlNtMFFvV0FnVE8wVUh3TVwvS0NDb3dzTGZ0K1M2c0N6c3lUUm96MEhuIn0= dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 x-ctpclassification: CTP_NT authentication-results: spf=none (sender IP is ) smtp.mailfrom=konstantin.ananyev@intel.com; x-originating-ip: [192.198.151.184] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b00a9db6-5fff-422e-e384-08d787c337f5 x-ms-traffictypediagnostic: SN6PR11MB2879: 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:264; x-forefront-prvs: 0260457E99 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(366004)(39860400002)(376002)(136003)(346002)(199004)(189003)(33656002)(66446008)(8936002)(52536014)(66476007)(66556008)(64756008)(26005)(2906002)(55016002)(81166006)(7696005)(7416002)(5660300002)(6506007)(8676002)(186003)(86362001)(81156014)(4326008)(9686003)(76116006)(110136005)(54906003)(316002)(71200400001)(66946007)(478600001); DIR:OUT; SFP:1102; SCL:1; SRVR:SN6PR11MB2879; H:SN6PR11MB2558.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NXff+41kB2Cj1l5giP1D2aTvxvfRG9VpNQSuThCNzHiuHGh7l54J8EvWk0qsHnjOjve73l450YcBXNTqTfYBx339eZcvqj/TdyP+E+MajRXQxcVxIY5P/TPb79auc/P7SLaaz9jzX+J3sR7/ALYvGPQCE2CGqKY9E1ZxWKzck3jpUl6DUdI2q4UPY7g3DEYmkSRYnVCIaGa3eKPmexT/ZFpWovdOk2oGLQgNGN3I6U6rp9QkStAVSeBe0j5zHyVVX0DCXiy5my5lF5Qkl3InHwdi/20ynEbbVgrlb8qHb5ebgZkT2nbaHZT7T7Emjavx55QsdKkovaOJ7BvmtKg300EWHSwGQSYOl/E3hagPu6sOQxWdStxk56PbYQ46wW/ZfRvhYAdH1nk+Zoz6WZLhoESYeYnpuGboiDgLOmJFZS0D/3X5qe/9f9J8hjJ0jaOs Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: b00a9db6-5fff-422e-e384-08d787c337f5 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Dec 2019 16:14:42.2469 (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: NyXn1c0UiUoIi8uZuctYhJDijJ8Mx6Z1T+8uSdy63PpvUZQpt2E/yEDqmYciuQOhSc6Znzk/0S+KgLYNvhsA3XeBx3wT/o4G24EZ2i8Cj+g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2879 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 14/14] examples/ipsec-secgw: add cmd line option for bufs 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" >=20 > Add command line option -s which can be used to configure number > of buffers in a pool. Default number of buffers is 8192. >=20 > Signed-off-by: Anoob Joseph > Signed-off-by: Lukasz Bartosik > --- > examples/ipsec-secgw/ipsec-secgw.c | 23 +++++++++++++++++++---- > 1 file changed, 19 insertions(+), 4 deletions(-) >=20 > diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ip= sec-secgw.c > index 76719f2..f8e28d6 100644 > --- a/examples/ipsec-secgw/ipsec-secgw.c > +++ b/examples/ipsec-secgw/ipsec-secgw.c > @@ -59,8 +59,6 @@ volatile bool force_quit; >=20 > #define MEMPOOL_CACHE_SIZE 256 >=20 > -#define NB_MBUF (32000) > - > #define CDEV_QUEUE_DESC 2048 > #define CDEV_MAP_ENTRIES 16384 > #define CDEV_MP_NB_OBJS 1024 > @@ -167,6 +165,7 @@ static int32_t numa_on =3D 1; /**< NUMA is enabled by= default. */ > static uint32_t nb_lcores; > static uint32_t single_sa; > static uint32_t single_sa_idx; > +static uint32_t nb_bufs_in_pool =3D 8192; Why to change the default number (behavior) here? Why not to keep existing one as default? >=20 > /* > * RX/TX HW offload capabilities to enable/use on ethernet ports. > @@ -1261,6 +1260,7 @@ print_usage(const char *prgname) > " [-w REPLAY_WINDOW_SIZE]" > " [-e]" > " [-a]" > + " [-s NUMBER_OF_MBUFS_IN_PKT_POOL]" > " -f CONFIG_FILE" > " --config (port,queue,lcore)[,(port,queue,lcore)]" > " [--single-sa SAIDX]" > @@ -1284,6 +1284,7 @@ print_usage(const char *prgname) > " size for each SA\n" > " -e enables ESN\n" > " -a enables SA SQN atomic behaviour\n" > + " -s number of mbufs in packet pool (default 8192)\n" > " -f CONFIG_FILE: Configuration file\n" > " --config (port,queue,lcore): Rx queue configuration\n" > " --single-sa SAIDX: Use single SA index for outbound traffic,\n" > @@ -1534,7 +1535,7 @@ parse_args(int32_t argc, char **argv, struct eh_con= f *eh_conf) >=20 > argvopt =3D argv; >=20 > - while ((opt =3D getopt_long(argc, argvopt, "aelp:Pu:f:j:w:", > + while ((opt =3D getopt_long(argc, argvopt, "aelp:Pu:f:j:w:s:", > lgopts, &option_index)) !=3D EOF) { >=20 > switch (opt) { > @@ -1568,6 +1569,19 @@ parse_args(int32_t argc, char **argv, struct eh_co= nf *eh_conf) > cfgfile =3D optarg; > f_present =3D 1; > break; > + > + case 's': > + ret =3D parse_decimal(optarg); > + if (ret < 0) { > + printf("Invalid number of buffers in a pool: " > + "%s\n", optarg); > + print_usage(prgname); > + return -1; > + } > + > + nb_bufs_in_pool =3D ret; > + break; > + > case 'j': > ret =3D parse_decimal(optarg); > if (ret < RTE_MBUF_DEFAULT_BUF_SIZE || > @@ -2792,11 +2806,12 @@ main(int32_t argc, char **argv) > if (socket_ctx[socket_id].mbuf_pool) > continue; >=20 > - pool_init(&socket_ctx[socket_id], socket_id, NB_MBUF); > + pool_init(&socket_ctx[socket_id], socket_id, nb_bufs_in_pool); > session_pool_init(&socket_ctx[socket_id], socket_id, sess_sz); > session_priv_pool_init(&socket_ctx[socket_id], socket_id, > sess_sz); > } > + printf("Number of mbufs in packet pool %d\n", nb_bufs_in_pool); >=20 > RTE_ETH_FOREACH_DEV(portid) { > if ((enabled_port_mask & (1 << portid)) =3D=3D 0) > -- > 2.7.4