From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 00E051B5DB for ; Wed, 4 Oct 2017 00:26:15 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Oct 2017 15:26:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,475,1500966000"; d="scan'208";a="906394635" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.241.224.245]) ([10.241.224.245]) by FMSMGA003.fm.intel.com with ESMTP; 03 Oct 2017 15:26:07 -0700 To: Matan Azrad , Adrien Mazarguil Cc: dev@dpdk.org, Moti Haimovsky , Vasily Philipov References: <1503590050-196143-1-git-send-email-motih@mellanox.com> <1507027711-879-1-git-send-email-matan@mellanox.com> <1507027711-879-6-git-send-email-matan@mellanox.com> From: Ferruh Yigit Message-ID: <319deb5a-c77f-340c-c05f-ff8bf056fbbd@intel.com> Date: Tue, 3 Oct 2017 23:26:06 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1507027711-879-6-git-send-email-matan@mellanox.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 5/6] net/mlx4: get back Rx checksum offloads 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, 03 Oct 2017 22:26:16 -0000 On 10/3/2017 11:48 AM, Matan Azrad wrote: > From: Moti Haimovsky > > This patch adds hardware offloading support for IPV4, UDP and TCP > checksum verification. > This commit also includes support for offloading IPV4, UDP and TCP tunnel > checksum verification to the hardware. > > Signed-off-by: Vasily Philipov <...> > +/** > + * Get Rx checksum CQE flags. > + * > + * @param cqe > + * Pointer to cqe structure. > + * @param csum > + * Rx checksum enable flag > + * @param csum_l2tun > + * RX L2-tun checksum enable flag > + * > + * @return > + * CQE's flags. > + */ > +static inline uint32_t > +mlx4_cqe_flags(struct mlx4_cqe *cqe, > + int csum, unsigned int csum_l2tun) > +{ > + uint32_t flags = 0; > + > + /* > + * The relevant bits are in different locations on their > + * CQE fields therefore we can join them in one 32bit > + * variable. > + */ > + if (csum) > + flags = rte_be_to_cpu_32(cqe->status) & > + MLX4_CQE_STATUS_IPV4_CSUM_OK; > + if (csum_l2tun) > + flags |= rte_be_to_cpu_32(cqe->vlan_my_qpn) & > + (MLX4_CQE_L2_TUNNEL | > + MLX4_CQE_L2_TUNNEL_IPOK | > + MLX4_CQE_L2_TUNNEL_L4_CSUM | > + MLX4_CQE_L2_TUNNEL_IPV4); > + return flags; Wrong indentation is triggering a compiler warning here: .../dpdk/drivers/net/mlx4/mlx4_rxtx.c: In function ‘mlx4_cqe_flags’: .../dpdk/drivers/net/mlx4/mlx4_rxtx.c:673:2: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] if (csum_l2tun) ^~ .../dpdk/drivers/net/mlx4/mlx4_rxtx.c:679:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ return flags; ^~~~~~ <...>