Message ID | 20221219171149.833822-1-paul@pgazz.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2514157wrn; Mon, 19 Dec 2022 09:20:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf5ozsr0AhdxEu6U8d9xbzkomhrBI7fDf48hzazFgRcikYdL6TJqWYLAQc25dIc2VdMZFXtl X-Received: by 2002:a05:6a20:2a86:b0:af:864d:e7bc with SMTP id v6-20020a056a202a8600b000af864de7bcmr29566022pzh.25.1671470403498; Mon, 19 Dec 2022 09:20:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671470403; cv=none; d=google.com; s=arc-20160816; b=xf96NsAhO5zCs6y+F+WZWV7kNNv0aJDunwHbzdWNuQdRPDHK1cEj9zB37fM9O/EbjC Ckdj+PH72y54wcjI2u+CG0U6bavMMNiMTfn72Wt9E4g3Vp2LkljLRH5RfdNSkuSHyc8f eKtAfZv7JNGukKNugpGRi+D6FplkqEAe9YjForJeC31DH2wHyUbp8yQV03vTiV0k9B/K u2UBoCP96JO4xLTBG2MCTACHeM+g6qzJ1EiQo9E6eHkMWQ+nerWITqWELkuAHrcBRhZy nzgFB9BPlw/3kRopTdH7DbYZrd+WDQa+Na0oCWxPzSOJLLem1bxB3sMHs5M2+p7bE1Mt 2BkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/XohzGpmRSjINGfK1dS+OZeEMpnn9ty1uwaaqAHH2u4=; b=dvrYoyqcBsKZ0t1ED29nYjUAs6tLzZ5re3L6lEdFnSjI3JCXhUfcc89sghEZ/+2oya zwfBi8Zw5Sx4RqF8oxQvVNd9egifkLt2PmSOdDOow/Ko1jBBizLBvf91RAHw7sor2BnE chKIAmPIHpl9KNLVX6YAmmBgR+QD+coVYKY1yEhMR6fpeFG7a+wiOuhfz5+rQtemLhuO fcFM9ITNaU09oGd4FOJ2WPbteCj4mIoD/TRn7K70jHini9aKFLH9JwIzlBs3W1a8lHt9 vUx+rxrsUdGcFPVRpsGPeayffHuNujH+ZfL4R2AAmHMoedVDwQ3gnFnvPOK/cNswy0PJ kZuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pgazz.com header.s=mail header.b=QkzqOPRU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pgazz.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k7-20020a63d107000000b00476f2b11c08si11804734pgg.813.2022.12.19.09.19.48; Mon, 19 Dec 2022 09:20:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@pgazz.com header.s=mail header.b=QkzqOPRU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pgazz.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231783AbiLSRMO (ORCPT <rfc822;abdi.embedded@gmail.com> + 99 others); Mon, 19 Dec 2022 12:12:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231991AbiLSRLy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 19 Dec 2022 12:11:54 -0500 X-Greylist: delayed 181 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 19 Dec 2022 09:11:53 PST Received: from box.opentheblackbox.net (box.opentheblackbox.net [IPv6:2600:3c02::f03c:92ff:fee2:82bc]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46B6E1095; Mon, 19 Dec 2022 09:11:53 -0800 (PST) Received: from authenticated-user (box.opentheblackbox.net [172.105.151.37]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.opentheblackbox.net (Postfix) with ESMTPSA id 2BB7A3EA50; Mon, 19 Dec 2022 12:11:52 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pgazz.com; s=mail; t=1671469912; bh=9bYAYnsF3sM0kY4DcqJgvSrfn3Yhvu5t4LsWQCVQ22c=; h=From:To:Cc:Subject:Date:From; b=QkzqOPRUuNa/qGz+0kKM5B8ydrXl9Ytr+JMz6Pmr9P7JxdXWyz4dhM2A5Z8ZqbhCa KYDejVQfMZi9z57C561MkYLMyfB06tnpe+dd5ns5D3vkhZEtm0lngZHyJEeqgC9Ww4 LOmgxxjQEUZ9Kw5aOXcw5DO0FP8tgPuOEFb2jy3Y8g7hjMLql+wjURr9+22toh7WCd bBTultH/RwGwlE3wPqFGKdgDNU/G5BC3J3Ra9bdp+6FuZX7cz+U0VJMXHtxKdxDK5z WBCrkoZIygor8LuvRjNylL8Hcy56hxpBAeBTkSSekg3h8zg/rKfRpJFUcgUxu97kW9 boDnjoZZyTsGA== From: Paul Gazzillo <paul@pgazz.com> To: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Randy Dunlap <rdunlap@infradead.org>, Zheng Bin <zhengbin13@huawei.com>, Yang Yingliang <yangyingliang@huawei.com>, Suman Ghosh <sumang@marvell.com>, Subbaraya Sundeep <sbhatta@marvell.com>, Sunil Goutham <sgoutham@marvell.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Paul Gazzillo <paul@pgazz.com> Subject: [PATCH] octeontx2_pf: Select NET_DEVLINK when enabling OCTEONTX2_PF Date: Mon, 19 Dec 2022 12:11:28 -0500 Message-Id: <20221219171149.833822-1-paul@pgazz.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_SBL_CSS,RCVD_IN_XBL, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752409612724020552?= X-GMAIL-MSGID: =?utf-8?q?1752663749679636066?= |
Series |
octeontx2_pf: Select NET_DEVLINK when enabling OCTEONTX2_PF
|
|
Commit Message
Paul Gazzillo
Dec. 19, 2022, 5:11 p.m. UTC
When using COMPILE_TEST, the driver controlled by OCTEONTX2_PF does
not select NET_DEVLINK while the related OCTEONTX2_AF driver does.
This means that when OCTEONTX2_PF is enabled from a default
configuration, linker errors will occur due to undefined references to
code controlled by NET_DEVLINK.
1. make.cross ARCH=x86_64 defconfig
2. make.cross ARCH=x86_64 menuconfig
3. Enable COMPILE_TEST
General setup --->
Compile also drivers which will not load
4. Enable OCTEONTX2_PF
Device Drivers --->
Network device support --->
Ethernet driver support --->
Marvell OcteonTX2 NIC Physical Function driver
5. Exit and save configuration. NET_DEVLINK will still be disabled.
6. make.cross ARCH=x86_64 several linker errors, for example,
ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.o:
in function `otx2_register_dl':
otx2_devlink.c:(.text+0x142): undefined reference to `devlink_alloc_ns'
This fix adds "select NET_DEVLINK" link to OCTEONTX2_PF's Kconfig
specification to match OCTEONTX2_AF.
Fixes: 2da489432747 ("octeontx2-pf: devlink params support to set mcam entry count")
Signed-off-by: Paul Gazzillo <paul@pgazz.com>
---
v1 -> v2: Added the fixes tag
drivers/net/ethernet/marvell/octeontx2/Kconfig | 1 +
1 file changed, 1 insertion(+)
Comments
On Mon, Dec 19, 2022 at 12:11:28PM -0500, Paul Gazzillo wrote: > When using COMPILE_TEST, the driver controlled by OCTEONTX2_PF does > not select NET_DEVLINK while the related OCTEONTX2_AF driver does. > This means that when OCTEONTX2_PF is enabled from a default > configuration, linker errors will occur due to undefined references to > code controlled by NET_DEVLINK. > > 1. make.cross ARCH=x86_64 defconfig > 2. make.cross ARCH=x86_64 menuconfig > 3. Enable COMPILE_TEST > General setup ---> > Compile also drivers which will not load > 4. Enable OCTEONTX2_PF > Device Drivers ---> > Network device support ---> > Ethernet driver support ---> > Marvell OcteonTX2 NIC Physical Function driver > 5. Exit and save configuration. NET_DEVLINK will still be disabled. > 6. make.cross ARCH=x86_64 several linker errors, for example, > ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.o: > in function `otx2_register_dl': > otx2_devlink.c:(.text+0x142): undefined reference to `devlink_alloc_ns' > > This fix adds "select NET_DEVLINK" link to OCTEONTX2_PF's Kconfig > specification to match OCTEONTX2_AF. > > Fixes: 2da489432747 ("octeontx2-pf: devlink params support to set mcam entry count") > Signed-off-by: Paul Gazzillo <paul@pgazz.com> > --- > v1 -> v2: Added the fixes tag > > drivers/net/ethernet/marvell/octeontx2/Kconfig | 1 + > 1 file changed, 1 insertion(+) > Thanks, Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
diff --git a/drivers/net/ethernet/marvell/octeontx2/Kconfig b/drivers/net/ethernet/marvell/octeontx2/Kconfig index 3f982ccf2c85..639893d87055 100644 --- a/drivers/net/ethernet/marvell/octeontx2/Kconfig +++ b/drivers/net/ethernet/marvell/octeontx2/Kconfig @@ -31,6 +31,7 @@ config NDC_DIS_DYNAMIC_CACHING config OCTEONTX2_PF tristate "Marvell OcteonTX2 NIC Physical Function driver" select OCTEONTX2_MBOX + select NET_DEVLINK depends on (64BIT && COMPILE_TEST) || ARM64 depends on PCI depends on PTP_1588_CLOCK_OPTIONAL