From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by dpdk.org (Postfix) with ESMTP id CD7899436 for ; Mon, 5 Oct 2015 19:55:48 +0200 (CEST) Received: by wiclk2 with SMTP id lk2so126027240wic.1 for ; Mon, 05 Oct 2015 10:55:48 -0700 (PDT) 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:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=SXhPmLbGDmv+WbBwMSq6VhpYsCV7IkzwlP0aRsJ3Wdw=; b=mTSrvx7E6wspaBVXVp7MjlPmY+u4qFn1cynIJV9K7OTgPps4dk8STLfylPbfDeFsD6 F8qSRSRl8DuQMKUyF2M5bXPnrZArqZ0epKMuHwcpcSwcQMWug9z2syeXe641j2rGyhtT Uvgw85Kf4L3tm8GYvjzfMFl5b4Y/XgOFCRPSYBvtkgqKpTPFMqPV2n6w2GKboKTXQUYF W/sg4WQ/b1eokzYYYmvjM43ilK+LfHJCtnWtly3Vq+KljNM6EHiT47voM9KFHYdJEiOh U9la2lkDjGEtJPWGhNkhzrPWFx9Q60BYqi9iJ2GNDjdyZm+JXJdyA9oURcPI9uWBSaO9 8p+A== X-Gm-Message-State: ALoCoQkXwZ+UyLXYX70rbdPNc2CNwxk7aAMYanKMpzR9SL/HU6soXgwglgT0tUHEP6P09rpp00Nd X-Received: by 10.194.204.195 with SMTP id la3mr30689623wjc.77.1444067748734; Mon, 05 Oct 2015 10:55:48 -0700 (PDT) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id go5sm15855857wib.3.2015.10.05.10.55.47 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 05 Oct 2015 10:55:48 -0700 (PDT) From: Adrien Mazarguil To: dev@dpdk.org Date: Mon, 5 Oct 2015 19:54:51 +0200 Message-Id: <1444067692-29645-17-git-send-email-adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1444067692-29645-1-git-send-email-adrien.mazarguil@6wind.com> References: <1444067692-29645-1-git-send-email-adrien.mazarguil@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Yaacov Hazan Subject: [dpdk-dev] [PATCH 16/17] mlx5: fix compilation error with GCC < 4.6 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, 05 Oct 2015 17:55:49 -0000 From: Yaacov Hazan Seen with GCC < 4.6: error: unknown field ‘tcp_udp’ specified in initializer error: extra brace group at end of initializer Static initialization of anonymous structs/unions is a C11 feature properly supported only since GCC 4.6. Work around compilation errors with older versions by expanding struct ibv_exp_flow_spec into struct hash_rxq_init. Signed-off-by: Yaacov Hazan Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_rxtx.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h index 4018ac1..422730d 100644 --- a/drivers/net/mlx5/mlx5_rxtx.h +++ b/drivers/net/mlx5/mlx5_rxtx.h @@ -150,7 +150,15 @@ struct hash_rxq_init { uint64_t hash_fields; /* Fields that participate in the hash. */ uint64_t dpdk_rss_hf; /* Matching DPDK RSS hash fields. */ unsigned int flow_priority; /* Flow priority to use. */ - struct ibv_exp_flow_spec flow_spec; /* Flow specification template. */ + union { + struct { + enum ibv_exp_flow_spec_type type; + uint16_t size; + } hdr; + struct ibv_exp_flow_spec_tcp_udp tcp_udp; + struct ibv_exp_flow_spec_ipv4 ipv4; + struct ibv_exp_flow_spec_eth eth; + } flow_spec; /* Flow specification template. */ const struct hash_rxq_init *underlayer; /* Pointer to underlayer. */ }; -- 2.1.0