From nobody Sat Nov 23 14:10:54 2024 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2062.outbound.protection.outlook.com [40.107.105.62]) (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 A38FD19C558; Tue, 19 Nov 2024 08:40:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732005604; cv=fail; b=exM5dLl1xJOT9ONGaGTQUZQbJtFpAWj1CRg9SWVaYYXf5Cqhsasp2U53A+ham+K/VvK1zFU/sI9dwsiJkOzwKxaUkMrwFZrbxzhyb/xW5JBzb2TEYm06h10XvLPlIbnUevNW9MN+9Wa8Xmk/hTtspYT1NHzOrDJ8gn+Ru5ZfFCE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732005604; c=relaxed/simple; bh=Kve0H5+o37kDdj12/XZbbiAVDS9NZyL01nZ2uyO52Hk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=dkiUGXkSpQcGA8+I49yRAARUwpQRYh6o1ioUSnRxOR9fAgUwNJ1Pgv4SohWyXlMJGkceAWWJ3COMHpnbBapRBb3K00QZJYnQxfbiDH99awnEqSUBTAR8YEtnQyRuUf3BRIKvlMkTWHFaUskS3aSda1/KkRQePM5dOIo4aDStVOY= 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=ETwhfEtp; arc=fail smtp.client-ip=40.107.105.62 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="ETwhfEtp" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iWC7WeXmswOUe6AVklTjcsN9J6UbCyzTZlTxzO6Fy4Xk3E1j0axeRowTZQWWTBwvrxJ3rE5y2k7l9BQAimcCeZ3lqXwzn5mmCwi3AHOpq1lnU1vqjBXKnM/8rj0X/iYpxGxC54Vnd2NaqcxN9zdY1lMLffQvl1oCcqMQYs8Aaf9RFmwuCGylgK3+YOsIEdQ0d7rpye14PO2WZLu6nN2joWGn1iuG5vfsGdmr7eiYXJkyYRIB+JsvYLzyYMaghJ9590p7plJ3gcbRQh5ILwth/ZZ+GQKQsv0tifpPQVwoTkw2COzEqPq/wJbQcjwfbX3mZ4EiIl+wO/L1BM2dL1hIUw== 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=uWi/3hfJJLhdUExR37GH35NJkVcvWklV8n+CoIbZYbE=; b=QPUjZjX8Mw4KTSvn1jtw6uFuV4EFHJuDnKnBfR8Naf2IjQ0rSh2WxAaT5RHS5XDFVeATWPtqWtYpTApBfHU/ZdOblcncoZ/hNRYRbD+JutkiqILR6XoCasgaBnN6fpFQoaxsvDJ2SZeAGBjPS9+rxVvqV4yaTD/pYrMS3ozTcZzCzDLqbjlE9n5N2h0XkbfDxvhZiSPmKjBUl7ZZtTvryu1DeHadgOTfSRqtkfFSRRPVF94dRAwsNBCPiOeFfwufSxeZSAWxO+ClAFxh4ckpufg711fqYFeyKPbYGp6/PrmfBvhQLsL46PhzOSgqDzFMS5sZDJqqnKwM4zhBlzEYvA== 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=uWi/3hfJJLhdUExR37GH35NJkVcvWklV8n+CoIbZYbE=; b=ETwhfEtp7o4GaARz8ur+o4maT2jTGkuZ754nzphPdTe+/ZYuNb7J5aoOa71VemrIr9K/140/yShVY0teM8lYRcKY3ci17H0zcuLSLgOmrMFUIRxN5dwdGxjff5k/cW77psAQbI8r7Q+d6d0pa9CASPOidOEEKjXwuaJHSmctT3jPuIb5Az2Uv7Ffa43DQDbaNrbu10/v92CVxY/ABpcRCt9WHyqJkf1KZh6D7dZxEWAGGINwer3O5And7unPQaE33nfdyFDbBQr87kCD73PI34To+5UH00AcNUmsxLwgvoKWd4Sw6chXn7HEKV5xmSYyLZljNy8VcZCyp6+teOn89g== 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 VI2PR04MB10266.eurprd04.prod.outlook.com (2603:10a6:800:22b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.23; Tue, 19 Nov 2024 08:39:59 +0000 Received: from PAXPR04MB8510.eurprd04.prod.outlook.com ([fe80::a7c2:e2fa:8e04:40db]) by PAXPR04MB8510.eurprd04.prod.outlook.com ([fe80::a7c2:e2fa:8e04:40db%7]) with mapi id 15.20.8158.023; Tue, 19 Nov 2024 08:39:58 +0000 From: Wei Fang To: claudiu.manoil@nxp.com, vladimir.oltean@nxp.com, xiaoning.wang@nxp.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, frank.li@nxp.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH v6 net-next 5/5] net: enetc: add UDP segmentation offload support Date: Tue, 19 Nov 2024 16:23:44 +0800 Message-Id: <20241119082344.2022830-6-wei.fang@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241119082344.2022830-1-wei.fang@nxp.com> References: <20241119082344.2022830-1-wei.fang@nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SI2P153CA0019.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::10) To PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7) 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: PAXPR04MB8510:EE_|VI2PR04MB10266:EE_ X-MS-Office365-Filtering-Correlation-Id: 6539f024-7d6e-4dbd-cbd6-08dd0875c054 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?9ndT0OOpIa9fYBnGjwqQd1eFvYYaVHCDhgxpopQrM3gw70ZH1BRBjniF8MpG?= =?us-ascii?Q?urzLb8+BSwB5psVltNChDew+0nmQjmDdURFwLH74QLQaKOIdpK3yaIuk09o5?= =?us-ascii?Q?PuD9J31RuDQUIWoNmvHvp6CN8zg+k4lhAEpekk/sFZdwwoVnIwnSk8G2Inuu?= =?us-ascii?Q?8upkymqF9vKSYqtpJaP0KctC5RIPVLSubjNnMhVIpdmNxeV3sS37+f/RfK4H?= =?us-ascii?Q?nqsH9zdsUoOCtA64fmsn9TofQWFzhr9/vpur7qRz3HMa5lZ2ll5+EzJFoRrl?= =?us-ascii?Q?ZTvv8v80p87Ht2Y3qfhsOPPoFWKhOcogWmVcKEoAk7+ImRUbaRYe+DzHyFSL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oRJ5dMCHhfIjFich/kv?= =?us-ascii?Q?uE3tOcr4o9svmN0t1Yh8taHzcweoPQjZwdZxhYw8P8itvtebNx7B8ead8nRP?= =?us-ascii?Q?GFPb/reAhLmuI1sphSFVAma0QVggJiTzWpfiD3rlqClzDXtEwyPO1ML7W5G7?= =?us-ascii?Q?pxx4dyw=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8510.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?twsroAGYTMD85alJzc7pxILrmAq4XMdKFlS5dYlMrjTLnoQ+xoT+1rqsz9bK?= =?us-ascii?Q?0u7ikgjeuIwjrcif5m+CQjA1LGcJIlIjPlu5hnIcUQnd2W8Y+QjQHJ/6WVMm?= =?us-ascii?Q?FyFyjyVrFS4sInbLjcPl6nhdYL2JQdm5hwylgF99qLCK6wJRjlmG/6sciVUN?= =?us-ascii?Q?CQjPW8/EpE1YAs6i0zFQduVrpZjouDweY9s5k3sd3eoWT3uxd4H4jNqBbuMU?= =?us-ascii?Q?JcbP+RRH4aNBorTm1Xfqd3nBS3LtarB91r1hRT1VXXe1uhv5WAcRLYDcOb0j?= =?us-ascii?Q?rn7kTkP4oPJ5DrRt2cBVmdUT54scENHYT3OOFJiSwYPdHJfH9sbChh2gKlkS?= =?us-ascii?Q?bNQZDl4ISFXLiBAx8U6N46k3BMvVunSF+XBxrtGjih5y8a8ppi6hmY6gnW7R?= =?us-ascii?Q?Go4EWXLD4AXAiPKS8+Q4FimeXbfkkV4/FpVgYHMkrud5c53ckIFZ3yt7BKUS?= =?us-ascii?Q?3wFdpG8Fup8L16daG2+Ho7tIOSQYOoEHcswxM8gy5tQiruJNKNwY96ooKgXW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i16e70tQWbXzEhZh4GI?= =?us-ascii?Q?j6qYLRFUu3+T0tSbAznxOxmg/wKZkyuPOomka4wUIMTJ+jp1SgCVSPCq1fvO?= =?us-ascii?Q?r+bzI+MhwP1ydZrIbQkfgSHMG0YblixcxUtSWWO7UP7IYi0LF8AQPOJhWwy5?= =?us-ascii?Q?8odcITPSzgzAyB4YQ9C/IfsPuTpuUa3pAdHqIzvf?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6539f024-7d6e-4dbd-cbd6-08dd0875c054 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8510.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2024 08:39:58.9282 (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: zHL8V2r+qf8z3g0eoZ87+Ji9hoh/h4pMkNlPT7iytW4YW5kCMDtgDF/to2eUR3jR6oJE/mDdUoWRw5P+RwYxSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10266 Content-Type: text/plain; charset="utf-8" Set NETIF_F_GSO_UDP_L4 bit of hw_features and features because i.MX95 enetc and LS1028A driver implements UDP segmentation. - i.MX95 ENETC supports UDP segmentation via LSO. - LS1028A ENETC supports UDP segmentation since the commit 3d5b459ba0e3 ("net: tso: add UDP segmentation support"). Signed-off-by: Wei Fang Reviewed-by: Frank Li --- v2: rephrase the commit message v3: no changes v4: fix typo in commit message v5: no changes v6: no changes --- drivers/net/ethernet/freescale/enetc/enetc_pf_common.c | 6 ++++-- drivers/net/ethernet/freescale/enetc/enetc_vf.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c b/drive= rs/net/ethernet/freescale/enetc/enetc_pf_common.c index 82a67356abe4..76fc3c6fdec1 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c @@ -110,11 +110,13 @@ void enetc_pf_netdev_setup(struct enetc_si *si, struc= t net_device *ndev, ndev->hw_features =3D NETIF_F_SG | NETIF_F_RXCSUM | NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_LOOPBACK | - NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6; + NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6 | + NETIF_F_GSO_UDP_L4; ndev->features =3D NETIF_F_HIGHDMA | NETIF_F_SG | NETIF_F_RXCSUM | NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX | - NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6; + NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6 | + NETIF_F_GSO_UDP_L4; ndev->vlan_features =3D NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6; =20 diff --git a/drivers/net/ethernet/freescale/enetc/enetc_vf.c b/drivers/net/= ethernet/freescale/enetc/enetc_vf.c index 052833acd220..ba71c04994c4 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_vf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_vf.c @@ -138,11 +138,13 @@ static void enetc_vf_netdev_setup(struct enetc_si *si= , struct net_device *ndev, ndev->hw_features =3D NETIF_F_SG | NETIF_F_RXCSUM | NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX | - NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6; + NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6 | + NETIF_F_GSO_UDP_L4; ndev->features =3D NETIF_F_HIGHDMA | NETIF_F_SG | NETIF_F_RXCSUM | NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX | - NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6; + NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6 | + NETIF_F_GSO_UDP_L4; ndev->vlan_features =3D NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_TSO | NETIF_F_TSO6; =20 --=20 2.34.1