Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp2857089rwj; Mon, 19 Dec 2022 09:36:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf5BCipQ2CAY41M9h/yqKhwqsCQ82qGz1obNZAi/uZdxvL9PvTWtoJ1CPlX5ApTyBtR+GF6v X-Received: by 2002:a17:907:a686:b0:7c1:2f05:7fd6 with SMTP id vv6-20020a170907a68600b007c12f057fd6mr37066785ejc.39.1671471386496; Mon, 19 Dec 2022 09:36:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671471386; cv=none; d=google.com; s=arc-20160816; b=sXNRaIwaDeGD/0rxMciONcpXOM9M9UR59YQ0YGUVCwND5K+NVwwZ6rOk+LfAFEFIuh kDXMVQb1g1LdBpAl37AN2ChJCmhXhS3DltRnBcqpY/NpGwPcksZIJ4diBHVtFNHRtLPZ EamVz4LuHi9r1QaQ4dRG7BsovMFYwPkr0BIm0hcahAMh8JK9iiVyRO5MrzYvS5mS6SSA jXXtC/xdkaXi3rnvNnUaFCPqqsO/4dVH4AUjmQoe6V8AOHeCNfxGyD8qpft1xPNpobM0 w7z44I2fllnVRDP3yJwad35pJ47Nvhvd0u3Spt3Tf2sKNGyi+S5VPxDmZgT/XVGpqp65 f10g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rk12-20020a170907214c00b007add6c835a9si8115600ejb.867.2022.12.19.09.36.10; Mon, 19 Dec 2022 09:36:26 -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 + 70 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 ); 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 To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Randy Dunlap , Zheng Bin , Yang Yingliang , Suman Ghosh , Subbaraya Sundeep , Sunil Goutham , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Paul Gazzillo 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- v1 -> v2: Added the fixes tag drivers/net/ethernet/marvell/octeontx2/Kconfig | 1 + 1 file changed, 1 insertion(+) 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 -- 2.25.1