Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2961596yba; Mon, 6 May 2019 14:37:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxm8BHRuiupZLvRdu99iyGmUYMemqyh+dgSpYlswP+HKFG+3p7ECDcwbY/6+D1AHAPt4ZH9 X-Received: by 2002:a63:6988:: with SMTP id e130mr35677826pgc.150.1557178642843; Mon, 06 May 2019 14:37:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557178642; cv=none; d=google.com; s=arc-20160816; b=K42jkjedBJEqQHUUYWsj92izTQtaSasEUNAvrdaqVRkThdFmTzekO8hCPDivZM8dR9 5lw3ZiI3Af62iaTi9OUJ2pITxCpLdYHl36pREnT5kk7krSa5EXy2uRAT0aC/YsQUpsbe 1hN21wHe6AU9Idj5egOEsyzXbItbhk6DNBr2htYcTc7jlxFDXp+K4KTR9k6JSN1p8d0e U1ZvdfvDh7qr3EOGjvL1NInOi5lAWb0uUNGxQsCbr+XTHtt1k6FTHXWI2jrz3trzKM6e d/FRiHpSJVC3JhezlnoJfbkOwAXC3SZHFu6evHL/26yeZfYmnKbJDVoOE8NpFAUixe68 V2+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=92TBfP6AEPchZTUan2PXByAVCV5aHVWIiftraVkfuME=; b=jXbmh/OxuF7zWA4AkJue3WLPTDvfQhIS0rSJvYHzVwlYZ2Ik5PLA6ENWcKd/7dDGw+ OVvNxoh/ZeLSazl9E+N/9mw1bEAYEqiwN4Z/2PC0PcAzzf1b6D/DIvNPLRpDZsCnEO5u mSZQU7P9MZ89MSBm9qDkTVQ8mP897jKGnDx3GBAyHX9MyPpBJw76FpF6T2ka9qk9YKAq F3EOnjHPddUtjTLOQsb5qbAvz4hVNz084yey3xaTYhDbv7T8ktuWcXkWISlk3uwLtlEF lx2maRQEL2cYMoAu1QeCbEacWScb8a7FvEkhCEZLVNZFwGhMCHISrcVGAFCTrP1Fw5ms BRJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=sJbXTmKW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e24si16857601pge.459.2019.05.06.14.37.05; Mon, 06 May 2019 14:37:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=sJbXTmKW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726542AbfEFVgI (ORCPT + 99 others); Mon, 6 May 2019 17:36:08 -0400 Received: from mail-qk1-f176.google.com ([209.85.222.176]:41440 "EHLO mail-qk1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726352AbfEFVgI (ORCPT ); Mon, 6 May 2019 17:36:08 -0400 Received: by mail-qk1-f176.google.com with SMTP id g190so3189719qkf.8 for ; Mon, 06 May 2019 14:36:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=92TBfP6AEPchZTUan2PXByAVCV5aHVWIiftraVkfuME=; b=sJbXTmKWQtTUvSTjBLV8yxJbuWsvKCzinYgYM9jzzePYPBlyRDT472Idhg8AJRsTIp VvtWAXo35X3sxsyeOCd1zUQb4vAN0aDSc1qpgvX/qm3bAUoaboUb5+slDl6RMvC49iZF Q7aHjibqVnCe/z65zstTmDxnrC4n+C8Pcnb5L4oaPaFk88kxkLi2IrwuAei/MPYDejLV FFAoLi5UeZysxbLgHvvFXzRdF+pd1a9Y6wuDF0N5P6nV7d4m5GDZCmJglOOcGBGYTCdp T+7XOYc5KekyfJA/mLX0CNmXIubsziv+9pR05T1lRPCajYZoL47ihAlN3zebS2hmZpkW ybnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=92TBfP6AEPchZTUan2PXByAVCV5aHVWIiftraVkfuME=; b=k2WGr+KZGdLm9Emgkqk0gLPVFEtE2sPrVXryGy4nxf7mQkUEy866xcaICKGXkK1GoI C96SbfqGbC0fEKCHj4uAYuLayoWQYMZW8CyI9ekoo7MiKpUdR06EEYez4QQqa3Xdc7wm mQUPDlG6mkr9ldff7m3aZ3V8bIEecUnfRrbw7ZofDHJW498lwZ9VDAr2gh29g3KBy0rG /8FZUSMAV1Xeb1LYvuDX1Oc7reWdEHN4UCjUleusoO9GuvwKvTaezRZvbUVn0ZuNTHje Y+TdAPonhBsoU97EMtYnnRwZK1yQdhlXtmp7C4ma1R56m94pgYOWL3WYGuG3tSHGkLQG YbJw== X-Gm-Message-State: APjAAAVFJfIS0GLClpXHm3/HskHsJvQzNsJB/gX3PCIytfxLIaApU2Yz p0KWV/VE+uCFU0TG2Wui/Fzpkw== X-Received: by 2002:a37:b8c:: with SMTP id 134mr3793391qkl.121.1557178567283; Mon, 06 May 2019 14:36:07 -0700 (PDT) Received: from cakuba.hsd1.ca.comcast.net ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id z38sm7641658qtz.13.2019.05.06.14.36.05 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 06 May 2019 14:36:07 -0700 (PDT) Date: Mon, 6 May 2019 14:35:59 -0700 From: Jakub Kicinski To: Oleksandr Natalenko Cc: "David S. Miller" , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Jesper Dangaard Brouer , John Fastabend , netdev@vger.kernel.org, bpf@vger.kernel.org, oss-drivers@netronome.com, linux-kernel@vger.kernel.org, xdp-newbies@vger.kernel.org, valdis@vt.edu Subject: Re: netronome/nfp/bpf/jit.c cannot be build with -O3 Message-ID: <20190506143559.31e7c968@cakuba.hsd1.ca.comcast.net> In-Reply-To: <2a3761669e4ec13847205d30384c0a17@natalenko.name> References: <673b885183fb64f1cbb3ed2387524077@natalenko.name> <20190506140022.188d2b84@cakuba.hsd1.ca.comcast.net> <2a3761669e4ec13847205d30384c0a17@natalenko.name> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 06 May 2019 23:24:39 +0200, Oleksandr Natalenko wrote: > Hi. > > On 06.05.2019 23:00, Jakub Kicinski wrote: > > Any chance you could try different compiler versions? The code in > > question does not look too unusual. Could you try if removing > > FIELD_FIT() on line 326 makes a difference? > > If building with gcc from CentOS 7: > > gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36) > > the issue is not reproducible. I just did a make CC=gcc-8 CFLAGS=-O3 with GCC 8.2 here, and doesn't seem to trigger either. > Also, commenting out the whole "if" block with FIELD_FIT() prevents the > issue from occurring too. Hm, could it be that GCC 8.3 has some constant propagation bug which breaks BUILD_BUG_ON()? My uneducated guess it tries to pull the mask validation out of FIELD_FIT() and FIELD_PREP() into one place but in doing so loses some information.