From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 63A2DA84F for ; Sun, 21 Jan 2018 23:22:21 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E142C20B6A; Sun, 21 Jan 2018 17:22:20 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sun, 21 Jan 2018 17:22:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:date:from:message-id:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=mesmtp; bh=oRS+pBGxYxVgTXMI6iLC/qFBM0aDWK10kD1Udj F9BX8=; b=mRwrs9kvUb6woMn7cjB23tdtqwxDq3Y3oNrinBTyL4Mpprv2oHtzZt aAKZ1/71pNjtv/ybVnVEKuOEtPiiC9ezaPMwvDHWoIF3K6eDOn6VmJYEGv9shGYV P5sS9gMmC1StZYjUWaH7pyMEEUWWLMxr8meh5Wk7tUpxtrzJ8Wsko= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=oRS+pBGxYxVgTXMI6 iLC/qFBM0aDWK10kD1UdjF9BX8=; b=CDPDzQoYx8YLgxTrZMraKScZXS+sva8dV 7RvlV6rQJTFpvBAxE0G6QrjTGD9UID9d689lXURPJbl8SLpP4L8eavRzz6tBhlgy 5xzSGxXrR8zwPrKrIFfb5hCL/YU0sQGyTUQ70Quiy74cnQyJsfjnNvGiQIvjTz8y 9LnNGufTO3h6FodXhYWy9EzOZVUQJZ1nfKM2nZ/XJG9N1C/SY6XC6KS04nxrZgdL 1xsPfEKWCNzih/4zq70iuxY+2WAyQuazT5fPv0GCiN96B658OlaiAeVLmeI009Qt Fp81bGdUmdaIZSOhCzyE+6kUmhSA2XCo+9qi9M8bRiBcbQZFbu4+w== X-ME-Sender: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 5B6E67E2E6; Sun, 21 Jan 2018 17:22:20 -0500 (EST) From: Thomas Monjalon To: Pavan Nikhilesh Cc: dev@dpdk.org Date: Sun, 21 Jan 2018 23:21:35 +0100 Message-Id: <20180121222135.26160-1-thomas@monjalon.net> X-Mailer: git-send-email 2.15.1 Subject: [dpdk-dev] [PATCH] examples/eventdev: fix build with GCC < 5 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: Sun, 21 Jan 2018 22:22:21 -0000 Some errors were seen with GCC 4.8 and 4.9. It looks to be a bug fixed in GCC 5. examples/eventdev_pipeline/pipeline_worker_generic.c:474:4: error: missing initializer for field 'queue_id' of 'struct ' examples/eventdev_pipeline/pipeline_worker_generic.c:475:3: error: missing initializer for field 'priority' of 'struct ' examples/eventdev_pipeline/pipeline_worker_tx.c:630:2: error: missing initializer for field 'queue_id' of 'struct ' The workaround is to not use initializer statement, but to use memset and standard assignment. Signed-off-by: Thomas Monjalon --- examples/eventdev_pipeline/pipeline_worker_generic.c | 8 ++++---- examples/eventdev_pipeline/pipeline_worker_tx.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/eventdev_pipeline/pipeline_worker_generic.c b/examples/eventdev_pipeline/pipeline_worker_generic.c index 2c51f4a30..c673160f5 100644 --- a/examples/eventdev_pipeline/pipeline_worker_generic.c +++ b/examples/eventdev_pipeline/pipeline_worker_generic.c @@ -468,10 +468,10 @@ init_rx_adapter(uint16_t nb_ports) rte_exit(EXIT_FAILURE, "failed to create rx adapter[%d]", cdata.rx_adapter_id); - struct rte_event_eth_rx_adapter_queue_conf queue_conf = { - .ev.sched_type = cdata.queue_type, - .ev.queue_id = cdata.qid[0], - }; + struct rte_event_eth_rx_adapter_queue_conf queue_conf; + memset(&queue_conf, 0, sizeof(queue_conf)); + queue_conf.ev.sched_type = cdata.queue_type; + queue_conf.ev.queue_id = cdata.qid[0]; for (i = 0; i < nb_ports; i++) { uint32_t cap; diff --git a/examples/eventdev_pipeline/pipeline_worker_tx.c b/examples/eventdev_pipeline/pipeline_worker_tx.c index c0d1bd9fb..b254b03f7 100644 --- a/examples/eventdev_pipeline/pipeline_worker_tx.c +++ b/examples/eventdev_pipeline/pipeline_worker_tx.c @@ -625,9 +625,9 @@ init_rx_adapter(uint16_t nb_ports) rx_p_conf.enqueue_depth = dev_info.max_event_port_enqueue_depth; - struct rte_event_eth_rx_adapter_queue_conf queue_conf = { - .ev.sched_type = cdata.queue_type, - }; + struct rte_event_eth_rx_adapter_queue_conf queue_conf; + memset(&queue_conf, 0, sizeof(queue_conf)); + queue_conf.ev.sched_type = cdata.queue_type; for (i = 0; i < nb_ports; i++) { uint32_t cap; -- 2.15.1