From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id D2BB7A05D3 for ; Tue, 23 Apr 2019 14:28:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8EE4C5F14; Tue, 23 Apr 2019 14:28:23 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50066.outbound.protection.outlook.com [40.107.5.66]) by dpdk.org (Postfix) with ESMTP id 277E258FA; Tue, 23 Apr 2019 14:28:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XAxOKZ+Oj3g7dtTMYgEV3X/bcynsKtNYQ7j5wUDnHHg=; b=nq9O1bGupkFTqln7m7kBs9hPVRCDrSgUmWCA+rPnqvYaRC3sN+/GuTF/6n7NvMp3SWxbIjRG521fbbLBqzo6lREJhMsoXh3O7ANepgaN9wQ9suLN9K30T8ViooHkx5YJbp8cAh27M8UTeUldFqYmKeWLKmkz7wMcGZol6F13lOA= Received: from VI1PR04MB4893.eurprd04.prod.outlook.com (20.177.49.154) by VI1PR04MB6192.eurprd04.prod.outlook.com (20.179.28.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.16; Tue, 23 Apr 2019 12:28:20 +0000 Received: from VI1PR04MB4893.eurprd04.prod.outlook.com ([fe80::98b0:84a6:1c08:57c7]) by VI1PR04MB4893.eurprd04.prod.outlook.com ([fe80::98b0:84a6:1c08:57c7%3]) with mapi id 15.20.1813.017; Tue, 23 Apr 2019 12:28:20 +0000 From: Akhil Goyal To: "Ananyev, Konstantin" , "dev@dpdk.org" CC: "Nicolau, Radu" , "Zhang, Roy Fan" , "stable@dpdk.org" Thread-Topic: [PATCH] examples/ipsec-secgw: fix pool usage for security session Thread-Index: AQHU+Rqo5PkmvO2GFky0NsixyB2xjKZJovOAgAAKv5A= Date: Tue, 23 Apr 2019 12:28:19 +0000 Message-ID: References: <20190422143942.26956-1-akhil.goyal@nxp.com> <2601191342CEEE43887BDE71AB9772580148A9B044@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB9772580148A9B044@irsmsx105.ger.corp.intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; x-originating-ip: [92.120.1.65] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f9587f84-c532-4104-956f-08d6c7e72b8b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VI1PR04MB6192; x-ms-traffictypediagnostic: VI1PR04MB6192: x-microsoft-antispam-prvs: x-forefront-prvs: 0016DEFF96 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(39860400002)(136003)(376002)(396003)(199004)(189003)(15650500001)(7696005)(86362001)(81166006)(6436002)(8676002)(102836004)(2906002)(33656002)(186003)(66446008)(6506007)(66556008)(64756008)(14454004)(26005)(81156014)(76116006)(478600001)(5660300002)(66946007)(66066001)(66476007)(73956011)(8936002)(229853002)(71190400001)(71200400001)(316002)(256004)(54906003)(110136005)(44832011)(7736002)(25786009)(6116002)(3846002)(486006)(99286004)(74316002)(6246003)(97736004)(446003)(11346002)(53936002)(9686003)(68736007)(2501003)(55016002)(305945005)(4326008)(52536014)(76176011)(14444005)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB6192; H:VI1PR04MB4893.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: E1GdgTxD4Lv3lOAevDeS1M6L4/ryBgm+Y30mrRmzxhW33kbTktqCejcK8Uus1DXVeiSAL4oudzDPLRtCU5cpZ349UENF1XwjmRAb7v73+o/wLdhVHj6+AZvjPJKNX3U8w4EWJ15Osz4FkDs/Z0bkz8PoqUMU7F2mySf4044toExEVMOyYrTVX++IwhBZhaEAcB6jB6gvVltUsV3X6ILFuftEYPjGfLknLViMDl6KVWLZjOh+UFq6KwatwxY/1aiWRuIZ9RhYH1W+pJc/X7xGFVnbN0PphVwsffKk/DOOCST9nE2BS21W7feVqXkbnqRvsHTXwsJdZrmSF6WApe8M9ZmSM3R4HNIKR8F+UHqyh34GiYOMMrD7o2Q+K1errmCecG7lMxQ2aTwTaLxldOmZeB7WLR2Bzi26sOaij5di5To= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9587f84-c532-4104-956f-08d6c7e72b8b X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Apr 2019 12:28:20.0353 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6192 Subject: Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix pool usage for security session 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" Message-ID: <20190423122819.oI2zoz91SlDJm9x2vpnCZxLCxElc7IIsV3qy0rrFH0g@z> >=20 >=20 > Looks good to me , but seems incomplete. > I think we also need to: > static int32_t > cryptodevs_init(void) > { > ... >=20 > /* create session pools for eth devices that implement security *= / > RTE_ETH_FOREACH_DEV(port_id) { > if ((enabled_port_mask & (1 << port_id)) && > rte_eth_dev_get_sec_ctx(port_id)) { > int socket_id =3D rte_eth_dev_socket_id(port_id); >=20 > - if (!socket_ctx[socket_id].session_pool) { > + if (!socket_ctx[socket_id].session_priv_pool) { > char mp_name[RTE_MEMPOOL_NAMESIZE]; > struct rte_mempool *sess_mp; >=20 > snprintf(mp_name, RTE_MEMPOOL_NAMESIZE, > "sess_mp_%u", socket_id); > sess_mp =3D rte_mempool_create(mp_name, > (CDEV_MP_NB_OBJS * 2), > max_sess_sz, > CDEV_MP_CACHE_SZ, > 0, NULL, NULL, NULL, > NULL, socket_id, > 0); > if (sess_mp =3D=3D NULL) > rte_exit(EXIT_FAILURE, > "Cannot create session po= ol " > "on socket %d\n", socket_= id); > else > printf("Allocated session pool " > "on socket %d\n", socket_= id); > - socket_ctx[socket_id].session_pool =3D se= ss_mp; > + socket_ctx[socket_id].session_priv_pool = =3D sess_mp; >=20 > } > } > } >=20 > Konstantin Thanks, Will be sending a v2 soon.