[RFC,net-next,07/11] net: enetc: rename enetc_free_tx_frame() to enetc_free_tx_swbd()
Message ID | 20230206100837.451300-8-vladimir.oltean@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2151451wrn; Mon, 6 Feb 2023 02:12:17 -0800 (PST) X-Google-Smtp-Source: AK7set/w6khnn+Eww2NH9Yhg8c0+nGvhNpIRl1N6oqa1wCytr9JDFWxPXQU6sbfjGRqjAXmXZad8 X-Received: by 2002:a17:907:c14:b0:890:4731:d1bc with SMTP id ga20-20020a1709070c1400b008904731d1bcmr12557395ejc.38.1675678337748; Mon, 06 Feb 2023 02:12:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1675678337; cv=pass; d=google.com; s=arc-20160816; b=ln1lLe2s8hrKnRzyPWC7JJfD4/jbYYNLpeX4YZtZik725OuunVsjrq8/oAp5QBSXeX lD/RawZwL8O3PuYwd4zCJgsOBYDBOoNzGWF5keU1d+MV3nijsxm48lR5+0DbPfUmLRZ6 Hn6f5qeT4IlgJ0yeHd5OyWcHvoZCJHMdo6+ULuIBblRBaGPmGJz3W7o9Rh43Fx8bPypT DcivOsKJQUb1T1bVkmAmMn3cv3erwZPonh7K3ERN7VuWcHpTs96R3yrrKmtA8fkm6PyJ 3Ab0sbcwRiNhomtV0AY+ed7GykkxQVvJfAqVUuslfLY4ZuGl2LoHG6czNZntOZoGsQrc zKaQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8CjEZ3qPqjoAGnJWcglwbUA8p9Q13/ucOiN10ijM2Bs=; b=s+dRwP1bGec7rqUN8vkF3wpZ/Ttd8lyKSkSRfK80Q5mQTpc+eXdusESECC1L7CabT6 5FJ4yQQxNQNemuZ5WuL2GTQIUHAhyJOazFJmuE3FMso5syqeYqf9vtzZlJI3Ip/Kk5NH cJfuDhjPO/2pdxq9hmzXMllfK6tJwtZjWINZElBsrGwKXcP20Y3X7sk7Spn8utvRPcE+ u8XJarMgLaIgijM/cn7MMi0VhQqJx+t/EAHtoF1RLKRpxy8qFEuy/l3xZn3BUz0NLCUW E5WGM4p97tSqAS+2ctnbtKyWG59sjo0np1BAAnf/M2ru1LSmsuk1yh/cG+w0YXg/v9PU uRPA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=XWajIViR; 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 vz15-20020a17090704cf00b00889794debc4si11354286ejb.775.2023.02.06.02.11.55; Mon, 06 Feb 2023 02:12:17 -0800 (PST) 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=XWajIViR; 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 S230202AbjBFKJo (ORCPT <rfc822;kmanaouilinux@gmail.com> + 99 others); Mon, 6 Feb 2023 05:09:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229899AbjBFKJ0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 6 Feb 2023 05:09:26 -0500 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2076.outbound.protection.outlook.com [40.107.20.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 525C71043F; Mon, 6 Feb 2023 02:09:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ioCCbDBbEyu2x4T2FTHriSS3KgMiLSTFvdNBS4GTF4kdYfcu1NN3dRhcNDAlWXSAWBWgH1OEUxjWIhqYww/9ksx2gzIY6i86kGnoQTyeFOsWbsA33wBLfw/FvVhsrWREsN9e6Nv7o3xMwDiMk9W3OyZqfm2n/qu7WmiHCpHd9LqAIaTwmZR+HDHjxd7Pw5WVUAsb7z7VZOdb6KHH+qSZLCLRBPwR4/iJ33yXq1wSjdHjl8AfLD5VlzjV1yia1peMM8rnRTK5UVhQBU7vlCp7xoDEpoYyZPdjnPIIOb+pOXD7NaKhfarWQZ5Z8h/klZ6bnNFp+HoZmIAx95702wYI6A== 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=8CjEZ3qPqjoAGnJWcglwbUA8p9Q13/ucOiN10ijM2Bs=; b=ipH4ZqU2b03EPUTCmtV+fW9fZDpB/vdKSG7TmFQabVwCUwXo/wr/A85EpNHB6ELEu5gRmgrfO1c66WOqrSzTwDXUKjIS/WCzW007xxBBpBRa/BtBJNB1RGAEF9mSRf6a7cDUC9C0mUZJQ8dzwy5gtt2LRYwkI7OpxlQri/ghXYqWalTZLLHal+vGUO/vWQgUmouZ9wMiqfEkLGYxuS+N8V3n/JqOHoRC+Gp0wAGL7amttK6FaECwOewmxOBXluscOaV+5uCZRu8I5Ab93mo0j2Z0HO8NWdTR/jbZPIWkrFmKWpSg/VHuBnntLWqELcNFYbGsAF82RWUY8e+7GgGvTA== 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=8CjEZ3qPqjoAGnJWcglwbUA8p9Q13/ucOiN10ijM2Bs=; b=XWajIViRiu9cm6DS2OA0xo9P/7sZoBuD0HewQ+FulspW2vNDgZy8LNxsucDsWtjJ1by3biDHjNxCXVvin6vne7In9gDcjLFtlJVrSV3Bu91rNRpcWoi8gGGixezz3/AyHy+LJT/TKk3JWMgHgyrsUha00mgsvLpwClQ5kR/beo8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by AS8PR04MB7735.eurprd04.prod.outlook.com (2603:10a6:20b:2a5::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Mon, 6 Feb 2023 10:09:09 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b%5]) with mapi id 15.20.6064.034; Mon, 6 Feb 2023 10:09:09 +0000 From: Vladimir Oltean <vladimir.oltean@nxp.com> To: netdev@vger.kernel.org Cc: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Claudiu Manoil <claudiu.manoil@nxp.com>, =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= <bjorn@kernel.org>, Magnus Karlsson <magnus.karlsson@intel.com>, Maciej Fijalkowski <maciej.fijalkowski@intel.com>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, Jesper Dangaard Brouer <hawk@kernel.org>, John Fastabend <john.fastabend@gmail.com>, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH net-next 07/11] net: enetc: rename enetc_free_tx_frame() to enetc_free_tx_swbd() Date: Mon, 6 Feb 2023 12:08:33 +0200 Message-Id: <20230206100837.451300-8-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230206100837.451300-1-vladimir.oltean@nxp.com> References: <20230206100837.451300-1-vladimir.oltean@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AS4PR10CA0019.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:5d8::19) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|AS8PR04MB7735:EE_ X-MS-Office365-Filtering-Correlation-Id: dbb61087-c5c3-41c1-ac8b-08db082a2fd5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8DDQa73QHUqNWYPL9DizMsoHDRH+s1z3unOvxsY8As1DwZ2dAMeuCma0XSAg2TBQwb38d5iRvjIDovpORIfYOy+fdJOIZy/xa8rNIm+1TlwyY7DkCgAPQp5Z6MVtmJ3w9Q8kquNZPd0PEXnMbEQcyUDCz2xjB94/MYEbYLmk1ZeYAoynD4J2W2gDnhwiRIo31v9NWlAiNzjixvcSdUlSSAw8iyiFWTvAMDsuNygIi7WXw/j5ZHj6o1Y7hUch/WHpmQ+OWgewnNTCoMSBNZ5McVkTQn5J+LeCmf2V4/QQiG2mYYSXFiSc1TpXYCJIZgdD8mUV9oxUIzXKlrUDJkG52Ww3H3Y34pPn2FZzMVaUmuPBO9maXp1FSopWcARsEsg62BUZkVllFqjOpGTH8PmmuVjqHodNnBoJ/niYw2zvJIU3BZrUhNE9attVZyEVV9Z7QQAlpqygjC2V61D5X1nCc+NKQ2mbUkkQs7Vq0pc0oHQw3xjx+BMNJf4wvXp6ULnfxVZOq6mLHMDn0uIsEtwMcCECCSB67VHeW6S0OfXg+L322WPYBJnum7mv6l7+9tltLJNWyBE4Vn5H16oIws8i1MIVh1rH33UGq7Z8bkZu6iQlTVMQHS6dZ7KMR0f3mpIZ8d2JaDIO58JMBgzpB7bYjTitPWM2v51URyRT8wUdkHFqeM/AgvBPLLbHrRPcItCf1FOPYTzgjrePyNyeOTqObg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(136003)(366004)(376002)(346002)(396003)(39860400002)(451199018)(86362001)(36756003)(38100700002)(38350700002)(66946007)(66556008)(4326008)(6916009)(41300700001)(8936002)(8676002)(7416002)(5660300002)(54906003)(66476007)(2906002)(44832011)(2616005)(83380400001)(478600001)(6486002)(186003)(52116002)(6512007)(26005)(316002)(6506007)(6666004)(1076003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ihj5yC7QGVM4q2vo0/wvwU0/p50SjaD5sFDviuZIQJi9Kl51hcNj2Mo4NtJc3mToJ8MHM3EvM56qzb0iZC2yWFhj3LiSddFqjPKoyy1uzOdGsYCxJeehNV4cPMbArzBVzTL+FQEBUAu5yh5dj4LBRumdD6GnDnRQW64qMs1s3fmKR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SkBQPgWnl3oH7ZTOtkj1rQPh0hC2XBCZIF38f5fl/lHsH7O0CPl9hujj8xCUq6pjRAEaf3mR4Sxj82sC8YwpQ4MxkBnm7Oegw/2V8UVzScO8d7qzj7y/P94LqcwvqHmrA1koel7SP9rYtNNzCAzZPwxpWG/Vvy09kufBXPrPP0nvNZ0SMyQoJMbHhkdXa1IwOxdl5btDEHuZaHhb37TzQblrwt9mKFuf2zZbQIfuf4B4EyR4Onuow59TSneh7G/T+fWrvz5lmxHcx7hph8v5+HxkIIz/ruIfXtLiGpPKo8+PQZ1PIdiFYybHoL4w2SQZ4/JMJQ2S0HSI5F51ELIL/EKJ+VQ3dNJnRMBAgJo9cSaEw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbb61087-c5c3-41c1-ac8b-08db082a2fd5 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2023 10:09:08.9425 (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: ku7GWQ/pri5E3lFcRdB58Akh00shgqAYk6bMJBOHLW7ES/QE0phgn2910kHUoeikjXYcw9QkFB2n1mdtg+6ONQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7735 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757076088733872258?= X-GMAIL-MSGID: =?utf-8?q?1757076088733872258?= |
Series |
NXP ENETC AF_XDP zero-copy sockets
|
|
Commit Message
Vladimir Oltean
Feb. 6, 2023, 10:08 a.m. UTC
Create naming consistency between the free procedures for a TX and an RX
software BD.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
drivers/net/ethernet/freescale/enetc/enetc.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c index 33950c81e53c..fe6a3a531a0a 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc.c +++ b/drivers/net/ethernet/freescale/enetc/enetc.c @@ -77,8 +77,8 @@ static void enetc_unmap_tx_buff(struct enetc_bdr *tx_ring, tx_swbd->dma = 0; } -static void enetc_free_tx_frame(struct enetc_bdr *tx_ring, - struct enetc_tx_swbd *tx_swbd) +static void enetc_free_tx_swbd(struct enetc_bdr *tx_ring, + struct enetc_tx_swbd *tx_swbd) { struct xdp_frame *xdp_frame = enetc_tx_swbd_get_xdp_frame(tx_swbd); struct sk_buff *skb = enetc_tx_swbd_get_skb(tx_swbd); @@ -331,7 +331,7 @@ static int enetc_map_tx_buffs(struct enetc_bdr *tx_ring, struct sk_buff *skb) do { tx_swbd = &tx_ring->tx_swbd[i]; - enetc_free_tx_frame(tx_ring, tx_swbd); + enetc_free_tx_swbd(tx_ring, tx_swbd); if (i == 0) i = tx_ring->bd_count; i--; @@ -580,7 +580,7 @@ static int enetc_map_tx_tso_buffs(struct enetc_bdr *tx_ring, struct sk_buff *skb err_chained_bd: do { tx_swbd = &tx_ring->tx_swbd[i]; - enetc_free_tx_frame(tx_ring, tx_swbd); + enetc_free_tx_swbd(tx_ring, tx_swbd); if (i == 0) i = tx_ring->bd_count; i--; @@ -1986,11 +1986,8 @@ static void enetc_free_tx_ring(struct enetc_bdr *tx_ring) { int i; - for (i = 0; i < tx_ring->bd_count; i++) { - struct enetc_tx_swbd *tx_swbd = &tx_ring->tx_swbd[i]; - - enetc_free_tx_frame(tx_ring, tx_swbd); - } + for (i = 0; i < tx_ring->bd_count; i++) + enetc_free_tx_swbd(tx_ring, &tx_ring->tx_swbd[i]); } static void enetc_free_rx_ring(struct enetc_bdr *rx_ring)