From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id 73F87A49 for ; Tue, 24 Apr 2018 00:41:37 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id w3-v6so45439517wrg.2 for ; Mon, 23 Apr 2018 15:41:37 -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:in-reply-to:references :in-reply-to:references; bh=xl46IJjKxV0YaYEAsHLqUr6zsQxzxBotScNDNyL0DD0=; b=gkPo5LzLU3QCuRgx7PuGibPOpCh5zDS6gEkBEJiA5yMBaxsXLiF0MI8dNWJvKA8cI6 QPvWwO0RT5aiHwED+I9dcsiCxJD7JX4hx45ds5ElCnV8gEWZn1SvOXP1xNprEwXfsRvo 6qZRdtDV91AQ0VKSN5nBUMwYaldyM+XizkXd1UeTQDyqSIXrtA4lCE/NAdDCoeh+17tq gp8r4jgsO9YcKrQOWXadK+chWBVgzc7dKEfMbctxlgXC2CnrFsxRgIfxBQxNDkFEqpnZ C103GRLfYUDlP7SMXGrtfBR/XUNQhkkfWAa8+Rq9SpDj+o8lFs6BmTUEZz0NyM/uCjGs CLCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=xl46IJjKxV0YaYEAsHLqUr6zsQxzxBotScNDNyL0DD0=; b=kvN79uebeO3zszFsELBnstc4jjOzgpwiJgVBCWDMrcvzgwdflwDSrcXN5PU/UgUVj/ VpHH1/B70+UMhf97D04HQG5B49enkc/zMRoSVwJqv7CPzfjhkEFEIU1w47dcCqeVzRKu jROHXvVGeVxTjK39IHNoNNRz756/zKm5o+SkoFALVTtWSU190ZznMPTfVt63F+CYhtSO bQhkceNpzvdWAX4bX79toqbrmUU1Qe685CkchCd+Qz/CdB35Ra1W7qHcoz8hoZ7iDcpS 3R2b0X8l1GLGsEgmSHwPfUAnH8gUTcX8GbSZ+zeySPCKsGQ72awu1ThexgDI2aKxDKaE FcNg== X-Gm-Message-State: ALQs6tCMN8Nq+YDdNzf4hIeBzLioZm6qookie4vBpQt1EtbUzK8OSHgy j4BNE4QSPqY7ldJxK9RiNt2ux9U9 X-Google-Smtp-Source: AIpwx49flC/nG7eiSnlNAv2UXX+Y17EpE4SHXOvvWu+Jign/V704Gf8uiP+JZx7OakfQ29+EBK6XJg== X-Received: by 10.28.41.133 with SMTP id p127mr11629373wmp.0.1524523296578; Mon, 23 Apr 2018 15:41:36 -0700 (PDT) Received: from bidouze.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id x189sm1590705wmg.0.2018.04.23.15.41.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Apr 2018 15:41:35 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Tue, 24 Apr 2018 00:41:02 +0200 Message-Id: <224c73b2d7b27f32376334041c217533803a7354.1524522515.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v4 02/10] devargs: introduce foreach macro 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, 23 Apr 2018 22:41:38 -0000 Introduce new rte_devargs accessor allowing to iterate over all rte_devargs pertaining to a bus. Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/include/rte_devargs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h index 969a10449..aba31481b 100644 --- a/lib/librte_eal/common/include/rte_devargs.h +++ b/lib/librte_eal/common/include/rte_devargs.h @@ -209,6 +209,14 @@ __rte_experimental struct rte_devargs * rte_eal_devargs_next(const char *busname, const struct rte_devargs *start); +/** + * Iterate over all rte_devargs for a specific bus. + */ +#define RTE_EAL_DEVARGS_FOREACH(busname, da) \ + for (da = rte_eal_devargs_next(busname, NULL); \ + da != NULL; \ + da = rte_eal_devargs_next(busname, da)) \ + #ifdef __cplusplus } #endif -- 2.11.0