Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4522082ybb; Tue, 14 Apr 2020 08:54:49 -0700 (PDT) X-Google-Smtp-Source: APiQypKg/nPipC1ODJu3Qv1tYuRhOba6m6+PKZ4b2tGQ7haWmUh24Vd7WEPOAdiQUxsuts+1jCWI X-Received: by 2002:a17:906:7c11:: with SMTP id t17mr787869ejo.73.1586879689643; Tue, 14 Apr 2020 08:54:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586879689; cv=none; d=google.com; s=arc-20160816; b=IW8ixJ3qX63SYZ/h9kWKQFBD5y9kl5eJC405vKBOzdsPSYtjYPMU0tEPNwI3IlcYd2 hMUU4CyslrJpJBaJEyLQ8F+IgDPaqpNIU5jzE2l9UCwPM6atmNswWXXRXMpGs7NrZFFG sHFd4fWOULoFKkajbuVZ4TsGm0GK9yXBPcov/gQyjIfJO0ZnqH+A9u5m0gVF9FzcwbtC dyEC5S+jchcEu/A4n+DjqLv58Sk6MaiI12jBBKrngLCIWVYcSCJDV3oTtrlEgeDOHUyt HXRIxOc2uzB3BYhWskudvWv5tN2upnVIjTEuc7WQN8MTBO3W8cbMlMmz8c61WdJYePW5 UWGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=35JPFQoqu2n9cN3F6+ZUlaG1xiUip5sDdcTtmfYSpe8=; b=e5HulZB8l6RYpfQXv6s2luQ6rjVVWhAQdgsXZgARZsLmGW0EWkzYm+sDHg82R/geO1 fUGDUWEoz0PeEmYzlOTWBl85MGJc8ZgI8zbMHai3MmFH0jNad3hl3XFyBlS8uUE1SKvg I2Pfgf1NLduqxIC5rt2qoi5ZdMzX9i4naYU29nF4gKt0h5x3yuRC/LjsOkdGsQTMpOaF yAwJlVPuip1rdm9XnK0AZbXMsS7vT3PHmVrYKqTHtVFAOGZrhhe+IW6SMRsbl7hOgNV9 dEY9vbKOsGKuMdzQkTUVLTxKMNTjodabCloKZZyT2SzqINWrCiVJLuFve+3KQTg34fgM oh+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=SGDVO9Rh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x21si2307670ejs.38.2020.04.14.08.54.25; Tue, 14 Apr 2020 08:54:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=SGDVO9Rh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732277AbgDNNaF (ORCPT + 99 others); Tue, 14 Apr 2020 09:30:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732114AbgDNN3D (ORCPT ); Tue, 14 Apr 2020 09:29:03 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EB98C061A10 for ; Tue, 14 Apr 2020 06:29:02 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id m67so13069386qke.12 for ; Tue, 14 Apr 2020 06:29:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=35JPFQoqu2n9cN3F6+ZUlaG1xiUip5sDdcTtmfYSpe8=; b=SGDVO9RhBeIKEvWxZM+JWkgmaml/HD1RGTWogUTjrp7mfpYcvQzhzvnQvuqqNth22N Rruj/VI4H3I+sFH0OMY7v28QPW7MuXUg2mASS1xE6j7UY02Vsml5mZ/Qw3RjVn6hM5sL 91+i14Bcrzqhm6veEVFJKC4kDq6XPaCQMogswLGFbM3gHKAmva9nPlymq+fzZNGMon0d x8zpf/ituX5C+wfeuP6qyk4GEct1eoKycovq5kubVEQ6lMA/5i8wWni2DZtPa6Up9Ooi kYXcRlzmeiczsaiU0z/VZCQS1033PVmAEKoP0aAKyt6Q1y5kmS85rGIwGACP5nqbuo27 H/ug== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=35JPFQoqu2n9cN3F6+ZUlaG1xiUip5sDdcTtmfYSpe8=; b=qqUIXAmYIBrK9I0N6eayAsVqcN9HD5E13kwtJfAWtbVR0fgCVz5v+PUJ9h9NajV2Ww 6IGXkEPQh/dx2rtAjkAzvZOF7d1kuxPIIzINTTlJio61IqEsOwhb0F3fAIavu6cE+kdD uvDvHAx2gnAUsfx84HL0p/CIrCHsEex2yip7Gs2bGvsQ3nbG/hCtgQuZF6r8wKV113Og YVpVCKQtX3LtkL92syCahAvpXFHVijNH0Ksc+APaZz9Loq9lTJIUW6DsbzGmaPbhKHcr 6yI/6ULRjIw3dTaCzEjLnbCiMOUE1edp3k6IAwSVGjalyoEo0BM70uxohwgLAGlBUyvI TMbw== X-Gm-Message-State: AGi0PubxEZoeLcJ4ytRXqAZAG9vYrNPv+IhuVfzXkd4Te0LktRSdWPqI jQigFEn4vrHf3zMAXDO3MC8Y+w== X-Received: by 2002:a37:cc7:: with SMTP id 190mr6464058qkm.44.1586870941325; Tue, 14 Apr 2020 06:29:01 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-57-212.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.57.212]) by smtp.gmail.com with ESMTPSA id f1sm9986663qkl.91.2020.04.14.06.29.00 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Apr 2020 06:29:00 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1jOLca-000515-3n; Tue, 14 Apr 2020 10:29:00 -0300 Date: Tue, 14 Apr 2020 10:29:00 -0300 From: Jason Gunthorpe To: Saeed Mahameed Cc: "narmstrong@baylibre.com" , "masahiroy@kernel.org" , "Laurent.pinchart@ideasonboard.com" , "davem@davemloft.net" , "leon@kernel.org" , "linux-kernel@vger.kernel.org" , "nico@fluxnic.net" , "dri-devel@lists.freedesktop.org" , "linux-renesas-soc@vger.kernel.org" , "kieran.bingham+renesas@ideasonboard.com" , "arnd@arndb.de" , "linux-rdma@vger.kernel.org" , "jani.nikula@linux.intel.com" , "a.hajda@samsung.com" , "jonas@kwiboo.se" , "netdev@vger.kernel.org" , "airlied@linux.ie" , "jernej.skrabec@siol.net" Subject: Re: [RFC 0/6] Regressions for "imply" behavior change Message-ID: <20200414132900.GD5100@ziepe.ca> References: <20200408202711.1198966-1-arnd@arndb.de> <20200408224224.GD11886@ziepe.ca> <87k12pgifv.fsf@intel.com> <7d9410a4b7d0ef975f7cbd8f0b6762df114df539.camel@mellanox.com> <20200410171320.GN11886@ziepe.ca> <16441479b793077cdef9658f35773739038c39dc.camel@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16441479b793077cdef9658f35773739038c39dc.camel@mellanox.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 10, 2020 at 07:04:27PM +0000, Saeed Mahameed wrote: > On Fri, 2020-04-10 at 14:13 -0300, Jason Gunthorpe wrote: > > On Fri, Apr 10, 2020 at 02:40:42AM +0000, Saeed Mahameed wrote: > > > > > This assumes that the module using FOO has its own flag > > > representing > > > FOO which is not always the case. > > > > > > for example in mlx5 we use VXLAN config flag directly to compile > > > VXLAN > > > related files: > > > > > > mlx5/core/Makefile: > > > > > > obj-$(CONFIG_MLX5_CORE) += mlx5_core.o > > > > > > mlx5_core-y := mlx5_core.o > > > mlx5_core-$(VXLAN) += mlx5_vxlan.o > > > > > > and in mlx5_main.o we do: > > > > Does this work if VXLAN = m ? > > Yes, if VXLAN IS_REACHABLE to MLX5, mlx5_vxlan.o will be > compiled/linked. So mlx5_core-m does the right thing somehow? > > > > > if (IS_ENABLED(VXLAN)) > > > mlx5_vxlan_init() > > > > > > after the change in imply semantics: > > > our options are: > > > > > > 1) use IS_REACHABLE(VXLAN) instead of IS_ENABLED(VXLAN) > > > > > > 2) have MLX5_VXLAN in mlx5 Kconfig and use IS_ENABLED(MLX5_VXLAN) > > > config MLX5_VXLAN > > > depends on VXLAN || !VXLAN > > > bool > > > > Does this trick work when vxlan is a bool not a tristate? > > > > Why not just put the VXLAN || !VXLAN directly on MLX5_CORE? > > > > so force MLX5_CORE to n if vxlan is not reachable ? IIRC that isn't what the expression does, if vxlan is 'n' then n || !n == true The other version of this is (m || VXLAN != m) Basically all it does is prevent MLX5_CORE=y && VXLAN=m > and how do we compile mlx5_vxlan.o wihout a single flag > can i do in Makefile : > mlx5_core-$(VXLAN || !VXLAN) += mlx5_vxlan.o ?? No, you just use VXLAN directly, it will be m, n or y, but it won't be m if mlx5_core is y Jason