Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp496286pxb; Thu, 25 Feb 2021 07:47:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxAdZt3gO6mQV+r+4NZDkKo/LggHKByNbFg038iA9Nn3SclsP2lQd3YaWJF53TNM1tGVOHl X-Received: by 2002:a05:6402:31a7:: with SMTP id dj7mr2412912edb.33.1614268051124; Thu, 25 Feb 2021 07:47:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614268051; cv=none; d=google.com; s=arc-20160816; b=sD13n1zYlZTx5mqI2aqaO3LWfcNQM6OmEF1HqSK1tcxNWUMtdJRNoE1hsdozoDDJwR +k5+kumsc6zXbT1+BOG1tlmnXbSCm/5l6WZdPS3LQgHJkU3GIxxQTKLqcavHV5IjWAEB DRdNThx6kxTLgnELaC3pixYsbpOx6A5CrTg16anhz93jZpSutLx4BXMiEyKdKxx7WHlV N0xUcwZFGM2i55WdErvIjQElh6htHBz8fg0ZRBezhEL8m8PMHFipAQBb7hxyFG4xcSul qy6fKXEgE1dMPX/tQ/hOXOBzmrLAiWsXFcIli4lAd6ywjIroXr9MUvMd1O837/k1WGhp K4iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FFbCuVuoKx+DCmrBSPOqPKONTHsfGp/vrYGtS8k4rGU=; b=lXeq0pSCK8dIHv/6PHAPcxTFHQQsEEezj7goIjZZRGns6wqat9v4tDNXFSbpcUx/jQ EsbGqog3iCdxmhcMZD6sJ5smzSKE2xeV7EtQNbyOiHP8WG4JQAtlH3BYU/GwUlruw5ia CGQxcutOTIrBSrydrmefE6m8moWswRyTl0w2zL4+59Yl80GHbG6Qu1K/ME3tAvO6KlUv Lmu8hOA+t19IdsnERFlfp+nAqOcNkj2+jROJq77ZCVBO0gOpW+4oy7epRg/aYy2xDJY9 mOyGMy3O0f2+6RLsQynxlmPQpqbBcar/Oi7B7t4kVGZS59ZrJOyVwH9/zKCSWKzGz5uh Cbxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Dl5qQc0/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n3si3225210ejy.171.2021.02.25.07.47.08; Thu, 25 Feb 2021 07:47:31 -0800 (PST) Received-SPF: pass (google.com: 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=@kernel.org header.s=k20201202 header.b="Dl5qQc0/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231335AbhBYPol (ORCPT + 99 others); Thu, 25 Feb 2021 10:44:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:48780 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233007AbhBYPoA (ORCPT ); Thu, 25 Feb 2021 10:44:00 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1B97864F1A; Thu, 25 Feb 2021 15:43:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614267797; bh=G8l3bZzpQKWdq/8HOkPtO+eDiTgygJ119U3fIxDi1vw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Dl5qQc0/QvST8TTSm9HZGTgDNhYqVrHHvdJTfPmhpfe/m6jPoDmonkiuikGGWVTzI zkObnC2tgc5J23DrWY2ILtSZJHZUi5eShfWEmvyIWw+unxffwT5Gucwg2PqCPyTYsN ySMAwdMdMGzvbitfiYkp3NA0B6fkdp24+rI13+NyadkwsJF4HXgH8xBIqmG/AKGPCA RKTUKECvVR2NMugWboiXrKXy23vjs8qoJB5sxz/i1XYyJUt6oJ1LAetibm2k8bnD/S uemLMdSx/Oj1RJCBJCqcA6NLWrINRB0Ael9hk/Ka5IkdJQs5RAZa7bng27YLRj0Fuk HEtny6NAWX14Q== Received: by mail-ot1-f43.google.com with SMTP id s3so6073188otg.5; Thu, 25 Feb 2021 07:43:17 -0800 (PST) X-Gm-Message-State: AOAM531oPWnEaElnmsjjKYl8Yrr9MTSRkF7QzAsTxSTWNd41GF3xr7rB LUndmBW46atltPceQRtXK6rJWYrzFQtV63aD4+8= X-Received: by 2002:a9d:7f11:: with SMTP id j17mr2861108otq.251.1614267796208; Thu, 25 Feb 2021 07:43:16 -0800 (PST) MIME-Version: 1.0 References: <20210225143910.3964364-1-arnd@kernel.org> <20210225143910.3964364-2-arnd@kernel.org> <20210225144341.xgm65mqxuijoxplv@skbuf> <20210225150715.2udnpgu3rs6v72wg@skbuf> In-Reply-To: <20210225150715.2udnpgu3rs6v72wg@skbuf> From: Arnd Bergmann Date: Thu, 25 Feb 2021 16:43:00 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/3] net: dsa: tag_ocelot_8021q: fix driver dependency To: Vladimir Oltean Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , Jakub Kicinski , Arnd Bergmann , Networking , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 25, 2021 at 4:07 PM Vladimir Oltean wrote: > On Thu, Feb 25, 2021 at 03:49:08PM +0100, Arnd Bergmann wrote: > > On Thu, Feb 25, 2021 at 3:47 PM Arnd Bergmann wrote: > > > On Thu, Feb 25, 2021 at 3:43 PM Vladimir Oltean wrote: > > > > On Thu, Feb 25, 2021 at 03:38:32PM +0100, Arnd Bergmann wrote: > > > > > From: Arnd Bergmann > > > > > > > > > > When the ocelot driver code is in a library, the dsa tag > > > > I see the problem now, I should have written 'loadable module', not 'library'. > > Let me know if I should resend with a fixed changelog text. > > Ah, ok, things clicked into place now that you said 'module'. > So basically, your patch is the standard Kconfig incantation for 'if the > ocelot switch lib is built as module, build the tagger as module too', > plus some extra handling to allow NET_DSA_TAG_OCELOT_8021Q to still be y > or m when COMPILE_TEST is enabled, but it will be compiled in a > reduced-functionality mode, without MSCC_OCELOT_SWITCH_LIB, therefore > without PTP. > > Do I get things right? Sorry, Kconfig is a very strange language. Yes, that's basically correct. I tried to express it in Kconfig the way I would explain it in English, which means it there are two options: a) If MSCC_OCELOT_SWITCH_LIB is enabled (y or m) there is a direct dependency, so NET_DSA_TAG_OCELOT_8021Q cannot be built-in if MSCC_OCELOT_SWITCH_LIB=m b) When compile-testing *and* MSCC_OCELOT_SWITCH_LIB is fully disabled, NET_DSA_TAG_OCELOT_8021Q can be anything (y/m/n) As a side-effect, this also means that if we are not compile-testing and MSCC_OCELOT_SWITCH_LIB is disabled, the option is hdden. Arnd.