From patchwork Wed Sep 20 18:07:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lobakin X-Patchwork-Id: 1837364 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=c73iW3E+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RrRPb4t3bz1yhR for ; Thu, 21 Sep 2023 04:09:23 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 28B8583BFC; Wed, 20 Sep 2023 18:09:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 28B8583BFC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1695233361; bh=vHsMas3sp5NKth+GF6JuJN/QPl6hfdZRDW+546O70T8=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=c73iW3E+sSLJwYOiPgDadmvpBrIrtyHwgdHscaH7x8yi2NQCceMPasEwfN51XuJ24 wDrb3uf77K0hUpLtlnVwaHsnTZmvElBoGqJZdqTn80SRUp4XCTST4M+1WcawPxZR2S z+4DBndmfb6TEjwtUoOH0rhtlKIgbSDoKEJHS6b+J0XcfSJiS/xvqWEy2k4rGYiciz zN9iEIhaaIzvzVLKU6xVpx7hp2V5xE37L6+xNK1sK8iwe+SqnSApNSAMBlnlQ4RCiw LuVct0VUqujdMZWdm3vvZQ+2PTtNtVe3sMVtFXium5hsr59TDV71u/FpDL6RuSZzyY mDpujUZF6MIeQ== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4cxZLj-T2-DY; Wed, 20 Sep 2023 18:09:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 2C65583C0A; Wed, 20 Sep 2023 18:09:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 2C65583C0A X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id BE0651BF2AF for ; Wed, 20 Sep 2023 18:09:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A222B83B82 for ; Wed, 20 Sep 2023 18:09:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A222B83B82 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o-338KhRV1cG for ; Wed, 20 Sep 2023 18:09:12 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by smtp1.osuosl.org (Postfix) with ESMTPS id B82CA83B94 for ; Wed, 20 Sep 2023 18:09:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B82CA83B94 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="359685161" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="359685161" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 11:09:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="870469682" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="870469682" Received: from newjersey.igk.intel.com ([10.102.20.203]) by orsmga004.jf.intel.com with ESMTP; 20 Sep 2023 11:09:09 -0700 From: Alexander Lobakin To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Date: Wed, 20 Sep 2023 20:07:43 +0200 Message-ID: <20230920180745.1607563-2-aleksander.lobakin@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230920180745.1607563-1-aleksander.lobakin@intel.com> References: <20230920180745.1607563-1-aleksander.lobakin@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695233352; x=1726769352; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QkeZCJ+wbV6YBiqruqO3WbNO7KU2wC4MLYBVcJfsgoo=; b=O30kftMdhUXNjDUiWf0UdGZjAHpXUxpKa4RmMAuWotabc0d9Ac4i9+ib JiVb82GbFEgjjYV+l5HtaUfkk/IaxdCN/2Kxon5CcmR3ByXu2AGxQqqZZ UuXxJWqicLRZqLZj+VPymu+sxxZjQ3EgHUSaIoc8a//Cn2yrOvPzrkBUY COKU0wQ91NG5zc8JsjiiO5KsuD+gGO2hobJYCm3KPp8zcaa8OakE7N56Q +C8Mx04EsUNKA3+gsqwO9LM9uKf52HXrCzbe5FLBPutWyXCqAzZZp3UDl /kJQ4UKZrux/TuhuitPzEjV8BCnGK3tfby+YV77xaNZyvwQYpaKr2HcqE w==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=O30kftMd Subject: [Intel-wired-lan] [PATCH net-next 1/3] ice: fix undefined references to ice_is_*() when !CONFIG_PTP_1588_CLOCK X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Michalik , netdev@vger.kernel.org, Richard Cochran , linux-kernel@vger.kernel.org, Arkadiusz Kubalewski , Alexander Lobakin , Tony Nguyen , intel-wired-lan@lists.osuosl.org, Milena Olech Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Starting the cited commit, ice_lib.c unconditionally refers to three functions compiled only when CONFIG_PTP_1588_CLOCK is set (as they're located in ice_ptp_hw.c): ERROR: modpost: "ice_is_clock_mux_present_e810t" [drivers/net/ethernet/intel/ice/ice.ko] undefined! ERROR: modpost: "ice_is_phy_rclk_present" [drivers/net/ethernet/intel/ice/ice.ko] undefined! ERROR: modpost: "ice_is_cgu_present" [drivers/net/ethernet/intel/ice/ice.ko] undefined! These three are HW feature tests and it is safe to stub them as `return false` when PTP support is disabled. Fixes: 8a3a565ff210 ("ice: add admin commands to access cgu configuration") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202309181001.G72eBLpj-lkp@intel.com Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 25 ++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.h b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h index 6f277e7b06b9..405a72864dc7 100644 --- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.h +++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h @@ -271,10 +271,33 @@ int ice_read_sma_ctrl_e810t(struct ice_hw *hw, u8 *data); int ice_write_sma_ctrl_e810t(struct ice_hw *hw, u8 data); int ice_read_pca9575_reg_e810t(struct ice_hw *hw, u8 offset, u8 *data); bool ice_is_pca9575_present(struct ice_hw *hw); + +#if IS_ENABLED(CONFIG_PTP_1588_CLOCK) + bool ice_is_phy_rclk_present(struct ice_hw *hw); bool ice_is_clock_mux_present_e810t(struct ice_hw *hw); -int ice_get_pf_c827_idx(struct ice_hw *hw, u8 *idx); bool ice_is_cgu_present(struct ice_hw *hw); + +#else /* !CONFIG_PTP_1588_CLOCK */ + +static inline bool ice_is_phy_rclk_present(const struct ice_hw *hw) +{ + return false; +} + +static inline bool ice_is_clock_mux_present_e810t(const struct ice_hw *hw) +{ + return false; +} + +static inline bool ice_is_cgu_present(const struct ice_hw *hw) +{ + return false; +} + +#endif /* !CONFIG_PTP_1588_CLOCK */ + +int ice_get_pf_c827_idx(struct ice_hw *hw, u8 *idx); enum dpll_pin_type ice_cgu_get_pin_type(struct ice_hw *hw, u8 pin, bool input); struct dpll_pin_frequency * ice_cgu_get_pin_freq_supp(struct ice_hw *hw, u8 pin, bool input, u8 *num); From patchwork Wed Sep 20 18:07:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lobakin X-Patchwork-Id: 1837365 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=D+TVOBcb; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RrRPg2Fn0z1yhR for ; Thu, 21 Sep 2023 04:09:27 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 41A8983C2A; Wed, 20 Sep 2023 18:09:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 41A8983C2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1695233365; bh=hY9Ku/KfqaLFADmd7Idbj5SXJnsCAUUd14hdRMubhlg=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=D+TVOBcb6rvWs0ugoTht+9acZHlVUSNCNFfwXyA0JwIeEAPxCJbxwodtE4zhReHov EZ4F7XAE3uMZW+1qfXy6+4AjK17MasUe+RACG7qxOTZJxwey1ykxMn4KTczecWjhZx kdnWBp4E0TDvxm15vzLENIRp6tqbFrrmkz+Ib9ug6Tp4zkj8FH8p5Yi/IsPejz6w6I 6milp5bIjsEcPpimUTsaqnuS4CNatP4n01idppwYYn+ma2ba/YWz8w0NBLFQ85ZinX yINymJ+zJdzK7JbnnnmAEJv8HQOqbFYOSM6bS3upUMDuLEx+E6XpCYc+Q/pbdjZ1/C XsKX+k7qpGbFw== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n4V2ljllVPJX; Wed, 20 Sep 2023 18:09:24 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 36B6E83BA7; Wed, 20 Sep 2023 18:09:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 36B6E83BA7 X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id BE37A1BF2AF for ; Wed, 20 Sep 2023 18:09:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A3B1A83B9B for ; Wed, 20 Sep 2023 18:09:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A3B1A83B9B X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 68SyeSGFzoUE for ; Wed, 20 Sep 2023 18:09:16 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by smtp1.osuosl.org (Postfix) with ESMTPS id A689183B94 for ; Wed, 20 Sep 2023 18:09:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A689183B94 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="359685186" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="359685186" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 11:09:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="870469685" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="870469685" Received: from newjersey.igk.intel.com ([10.102.20.203]) by orsmga004.jf.intel.com with ESMTP; 20 Sep 2023 11:09:12 -0700 From: Alexander Lobakin To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Date: Wed, 20 Sep 2023 20:07:44 +0200 Message-ID: <20230920180745.1607563-3-aleksander.lobakin@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230920180745.1607563-1-aleksander.lobakin@intel.com> References: <20230920180745.1607563-1-aleksander.lobakin@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695233356; x=1726769356; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iBHldoR40VpXeC3G/McChx+fgRcdfcyH8Q5bUfcu6gs=; b=cqoFZJY6521G/v8U12fJFye2KZl7CVMRvdxtw3+ddOvOj7ma2RK2Udrb X7gccfTb1IO6XbT1t2WjvflpyKRPbaIDcm2EKKgrnym/OsPjJp9NK8dAa Mc5sRk+kaWlN4s5hnyJb3MHf8e7Kg6s1oIG+WRhsrKjnuUj+gsa0DKsKt WFBoFiR6ZFKdCtjLtSooBobRkBEvQBcJTLL/ff8iPsAtuNotZ61tc4gTT aIfDt4nfphatE7W5mqqPIiMutDh1fG1b9Jyup/X6nwzELFiswR2wsAaY8 /aRLF1VHeODIX0YEWvaIvXMF8n2+tGvtJLaRk3LR50Hgf4H7tOFGv72I3 g==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=cqoFZJY6 Subject: [Intel-wired-lan] [PATCH net-next 2/3] ice: fix undefined references from DPLL code when !CONFIG_PTP_1588_CLOCK X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Michalik , netdev@vger.kernel.org, Richard Cochran , linux-kernel@vger.kernel.org, Arkadiusz Kubalewski , Alexander Lobakin , Tony Nguyen , intel-wired-lan@lists.osuosl.org, Milena Olech Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" DPLL code in ice unconditionally calls several PTP functions which are only built when CONFIG_PTP_1588_CLOCK is set. This throws a good bunch of link errors: ERROR: modpost: "ice_cgu_get_pin_name" [drivers/net/ethernet/intel/ice/ice.ko] undefined! ERROR: modpost: "ice_get_cgu_state" [drivers/net/ethernet/intel/ice/ice.ko] undefined! OR: modpost: "ice_is_cgu_present" [drivers/net/ethernet/intel/ice/ice.ko] undefined! ERROR: modpost: "ice_get_cgu_rclk_pin_info" [drivers/net/ethernet/intel/ice/ice.ko] undefined! ERROR: modpost: "ice_cgu_get_pin_type" [drivers/net/ethernet/intel/ice/ice.ko] undefined! ERROR: modpost: "ice_cgu_get_pin_freq_supp" [drivers/net/ethernet/intel/ice/ice.ko] undefined! ice_dpll_{,de}init() can be only called at runtime when the corresponding feature flags are set, which is not the case when PTP support is not compiled. However, the linker has no clue about this. Compile DPLL code only when CONFIG_PTP_1588_CLOCK is enabled and guard the mentioned init/deinit function calls, so that ice_dpll.o is only referred when it gets compiled. Note that ideally ice_is_feature_supported() needs to check for compile-time flags first to be able to handle this without any additional call guards, and we may want to do that in the future. Fixes: d7999f5ea64b ("ice: implement dpll interface to control cgu") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202309191214.TaYEct4H-lkp@intel.com Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/ice/Makefile | 5 ++--- drivers/net/ethernet/intel/ice/ice_main.c | 8 +++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/Makefile b/drivers/net/ethernet/intel/ice/Makefile index 00806ddf5bf0..16f96d5210d8 100644 --- a/drivers/net/ethernet/intel/ice/Makefile +++ b/drivers/net/ethernet/intel/ice/Makefile @@ -34,8 +34,7 @@ ice-y := ice_main.o \ ice_lag.o \ ice_ethtool.o \ ice_repr.o \ - ice_tc_lib.o \ - ice_dpll.o + ice_tc_lib.o ice-$(CONFIG_PCI_IOV) += \ ice_sriov.o \ ice_virtchnl.o \ @@ -44,7 +43,7 @@ ice-$(CONFIG_PCI_IOV) += \ ice_vf_mbx.o \ ice_vf_vsi_vlan_ops.o \ ice_vf_lib.o -ice-$(CONFIG_PTP_1588_CLOCK) += ice_ptp.o ice_ptp_hw.o +ice-$(CONFIG_PTP_1588_CLOCK) += ice_dpll.o ice_ptp.o ice_ptp_hw.o ice-$(CONFIG_DCB) += ice_dcb.o ice_dcb_nl.o ice_dcb_lib.o ice-$(CONFIG_RFS_ACCEL) += ice_arfs.o ice-$(CONFIG_XDP_SOCKETS) += ice_xsk.o diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index e22f41fea8db..9b48918dcdb7 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -4665,8 +4665,9 @@ static void ice_init_features(struct ice_pf *pf) if (ice_is_feature_supported(pf, ICE_F_GNSS)) ice_gnss_init(pf); - if (ice_is_feature_supported(pf, ICE_F_CGU) || - ice_is_feature_supported(pf, ICE_F_PHY_RCLK)) + if (IS_ENABLED(CONFIG_PTP_1588_CLOCK) && + (ice_is_feature_supported(pf, ICE_F_CGU) || + ice_is_feature_supported(pf, ICE_F_PHY_RCLK))) ice_dpll_init(pf); /* Note: Flow director init failure is non-fatal to load */ @@ -4695,7 +4696,8 @@ static void ice_deinit_features(struct ice_pf *pf) ice_gnss_exit(pf); if (test_bit(ICE_FLAG_PTP_SUPPORTED, pf->flags)) ice_ptp_release(pf); - if (test_bit(ICE_FLAG_DPLL, pf->flags)) + if (IS_ENABLED(CONFIG_PTP_1588_CLOCK) && + test_bit(ICE_FLAG_DPLL, pf->flags)) ice_dpll_deinit(pf); } From patchwork Wed Sep 20 18:07:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lobakin X-Patchwork-Id: 1837366 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=7ThTkhd3; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RrRPm3PG8z1yhR for ; Thu, 21 Sep 2023 04:09:32 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id AEEC780C7A; Wed, 20 Sep 2023 18:09:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org AEEC780C7A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1695233370; bh=69RFCqxKlVdpFQPxYvDkgdIbsLeS8/LhNiEU5QE7+0M=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=7ThTkhd3jTp8QBYdt9vCbrVUsykYvOVeCFuBlgUVcLl1ENvcmHzKiI20HHpL7v0OW WvhDTrg2+vOdLY4k7pcAEdwkOBROV3fDSQD3K/cbspbYiKM5+yRbrEmvDDDGQCitO1 oIL1khRX4Vu99kdu3ULQoBPSxX3S7aXid1UXLYeFHiEtEyjDYO2hAqk439kSG21SvP s58A+O3DvR2IF6mBBaydbugzqgzmuTpuNmw6R6rEBdhDlPnswtmBM4fwo7DjCccCjY I4ggX4XEeJ10uv+aN9SmlSK8oSg7DMJcbDDFOVbgmWRl6we3tSHSe/J5pPlX40gjBD G44hnMnceiQrg== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZQud26wK6BAB; Wed, 20 Sep 2023 18:09:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 12E5180C08; Wed, 20 Sep 2023 18:09:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 12E5180C08 X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D51C01BF2AF for ; Wed, 20 Sep 2023 18:09:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id AE5A583C0D for ; Wed, 20 Sep 2023 18:09:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org AE5A583C0D X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tdZHVn-8AUnW for ; Wed, 20 Sep 2023 18:09:19 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by smtp1.osuosl.org (Postfix) with ESMTPS id C639A83B94 for ; Wed, 20 Sep 2023 18:09:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org C639A83B94 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="359685200" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="359685200" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 11:09:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="870469703" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="870469703" Received: from newjersey.igk.intel.com ([10.102.20.203]) by orsmga004.jf.intel.com with ESMTP; 20 Sep 2023 11:09:16 -0700 From: Alexander Lobakin To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Date: Wed, 20 Sep 2023 20:07:45 +0200 Message-ID: <20230920180745.1607563-4-aleksander.lobakin@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230920180745.1607563-1-aleksander.lobakin@intel.com> References: <20230920180745.1607563-1-aleksander.lobakin@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695233359; x=1726769359; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9v3tuq5QMpq6FKi4RwFSg7GiSz0pETN22pnlW81jpvc=; b=Gu0oIzlie/ACL7UpdhI6pUocntPigOJQG8c571qNh37/+8SqSL/fgt08 b/hZf/sNAAm/FtrJSpPQG3CnsAayvI/UaeRqq1fXUI04mxlbYx71x8DsL lbM3rEudLP9wIGkW6MC43/BW+wxaoNVD408q7wUhqLDDmOapXkYeuumGC EP4rVBYZq1bGtlx9cICJ4qBwFeTcQEy+eklusA3VdidequtXufPMOPV8b 0/ujVcllyGIovf0p0dAVCVfS9YoNyXSVxc57GoYQRwvx+8x8wxLj6eGAo /gsyvTv2OUqwK3oRN5+UW2RQIyV7Yrfm3tM/8BYjPxA8EAEXvTHiAeCWH A==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Gu0oIzli Subject: [Intel-wired-lan] [PATCH net-next 3/3] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Michalik , netdev@vger.kernel.org, Richard Cochran , Randy Dunlap , linux-kernel@vger.kernel.org, Arkadiusz Kubalewski , Alexander Lobakin , Tony Nguyen , intel-wired-lan@lists.osuosl.org, Milena Olech Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" When CONFIG_INET is not set, tcp_gro_complete is not compiled, although the drivers using it may still be compiled (spotted by Randy): aarch64-linux-ld: drivers/net/ethernet/intel/idpf/idpf_txrx.o: in function `idpf_rx_rsc.isra.0': drivers/net/ethernet/intel/idpf/idpf_txrx.c:2909:(.text+0x40cc): undefined reference to `tcp_gro_complete' The drivers need to guard the calls to it manually. Return early from the RSC completion function if !CONFIG_INET, it won't work properly either way. This effectively makes it be compiled-out almost entirely on such builds. Fixes: 3a8845af66ed ("idpf: add RX splitq napi poll support") Reported-by: Randy Dunlap Closes: https://lore.kernel.org/linux-next/4c84eb7b-3dec-467b-934b-8a0240f7fb12@infradead.org Signed-off-by: Alexander Lobakin Tested-by: Randy Dunlap Reviewed-by: Jacob Keller --- drivers/net/ethernet/intel/idpf/idpf_txrx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c index 6fa79898c42c..aa45afeb6496 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c @@ -2876,6 +2876,9 @@ static int idpf_rx_rsc(struct idpf_queue *rxq, struct sk_buff *skb, if (unlikely(!(ipv4 ^ ipv6))) return -EINVAL; + if (!IS_ENABLED(CONFIG_INET)) + return 0; + rsc_segments = DIV_ROUND_UP(skb->data_len, rsc_seg_len); if (unlikely(rsc_segments == 1)) return 0;