Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10351195rwr; Fri, 12 May 2023 07:07:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6NX2oum6GWhpzg1Su3NMLp/lM7xUk7yWcA4ierzraNGz8XHR+nwoovGUURQfNJ+Ko07LTJ X-Received: by 2002:a9d:7692:0:b0:6aa:f8ce:b69c with SMTP id j18-20020a9d7692000000b006aaf8ceb69cmr6662645otl.22.1683900464712; Fri, 12 May 2023 07:07:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683900464; cv=none; d=google.com; s=arc-20160816; b=IBOaaWPZaMWAU1uM3Q6WyXO6AV601nOn8H7CQ8bdYTkd0I8jWmi0rMmGM01hlVKGlw KgT1fOxAyynqtt9mGKsMy5QBKHp2TEbEYBy0X76H0PhWZDm/BEC33L7S6l4mlQf61MMs en+sk5fW7MbeC3sY5NSMsef2/2VwAs5ZD/DJMRV9Fn5rhZLkw0xjvxdGqXfnkJ3hdC98 mnXKmMu4Dee6EBt9vNQ2uhLRc2roNl2xnmUhMg8hJF3Z/7Fi9OG7bTZlqEX893jaeMal RX6UnrioY5KIufpxgqKAS7pmvOcmP7vISbJNVKhl+S5TeSH8Zq99yX1a906dZGEClUGu bTew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jk8L1ikjnOvQcsh0a6LdYOBOIeO88tM3eOLiYE9g66M=; b=RQThoRKAsjoM5RKPjMV+DBogDgVuq2x/h1Ys+00L6+D4Endn/dPppTCN/wRRwrQtTK ePTtXxcBAeZoML5KuvAzHeWWC0Hv6X7VpF1nJrUfUofrAo/BTVmZNjpvXisHi40M6ArK HThXhp0vc7O5K8gBq0C7HHSNvCJcOG5nou9dlXEGP4YPGQDLBdnKZM5KhyxZ0giLZrWL 0Rg32zurv1IO+MKRUyoOYimgzh/8WMJpy3b8fibHtHZlfYP0fD/0nyApKbGMVm3NCXjH +JDnVLtowvIoDIAPblGRXgulhn3q4f633mz7XdQoaYpgUf0krnoTojTbZl7N6p+9PI9K Rifw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=n9yvwfKQ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs1-20020a056830398100b006a388a88b21si11666895otb.174.2023.05.12.07.07.29; Fri, 12 May 2023 07:07:44 -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=@microchip.com header.s=mchp header.b=n9yvwfKQ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241172AbjELN5W (ORCPT + 99 others); Fri, 12 May 2023 09:57:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240855AbjELN5U (ORCPT ); Fri, 12 May 2023 09:57:20 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96B4211DB1; Fri, 12 May 2023 06:57:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1683899836; x=1715435836; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=QwWE/tJlAPiCpmRXJUsvyc0KqZbQ5lpruaSv6RHumwg=; b=n9yvwfKQOFStLfiN/7ANP61yDQXq4M5JKwqpZTupb6QKaT5X//BQwv/d Cw8xwGCmOfN3VGjjDn4BNWJz5t9Owd1bySvbRL+kzFbNcM0FxdoEwDZ7E 3UXIQGukEa+E4tkmtnr7itWbA1NcNyyvueA84wKUXAsc/GT9h3jbE1Dp+ fQQ+ZQEPpBVHInBZi0wraH4/mU+UVYeCgn9EUuelE9ZArsa1CUVqDrsSO hlw5pGkia1SaNJUzXKRjKkup5zs0U04yPtZ1S28ToHeW+rmcUCUMkTwxf IgisY9wE6gMP0okz4Kh+vJ9/nHjG8R4ZJ0DcxG2EFUDcXiAo2GcAOcNk3 A==; X-IronPort-AV: E=Sophos;i="5.99,269,1677567600"; d="scan'208";a="210976329" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 12 May 2023 06:57:15 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 12 May 2023 06:57:14 -0700 Received: from localhost (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Fri, 12 May 2023 06:57:14 -0700 Date: Fri, 12 May 2023 15:57:13 +0200 From: Horatiu Vultur To: Shenwei Wang CC: Wei Fang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Clark Wang , NXP Linux Team , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Alexander Lobakin , Simon Horman , , , Subject: Re: [PATCH net] net: fec: remove the xdp_return_frame when lack of tx BDs Message-ID: <20230512135713.lwfpw4lzreece4rb@soft-dev3-1> References: <20230512133843.1358661-1-shenwei.wang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20230512133843.1358661-1-shenwei.wang@nxp.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,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 The 05/12/2023 08:38, Shenwei Wang wrote: > > 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. Reviewed-by: Horatiu Vultur > > 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 > > -- /Horatiu