From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id AC90158D4 for ; Mon, 3 Oct 2016 22:58:44 +0200 (CEST) Received: by mail-wm0-f52.google.com with SMTP id f193so130705251wmg.0 for ; Mon, 03 Oct 2016 13:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=BthuYj4E8FzwBIuluxbGyMbWqvF3PnHLEnh3n3hn3Rw=; b=MWDpVY0JCDoYf21my85vzw0MWONJjp3GHZOBOv+HhCzGhqHNugcOZvUEU5U11VIPio kxwIgBdPIrbOnfBKV4F2KMQMNp6Vc35ix8g2mh9jHPYf2QktL75r7M1WyLf8bB/6AP08 Fpgxp9z6OWGCb01legFTvg4CebG/czEo4aq+K4dc1BQ2w9wihpK4PXWfhTiAnbvp7i+o W2eCgDTJj9Nqnu7bkTCEH6i0LNsuyphJrReYWkdUEyU1pyMig6tOybcGKR0f3/du2fvc HW6x2j64XTo4rwgkOh07g6xfDgaCftAVn659Gr8Ib/53EJnZA4+i39Oy/Ow61OE+n46d MYBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BthuYj4E8FzwBIuluxbGyMbWqvF3PnHLEnh3n3hn3Rw=; b=TEdi36cGWF5FUm5gySBV/lZEVFxRl/dmRnnsBuT8ArA4G64Em2LdY5ZG/c8hMZYzwF t1/nOQQYjwMZ1iE/cky6eSMw5UdS4HgY098MhMdu+AdgzJUTML4+9lPiV3fZlAglBYHF 0oJ10pSdTBzChii/ooST9Gtfyf9Nr0dp1SQMe2LmStfQMiFAPNUdqqo+pdJJNT/Skq9t mAUxFlfZZSMvCMCWruInOxhQmxRXe+CJjWMme8mJNl9f4oUI51RgCkbT73ev0vylssFU DH+S9pzf7SzCypzzBeY5y/iBVhnaT6JE/2disbYPDlEXEYpBFcQhlZd6WJCO4HCnIk6A pWaw== X-Gm-Message-State: AA6/9RmEjhwNDwQyrRi0bCaVNbMa4S1aS0XSQDg+rcTRTpl1HCvkYbHITUw0o+nXRIy0LIot X-Received: by 10.28.14.202 with SMTP id 193mr453198wmo.125.1475528324464; Mon, 03 Oct 2016 13:58:44 -0700 (PDT) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id iq2sm20219wjb.19.2016.10.03.13.58.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Oct 2016 13:58:43 -0700 (PDT) From: Thomas Monjalon To: olivier.matz@6wind.com Cc: dev@dpdk.org Date: Mon, 3 Oct 2016 22:58:33 +0200 Message-Id: <1475528313-7759-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH] app/test: add mempool walk 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, 03 Oct 2016 20:58:44 -0000 The mempool function rte_mempool_walk was not tested. It will print the name of all mempools. Signed-off-by: Thomas Monjalon --- app/test/test_mempool.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c index fffbf8d..b9880b3 100644 --- a/app/test/test_mempool.c +++ b/app/test/test_mempool.c @@ -500,6 +500,12 @@ test_mempool_xmem_misc(void) return 0; } +static void +walk_cb(struct rte_mempool *mp, void *userdata __rte_unused) +{ + printf("\t%s\n", mp->name); +} + static int test_mempool(void) { @@ -561,6 +567,9 @@ test_mempool(void) goto err; } + printf("Walk into mempools:\n"); + rte_mempool_walk(walk_cb, NULL); + rte_mempool_list_dump(stdout); /* basic tests without cache */ -- 2.7.0