From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0087.outbound.protection.outlook.com [104.47.2.87]) by dpdk.org (Postfix) with ESMTP id 8CACD1B32A for ; Mon, 29 Jan 2018 09:12:23 +0100 (CET) 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=AqhC+4l9ZCcs0Q3t9OjqMfoRZ7nm/MnXOdXiygve0H8=; b=xeTh44rzN1CcizSkk55OhRa0bPTn/USyFn3Qvf5gKDqF9x4OA3cVo2rKOPKlg1x2ljP2CbMKOSVfaRBd3JojXVf3hvuf5hKYyd+JwJYKj3XCsMu1nVBZ7PYneq0Qf8JdISkSjM7G71UiBSOi90gwohqJ1fgF7kaxdei/G84M0aA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (192.88.169.1) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 08:12:19 +0000 From: Hemant Agrawal To: thomas@monjalon.net, dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com Date: Mon, 29 Jan 2018 13:40:44 +0530 Message-Id: <1517213449-678-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> References: <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: BM1PR01CA0094.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::34) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 63d8879f-e0a8-4992-a632-08d566f0061f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:4blqymZU8GbDtlg3zkbYIutJRQ5pKuTyAg5ma2tAzY8oAcFkZLpYz3EgM6u4KaKNeme//LEGUH5QBKNUUqfmiAeyHgLu5WFYw3l61WYzDW2v1I2gpvl3Ii3Jh3Sr0wUcBAAEaI06HGmlcGBWsCM+8RpPd1H35x/2gvIawGNP2Vr8b0HCKyVne1TqQ20P07JmWhZ4C5MBmjff6U4Xj/fKeYsoe1JD8Oyz6/jiHW023uBzUHYA3rpEBFYvQkNdAwOc; 25:ppwjn4KtY0lXUTc4UDXXwcPpPJXr5geebC1ZzgsQjX4LvtQnpvtjcvohUgLzjtbc4ZTHaYHiVFpkwUbr+1BShF6Vjj42LS/r27ClENEtjQpKKJOTjhyNxsSj1xAgGTL1avJ7UCBUFK1JHS1gx/8GksoElTiaSjAEftTQUlmFr/P/MdteZNFZKqimFwWYfXTZoNLDeYsInh/OjCmirsT93fwNQUn5d/ZcwebrWECIuhU7iVsqWrExYmZkO5me4ILuhc/mRsiYxB36fNH1CaJhRAD5WxaBGpP8ajLhaRas6v83v48lVvpZ4ZYLFU/4uypsqtGZ31g9W3kdPoX3F+oRdw==; 31:8I7EDilv4rlthammBiFgOXsRzkK/yuwDmuEw3N4wSIsJymlE+J6dMhPNzq2yko4XJxib/xP0oncrSCfNY7puSfeSCs+r9bmis6p0ExvwxQEr0kbkvhQWJ9wZIp8x4edVGesBYQohKjlC8RLHAwzg3NE8u104Gcf7kTaP+GZTvmDfdJGkwTkeiemO/bpJR6MdAg3aFUt1RV50W+gLO3nMJ2jbKdWKMqMdoMkaFfToS7A= X-MS-TrafficTypeDiagnostic: AM2PR04MB0756: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 20:7KqEwg1k6JwyZNQy2/JrSDpatQD993nEyJnHPmxBj2TVXaiHYTAjYAlNamVqZyTKHrq6Lavp07hcfROO537/Oeh9AnAq0Et+nwcKBbrQ1ppm+NDu8zabP6waOQFH+8QD+SidAvMYQw3T/IjiDMrOPLd5/pOm+zEooc0/a6xL/j5o0rNezVZSWa9dhHe04eVW8yTuL1BCRrYIrpQjoOtAQ+c0/V9wGq5Eng6XWe11ltyB5x4nMGRQXvldXb/p+RszOldjP6ZGAZ3wzgGJcwWYwqx0uv/qc/gQAIqoORnmd7qnrdMyXsyVdLkR0QGHN4gpXkIbYvg1TLV2Bhk634WKgtLPuMw5bB56h0GDHqPNqK7I4mTcn67maC+HvZk0wePAwEH6vD7ijfpXoXlwR5LWDy/yuKY8D5Tqzw/XuAVe6XnQVX0zavlesS56M5kEUAJNwT5Bb+OMvqjuCDics70ivEeyXWCBNK/Z/kNsxzchF8J5do38Nx+TmJMs2ofUJON6; 4:XSjOeowl2TL9Jw4V5RosRM/S0+Y1TkLp3iUwFCDmgIg9mi+U9tBZp7ZDacs/dFRinve9GoMXONN8GXldZZeW329esIdh5JShEbPPSLi78lnDfQXCYp7jpKIocO3+hk0mdRJEe9ECieWfIYa3dbQZgWQ5QIVOLgyxaF54867nNuDnEuUiv2V50hLrU397YBQSdhUGyDIr9eSBsldscpvvrDJ8P689gEkbnVjytDG5vtLe0a03GfIs0gMSuwD9wuZq/rV/u8NYYD2Nm3aV+2Bv5ZpaAcz0E5RoyvwvjZ7hopi+2kfpkZEHz2xKRiAgvU19 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231101)(944501161)(3002001)(10201501046)(6055026)(6041288)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(376002)(39380400002)(346002)(189003)(199004)(5660300001)(6486002)(4326008)(86362001)(16526019)(3846002)(105586002)(68736007)(36756003)(6116002)(76176011)(25786009)(59450400001)(6506007)(106356001)(386003)(305945005)(7736002)(51416003)(52116002)(97736004)(81156014)(81166006)(2906002)(50226002)(8676002)(47776003)(478600001)(8936002)(26005)(66066001)(316002)(16586007)(48376002)(6512007)(2950100002)(53936002)(186003)(50466002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; 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) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:ddc2CCL8vH565v850iedcjraLceeaxg9pM01JryBz?= =?us-ascii?Q?u+8oiXsFF4KckdeLEg8y/ma6uQFeLNqYhNtKwRJ0XkXdMBh/FuRPVDC0AGVI?= =?us-ascii?Q?PVvWmaHeK5Wkj1FsgE2/VbkENpDMJAoRvLiP53ClCH5yR5K8TVb+stRo1/PC?= =?us-ascii?Q?pkrzGYTrsAAXi1TPbGSgTDDl+uIfKkj6Vx9VUb7iWadeEvzNHC5jS3oJ5eDk?= =?us-ascii?Q?ICd407NI7Q8qcYAL4D+kHySCI9mVaAP0VebHhwrvmCiu+9heAFASmGhGqBD7?= =?us-ascii?Q?mVBweNP/1xZGMOeU3nTOS6ED7OpCh1p7cGEeNS1xsU2KaKlg522zNr+JKugO?= =?us-ascii?Q?zkwTHvveZc8NpPFFv+mSoIEYmOz+ncBygyjk1vcmwXOncQ0HEyavru45XkNy?= =?us-ascii?Q?JAliU+duIv40rRvx+5chsy8BnexlMTKdSUFd1baww1VBoatFbJXsmOuXseaF?= =?us-ascii?Q?Ye4E4EjSm0DXJKnf5ojh1DVZVqpcO0G4V0yqqFf2RJyODcVV/JhI2I9HOUXD?= =?us-ascii?Q?P1XQOVWUA5rBQP8SvDR9iM4SKvOB3z/arhr9CYOQYQc/DqewnoCpz5oJrrpL?= =?us-ascii?Q?iPLXgmOh7xcUsSDlFtuB6Ly8YHqm1Tv/4PX4yh6VMPjCTxUwksHtnnCDDNf8?= =?us-ascii?Q?qSTTMeqqphQ/X6HDZY0JIeFmOPGSiIfYi3uArpn07lY/59uiCAExszZ2WuIb?= =?us-ascii?Q?mb89wQjufuVLalfeAHbNzp2cv+oMR9tFxiwOeAhjAEXBds91Tc6hvGw1S+QI?= =?us-ascii?Q?3jfXHQZrQwC0dE1lGq6aBy087vEpzH91t7RpAHL0OheOYS2iTm3kbMROBM0a?= =?us-ascii?Q?fJ/hwUNNtFYdXn7o1WfTiB2abcuaupqiT+3iCzC58et+56WbOoos0pii8DYr?= =?us-ascii?Q?NWmeAI0milRlOOfxetCNwiiFwbuiau9Vgf58xH3R8/RS9C6NKBKyyXKVsqRK?= =?us-ascii?Q?Zfr5T5U0twOiKJxVv1d4FraL1VpT6lfmDNja4TOOd2iZ7u1axMorSqn/R2bg?= =?us-ascii?Q?lhKJegAQVckM8gGdL2zSlO03p5zeodBmnuJMQGNi5V0AlsGQ0qAD9RFlKnz0?= =?us-ascii?Q?VWjeVanBBysUqu7VuRHmoeaJXAu5+taUiZA/Bu5bXK13m6ldg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 6:36ciD4g0AB/2AN7VGCUv1rfwT+juI1wOF9+6eSiRzPmQJoAwlXUm3ffDfb/4sqmBFXklVBT8y8HBRO/aNZckyO2WQrCi3CGIvfFLJz9T6kYaQx0sTLHle7zwG+Mp6y/CIf9cCbE9wxtF26eWaE31mLrK1rLs0ZiiQRsjf/sc+8qRpaqwd1lAsQEcgGmfeIB2ghto3ukM5eVy4c1PhCWqpaE7LvL0TN1ZiJDN97kO7Mobc66FnHXJ+XQsINBKSBlmikFcL0H7rYtZNp8vfPb6ghKCj9doxaw9bxc1sToN+JQlnxOLL/j/FDJEGC99NA9q71aR0U6o4hFFcULj/DQbPjz1SUQLp51R/HGAysmpvlk=; 5:Ge7nU0Uam9PNh+D55vw2QUN0XUjYcYYgFMbmyJVgZLxR8D6WO8YYkFpgSwAR4iSvymhBUmTE9SYd0G7c4f4lWRCsix5VPz7UVlRBC9LQno8KFlJucpsweslgGEMGl61Lx25W5nxI80hHXEU5ECWn5Yxk6xfiZbdKcJmCX1eF11I=; 24:ES5BRFK8SuhismHS7QlXJU+NNNOlb/OWiQBQ2Kc1GroGRvNpW8uOickEIbNib/ovOIgaPPk4KsQSfoloNW6OaciErxxVMReQ2NtYOlFI4Ng=; 7:ux+sspF2Ppcxa2dcca/bb1nBLWiftPOojNejOHtIx+rtI9buORFgXRf1YYaSd2kbKuOQ8Bo5zfODvtzkEwEa0LBGTv1IsPj1NpIWVDdIQpaDmwafZfRCA2pNHH3f3AcaeeJbvCZEGLyd6YsznY5pGEGN3frzXbmiYD3wMJFj4vGHXpzKZWNHm/Vms+H7EiFr4T3FmjsuRy++pOWusLauPq4W7LzxfAjKQTOAVx47RSjL/nqeHzE7W0f73F4pN2qY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 08:12:19.9966 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63d8879f-e0a8-4992-a632-08d566f0061f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v7 2/7] mbuf: maintain user and compile time mempool ops name 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: , X-List-Received-Date: Mon, 29 Jan 2018 08:12:24 -0000 At present the userdefined mempool ops name overwrites the default mempool ops name variable in internal_config. This patch change the logic to maintain the value of user defined only in the internal config. The pktmbuf_create_pool is updated to reflect the same ie. use user defined. If not present than use the default. Signed-off-by: Hemant Agrawal Acked-by: Olivier Matz Acked-by: Santosh Shukla --- lib/librte_eal/common/eal_common_options.c | 2 +- lib/librte_mbuf/rte_mbuf.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 7a40414..b6d2762 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -218,7 +218,7 @@ eal_reset_internal_config(struct internal_config *internal_cfg) #endif internal_cfg->vmware_tsc_map = 0; internal_cfg->create_uio_dev = 0; - internal_cfg->user_mbuf_pool_ops_name = RTE_MBUF_DEFAULT_MEMPOOL_OPS; + internal_cfg->user_mbuf_pool_ops_name = NULL; } static int diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 937fd70..c085c37 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -177,6 +177,8 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, return NULL; mp_ops_name = rte_eal_mbuf_default_mempool_ops(); + if (mp_ops_name == NULL) + mp_ops_name = RTE_MBUF_DEFAULT_MEMPOOL_OPS; ret = rte_mempool_set_ops_byname(mp, mp_ops_name, NULL); if (ret != 0) { RTE_LOG(ERR, MBUF, "error setting mempool handler\n"); -- 2.7.4