Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10322205rwr; Fri, 12 May 2023 06:48:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7VYjtw2k+w73+6lhyXP5xXv0uFQYT1JjMISiEXwERI9mOyD61VAiMQKHy7kzHyitXb3EZX X-Received: by 2002:a05:6a00:1a46:b0:641:d9b:a444 with SMTP id h6-20020a056a001a4600b006410d9ba444mr31671680pfv.31.1683899300246; Fri, 12 May 2023 06:48:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683899300; cv=pass; d=google.com; s=arc-20160816; b=pfm+RI6qDe20OBhT3i2+dDVtgeAMA5nrZLWsUDcu6CXs4xdLitutstPJNW6soPMmp/ mWahxZGWxzXiWCdfp/ybowGe+s+CyJLgBYsQvGfYKTDnR/upUJegvLo1K0yzim4Elb7j Xli86MgQguu3vzb/xSOal2EXiFmMgDF6OKRrRlv9kT6JFWg1VPXyHaNMakD0D+AOh5FB aeLg5Lg0cyAwPfR6gy1bo0+mu+HESDjRzAjUQEOlZr2BbiQRIJLG11OuurVGWWKqOq/G du8WEVaw6XZR+yTcW4fsSeIY74DVa25xI6Ml5SgvoOqq9r5nHFidlHmacAhDm+9NscEy utaQ== 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=7o1olkSVX7f7WMt24WHnKppcpCJKudMgi/Q8/GkPu1c=; b=weXp1pg0ia1bw41kqZ3Z2sEOtjclDGYEHXmHxns1HXDthjk7BQWmxi3+pgJzrfYoz/ frODr4xQc82v825T0uHtAQEEQcfrHBQmtu6ju3FXZgJ0cpf6ty0KDL14QR5GfnGcA1b/ WrOJkViFtWXFe+e+JiAdCGb6xOl5VaaB53XGueFrrJq+BUG18mBROCrByswHvGOxO9lm EkHJoSQLdEOarR/QfhBMH+N8Ii9UH1wleJcGsYx4ZeAxTjbNjJs0ig9gRmTgY0MigViE WU5Ma2KLrTBXB9/5k1y7I5KY/HHEJeL1GqqWlEr4qsrsEOyJUSvWiQJsS8Jzi8i3hG6a 7B1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=YQ5S+vmc; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h66-20020a625345000000b0063d28eb37a8si2659370pfb.402.2023.05.12.06.48.07; Fri, 12 May 2023 06:48:20 -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=YQ5S+vmc; 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 S241290AbjELNjH (ORCPT + 99 others); Fri, 12 May 2023 09:39:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240996AbjELNjF (ORCPT ); Fri, 12 May 2023 09:39:05 -0400 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2082.outbound.protection.outlook.com [40.107.15.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1748A11DAB; Fri, 12 May 2023 06:39:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iL250IhjW9+tZCbxKXpnXOlmZXEhyg9EnFkYah/W2P4KRdfhwOzXHo2aL8jVoolaR3qyNFfkHFrbCwyMnrcncUM7UVDPXni/nG0W/5XZvEkT8NU0Q/1j24bAOd1COpus5Ge2Gqqfr1xHnuzlIBUUOFMcM0Xgjdq0xUSe7ipjv7dH94oqb//bNB84ryi55MaRpYK+d3Z12yGf11yrdN7NY1C2BIKct0czz6hDBZ0RfZYfRN2TbebTjsV3MYYLU81OwZ3i+HkB2Qhds5VCF9nD9pv3JZI+VtuA47HOeW7bO7b44cafhkUlAC91mw9k/y+MN9KIPdpmoyD8LmU5VYKNzg== 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=7o1olkSVX7f7WMt24WHnKppcpCJKudMgi/Q8/GkPu1c=; b=kUumWRD2rEDNxZ92CpSx9NINnjqEI53JEt48Ied1fPKCc9K0VepQmrH/omL6vwWEP3NIPD5J8yuWxbny1ZW44YhKSWnkF+rQV0691bKSqir86GBJ+ELmunGfFKYYxMnvCM45kvzWVtQMWNRmXRzC0sKjptGWDYriHoe6FC1BwinMi3pMdzrEUwf2fiIZAFMsLDFKC2P9FSm7ThXtKo046C0jLEufjPdrZOATBcKV772pTbsuWJ+dJkdJwOCKNxHqJZtT4UJ6xYxkr6NA6z1YbKrAkTk31qsPjG2kJybcqG4TDqK5n6BOmtdVjxOpd4QokxGmeUoGCicSgvJZrnQomw== 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=7o1olkSVX7f7WMt24WHnKppcpCJKudMgi/Q8/GkPu1c=; b=YQ5S+vmcnwxkrr2pFcXIe1nvOhN9ANbH/LNHjHhZLR/yR9lToNctHNevLGIb58gtyUjOdzr7xf7STXbtPfbM3b6fYZ7Sj5F0beqfssj2m50szhelk13kKdvMsbKm8waQOSmgVF5xBBlK2DSwypBVkKriyM3CqFvb0bdK0VgjyyM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) by AM0PR04MB6803.eurprd04.prod.outlook.com (2603:10a6:208:187::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.21; Fri, 12 May 2023 13:39:00 +0000 Received: from PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::28fb:82ec:7a6:62f3]) by PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::28fb:82ec:7a6:62f3%5]) with mapi id 15.20.6387.020; Fri, 12 May 2023 13:39:00 +0000 From: Shenwei Wang To: Wei Fang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Shenwei Wang , Clark Wang , NXP Linux Team , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Alexander Lobakin , Horatiu Vultur , Simon Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH net] net: fec: remove the xdp_return_frame when lack of tx BDs Date: Fri, 12 May 2023 08:38:43 -0500 Message-Id: <20230512133843.1358661-1-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR05CA0047.namprd05.prod.outlook.com (2603:10b6:a03:33f::22) To PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9185:EE_|AM0PR04MB6803:EE_ X-MS-Office365-Filtering-Correlation-Id: 4cd2ab4b-ec52-49f5-86d5-08db52ee3e04 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oP5mzx5YYz3l7It6dHbmu7Npxlqp1Ggd24gxfHN067x5N/yjiz2IiCzUF+xgPTlzPy8UHey27eSC25H0QWuomE3O0SgeaR9QsNPpB+gFa6YMZyB9q7HxaqJfXHFBdKNDNg/WKyxdZNkLoN/8D0Wn8IP5uZ8y5AsotWvcVkEzuDicYJnoVaxA1iP+uP6cRVB8DliDoNvqYmrsoUOrdTKbOsCiL9Qen3sxbOIfaGuxaV9RVhniIXEcT4JBDzk820PK49iuMMZfEj56pcP8yvnlSWHC0MivXwx4dihbxGCkedhxbTSkjAiCIJwqvpzL/L2/N45+qlofexa9O3GX8LZdTV+8gXhkDMPz0oKp+QSuh0bjHkq0F3zBNwpZhh+KLP62dpbyz13AsdSX0Ce6QNX1Qp10EaPqKT5tJMt8c014N3pfcju2nidKpFCau4wTtawb89WlryHGPJlrkqYBKM9SR8pgpYPycFQjSbO5jDOlt48PxI6QfDQQvWvEh4OHMUzitbUpI5N36obsSTCMMc8SvwWbdPF0jSnX5v8CjRSbJUj4N+l6gTcpGoaRVGGNRzmofEmiuUdZstA5cYGx/h0c4ykvD5StsbPqLAQ6MB8L++rmQEJWXfnXBNuNWPNlcXRs X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9185.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(396003)(39860400002)(366004)(136003)(376002)(451199021)(7416002)(41300700001)(6666004)(6512007)(38350700002)(44832011)(5660300002)(55236004)(6506007)(26005)(38100700002)(1076003)(8936002)(8676002)(6486002)(2616005)(83380400001)(186003)(2906002)(4744005)(52116002)(86362001)(66476007)(316002)(478600001)(36756003)(66556008)(54906003)(66946007)(4326008)(110136005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?vgfHDpayGZQFKKr1q7H3kSNKLny/GM9Q4+Of//U7LLuxCwUM7GmHj1FjUC//?= =?us-ascii?Q?+82FHJE8/hx37y3ELi4lQqug/BCUPfPsJygQ8PafMjlbd/6eKVrl/gxf7rSo?= =?us-ascii?Q?TNXUSx1e0IcMWfYZO7re5ljTRq6Rx1fiHD3xYjIruhqxsCGR2vEH/YxDNnKU?= =?us-ascii?Q?MJUWKAG48CoEDTS2Mdtf5gvigQIkI++O9+PYduZ0m9tw3AcoD67ga+rSMi5U?= =?us-ascii?Q?mKS5sfrQW8/GyXSHvuOEh4CZddSB1RDY4tgcKxJKYRJxeo6RO1YV1zpDA9cq?= =?us-ascii?Q?V+KrQYJn+p7ibFXo/fcICVFKCAuasm6xBox2b0RBDJcbTzc5MGOLiay7IW8x?= =?us-ascii?Q?9aVrGV4vHgVcpt0j6Z7VN9M1EB9aVhZyiYx1YwZDXcFZkQbI8VS4Q1+UAnZU?= =?us-ascii?Q?QJaArD2uSBh0nM1ZMo7tQYsKf5vhANFJs2i0VzOvuu2McCzJN942rDoqAqXh?= =?us-ascii?Q?ou4QwrjDoPIASmpDk0tf1GetrfWuIkRE5tevz7J2WTxRcznnmnThKPBqkhng?= =?us-ascii?Q?GCTDtkWMHrcGmSVbdYZ9tz3FtP3uzhfre/hldav3eFmjoQN/tDVIlNSPN4rc?= =?us-ascii?Q?FoslTNlfj8a9IQqAjjjshAdipBXYmYT7cgy3IIu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HJ6yq+Y/xTikC8P42mrX/zoq3rj43bM2jBY6ignVoIx?= =?us-ascii?Q?NQInbHQralbDRVUY4nV4kQgit9EUgoHTlhhoGzmH?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4cd2ab4b-ec52-49f5-86d5-08db52ee3e04 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9185.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2023 13:39:00.2357 (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: DI801lf9p7pjeC1mLgO8IGM/ei+M9WpuPDH3H+qfiMSHJc1ly0OUb2kwJGM2aaidWpunCEtqy7BNZA8PTY52iw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6803 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,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 In the implementation, the sent_frame count does not increment when transmit errors occur. Therefore, bq_xmit_all() will take care of returning the XDP frames. Fixes: 26312c685ae0 ("net: fec: correct the counting of XDP sent frames") Signed-off-by: Shenwei Wang --- drivers/net/ethernet/freescale/fec_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 42ec6ca3bf03..2a3e8b69b70a 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -3798,7 +3798,6 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep, entries_free = fec_enet_get_free_txdesc_num(txq); if (entries_free < MAX_SKB_FRAGS + 1) { netdev_err(fep->netdev, "NOT enough BD for SG!\n"); - xdp_return_frame(frame); return NETDEV_TX_BUSY; } -- 2.34.1