From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id DD4B72170 for ; Wed, 28 Sep 2016 09:01:19 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id w84so217458839wmg.1 for ; Wed, 28 Sep 2016 00:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=WgAkNExMwxLffT7BaHJfJt8/b/PxHfBy/4qojS+Zug0=; b=tFE7zB017BLRmekhrJEk66Hk8dkSMVPr7v/CkpnYkFbFaSjH9xy3WsaGiSVZc8Rulu ESNb1gTMOrCt/TAkskTo9C3ssIzQfl0R69l2W2+zHoN7tjt3H8FTYXLN3DKcHQnRFNxu yWpDMrpiuE9i4rM+HH7MRVNo8fhmu769wwOSO1JJ9KQXgdjahFV1iVHKFwSQIJ4pOYHv JqE9u8U5x/jXPTg6iIv8snwaspTPjTiXfALqXJuHS/K7+6dWYggnr/GJwlT/XjfFbnfc l3J7rFMFjlHGSo0H9W7Jm6vNsZQvKa+3H3sRf6ev/9nJKkgnSecEnhovkuXx7RlNSWMY nJIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=WgAkNExMwxLffT7BaHJfJt8/b/PxHfBy/4qojS+Zug0=; b=E8SSK9bcGq4emZYKfQZN8R20rK/uVoQ1pw+tmd+FzuHnuibNHNLqeZog4rFrgFpDgK LFbE0mMLvzuttq9Q11y/2QJhRmRzp9gTWO6uyVMG4zk0SxxQXZCy7XVZLCx32fFtxC7H 7CZq65pc7bqyA8Ju/3g7WU7zHjWdNm1m5KfZA0IL/0r77A4gmcOMZpr5G1rdjQavN1S4 FNuetodzSZACMkluJbiTDlv8Fp2NXgVCk2D8z3lXZY+4eZ6P6HmfE/6ra/DtsF380cKg xa9MHohcjNVtxibkh97w3Ds4QkJXeDa8lBO4oZyY21PkJq+2iMcGT/C6FEvjNa1xxvSz Zv7w== X-Gm-Message-State: AA6/9RkY9DjmrC9tnBG3JstgVKVgMWX9ty/om/b1MCiAH3nqTyoRUSQFbo2NLjTcMGES66HP X-Received: by 10.28.92.71 with SMTP id q68mr6211517wmb.85.1475046079668; Wed, 28 Sep 2016 00:01:19 -0700 (PDT) Received: from autoinstall.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id j10sm6667707wjy.13.2016.09.28.00.01.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Sep 2016 00:01:19 -0700 (PDT) Date: Wed, 28 Sep 2016 09:01:13 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Ferruh Yigit Cc: dev@dpdk.org, Bruce Richardson , Adrien Mazarguil Message-ID: <20160928070113.GJ32397@autoinstall.dev.6wind.com> References: <30739c1ee245c3e3ee9a1122ca08285d718eb9b8.1474987853.git.nelio.laranjeiro@6wind.com> <4fbbd27b-9610-4772-5cba-5ce896b4eebf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4fbbd27b-9610-4772-5cba-5ce896b4eebf@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v2] net/mlx5: return RSS hash result in mbuf 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: Wed, 28 Sep 2016 07:01:20 -0000 On Tue, Sep 27, 2016 at 06:03:51PM +0100, Ferruh Yigit wrote: > On 9/27/2016 3:53 PM, Nelio Laranjeiro wrote: > > Signed-off-by: Nelio Laranjeiro > > <...> > > > @@ -1286,12 +1291,13 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) > > &(*rxq->cqes)[rxq->cq_ci & cqe_cnt].cqe64; > > unsigned int i = 0; > > unsigned int rq_ci = rxq->rq_ci << sges_n; > > - int len; > > > > while (pkts_n) { > > unsigned int idx = rq_ci & wqe_cnt; > > volatile struct mlx5_wqe_data_seg *wqe = &(*rxq->wqes)[idx]; > > struct rte_mbuf *rep = (*rxq->elts)[idx]; > > + int len; > > clang generates following warning, -it is quite detailed compiler message: > > .../drivers/net/mlx5/mlx5_rxtx.c:1327:7: error: variable 'len' is used > uninitialized whenever 'if' condition is false > [-Werror,-Wsometimes-uninitialized] > if (!pkt) { > ^~~~ > .../drivers/net/mlx5/mlx5_rxtx.c:1384:7: note: uninitialized use occurs here > if (len > DATA_LEN(seg)) { > ^~~ > .../drivers/net/mlx5/mlx5_rxtx.c:1327:3: note: remove the 'if' if its > condition is always true > if (!pkt) { > ^~~~~~~~~~ > .../drivers/net/mlx5/mlx5_rxtx.c:1299:10: note: initialize the variable > 'len' to silence this warning > int len; > ^ > = 0 Right, my version of clang don't report this error, the one from ubuntu does. I will fix it in a v3. Thanks Ferruh, -- Nélio Laranjeiro 6WIND