From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id A9CBE2956 for ; Wed, 6 Apr 2016 11:28:55 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id n3so54456835wmn.0 for ; Wed, 06 Apr 2016 02:28:55 -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:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=+/XNNuOFx7GnHfC0rmpNDbtYiDC3BpOKeNf7GmKfj94=; b=UTys+DgOFbCuKWickUCM1yhDiJ1Od8t8LeQGDs84AjvLEtL+T2Gwi57JL20BzIveX7 NpR1yJT+fPx6AaxY0ePU61//hk4u4Vqmp3IpISQYQYyheytcCFavVVmQhTNMSrgDQW4/ 4jJMp6ObWwocJGeDfzGenpVc3zmn/SPgx701kff9Z2YiUzp1VqNi8HS9TcdVM4iK70Q+ Yg8JfF9M3ORsD4L8M7R/OSlNciv6SiV10uSeQ4ajUE6feUDW9yD+bho3zG+/Kxd9ufaw 0mGj9Nq2Fz/QsCh0XA/JO3iCoGM7yAjDmk0EG/uINAJnyRhr8dcE1WOSMhUHlK0ZtJby qUQQ== 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:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=+/XNNuOFx7GnHfC0rmpNDbtYiDC3BpOKeNf7GmKfj94=; b=CjeoNOPmRXLIDbC56fzYGxlt3J3sidSwrWYJhElwbfylTLm/3wIbfyyx9oClVCSfdV HXzzDvZVxDjizSXVHhfFkRDIGtoMhWnBLUu7led5T5skV762nDQs7+jgk7Nd18kUgmka FwOIRfzJNdJJG37++QvzpEdTymLuw+LMLZYwoy2yxg7nGMlCU5vR7k+BAKg7jg6vJGiB EtsIyraUswBMonbLAinwPqdRExShtYn1DU0qRYEhKxwdxk3bsLsMyITSsbRRZGH/42jH i/WqLMStuiVLXOGmIMkr29xW45b92jqA9xn81pyabemzgPOFEPBVCvP5fEbxJWWllP0Y w2JQ== X-Gm-Message-State: AD7BkJLGqUvLH3ACZxm+WeLQEqbe4QNGXE2mdjmW8vkjMpt0ejm8ore+U9LHv4G6ejxv1zEE X-Received: by 10.28.220.213 with SMTP id t204mr14727191wmg.42.1459934935528; Wed, 06 Apr 2016 02:28:55 -0700 (PDT) Received: from xps13.localnet (91.111.75.86.rev.sfr.net. [86.75.111.91]) by smtp.gmail.com with ESMTPSA id da5sm2241209wjb.25.2016.04.06.02.28.54 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 06 Apr 2016 02:28:54 -0700 (PDT) From: Thomas Monjalon To: "Kulasek, TomaszX" Cc: dev@dpdk.org, "Ananyev, Konstantin" Date: Wed, 06 Apr 2016 11:27:17 +0200 Message-ID: <2020208.0hTbuSh3Wa@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <2601191342CEEE43887BDE71AB97725836B2E246@irsmsx105.ger.corp.intel.com> References: <1459781123-7556-1-git-send-email-tomaszx.kulasek@intel.com> <2601191342CEEE43887BDE71AB97725836B2E246@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] examples/l3fwd: fix segfault with gcc 5.x 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, 06 Apr 2016 09:28:55 -0000 > > It seems that with gcc >5.x and -O2/-O3 optimization breaks packet grouping > > algorithm. > > > > When last packet pointer "lp" and "pnum->u64" buffer points the same > > memory buffer, high optimization can cause unpredictable results. It seems > > that assignment of precalculated group sizes may interfere with > > initialization of new group size when lp points value inside current group > > and didn't should be changed. > > > > With gcc >5.x and optimization we cannot be sure which assignment will be > > done first, so the group size can be counted incorrectly. > > > > This patch eliminates intersection of assignment of initial group size > > (lp[0] = 1) and precalculated group sizes when gptbl[v].idx < 4. > > > > Fixes: 94c54b4158d5 ("examples/l3fwd: rework exact-match") > > > > Signed-off-by: Tomasz Kulasek > > Acked-by: Konstantin Ananyev Applied, thanks