Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7037985rdb; Wed, 3 Jan 2024 02:25:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQFbxA7h8SJsajCjbt8IHY/tivwVmmbOn/r4a4KneXT1FrP22G+VqXotyuGIa2y+ysOIed X-Received: by 2002:a05:622a:54:b0:427:9391:1828 with SMTP id y20-20020a05622a005400b0042793911828mr19374439qtw.56.1704277517133; Wed, 03 Jan 2024 02:25:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704277517; cv=none; d=google.com; s=arc-20160816; b=oQP17bVuxth98+7Gln8CNTSO43iPYFkJqbgP9dDKQ6Ek+l6y0ZuyNYMmWx4HvlL6Ea QmtlZD3Lv86Gc9EfY5vi4yLmrKP/XXqkL5R/pLuq4rLbUpHzpIWGjZKHnQSU9IYCADIW JnQfBtlPSmXuPH7NyMTkLNOynrxwGd0TpXEvRi/Yi6/eg6aBfG8xjDf7LZQo0ncMuR/e f8pv1cgk3lqC8zVYlo5K8CSwSjxXaMDCrH4Z/lG2qUhvjJHoRnT9YbTE9v+Vds2Ju+82 0NqI5xxjUS9xcVwfQ38oqCdNpdqsr9wqBlwOBREkZ60goiK/DU+T9ot3qgIbnWnlnEVj xnbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=DIAGPCK4EyPrh/Ael+oTPsoJvt+qmEkA0tC07oOAw7c=; fh=rg/Y7mZHcrVAqgW1L+TIgV0FN+QDm27XMSn67Zqfy1Q=; b=GfA1+SYymWfXidRPMEvjU0/8ZNZ3qRBwKnaYkKfeByWnbiyAkXvhNBT65uFvv47lcM v+4HhhszTRuN78EABNodpM08iBtyENSqgLc0jO4IlpN0SDi9eTARMuPiXtjv+qTAT/i0 jYuyb9nEh4v9B3R8fMnIg4i9rp74UQaMv7CZpR2HeLKNyiEyh1NnyP/H1lyiAlQaAOf9 DzLqb7l1SnmEr9Ff+Wge/BQMM29+VK0mJC2f1Z6oK89rO3sQmE4r+CKkxwZKhtI4lmJB f1CaX4bRtWkvggGrp5C49TC+koxpv2wEkcS3Zhsdx4KzxcACIZZj/wHO8UIgHALyThK/ MTmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U4vF7p7q; spf=pass (google.com: domain of linux-kernel+bounces-15383-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15383-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id i20-20020ac85c14000000b004281f19401esi6281940qti.317.2024.01.03.02.25.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 02:25:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15383-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U4vF7p7q; spf=pass (google.com: domain of linux-kernel+bounces-15383-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15383-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DF2F91C231FB for ; Wed, 3 Jan 2024 10:25:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4AD1718B16; Wed, 3 Jan 2024 10:25:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="U4vF7p7q" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7DAD318AF6; Wed, 3 Jan 2024 10:25:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8AD08C433C7; Wed, 3 Jan 2024 10:25:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704277505; bh=5Rcik7t02gBhfvqwKpMZbmbnkEm1DrJkNCgPCnScgEk=; h=From:To:Cc:Subject:Date:From; b=U4vF7p7qcZWkkoYObZ9qmo2ktv6FBoq5E+Xg7MNFl/frEzm3aIqjASJ43SafT9eKK 5IpbXaxOjjl2lG+Id2vXcO69Qnn/0YAhjb84cjlPKoLCILW2XNFu2U1rcuOlq4dcoq w43AbxgDl5V+UczWqL6v4oxgftsQLFHgtEkPerbGCx8S1X/6YinQsr/yZNRC4IEyKP G0yuGTqTW1EMaW9hLA6taWKxbt8/XFwaRURbi2jLF1wbbmILn45J7uMQZtIl22ZHY6 JY0gphYd0AggEXOrhAG6CljcM7VTkiKGh7focQO0U3x1GUyvy21GwKiAa+j8JWLNYm rMlwxDkzRsmkg== From: Arnd Bergmann To: Jesse Brandeburg , Tony Nguyen , Jakub Kicinski Cc: Arnd Bergmann , "David S. Miller" , Eric Dumazet , Paolo Abeni , Maciej Fijalkowski , Simon Horman , Daniel Borkmann , Larysa Zaremba , Piotr Raczynski , Amritha Nambiar , Alexei Starovoitov , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ice: fix building withouto XDP Date: Wed, 3 Jan 2024 11:24:45 +0100 Message-Id: <20240103102458.3687963-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann The newly added function fails to build when struct xsk_cb_desc is not defined: drivers/net/ethernet/intel/ice/ice_base.c: In function 'ice_xsk_pool_fill_cb': drivers/net/ethernet/intel/ice/ice_base.c:525:16: error: variable 'desc' has initializer but incomplete type Hide this part in the same #ifdef that controls the structure definition. Fixes: d68d707dcbbf ("ice: Support XDP hints in AF_XDP ZC mode") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/intel/ice/ice_base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_base.c b/drivers/net/ethernet/intel/ice/ice_base.c index 6e3694145f59..0d1aeb7ca108 100644 --- a/drivers/net/ethernet/intel/ice/ice_base.c +++ b/drivers/net/ethernet/intel/ice/ice_base.c @@ -521,6 +521,7 @@ static int ice_setup_rx_ctx(struct ice_rx_ring *ring) static void ice_xsk_pool_fill_cb(struct ice_rx_ring *ring) { +#ifdef CONFIG_XDP_SOCKETS void *ctx_ptr = &ring->pkt_ctx; struct xsk_cb_desc desc = {}; @@ -530,6 +531,7 @@ static void ice_xsk_pool_fill_cb(struct ice_rx_ring *ring) sizeof(struct xdp_buff); desc.bytes = sizeof(ctx_ptr); xsk_pool_fill_cb(ring->xsk_pool, &desc); +#endif } /** -- 2.39.2