From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 0BA9B5920 for ; Tue, 25 Apr 2017 10:30:19 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id r190so89093442wme.1 for ; Tue, 25 Apr 2017 01:30:19 -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; bh=AWPcskg5bSk2eeI7oH9fkXUvKudJrB6oOY5/ov/PLn0=; b=QjS0OWvQI0tyQj0N1Azz8WmmE9snlOx8D75TzHFKG1G2HfEZQhMlugYBJ76iWzwMyW 5+lLnkLzSASEiEPFFymQgGnEXGZvr7ALqgY3Rkw4+WsCDAwzdtCtvGtcTOthnRIEDxvF 0KGE4rSp8Iz3BbDK4SPsaqwVOADBQpIflgmtjUoKsyIO/ExtiDIfsjeO1x7oR6CwGab0 D5Fx9JLYVsEaSwBw9sV6iglTBFoLPqjuJr5FVBs1yPNl7UqL660v+XFN6Zv7IdSR6j4o IMkvp4+dNCBA2GEIhQPKe++Dx4HYaRUjb0v7BC9FLdXsf5+brYvBEkJt4Q5f0lfraTaA cf+w== 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; bh=AWPcskg5bSk2eeI7oH9fkXUvKudJrB6oOY5/ov/PLn0=; b=YGP11qZ3XykK2OPll3Ow/UyP1/8KHChAzohmqgP0ErcZ4q7ntZKPkIL1Ua3pkcdHKf BFSIZDCotB6+JCmjkLiVftsBUkmnRzq6XKqxMzfhnNpWZ8VCgiR6CzrAbwhqs9sxISYQ jx94yljaHlEFtntYcf9Df1hAibG9FxkyIXxRDbKoma7wgMWjGXvs1CqrhcdRveTbvVXS A7eZmSWTRGcSicu0xmpvdjAmIIJv+TJECo+UprYhUVxX85Hj9932Xj/Nw70HC3DKbKIN CMx87tzxd0fonqqsQ0qNvYf0JCEzaor7HG6KYKxxz0CUgAYHNYhDLaU9eZCMkMuoWUoq rbRQ== X-Gm-Message-State: AN3rC/6EtL48OLFW2l6h2OxKALU8xC5Ot/XC9ZYCcZO2T5t5xwnu7jXd Z2v+pL+zOXy8mGJvCac= X-Received: by 10.28.47.23 with SMTP id v23mr11729544wmv.50.1493109019406; Tue, 25 Apr 2017 01:30:19 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id k4sm2586777wmf.12.2017.04.25.01.30.18 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 25 Apr 2017 01:30:18 -0700 (PDT) From: Adrien Mazarguil To: dev@dpdk.org Cc: Jerin Jacob Date: Tue, 25 Apr 2017 10:29:56 +0200 Message-Id: <743ea1c06b9307c8fc68a399244b8aeab606878e.1493108423.git.adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 02/13] eventdev: fix errors with strict compilation flags 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, 25 Apr 2017 08:30:20 -0000 Exported headers must allow compilation with the strictest flags. This commit addresses the following errors: In file included from build/include/rte_eventdev_pmd.h:55:0, from /tmp/check-includes.sh.25816.c:1: build/include/rte_eventdev.h:908:8: error: struct has no named members [-Werror=pedantic] [...] In file included from /tmp/check-includes.sh.25816.c:1:0: build/include/rte_eventdev_pmd.h:65:35: error: ISO C does not permit named variadic macros [-Werror=variadic-macros] [...] Also enabling RTE_LIBRTE_EVENTDEV_DEBUG causes redefinitions: In file included from /tmp/check-includes.sh.18921.c:27:0: build/include/rte_eventdev_pmd.h:58:0: error: "RTE_PMD_DEBUG_TRACE" redefined [-Werror] [...] Rely on the rte_ethdev.h version instead. Fixes: 71f238432865 ("eventdev: introduce event driven programming model") Fixes: 4f0804bbdfb9 ("eventdev: implement the northbound APIs") Cc: Jerin Jacob Signed-off-by: Adrien Mazarguil --- lib/librte_eventdev/rte_eventdev.h | 3 +-- lib/librte_eventdev/rte_eventdev_pmd.h | 24 ++++++++++-------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h index b8ed6ef..20e7293 100644 --- a/lib/librte_eventdev/rte_eventdev.h +++ b/lib/librte_eventdev/rte_eventdev.h @@ -905,9 +905,9 @@ rte_event_dev_close(uint8_t dev_id); * The generic *rte_event* structure to hold the event attributes * for dequeue and enqueue operation */ +RTE_STD_C11 struct rte_event { /** WORD0 */ - RTE_STD_C11 union { uint64_t event; /** Event attributes for dequeue or enqueue operation */ @@ -967,7 +967,6 @@ struct rte_event { }; }; /** WORD1 */ - RTE_STD_C11 union { uint64_t u64; /**< Opaque 64-bit value */ diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h index a73dc91..a090fa4 100644 --- a/lib/librte_eventdev/rte_eventdev_pmd.h +++ b/lib/librte_eventdev/rte_eventdev_pmd.h @@ -51,27 +51,23 @@ extern "C" { #include #include #include +#include #include "rte_eventdev.h" -#ifdef RTE_LIBRTE_EVENTDEV_DEBUG -#define RTE_PMD_DEBUG_TRACE(...) \ - rte_pmd_debug_trace(__func__, __VA_ARGS__) -#else -#define RTE_PMD_DEBUG_TRACE(...) -#endif - /* Logging Macros */ -#define RTE_EDEV_LOG_ERR(fmt, args...) \ - RTE_LOG(ERR, EVENTDEV, "%s() line %u: " fmt "\n", \ - __func__, __LINE__, ## args) +#define RTE_EDEV_LOG_ERR(...) \ + RTE_LOG(ERR, EVENTDEV, \ + RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \ + __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,))) #ifdef RTE_LIBRTE_EVENTDEV_DEBUG -#define RTE_EDEV_LOG_DEBUG(fmt, args...) \ - RTE_LOG(DEBUG, EVENTDEV, "%s() line %u: " fmt "\n", \ - __func__, __LINE__, ## args) +#define RTE_EDEV_LOG_DEBUG(...) \ + RTE_LOG(DEBUG, EVENTDEV, \ + RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \ + __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,))) #else -#define RTE_EDEV_LOG_DEBUG(fmt, args...) (void)0 +#define RTE_EDEV_LOG_DEBUG(...) (void)0 #endif /* Macros to check for valid device */ -- 2.1.4