From patchwork Fri Oct 30 18:55:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adrien Mazarguil X-Patchwork-Id: 8479 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 5138C93D6; Fri, 30 Oct 2015 19:56:50 +0100 (CET) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by dpdk.org (Postfix) with ESMTP id B0FB79256 for ; Fri, 30 Oct 2015 19:56:29 +0100 (CET) Received: by wicfv8 with SMTP id fv8so16791792wic.0 for ; Fri, 30 Oct 2015 11:56:29 -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 :mime-version:content-type:content-transfer-encoding; bh=cGmGCy5rM6eo4vI2ozybziO+KtZA7IebKc8sRhh6KWc=; b=RCmar+bvdQ5ePBbCQ1rKdv6/UbZZzfIjr8h1jJi39jTbry3zmmhMKQgDP5OWSzaPhg t1H1wkhqqUYcANAjXr4xgvvEPzj95vBkTp0QLjD8LttfNNMI6esGgcP0fNKbaWTHeyFO 6a0de6ySNuwOjDNIh9GnaeivMUyXUE/H7VXd1+N/4ifcoRDR66rA0LU6CkbgXIRj4evb ShORcyBKs18A4yGWaKmJviwO4AmO8M6d8pSqhXI93uhKD8BWazTILkQSmEScHg6ym+TG ymXJrgRx1lOAtdXmIBWXM67NDQ/KJMXUy/Q7cIx3zDvCdqsgzXRe2Nj+IIEJICMWuYOU W4Zg== 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=cGmGCy5rM6eo4vI2ozybziO+KtZA7IebKc8sRhh6KWc=; b=I3DArkjofD5fBdroINknR2VhzRlwirmyekqBnYb0/Pp5IoAIW/y2B47/5lIe4nS3pp mqM50InXclnfl46DlLha4inUum5hAeBeLl6OxzO9j9tXimdDOOLHpaqw22A5YBX9+VAL mRprX+IlPS6cPWPFYCGy1zadVh+spxgBPsLi1k84a23uIep+ydpS8B6Dje03NNdM0oTz mKCMaT8zgTdCPTrMKP7n0fGexAMSXAcenznCJOMiL7Uw9CGFebYrdMYs3+0nYiJJBLAC WyqSZVqIQkz8cBmJjr9Axw7J3/Y6Fv0bwUY67wluW2ycQW37e+j2a+rlBKCYwGGDSbhw b0HQ== X-Gm-Message-State: ALoCoQmENj6Nh3Akkz4LpUFe4T3iilf08weMDJUogQtOA6xWqBdqtjXOCDiyEOmqwv6etA7duHNH X-Received: by 10.194.62.112 with SMTP id x16mr12014968wjr.132.1446231389554; Fri, 30 Oct 2015 11:56:29 -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 20sm4228223wmh.8.2015.10.30.11.56.27 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 30 Oct 2015 11:56:28 -0700 (PDT) From: Adrien Mazarguil To: dev@dpdk.org Date: Fri, 30 Oct 2015 19:55:18 +0100 Message-Id: <1446231319-8185-16-git-send-email-adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1446231319-8185-1-git-send-email-adrien.mazarguil@6wind.com> References: <1444067692-29645-1-git-send-email-adrien.mazarguil@6wind.com> <1446231319-8185-1-git-send-email-adrien.mazarguil@6wind.com> MIME-Version: 1.0 Cc: Yaacov Hazan Subject: [dpdk-dev] [PATCH v2 15/16] 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h index 25e256f..15c4bc8 100644 --- a/drivers/net/mlx5/mlx5_rxtx.h +++ b/drivers/net/mlx5/mlx5_rxtx.h @@ -153,7 +153,18 @@ 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; +#ifdef HAVE_FLOW_SPEC_IPV6 + struct ibv_exp_flow_spec_ipv6 ipv6; +#endif /* HAVE_FLOW_SPEC_IPV6 */ + struct ibv_exp_flow_spec_eth eth; + } flow_spec; /* Flow specification template. */ const struct hash_rxq_init *underlayer; /* Pointer to underlayer. */ };