Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp423244rdh; Tue, 19 Dec 2023 03:11:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEntBKnCumbnqbEsQU2JN4nVkXAaEAeS6TG0XZvJh4XYNTAZRwrF9WcO4NwUm2jajZzEpTN X-Received: by 2002:a17:906:2202:b0:a25:49d5:e272 with SMTP id s2-20020a170906220200b00a2549d5e272mr318654ejs.12.1702984298441; Tue, 19 Dec 2023 03:11:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702984298; cv=pass; d=google.com; s=arc-20160816; b=R43VMPRuZZCc5S7426QDPSO65Uu3nEUiv6ODN6UjBKmFsHJnMx758xooijGvNoDUrr ShUrr2/7TcAxNjo0HTLYQyKrk5yMdtLKTLIfy5xmJ/dBHUGjsrnxmTGaDmVXnv9Ig2df N5cmd9yBba8Xn0scDBiyxIvD4RJ5BHMMx8+W7eJfL4yr+qAzWGxETxvLcXE1RPgtyNkK 7Ji4Z2sajHa1bn8fFNmEbj/FvZmGVofiZzI1AVVFt09IKjFtrbGiWEkgQ7cs27kA2EKP dQ0KGVhawjb5Ld2RbJTt43NSw+50pSx5/7sAMe0tC9K14+WOody1Alwv3yrEZBUFcraD m6Jg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:message-id:date:subject:cc:to:from :dkim-signature; bh=tGmPW8MhjYS06UjczvfQLAARh9ju46JuP3AOalJpBEw=; fh=RaLm8hBtwXn59yU6KRI+vPP87VquXAHJOleL02Ebakk=; b=DU8VRWyUTAVa28lHOOusU+M7NxMgo9Yzb1kb0tlNHur2NwQ7ix0wfOWNTzYEVbGUpH 24xS7kw/tUe5AFcHttE8V78c7yET/QAPddam51qZrXxoCEqM43celVK4MCKwrm6ySh/k kn7v+rxu3vAva4mWzw4hWYV4UjkvhvOCi8MIVFSAAC3X0bffuskyWnua411YDHGTTlZx M+9YGrEauRi9D6R4tFpcVjoMrq+8qZ7QkbptPlcZ5en5SRLWRrbGhy0QQqJkyzJUyyzU yE/WK8H4bqh9KKSYbu9Y0DeKWr6pZbWAu6xRtfF3VAPkUqCFToQ+9T2BbVLRnLe57Gz3 IBPg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=h2EYsxEJ; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel+bounces-5055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5055-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id kt8-20020a170906aac800b00a2349f5f97csi2130866ejb.648.2023.12.19.03.11.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 03:11:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=h2EYsxEJ; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel+bounces-5055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5055-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 00A461F25B36 for ; Tue, 19 Dec 2023 11:03:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A912154B6; Tue, 19 Dec 2023 11:02:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="h2EYsxEJ" X-Original-To: linux-kernel@vger.kernel.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2060.outbound.protection.outlook.com [40.107.247.60]) (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 16A121862F; Tue, 19 Dec 2023 11:02:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S/Zpu2Ji20UJv5QRLP1AuqTiylkdvg/IQEnLVvU2sfLemefeib1rqgwJgiDnmvKbrRAqXy0Amyq4l6N43mRZ1a5wGbxfPygtZDX/jJim0VVj394HVyMNLI6jcROFuDuCJlQMgMO8uooQ3nA8QYvseBVuIPS6LdLsNtcz2PyIf+ZFH5GWr/8FIcMd9Qpsm+UGCijmmsH+B8SV6vNxwvV4+UvyP1zVcwmJRRULnm0wUww12Oa4LEjcAF91+GuQnI4VL0CvVdS3HVYBid62X6/SFtkiDDwPbh7tUG+raB5eN7rVSykgXeLe0NYQbaXiu5eHy1MRv5W8kVVRGMmA9OZhSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tGmPW8MhjYS06UjczvfQLAARh9ju46JuP3AOalJpBEw=; b=H2SPHttlWIY3kHdcdEzy5uuRCXDxBA5D9FGuN7ZwhPjz9CFT/8ebCvFwB7qSO3zTlEYXg14eOgk/6hnm4bfpI2gL6H7rVh8bQdT7XPPVghhtEKPLVn//om3d/9MLWbqMmLhDue4wm2ZjBZyNiUto+7/NXM9gp0ecQoCoH8o5nIZ26VPqlDUHdadTj53idkWQ/fOo6O4Su+6KRSRECJbXdlfWML87E1CT8u8fjhUwL5Gv6rTuHEQYyNxBrIM/qF77Ks5nJsl23GHod170flE57GnemeodVfYOcPBQtOuM0cmkpbug8389cBDMoLa0d0C/hqmYtM2DSvaHKB7RkdS0QA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tGmPW8MhjYS06UjczvfQLAARh9ju46JuP3AOalJpBEw=; b=h2EYsxEJdNFcO2bAoTd5e9xYiZGY47p/kyji6YicHAYE0yG9brXtWsVkbNNcdQpbaDk8thGJ+F/4IPB52zuNuDp3NhLsj04Lj+VmZDk5+CqENkpSfYapudrCCN4gHdgeaErO2yaFeOH0KDm+7n2jhRifQOeRaiU1A6PpaXq+cAc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by AM7PR04MB6853.eurprd04.prod.outlook.com (2603:10a6:20b:107::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Tue, 19 Dec 2023 11:02:28 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dd33:f07:7cfd:afa4]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dd33:f07:7cfd:afa4%7]) with mapi id 15.20.7091.034; Tue, 19 Dec 2023 11:02:28 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Randy Dunlap , Tony Nguyen , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Magnus Karlsson , Maciej Fijalkowski , Jonathan Lemon , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Larysa Zaremba Subject: [PATCH net-next] xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS Date: Tue, 19 Dec 2023 13:02:05 +0200 Message-Id: <20231219110205.1289506-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM0PR04CA0095.eurprd04.prod.outlook.com (2603:10a6:208:be::36) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|AM7PR04MB6853:EE_ X-MS-Office365-Filtering-Correlation-Id: 221647b1-c994-4b8d-7415-08dc0081fd34 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EfCch/Mrd48Bv3baO+66kITJHG+nk8TXZLDSFrvftWuHJgBw2uf+zwbgvxlHpAfjCx12qm55qymD1d5sC5Iv0ywd5Qme2lTcuehRuMHBpHRYKuoXAFSNk7WGNb9L8zf2mpvvKCRUrxI2fWcwfcdj0v71aLX1+xd4+nFlmrlrSEZ3wpdxrf2UP3Zl1aUToJZQkHTyTFB21ENcdzX2FDXvShSuunJ11Nq74ZtOytM7yFn3DO9LmRHPQ5Dlv8EOrGqbbwYH+1yJg0P+ynt9RXK1yJZmrGLa1XKH8Rx1sIE7gDjo+4mVtnMOGI39d6UySUp6Wf7GA+DyM53SSNzO2KZrdXVhAJaPY+fP72Lfha31QURMgyOT/3kn8JMNh5zbltz3FDSST1VGeYy4Otw7Cic6ysM+E5kqKmK7gUcn0Dy6opa2cnQ9ldy4LzlkP8KFnnAi1ELYGqwHxDv2PTSiwHwAKMxif33m4R/DHbsU3ycGNqQwDPY720WpRLYVKeKpJfESgzwA1vpKAhZ+x2j9qaAOMMuEesDeX0vksyBPgOIvm/Ti9PqOUyhcXniee2NR8yr6xBjX8hGM6+jTAa2VhtkVsM4vINPKbxtFaBfKUmHgBEI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(376002)(396003)(346002)(366004)(39860400002)(230922051799003)(186009)(64100799003)(1800799012)(451199024)(38350700005)(86362001)(36756003)(38100700002)(83380400001)(26005)(52116002)(2616005)(1076003)(478600001)(6486002)(6916009)(66476007)(66556008)(966005)(2906002)(6666004)(54906003)(6512007)(6506007)(4326008)(8936002)(66946007)(316002)(8676002)(44832011)(7416002)(5660300002)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?zpFIn5TdmqYRwQx2VWZDwFa0z6o3TterblzuFOxE+QBpkJXuSCGCqQXem+uA?= =?us-ascii?Q?0nIOqa/H5jtwLg4N7BraDQmvlii55fdURFjih2AcZEDlvpXm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dS+/KF7xMLxFjpW0x6fypFBodYTDhb77vmfVy?= =?us-ascii?Q?X1FEji538bH1j+DcKbL39siiJ+HOjsVZUoKEWYjBtFSfG3KGiFDibWhGiGo7?= =?us-ascii?Q?dPpd3jspOrZ7EcZcxLFE3zEyLM+cF+0WLHjiBJdxtUeI7x6Mol5BFG9PLYli?= =?us-ascii?Q?W4yKqKnybrxJZkQA5aDTbrSN4whX8VdR0S0SVuomDz4xbK6GWV+xj2EMGhPT?= =?us-ascii?Q?xtrAQ2ez59F7CzdJABQ3DSnrAjNhSmcQB2rwzhtgEYvSou6UodgjD52pGAfj?= =?us-ascii?Q?GNsWzTSLzrHQS+2SjCWBd2LkS59ZiDmdntuy2Eo73tyLr/NbhIPEGTUIDrmo?= =?us-ascii?Q?hgOBKbRCGMMlQFjx1r9L2dAZJd7hwkz83X6OnJa3U3rdPkz1fcCOFwxaKsjN?= =?us-ascii?Q?qYZ8ll1OTtBryP5buy9CI5txY+tdYHT49Gi+awv9/s9RyNOqLDYXRNoJHbgy?= =?us-ascii?Q?o1U3dsG+3pgj3aQzYPHXez6VC/xvxVufknzr2oo7AhTbqpMhS7/oZY0zxO02?= =?us-ascii?Q?j9HzCeFx34TQpZHnij8Q0aa3p+Y3OBYWNLCodo1sM2TUzTK7nb+L8S8Y0UpM?= =?us-ascii?Q?w4nRMRie+5mlNGg8ffbN8+p5eYP2it2pymbhgkF8LQ4hfLo/L/yui2nsOogz?= =?us-ascii?Q?nw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 221647b1-c994-4b8d-7415-08dc0081fd34 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 11:02:28.0762 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: T4OalOmGZHKAKuX+JCiE+Bn+v3OirmBVQdy+geYSeNdWZQxeBSe3W4sVX7g4fyYUrIGOKRrwYDuy6iiVQp1dCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6853 The ice driver fails to build when CONFIG_XDP_SOCKETS is disabled. drivers/net/ethernet/intel/ice/ice_base.c:533:21: error: variable has incomplete type 'struct xsk_cb_desc' struct xsk_cb_desc desc = {}; ^ include/net/xsk_buff_pool.h:15:8: note: forward declaration of 'struct xsk_cb_desc' struct xsk_cb_desc; ^ Fixes: d68d707dcbbf ("ice: Support XDP hints in AF_XDP ZC mode") Closes: https://lore.kernel.org/netdev/8b76dad3-8847-475b-aa17-613c9c978f7a@infradead.org/ Signed-off-by: Vladimir Oltean --- Posting to net-next since this tree is broken at this stage, not only bpf-next. include/net/xdp_sock_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/xdp_sock_drv.h b/include/net/xdp_sock_drv.h index b62bb8525a5f..526c1e7f505e 100644 --- a/include/net/xdp_sock_drv.h +++ b/include/net/xdp_sock_drv.h @@ -12,14 +12,14 @@ #define XDP_UMEM_MIN_CHUNK_SHIFT 11 #define XDP_UMEM_MIN_CHUNK_SIZE (1 << XDP_UMEM_MIN_CHUNK_SHIFT) -#ifdef CONFIG_XDP_SOCKETS - struct xsk_cb_desc { void *src; u8 off; u8 bytes; }; +#ifdef CONFIG_XDP_SOCKETS + void xsk_tx_completed(struct xsk_buff_pool *pool, u32 nb_entries); bool xsk_tx_peek_desc(struct xsk_buff_pool *pool, struct xdp_desc *desc); u32 xsk_tx_peek_release_desc_batch(struct xsk_buff_pool *pool, u32 max); -- 2.34.1