From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 63D9A5F28 for ; Wed, 21 Mar 2018 00:20:36 +0100 (CET) Received: by mail-wm0-f67.google.com with SMTP id i189so3925184wmf.0 for ; Tue, 20 Mar 2018 16:20:36 -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=U1pPbixyTEjKd44DWFFjRRp14fQFzDAXX53wJOBmG7PakwwTpaOihXRVO7gS21oS9c kx77WdYl9RdCFT3xu1T6ovQWvIbu0sf2o8vU8S+mFm120MmbKEIphYJjPotiyV/rSOcN zbhXrEhnSbxoglSbRfk8Ie4LsuPH/wDgwjur4ukYIqZoJyPdamZcwzMcRkvPs2JTdIWZ ow98kBkSDr7My6whDP7piM5k/luEIktjqZuXXoWSTAoqFjQfvBf2OfymrkWLueOQw3PN YB3HLsqaSrm3SoQZ3dnzmZGa8AMu9huC0whXPKDLTTNlDjNSNMjItRQxD/E+40wy0WaS Taxg== 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=XNULoTYu5aaS34nbLnmIPsHKWlCIhsM2Pf0BVn8WvHfBWe3DQd/zepQFHecxtAJF6Z pgfauWoSKsh5ra650XRKU14c2QptwJ+9Igxpqyn/hwxkSslMKIX9P8FPeKyNy4c8bcoA /Ce2Pt0bYRkynBcTTszl36QGvQ32HWh5oxz5v1kv5/rCDcL7yZj1F4fcwt8ObcBDDQ5C PjLMv+eqbfcW2nlKWOSftZ+kHNwFGNtOnPMo2bSlp31V6LoMroctVlMgTEMb4BCeoLu2 DC0UbdUrrvfmnyfiEjTyQL3V44swztVWDoxh16tkpWVIQ+qXPsy/WriJCua/oSpM6OZG 240w== X-Gm-Message-State: AElRT7GDBGKOuo3dwJ0+PaiZI70PmSPaS5SiiL7eVKfi69DC/7q4J83/ T7bszQ4Y5c6t7M+VmAMC1YJEiZKV X-Google-Smtp-Source: AG47ELukQ6LoKzrvPLLa2d2EI6B3IiWCsL763oYCxNk4ooFhryJMGm64jn+gbh9JVog8o4swoz64MQ== X-Received: by 10.28.249.21 with SMTP id x21mr1078415wmh.114.1521588035401; Tue, 20 Mar 2018 16:20:35 -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 m135sm3983479wma.2.2018.03.20.16.20.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 16:20:34 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Wed, 21 Mar 2018 00:20:03 +0100 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v3 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: Tue, 20 Mar 2018 23:20:36 -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