From patchwork Thu Sep 19 08:41:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Fang X-Patchwork-Id: 13807524 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010071.outbound.protection.outlook.com [52.101.69.71]) (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 9EFB81991D7; Thu, 19 Sep 2024 08:56:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.71 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726736187; cv=fail; b=NtxQ3b+MqkQgHPq5iZZygYf40nFUXQ+HVxM2JDR73eAblCWz8BevcdwJYHLkr5sTX89cgrpKE3GYQhx99lqvJSeMjUZOP467NEFyQGcbfKMNq/9sOZBQguPQR5YQXtT3xHPX+XfU8535HMW5K1I/dAg2Ee+zPWJYFLjw+RinZIo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726736187; c=relaxed/simple; bh=aBK5W1y0Eh0vIXTcTK9dHQX6NfM/iSqh53uLVQK5Wmk=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=Cy9M0+E43yC3wKrCyOwvi631whkWr1sos3mPX5/QGeFCPlVqCnvxkmAXlK4HSkJCNAgEL89G5uqIJycpvjwg0ns8W75eqfyb2otpb4eVf0bAqHAAuDhANPz+5wYRX3WPxFUWP5nPLRd+1KszXzaq34IDs76JnupUzqnuAqfZXIE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Hy0d2W9R; arc=fail smtp.client-ip=52.101.69.71 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Hy0d2W9R" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cXQJvpgvtBsUAQvehHTw5VM1i2SCfbIsTPytxP6DmAe6mttKZvRcCCtj+4VI6J+3ztG5Twd8f/bGU4DXigxGEge6VKh0z0l2Yvdg0wxhkO3mU4cuWklSIq7NvIWyAYcitO1rgAMzrRs0yGSe/1jLbEvwD5N+gw4ayYAkMGvgMF/w567E6tIREnKKRY64ZfMa8nw+V1JaKftM86/T3BdA1cala4f8rohcWvv94/gtAuYB3AOiSEILMkJ4j/F6NobRHK3N5iCLurJEYKtlREwCMu87TPfo5Y0K319nRTRHIzdSq0mK/m2JCq+ucLv7m8TARs8rECcSOuuw8CswbAF46Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=M4l/oeTuTU9yGCxRBJaQwH6I+1YI4dIFPi3rZBGvhYM=; b=WuQySajEJG8vXYkVXQZmID9RRIPNL7fO9wrpZNT6O/8ObdqHIwFRerXiB7AHfHISuT0NHMJj/PbRamV4LYfv2EMzJK4NXxk8RZaXK0kgwwBeyLr5N3GT5IQdv7pXY/5qfN2usc9DrREaGy1skiGxRr0QBUGi3P5P7GE5z7PDIFsqvDnzgzERCnd/ekHZna3yglcXTLXHWZHUK0hG2JEaedSBpeaLcM4RoFaZ1dQdrAj7uMecefePzqg4FWTFNGAqUw3Y0vZ2K67J9TQLtMEFjYNLrIf67t44fb2oghHN4/9d1JvTUBSNBAkTNyFI/wfbby1VSvkgCrHtlmKP6cuErg== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M4l/oeTuTU9yGCxRBJaQwH6I+1YI4dIFPi3rZBGvhYM=; b=Hy0d2W9RCCZ32sbaPUpVMFgHl+17vx0nezxh63Ckikqucnj96TXaSACC6VyCnXaL3g4YHF+Q5MjcP2/Md6McjwrlWYMqlGeFR5llE3GkcfyQSpyGVZiy9VuvepF4wP8xbevQNSKApOqD/K0pL9d0WyGFTVVtG3oMU/Py1K5vdLBq+SvsFn7WjEJ2+7wYX+uBeonfiOiaJHSivXCTxrJ0AvIW8DfhvDqAY59gfWfP07Q+tRO3qGIzEnl93ZtF5JLTL66nz670Z2HvhTmaVnMfkScu9ivggBkDkc+wHTPDjS906einAGA5ZC8FE/cVuYa4lUTjwnjPpLaPLbyvSj2GLQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7) by GV1PR04MB10242.eurprd04.prod.outlook.com (2603:10a6:150:1a8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.16; Thu, 19 Sep 2024 08:56:16 +0000 Received: from PAXPR04MB8510.eurprd04.prod.outlook.com ([fe80::a7c2:e2fa:8e04:40db]) by PAXPR04MB8510.eurprd04.prod.outlook.com ([fe80::a7c2:e2fa:8e04:40db%6]) with mapi id 15.20.7918.024; Thu, 19 Sep 2024 08:56:16 +0000 From: Wei Fang To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, claudiu.manoil@nxp.com, vladimir.oltean@nxp.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, stable@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH net 0/3] net: enetc: fix some issues of XDP Date: Thu, 19 Sep 2024 16:41:01 +0800 Message-Id: <20240919084104.661180-1-wei.fang@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SI1PR02CA0005.apcprd02.prod.outlook.com (2603:1096:4:1f7::13) To PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7) Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8510:EE_|GV1PR04MB10242:EE_ X-MS-Office365-Filtering-Correlation-Id: ba383c92-edc2-4f51-c517-08dcd888eb76 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|366016|1800799024|7416014|38350700014|921020; X-Microsoft-Antispam-Message-Info: G5sXKS9XtGKIbDUqCVfwlUbrpO9JzWUUwMtlcmXI7nXq6/13ROmafmTmnR6pHRk0E+kiWzEUCA4f97XcCKnEA+CaqOWKr8I7ewOU2wDn64zt+jWVphy2/vtFvOEGEmFCCR99CLys/7Z8CJCuFoKa8CeJimreluKJAKu+oe01viuK5WfbaWpS8pVFEnpKYVtDqtUQsSzbbQ6GEVDNSIu31O6luFL6EaX5YBfphsJDlfpOJaRvQ9nqd8j3osS+D49j39t0Z+XpkmKuO3wvbjx4TQIkgaBtqG//u6zHVQD4vnQTQw4kfJaBlYT0uZCJSvMR4vUQlUmNlC/JNiOsa/1mUBpbChvBhJZ/ci2cWlLmpBcIpUbDwoS1/0rtpIvlMmq1EDFW5O5jyxHja9C+GxnLiAIDUdiku6KRGeprfJ6iaAznY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V:NLI;SFV:NSPM;H:PAXPR04MB8510.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(366016)(1800799024)(7416014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xf7kwOEy0rlpgWkLNYrHYyjZN4OJaeHHHqw9dYr8iFi5r5MaJN81wOkHIcJ8HLl5AiteOW8059tOjuBbELGX6/sjgIRmUhToJRCcLG92ZF2iV6rsOBH/XZ+3sxTYU4fAvSEJr1sDeYLc5GMiyvXxrvHRZDcmorWLSlQ+at+NjoLeCfhA12r61byxYDXtg3k0MSOSeqjtXe0NPQO4dVJYmCN6eZgvPc82RHl+nYTfbs3m18u3RDuhLeZxmaaalas47Ng0CS159WRgyxS9bxYyw5FoAikIP2rz9Pj0nzBbzjfgE+OXagNKyfMFJEn3YAfMJekK35JNRxKLalxCjT+YZkb4hSXCQ/34gtFbGfw0E+GkSWSJxhdK4dCk2HWCWgVNwrZZM87w3OZoh2pWPqqdvQwl1T9jgpL5quT4A1x0yZ3c+KPdlB/MLX0w6QG5OJ7ZyIPLRfl1uvfp1Vmb9k4664xCh9xlFbqad0hgeg/Exp0v8BnRvkcpjqaS79Cmd/48WVhZUNp/JiLN6HYGqMweye9ZkVhcARCjHsMBmz7Ux3Op6RcbxeJQMcy1TbJy5xxtK3BolTDu5kbfQtFyazfCX+x2YxHPm0aS2hKC1/+kvvlnOofAv0MSKGT6PP/+wHdtKD2SQvgAtPyWjdBDirsK+w4OVeN11xHwwt3AY2UcWfi7QHgD2gXdxNEBY3qF2z/JjJVrAm2YOT2uam44/Y3P0PKF6I0Ob8JfrmGvHAcz6DGHInjg2z6xpXBBy7YtI9j4hG9qUHgIk03y9QFY1W3KM+1hVjsC830ySQ8UVLFQDkSTJIlqkeCM1xx+j4F+kzo4ta4EXfxjTKmU1NuOoTbxx8cpaU5rfS7L41PRote5Rw6BEfyYvntxdYeXX9/E3ZLHaR0q2RMd9riwlCGDw1VG5W3fjj0zHfU4UMB1yJX5+hDaeWHp7weJEZKfWyDMhEfCEAgxZtA8TFN7LBysd0D1N0eYVQW7M+cYLdHXmPG+AIjuBQiomd2vVHlUBo26W1BukGoUImsxCVfhbanKLc0ZSgTkpiBJUIa8x33ALdGMGk0AirJ0lToV7r6nwuTByJ8gMU3FPyGeRE1HpmAj6fdxFuffwF0iLUXxTOrBlOIp6zgRqQ9WFeqwEt3LUKOsN9hBYQoGLZLwREoVY7XdKspB5PbppBs/GraT/54U2k39nFp0NJ56nBw2ZAXaMXugiIFUabr/DMMGtNY0EnvJVjR8XzJ3MBoqiGNkHlChJddewR3KYgukeGW1A7J0hc/VkSKFaWHvfaT14dWj03bdeUHKNFhYYVtftwlfFoBhKGan7Iom29glLqfdfKFkobXBz3uwmSEAaqpk3aCEBdgLkLCZP56+wRwqToGvR7yPdiG7wLkF6XG5hASTsNNgvm3v50UM//6EDH4DR9rPDSU78PzqOW74KVcK4/WNZiDRd19y/v5aRLyzQthviaYvxJoDvqirsgKvNbBo45RVHkC0gAOd5yWJSGicYNYkiocHcM6W1FZdih0CdaAYhaw9yaYQllebET2pUNqakNv581zXFHDXRIDKayTm9+XxkechvUkUHGF1xgPpINFOSPPAN/e0FWS5 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba383c92-edc2-4f51-c517-08dcd888eb76 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8510.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2024 08:56:16.0853 (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: TDFrfL8jpDLhg8d6Gdak1fvxD9RCZZnHMbcY5LTeAjLkPBVHQwF91CNu2uu5h78Yx6Dco0Uq1IkJX0tIYAI2zA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10242 X-Patchwork-Delegate: kuba@kernel.org We found some bugs when testing the XDP function of enetc driver, and these bugs are easy to reproduce. This is not only causes XDP to not work, but also the network cannot be restored after exiting the XDP program. So the patch set is mainly to fix these bugs. For details, please see the commit message of each patch. Wei Fang (3): net: enetc: remove xdp_drops statistic from enetc_xdp_drop() net: enetc: fix the issues of XDP_REDIRECT feature net: enetc: reset xdp_tx_in_flight when updating bpf program drivers/net/ethernet/freescale/enetc/enetc.c | 46 +++++++++++++++----- drivers/net/ethernet/freescale/enetc/enetc.h | 1 + 2 files changed, 37 insertions(+), 10 deletions(-)