From patchwork Thu Aug 10 06:45:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Fang X-Patchwork-Id: 13437 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp262211vqi; Thu, 10 Aug 2023 01:11:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFDoJ834770bj9R8hFvv5l9pLXAoVj9oHiMkbgxRjAh3Nqv8MM07+R2PYhsdNASmhXCtSo7 X-Received: by 2002:a2e:920a:0:b0:2b9:aa4d:3728 with SMTP id k10-20020a2e920a000000b002b9aa4d3728mr1295795ljg.29.1691655103652; Thu, 10 Aug 2023 01:11:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1691655103; cv=pass; d=google.com; s=arc-20160816; b=TIitsP+b6Y4AdDs6yCEKW9eqPOBqpm1IzVDKi1L9gvAyQOfYeWn0Dx9d6NEV+DJSOp k2q1JMxjBCR90TSS7ggCPYdXip34AJ2W6U1ZwvGvYxwZNjEW8Ys46DifNxG9WiW0y8qH uNcW7xRVgByoKMWA8ZJGa8FMrQbSpd7ylcAi9RDuRdbbtWHoyoDRlnnnOk47yZYmSujH jchSZjKVE+x5J4ywxbrJX58cXASXfNhejwVvbrY97s0viLkCqUj/idu/hvk1fDF/im6E nlm/yxhzEZd1sXzMwfOENjtdX9DRociW2eK+MrC+sJIBdGsfeG8agkSragnpM7u0hxoG Q2/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=zVMDJTUNkclaZdJKjRcMIpnLtVggIYl/ZFwnYclK0f8=; fh=dl6FyqL6TYtfE7AiAkpJaBqjuxtgSitMtd4JQ2RJiQQ=; b=Avti18wjjnKbNir9OxIeqMskgCuwP82lrgTEOnNH4zAPDKIlBc7ugXaHPx5UB0Oszx 1ZOrJqfJF5BpkqABgXbW4IgxhXWJS8xJ8x13FNiq2WtR1Vj/XTEyurlbGR/8uIboDAnz 7YY8iIBwY6AHh78KoDZ9QbkmEIqc1W1ksU19LyB86KYhsCyKUnVjePY7zSBo3P5usVaE zWolwHdCU8c7kmvnZB5SnfEMKHTjhNkDuu16ZcKu6TDPZdA4EvmMu9gwyNRZeLcUg7a8 uGqDFVEQKVds1w5rTpp/tV0LdneRt4A8iyaJGsmwQ9CChwOGW0Z4Kk133E9i0Dy0t/xB BkZw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="LR0EK/+x"; 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-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz18-20020a170906cd1200b00993321873fesi959914ejb.665.2023.08.10.01.11.19; Thu, 10 Aug 2023 01:11:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="LR0EK/+x"; 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-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231451AbjHJGw3 (ORCPT + 99 others); Thu, 10 Aug 2023 02:52:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231147AbjHJGw1 (ORCPT ); Thu, 10 Aug 2023 02:52:27 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2045.outbound.protection.outlook.com [40.107.21.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94092E69; Wed, 9 Aug 2023 23:52:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YaisepM5pftXHdPiIdVlfnMFuT4LMN+DhXboYy/ZCUdL/gsr3tBrs0Xvol9mwTv0/3ON6i8asjlA8Xch/7Ej9yvf2kaFgYKs0o2i7iFdZkJrrF0r6s8xl06GdmKRYQA7Z6ru58KxhP3xhhrd2FUl+4Rz9IcOwBynH2D8n4Wet5Omsh5rL8aJROYY5vHjIp+TJ2XbnPwhP80N9Cvuau86wX3zb9piiQTtLPQFaYlU3wW1xRosn9ZG+hNgIuVRH7R58MaZGj0CgpAuyAijivTtzZGOXEkHupNBaA1lxzbFo6J1yvpZq9+Qtc8pSwv+0N/V2YjFK48U8D2idwcUyAwiFg== 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=zVMDJTUNkclaZdJKjRcMIpnLtVggIYl/ZFwnYclK0f8=; b=ZANNwyh+nHpewDosCGBNTgVb/eAr6nH9O1PeL05Oeay7UN2R6hvddCrndpz+G+XVl/zFijZS6HfPaszLOQ+xkuWpFf0+mMSYTLPuT97mA+9ewqHTnK0m4p44Lg06lywzbBRuN9HyCe3l8+fXkGegtAb0nhKyl4hRdLSv+sQsRMc+IpjdZ0v5aJZDfaf1q7E403402r7/qdWMrJbvT9a6QG5BTH63yQfKkFfBryquVhnRbFpXKoy7HO0DI19/XF5ETS8+zveqPizCM9X1M+MaQSiLcugZOwdpo7KftcrtcPutCFdGetFQiLpJsXqdgzvZXgKuTYyNM8Xe0YhWsfhaLg== 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=zVMDJTUNkclaZdJKjRcMIpnLtVggIYl/ZFwnYclK0f8=; b=LR0EK/+xA+drlwHrriD7okCJRjnfGK+Ywrs1ryAmtzGTJrFjGz47SdQLLn5cidKwLQKB/3LBfImUwcr5N5nNhQgnmXN4ZELD4yThLtyi/oI0qahkg/TlD8Ky+MDZx+Mq1gqVXDYJadVjEghfmaE8h+cRsOkvXMqfrcoTcXtapWk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB6PR04MB3141.eurprd04.prod.outlook.com (2603:10a6:6:c::21) by VI1PR04MB9761.eurprd04.prod.outlook.com (2603:10a6:800:1df::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Thu, 10 Aug 2023 06:52:23 +0000 Received: from DB6PR04MB3141.eurprd04.prod.outlook.com ([fe80::3203:2dba:b6f5:9104]) by DB6PR04MB3141.eurprd04.prod.outlook.com ([fe80::3203:2dba:b6f5:9104%5]) with mapi id 15.20.6652.029; Thu, 10 Aug 2023 06:52:23 +0000 From: Wei Fang To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, shenwei.wang@nxp.com, xiaoning.wang@nxp.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, larysa.zaremba@intel.com, aleksander.lobakin@intel.com, jbrouer@redhat.com, netdev@vger.kernel.org Cc: linux-imx@nxp.com, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH V5 net-next 0/2] net: fec: add XDP_TX feature support Date: Thu, 10 Aug 2023 14:45:12 +0800 Message-Id: <20230810064514.104470-1-wei.fang@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SI2PR01CA0002.apcprd01.prod.exchangelabs.com (2603:1096:4:191::21) To DB6PR04MB3141.eurprd04.prod.outlook.com (2603:10a6:6:c::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB6PR04MB3141:EE_|VI1PR04MB9761:EE_ X-MS-Office365-Filtering-Correlation-Id: 99d5b2ea-07aa-409d-74f1-08db996e598c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bkXmA6M1DeJO56lYYzKqgl2SHC6dbV5EkWcvz12jMGlCZT0aq01XB1La7uwL7SiBohxRvK4NTnoSgr9Xp8wzG8YwGoBqMRyLpghqYk4L65LWvjVS9ux1JhdQkm/3rZaIqxISZ4qLo4IHxtxRli+pWsMmUU6qB5Wwe/sV08rlwjLl/Hpll3S9nCBSKWjWAqiouAJCLNRwZ3lHEhKq7p4ikrRY7hM5AWCyh6k27AWFZQHc9Gajt89A+4JDmYICYqHhEgpurWvnY4YOCDcEc9focCscbvAWSqo9iadBZq/cB2JIePIXEtB3Nes30YYXEGeiNPitwgnsaLJxOWVRNhOztSD5pwJGJQBGaBFQXfWWJdtbkX9JQxPXdZy4hQTcLtpursYA3zbrq2rMPG6jHJyDKseKAOPny3HenS/Mw83AQSyXBJJMX9Sv/OsWVBOsqsTuSy7qoUYTF78ImTWvV/3tzAy8kruA1f9Q75XmfM1BqLo++00HtM1HKtWhNZA6CAH8K8WVG6aRcJrvchclBFyXSr6EoZbsyNeh7ThLYiMKAv5Huvu47gsen4wLi3JR7V7zxWg50MDJ9lbT6yGRUaHPhwRFcykom2nlRK+uO7vKRZ2YSyvY2oxziyJZmGXkcQ4m X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB6PR04MB3141.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(366004)(396003)(376002)(346002)(136003)(451199021)(186006)(1800799006)(86362001)(2906002)(36756003)(7416002)(4744005)(44832011)(478600001)(66476007)(83380400001)(2616005)(26005)(6506007)(1076003)(38350700002)(6666004)(52116002)(6512007)(38100700002)(6486002)(8936002)(8676002)(66946007)(4326008)(5660300002)(41300700001)(921005)(316002)(66556008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 19vS72k/bVLy/pLkJ0/sS53L6Q6qJtterrA4dQl9twdzGm2pQd4DXM1DaL9hSrqeXRVhsCSdqr6wLiVE+bApjddoWJgsAz+o1vLierL596LtoRoWFnkfcT9EoAYwWthT49+IYTJNrpWQZYq+U5D2oJ2pLHmFMHlnmy0UrQBLhzwWBwrhj4FUsKnt56aFOU5jcc76eh8BReNuBHyfzRNFB2cpk/sBDJA0Wpl0S6TKgzt4WYMQZqV8p+fwSaYZOSOcMG7FKmNi4Jaylo3uCeZDrIc+FzFXH2du7Gj5nyOoYK/ctUwoB23W5SXbVfLOWe76xr3cGbO9G0Z4Dr9Q1ae6YFWTKlLjtlwGQcqKO/3hLO7Jg3H7YXSOejfdPI5uD92gZxURvsPLOmnQXWdR+90GkqwaEZ8J+pvZ+jrKxY3Jzwobqncg8OmosHedfjMuB6z4Y0ZPTcAnKZLfY0efmbvvFz+cven/zH3KwnHWOApV+CG73dXkuClTeiw3FrJVaP+QGIESSzDUB2FsVs7/nnGtdE1RyF48Q3J3ero7gN3VscEQ6wxyEBOWqS3GAUwGo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f1-08db996e598c X-MS-Exchange-CrossTenant-AuthSource: DB6PR04MB3141.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2023 06:52:23.7004 (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: rVx1Jep5W3wRlh6hrVkr8EnBCEv7HU8kwCYwKOySiqAlWLqM5lcfvop1fZ3jb6wJMYiXeO76ZwbK8seSsuTpAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB9761 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773827135992823561 X-GMAIL-MSGID: 1773828942322497592 This patch set is to support the XDP_TX feature of FEC driver, the first patch is add initial XDP_TX support, and the second patch improves the performance of XDP_TX by not using xdp_convert_buff_to_frame(). Please refer to the commit message of each patch for more details. Wei Fang (2): net: fec: add XDP_TX feature support net: fec: improve XDP_TX performance drivers/net/ethernet/freescale/fec.h | 6 +- drivers/net/ethernet/freescale/fec_main.c | 184 +++++++++++++++------- 2 files changed, 130 insertions(+), 60 deletions(-)