From patchwork Wed Jan 3 10:24:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13509901 X-Patchwork-Delegate: kuba@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) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="U4vF7p7q" 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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org 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 } /**