Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2394407pxb; Wed, 9 Feb 2022 18:09:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJyusgo8K8hRszkSN8i8Mjlfgae7VttWoL0ohp5LyFV2qPNLoiLcbzXh31XZBRhhwCpr5aDT X-Received: by 2002:a17:902:8344:: with SMTP id z4mr5204443pln.12.1644458971195; Wed, 09 Feb 2022 18:09:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644458971; cv=none; d=google.com; s=arc-20160816; b=Q/VCHT+8OX06hXhPCvA6UZM0yRq24dmZ4jz/HhVSeWNEblI1wjnBHhw1Svsgn1gaYm em/5SEhQqeJ349m83UburSbTyzEhPt03r+CTppAsmjceeST9FGARQ9LjQH3vNVe8Shy1 5O3HmRkMwU1JHuCJq5V4zMt+ybiTsTdO5y+vP7oxef4FId/GPIbHt5sBBxovYpFQ6tfw Qks5PuDz2indP0pXzmt6WJ+OlvmS/ukqZGCJ0fQMy4YJDXb49dTGpogKsgK8MenBeq5W r0AAwxyIzga3+t097XfHBkD6ISPUn6DXhMAcDhpbH9kHVOhYTkV8VRwZkbZOvf4OMJxd nf/w== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Nd8AwXmq8SrVOxKjjNLuvsKRgjpc85o3/Bl1j/eUKq0=; b=COw8dQb4UsS9NQ1XbG0XwQYI2pcCB/SfU8PgEneCCj57ndBEzd7Tmx67Umda8zirX7 ixB7NE2YWmQgbQqBdl8wdWmB4oSJT7nH6bIaTlsOw//NmDMmTQFOAXGPr4tOlyUX9/vz OAtcYDNv9+1F4Q4JXL6/kOpA2rFWXh0gOM5f1ZN9fRttB4mfG6GhPY/ytY3ctHtVEZ0b tUHPlMdH18IKYyVjL7JMiO2+Q1tFb+pgGUQhgo245B4CEam618c/6vFc/yYCuYr7O3/F +3lX6LRmPcddSkdY61Il4gQDEldbOZHv6occ805Uoyihf7oDCYGiEvvHTMWXi9T9XVad wnCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TfoiDVHc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q6si706186pln.377.2022.02.09.18.09.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 18:09:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TfoiDVHc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CF8EA115D; Wed, 9 Feb 2022 18:09:29 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231460AbiBJCIr (ORCPT + 99 others); Wed, 9 Feb 2022 21:08:47 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:56178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234864AbiBJCIP (ORCPT ); Wed, 9 Feb 2022 21:08:15 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C735F52; Wed, 9 Feb 2022 18:06:24 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0CB6AB8237D; Thu, 10 Feb 2022 02:06:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75905C340ED; Thu, 10 Feb 2022 02:06:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644458781; bh=fAh2X+kAgBzPTZ6RgHDL8gTwRpxG0YfihVGEOE17ZDk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TfoiDVHcL+PqasAsLl7TW5YwawF7477ZNjwGEQZHJIqCrY9IlkCuClf/J7AYM0qou EZL1TMQxB/g4htar/APBoHYyL84P8lFOPCc8MkUb3iJLkB0p+JKmeKrqFel+zbtaFE WFnR/6p7LPNDwF5W7T49km3nBrawAlXWEI7CO+Wpu/mMzffgvqbYYmb1M9WaZKMvqY hZ1MJHZShq28LbhHAwL/lRMel5732FC2IuNECt9nfnVfXNknMPP/yjV+SLLu43HUQm 44TYrcvHPotTNHT4gIGFkn/HVJm1sQtRuQ63fstFuxt3vMIYomQY3iegOgtmNUAHHp MIhET2qU4TJFw== Date: Wed, 9 Feb 2022 18:06:20 -0800 From: Jakub Kicinski To: Andrew Lunn , Horatiu Vultur Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, UNGLinuxDriver@microchip.com, davem@davemloft.net, kernel test robot Subject: Re: [PATCH net-next] net: lan966x: Fix when CONFIG_IPV6 is not set Message-ID: <20220209180620.3699bf25@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: <20220209101823.1270489-1-horatiu.vultur@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 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 On Wed, 9 Feb 2022 14:54:23 +0100 Andrew Lunn wrote: > On Wed, Feb 09, 2022 at 11:18:23AM +0100, Horatiu Vultur wrote: > > When CONFIG_IPV6 is not set, then the compilation of the lan966x driver compilation or linking? > > fails with the following error: > > > > drivers/net/ethernet/microchip/lan966x/lan966x_main.c:444: undefined > > reference to `ipv6_mc_check_mld' > > > > The fix consists in adding #ifdef around this code. > > It might be better to add a stub function for when IPv6 is > disabled. We try to avoid #if in C code. If it's linking we can do: if (IS_ENABLED(CONFIG_IPV6) && skb->protocol == htons(ETH_P_IPV6) && ipv6_addr_is_multicast(&ipv6_hdr(skb)->daddr) && !ipv6_mc_check_mld(skb)) return false; But beware that IPV6 can be a module, you may need a Kconfig dependency.