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 5C916A04B3; Mon, 23 Dec 2019 17:17:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 63B002BE3; Mon, 23 Dec 2019 17:17:16 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 506192BA3 for ; Mon, 23 Dec 2019 17:17:14 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Dec 2019 08:17:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,348,1571727600"; d="scan'208";a="367097113" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga004.jf.intel.com with ESMTP; 23 Dec 2019 08:17:06 -0800 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Dec 2019 08:17:05 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Dec 2019 08:17:04 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Dec 2019 08:17:04 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fGpmfa2C74opln5W8XKUX3o1WAPMl2tXV7Lr1QDyiblAEqG43mzALz9Lwe7NriaCQ7xvUBzFfBkY1uYwwAXH7tSzIQmfGQLAiWRH5vOIfP3bJlR7bqcHyy4bCmSTHL6Ezxn+JDostOAQB+V37lwMyQ+cduhuoTptT2aF4NnjwmgppwZGrS4wFBCyW++rvU7rCjJ75S2c5Hh4wQGIU5GkXlo20AoGJuw73oxXETaCOVMCfx/SdULK+iK0DbYk4tIWoo43IVwZrf99nFYk4QKarHmS37NyapshR5dUIwmzvZPptgaqEwzWz52hAgv8/RnIHiE8mkjloi8OL7uxCpiMPw== 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=XaTRgIiMxpAByqgGwPUMmAtzdgh7NN/QRsW5+bj9xs8=; b=k5znACqSaAGtNz71QkTOlTHkVGhnfBeYwEGyHjOit816tYgVnhKCs62LxQ8R+RwvoScY4oEhckqxjbruDdeOcy/WvsN/c0+sK5Eigx8NuO06YUUmJ+Xy2cQqaAWhW6/nurwfNVsqifxDMlNZm/o/etej6W+2i6SCx/i3w5pA5CNerPEpBqvOO3FYFKK6gXpGMo+iaqMtctIZ0SaB0VRn5We9iQGfyN7Qkd3DxfPeTZ9JOElt7HspKagBZ8TeTbWkarCbqw/4aKTojoYk41RaeT1+1/FUKQKGZUyeSCUzE23i1MM74C8FtXalxkY5ey0CpgEWw3LRUt3HhxDcRFd69A== 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=XaTRgIiMxpAByqgGwPUMmAtzdgh7NN/QRsW5+bj9xs8=; b=NrEcfEkEu8BIPFxPvDxbm57c2Hx6jRaIklOl+Us10zufWb2F1jDIg3qRQeHeYLqhIfjedeFxhByyy9edrQ/QXrT2/786UVVnaUbjydOhBs+oWY6vwctIWlD1d4Um+rQnNUJC2O5PogaS9nBN9iuH9Of175sPTgyszwtBW8V92X4= 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:16:49 +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:16:49 +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+/IwgAAAtmA= Date: Mon, 23 Dec 2019 16:16:49 +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: 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: 9211f39e-3984-4865-6f10-08d787c383c4 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:398; 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)(2940100002)(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: roQQVWZPvXHzc4Dm/WXJzcQLB0+ZunHthd7dcAYvY0SqN5B56c5a+Krngg/yIOShSk4/Lwwp1wLXa5IFb6IDiHu8qaR3PCO8s9a5YYTk8DZ4uh/LpvXUg81Z+0KpRvOgPsDXTf52WCnq/n7No+pr31qFCmi8E0yO4ffa5N9PGyIocxtakhoXAsa80H+j4F60HB1NffMdcH/TFGq0QoC18zQZb/we/rli6JOciqHVuqlR4pwDMbVX2CRbVy7hb1A3a00AMtEW7qQTTa4BJMdCdNpR8rXN6XVL5K78SdAuFDJiZ5RovfiA8bSchZOYm3GcZtj+UXz9U0BGXUDc3cNAdgWixeX+n3XjUcU54yOPL7XK0v12mCtzFND+58J7zmaLghfQuN/6jyPDaQiTJ4cxTXtLgBvsvB0+8W9vrGxzhPntkhFJu7Syaxb9RpBfaHjT Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 9211f39e-3984-4865-6f10-08d787c383c4 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Dec 2019 16:16:49.3726 (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: /IvMDlhHpl4ShNjEq/+OaLKgys1Fq41qCe1ipr9Dwp5Z9hJvKBNWbN+tVK9f4xhDZYIsvXn5Qv88z+jrdBFvq+Kp/+b/jNT3VHW9Q1IvgUI= 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" > > Add command line option -s which can be used to configure number > > of buffers in a pool. Default number of buffers is 8192. > > > > Signed-off-by: Anoob Joseph > > Signed-off-by: Lukasz Bartosik > > --- > > examples/ipsec-secgw/ipsec-secgw.c | 23 +++++++++++++++++++---- > > 1 file changed, 19 insertions(+), 4 deletions(-) > > > > diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/= ipsec-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; > > > > #define MEMPOOL_CACHE_SIZE 256 > > > > -#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; >=20 > Why to change the default number (behavior) here? > Why not to keep existing one as default? Or, at least try to guess required number of mbufs (like l3fwd, etc., do)? >=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_c= onf *eh_conf) > > > > argvopt =3D argv; > > > > - 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) { > > > > switch (opt) { > > @@ -1568,6 +1569,19 @@ parse_args(int32_t argc, char **argv, struct eh_= conf *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; > > > > - 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); > > > > RTE_ETH_FOREACH_DEV(portid) { > > if ((enabled_port_mask & (1 << portid)) =3D=3D 0) > > -- > > 2.7.4