From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0058.outbound.protection.outlook.com [157.56.112.58]) by dpdk.org (Postfix) with ESMTP id C743F47D0 for ; Mon, 6 Jun 2016 16:32:17 +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; bh=i9CoJBgJKRaFPDHjGRr5HO9gAoxm55t/N+Va2iCHHMw=; b=LklxKGcGpoyF64e1slSuBFPZwyqz5JvCM8ucCiaWtEdW3mirdiNJEy50FcMYp2unYzx0KlgvrwAXmwCR/unOlTm6Uxamme6ry4Lu5vTV3Cf/S5t5xxJsVeJIK7qGoHKsT2FOQX2Evle50WA8vUm6C9yjtj0wfDphCtMm5J8nkII= Received: from DB5PR0401MB2054.eurprd04.prod.outlook.com (10.166.11.137) by DB5PR0401MB2053.eurprd04.prod.outlook.com (10.166.11.136) with Microsoft SMTP Server (TLS) id 15.1.506.9; Mon, 6 Jun 2016 14:32:16 +0000 Received: from DB5PR0401MB2054.eurprd04.prod.outlook.com ([10.166.11.137]) by DB5PR0401MB2054.eurprd04.prod.outlook.com ([10.166.11.137]) with mapi id 15.01.0506.016; Mon, 6 Jun 2016 14:32:16 +0000 From: Shreyansh Jain To: David Hunt , "dev@dpdk.org" CC: "olivier.matz@6wind.com" , "viktorin@rehivetech.com" , "jerin.jacob@caviumnetworks.com" Thread-Topic: [dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations Thread-Index: AQHRvaht0RXQVWk8xkWSzpGmKHutFp/chDIg Date: Mon, 6 Jun 2016 14:32:16 +0000 Message-ID: References: <1464874043-67467-1-git-send-email-david.hunt@intel.com> <1464965906-108927-1-git-send-email-david.hunt@intel.com> <1464965906-108927-2-git-send-email-david.hunt@intel.com> In-Reply-To: <1464965906-108927-2-git-send-email-david.hunt@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; x-originating-ip: [192.88.169.1] x-ms-office365-filtering-correlation-id: dc60b139-2868-468e-9cd2-08d38e175bdb x-microsoft-exchange-diagnostics: 1; DB5PR0401MB2053; 5:uh5/ln1yS1ESRoxQra9uC+oH+xLzwtJin8AU9lQz3VVWEJn3Ka64e5WBqs+OJ+csSBBREVHKAssNf95At4kez1IJwLPJioIJuFFcRfVCkOHBw0ij1Ab4gR9bbUD4g1i71a0SBvmA2YBttQ1kxT4sew==; 24:F3FiLStP4h/1Hdsq0et6R4DVu+RfX9WDvDkwAYQsvuWVmH24A6BhPPDc/+hOLMGdp5PatwoLhnat2B4iO7lhQ4P318sro4v6tfLvt3vH26g=; 7:hkwHCQiNc0ypfKPbgGRR4Kxh/uuFWSnl5qzDiUAnhHrzYnFQZp18hJQcvDgW7ezQS+iWwJD7CISXGcZ1WYYYw0YttBm4mcJRDcmglWgIdjwXrJK9wuIVs5nHCacHX3zuMFhYx/zthTb/8VyTMBO/mrDiPmT5C6akDPxwn5CDbYFRU/6soXGR3cwK550SGmXzhZCyrTsv8vykhAcJn55yoMYzbWtuErGArkWqM9jmepE= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR0401MB2053; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:DB5PR0401MB2053; BCL:0; PCL:0; RULEID:; SRVR:DB5PR0401MB2053; x-forefront-prvs: 096507C068 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(189002)(199003)(4326007)(586003)(77096005)(2906002)(74316001)(102836003)(3846002)(101416001)(5004730100002)(6116002)(11100500001)(5002640100001)(10400500002)(68736007)(5008740100001)(76176999)(87936001)(50986999)(54356999)(2900100001)(2950100001)(92566002)(33656002)(5001770100001)(9686002)(97736004)(5003600100002)(106116001)(76576001)(122556002)(2501003)(105586002)(106356001)(66066001)(86362001)(8936002)(3660700001)(3280700002)(81156014)(81166006)(189998001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR0401MB2053; H:DB5PR0401MB2054.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jun 2016 14:32:16.3851 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR0401MB2053 Subject: Re: [dpdk-dev] [PATCH v8 1/3] mempool: support external mempool operations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2016 14:32:18 -0000 Hi, This is more of a question/clarification than a comment. (And I have taken = only some snippets from original mail to keep it cleaner) > +MEMPOOL_REGISTER_OPS(ops_mp_mc); > +MEMPOOL_REGISTER_OPS(ops_sp_sc); > +MEMPOOL_REGISTER_OPS(ops_mp_sc); > +MEMPOOL_REGISTER_OPS(ops_sp_mc); > + /* > + * Since we have 4 combinations of the SP/SC/MP/MC examine the flags to > + * set the correct index into the table of ops structs. > + */ > + if (flags & (MEMPOOL_F_SP_PUT | MEMPOOL_F_SC_GET)) > + rte_mempool_set_ops_byname(mp, "ring_sp_sc"); > + else if (flags & MEMPOOL_F_SP_PUT) > + rte_mempool_set_ops_byname(mp, "ring_sp_mc"); > + else if (flags & MEMPOOL_F_SC_GET) > + rte_mempool_set_ops_byname(mp, "ring_mp_sc"); > + else > + rte_mempool_set_ops_byname(mp, "ring_mp_mc"); > +