From patchwork Thu Sep 21 12:59:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lobakin X-Patchwork-Id: 13394222 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A4C2171A6 for ; Thu, 21 Sep 2023 17:52:44 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B1FF89D92; Thu, 21 Sep 2023 10:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695318732; x=1726854732; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=CB1e+1tDos0izps6y7bKpYTFHFvWb1uVC0e3ziRvTvY=; b=mecA3MhG8FsF1L21mW5EE32egHlmVWqjFJFhGlb4kpq8+3WFNyFwOYe5 AVLA1N14JzI47A9GpIoKEuqzdP2MRL+oaQy0rY6PAGD8hhxC3ytF/OOjP DQHi/j14luo8t1InVRRC5EgEtqJ7AXax/FSub8DKQ4GEAueW597y+XKAs HeZpdzFJ8u0HjksA48SfAs89sRKddv5hGEd6THec/Hp3WU4pTFJjWGwWs DT4PtivxIs1gfBGJADMpG6ybuxqsiiD3U+q8bAaJVXNUM4kASWgO2LUuI ZmbZWeIP8HufYhLqlguGLN1hYD1Ze/d+owXRUHWMNo4Zis3b/dSz1Dk47 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="379396206" X-IronPort-AV: E=Sophos;i="6.03,165,1694761200"; d="scan'208";a="379396206" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2023 06:00:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="812639263" X-IronPort-AV: E=Sophos;i="6.03,165,1694761200"; d="scan'208";a="812639263" Received: from newjersey.igk.intel.com ([10.102.20.203]) by fmsmga008.fm.intel.com with ESMTP; 21 Sep 2023 06:00:40 -0700 From: Alexander Lobakin To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Alexander Lobakin , Tony Nguyen , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Randy Dunlap , Przemek Kitszel , Jacob Keller Subject: [PATCH net-next] idpf: fix undefined reference to tcp_gro_complete() when !CONFIG_INET Date: Thu, 21 Sep 2023 14:59:36 +0200 Message-ID: <20230921125936.1621191-1-aleksander.lobakin@intel.com> X-Mailer: git-send-email 2.41.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org 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 Tested-by: Randy Dunlap Reviewed-by: Przemek Kitszel Reviewed-by: Jacob Keller Signed-off-by: Alexander Lobakin --- Directly to net-next, build bots are not happy :s From v1[0]: * post the patch as standalone; * pick the received tags (Randy, Jake, Przemek). [0] https://lore.kernel.org/netdev/20230920180745.1607563-1-aleksander.lobakin@intel.com --- 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;