From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id AD5E737B0 for ; Wed, 27 Apr 2016 17:34:27 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id e201so44478784wme.0 for ; Wed, 27 Apr 2016 08:34:27 -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=JCWOOSLbgPPjj7rfsQEmHtJGPQbm2Vnvplcg1jveqN0=; b=pGFO/RfujeCFOPTm+I4ZELijhkmxf/pcDgxzwNK3NiS2Yo0LJoHkosddkf5VynsUXG kCqLRdsYgJ3ylCgPBE0sbn8wODYCMn6u03qEDBF3FBhfwcPyM7NarxhR0PCCGBBW/lqT Y/h3BZUtRH3o/97DK5vKDJA9Ns4m35curGNV2IjqyzxJxDl43i4WfThsvUAOCgn7SzI9 zAyPe8SMLOGuoE//apepJifnaCyR7ZFkYFW5krdk4ZesmTyX1EqoFW7EK81ugYf33IlQ qHczkza9FtAL3PHrhMn4+9VsEkRXxEsMl5pdKpCWh96IZ5VpOZ/BarIyesinp9/pJb8b go4Q== 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=JCWOOSLbgPPjj7rfsQEmHtJGPQbm2Vnvplcg1jveqN0=; b=jGe6H+9IkkE5EasTIvdKMIHO6uDrQa0Vj6kZ8GonmOzgfIT4TyzHNw2junmpeh47io fr6mLe2F1oLGDJPMClhG0DHzXH9VWNpav2Rag0VnxSMqI+aGdRsMiei5kfuftzT0Ffpk 4W+12Z+SzN8Uip5JK6Zz4/inzZv7sbpdxHaf9LUn0/vkJrynznjD6SCOkecB8GMVo9RG w5jFx+8/DtAJZqF1Y+XZ2FoDwaHM810hxZM/vBCVgS66yQcQSOzwlJpyNQRuyZkSdkX/ kWuHyupp+HYzNtYKfynpeC+ypQmtUEzueNWt9XjoL6QGN2fJQX16apd4DQ+ajgzCgNXu ey8Q== X-Gm-Message-State: AOPr4FWdbHPbHu2LN+48rcZ24EXcZ+/wdGjBLoe0memNXq9dM7/j9TgiRuwyJw1uQwlduyHF X-Received: by 10.28.19.21 with SMTP id 21mr25048457wmt.74.1461771267525; Wed, 27 Apr 2016 08:34:27 -0700 (PDT) Received: from xps13.localnet (51.111.75.86.rev.sfr.net. [86.75.111.51]) by smtp.gmail.com with ESMTPSA id w77sm29837286wmw.10.2016.04.27.08.34.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Apr 2016 08:34:26 -0700 (PDT) From: Thomas Monjalon To: Tomasz Kulasek Cc: dev@dpdk.org, ian.betts@intel.com Date: Wed, 27 Apr 2016 17:34:25 +0200 Message-ID: <5958766.CmHbfFznCf@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1461685676-7084-1-git-send-email-tomaszx.kulasek@intel.com> References: <1461685676-7084-1-git-send-email-tomaszx.kulasek@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] examples/performance-thread: fix segfault with in 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, 27 Apr 2016 15:34:27 -0000 2016-04-26 17:47, Tomasz Kulasek: > It seems that with gcc >5.x and -O2/-O3 optimization breaks packet grouping > algorithm in l3fwd-thread application causing segfault. > > 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 causing segfault. > > This patch eliminates intersection of assignment of initial group size > (lp[0] = 1) and precalculated group sizes when gptbl[v].idx < 4. > > Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app") > > Signed-off-by: Tomasz Kulasek Same patch as af1694d94 (for original l3fwd). Applied, thanks