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 9D1D4A052F; Wed, 29 Jan 2020 15:41:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C15741BFF5; Wed, 29 Jan 2020 15:41:02 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 454F81BFF4 for ; Wed, 29 Jan 2020 15:41:00 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jan 2020 06:40:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,378,1574150400"; d="scan'208";a="223850337" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by fmsmga008.fm.intel.com with ESMTP; 29 Jan 2020 06:40:58 -0800 Received: from orsmsx161.amr.corp.intel.com (10.22.240.84) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Jan 2020 06:40:58 -0800 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX161.amr.corp.intel.com (10.22.240.84) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Jan 2020 06:40:58 -0800 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (104.47.44.50) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Jan 2020 06:40:57 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fApvbRhi2xIHSRJIcJQDoLOHsTJxCXnU6mxGg/AVutLrOuKY+mKj7S5RNPPnBp09PAVNDRsX7psw0x0sMdFldcLH5CMuWLHk87g3elGZXxMCXl83b8o23Ycrrpf7cR1lnEya4z2gOQD0gF0pCs6Q0WyegsENRNwWoGCg96fux8S+2xWakqcTIiF1CcHI1mw8yxvHgOoK9CVEMgAjownXYgb2qHnLFhdL0Eo7UNmX/+QXPcEldAxuxmd32pMJK9V/6+rFZv11krlz7mL4SEUkAREJYbSf9XJEguxZ6tnw8SG+UpoH2uMgXJ1cMjmtA8+ZI+MGFhgy/N4P3qlAxKuPgA== 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=nHhiKqP5XcXbneW9fmMKwkSAD4YD2sGZbakfOUcqaW0=; b=ajEKqc78Nkmep4yJNtLSmVfuDhMJNR4sLdeg/oojWPjdntchIaQCTGsJwQCkIUswSOWkUYoUbC8qgcioCpRVB4haj7/qKiShJplCFPdu8mA4bzh8vP56pgp6URxyd5RYc6iob1Tix4tH8x+dHKsmYAI7tQGOuecLzrYN+gyq4Zsmc2Sj8R4xcNYioYuWg6Ihs6Brp4F2Ms/hHJV7J4h9PJkKuHD2LAOJxdngE6JpWU5Zm8d/u9TAJWr2/4ZyFJ5tqyCe8gDLx6uWLTFzhpkg1YTiiKDyziEyAAMXxDOoM2beB7Ko2FTloAP+a1Hm5a47pQyBtC9SQU6JioaENXKD9g== 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=nHhiKqP5XcXbneW9fmMKwkSAD4YD2sGZbakfOUcqaW0=; b=aE8q06K3pktMB2BmJKJBi0ULdcb43X6wXVXunkNOy1oBRhyBWeULvg0OXhpA8B4ay7rE6mQA6C2dVwims7DR/EoxNqarzHUZ+mkSW4swUOOaPcE1SZcOoo8b249JBFbY3l3ZgaLnYc0/ItGLbbC0UurZaC6Pf4DaNAw2Hu50UjY= Received: from SN6PR11MB2558.namprd11.prod.outlook.com (52.135.94.19) by SN6PR11MB2559.namprd11.prod.outlook.com (52.135.91.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.23; Wed, 29 Jan 2020 14:40:56 +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.2665.027; Wed, 29 Jan 2020 14:40:56 +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 v2 12/12] examples/ipsec-secgw: add cmd line option for bufs Thread-Index: AQHVz5glmMosZshPMEyfmUsPiA0zeagBxB+g Date: Wed, 29 Jan 2020 14:40:56 +0000 Message-ID: References: <1575808249-31135-1-git-send-email-anoobj@marvell.com> <1579527918-360-1-git-send-email-anoobj@marvell.com> <1579527918-360-13-git-send-email-anoobj@marvell.com> In-Reply-To: <1579527918-360-13-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTc2ZjIxZjYtNTlkZC00Yzg4LWJjNjgtYjJlYTdmOWNlZWRjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicmNoOERFTWdzeFppd0hQcWdrU2M4VHdPQWhaeUdMcUJTaUNZcmg0WCtGcUxUbVQ2QWdIQjZlSk9UNWVMZjhodiJ9 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.187] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a78bf0a4-5760-4ada-ef37-08d7a4c93ffa x-ms-traffictypediagnostic: SN6PR11MB2559: 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:556; x-forefront-prvs: 02973C87BC x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(366004)(136003)(396003)(39860400002)(199004)(189003)(186003)(5660300002)(55016002)(9686003)(8936002)(7696005)(76116006)(2906002)(66556008)(66446008)(64756008)(7416002)(66946007)(66476007)(52536014)(8676002)(478600001)(71200400001)(6506007)(81166006)(26005)(81156014)(33656002)(4326008)(110136005)(316002)(54906003)(86362001); DIR:OUT; SFP:1102; SCL:1; SRVR:SN6PR11MB2559; 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: BLCh4CKhpzV1hKwcaS0JU5/DptKyYj49Qc78AeOhX5a1rqL0cAN0kXiDjeZ+d7qvFidNPrYxkd3KPDnEmvPompdbEfSDlB5BBOQMsVPkpdEXSt4dMqXEGwT5i4sjpvU3+fRavaXp9QH73A8Q34vew5l1oOcKi6iDHCTrZyieJRFNTaCn/fLYvq0nG2g4C3lO4RqeUug0p+VyRnz7S0lVrL7ZB+lwYt47uQ37B6SknvcI9SRgD2/WyE1VlFUtM0m6W/kn7jFyd/vjWe3PdAM4Q6bMH5I+UFmI0ufjKrgM627KbMP6mdRBKWR0UlX85u+4vQprutrY7JvACmoIVL5BJJ3QVJ2RMksvl1AsqSUqzNgf28TVM2W5SomflHfkuNadVzKO9J37C8RM26gKyMSuG8I2XZ3+B08B2e6OpQ4dZXd2BfeSk4DA+eDZb++bAVpn x-ms-exchange-antispam-messagedata: fqfAmR5bDTeYQFQZs7IILPg5j3uK8QCRZY9yewbxhyi2+f81Nn3sYj9+cG6nZZCb60f62gjb/ON5Oq24Rr8L+eE9CH1MCrfpwEvVI8B74OrlXgf2mcuI6POpKExcoEaAa8reePCjodUYD/6HIbfVbQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: a78bf0a4-5760-4ada-ef37-08d7a4c93ffa X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jan 2020 14:40:56.4206 (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: cK/ytoB+xN/R7pbMaar1kvpPa9FPznhGdFJgljSM0Afb2mnnfsorelL2RBGHGoh6ItjOZ2yUplrj+5S0MGgsFjVZvw2iZwgbL4CouQsxPu0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2559 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 12/12] 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 > From: Lukasz Bartosik >=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 7d844bb..a67ea0a 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 > @@ -162,6 +160,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 schedule_type; > +static uint32_t nb_bufs_in_pool =3D 8192; I still think it is not a good idea to change default number of mbufs. 8K is not that much: 1 core with 4 ports, or 1 port over 4 cores, and user might start to see unexpected failures. Now you added an option to allow user define number of mbufs in the app, which is a good thing, but default one I think should remain the same (to avoid any unexpected failures). Konstantin=20 >=20 > /* > * RX/TX HW offload capabilities to enable/use on ethernet ports. > @@ -1264,6 +1263,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]" > @@ -1285,6 +1285,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: In poll mode use single SA index for\n" > @@ -1484,7 +1485,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) { > @@ -1518,6 +1519,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 || > @@ -2753,11 +2767,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