Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5959834rdb; Thu, 14 Dec 2023 04:54:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGFPJ97iKfo5fykvmrtvnGOZYRhtq8Vvhs69CfAOh62Lo6kZYqk+GJ+Wen93zuamvpVE7EZ X-Received: by 2002:a05:6359:2e03:b0:170:17eb:2046 with SMTP id ro3-20020a0563592e0300b0017017eb2046mr7926901rwb.47.1702558487148; Thu, 14 Dec 2023 04:54:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702558487; cv=none; d=google.com; s=arc-20160816; b=UqS8P2x0cNwV7dubL9gAizpByrftiwbHYuY+9JyOjC3eYafOHBbdI/7SCdR6U3bPrJ CBq3O59Onm5SSIiX1k/9sdfizt8mEWTFZDoORVbVeHGJAFSe6pTSgfOI7emC2vmN1GDk +tXSZ6mSLv4tkl9QY7xrS/9SHjuzcs7XtEYNrkQtrbCNTun45jPU73I+LWUtWL38LQnS ZSSbKTVaU9jsRlWNaDAF7wv3RBlm31nADR3iQkp6QxvzRuwGKzt410hi/wth5pRBjyL0 pUuj9r2vwwOc+Vub8Ql7REIzXNXJiTvCpM4XoUzwZIpsC2r+rV2qK2dwW+mnQ9pfKcxq rsGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=ZhG9TDyefIuMCgeCvQKpU6etC7c4caLyptuyoc2GhA0=; fh=IYJcvjruGo/ROSo30p5Adi0uNhPR2XdImYJiyUWh+ug=; b=Kx6QrJeUqSoyWVCiP/KltEVwyeXJk9y/sb52YEGG9aVSY0j+lQZ+ZZYPrFdZZu6zKJ PoTImuSqxT6SmeJInDB79bQVWswwWu98dm47DHe5oCpXA1M4010lgBRvvF7F335SDGez WRlpFc9KyihAtibfIJJYlzZBYEJAlFB+f3ty1c5qAWN4I1HYHz0/e/f7YT+f+wuibdnr k0nB8U7g2BLoQrtVoyGplmoqmyrlBu+vNG0H5ujQRO4LkRkZYtE0M4hJJ2pGOx76Lp1A wwKNsvbmRAEqWFgRf3L2CRB5gPKLXRCb7aT7ux5qxrDcd4otgaCjPxhN2wxclNfGPjjw R6rA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id s11-20020a17090aad8b00b0028b0f286487si702930pjq.157.2023.12.14.04.54.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 04:54:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id ADD398235798; Thu, 14 Dec 2023 04:54:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573156AbjLNMyZ convert rfc822-to-8bit (ORCPT + 99 others); Thu, 14 Dec 2023 07:54:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573145AbjLNMyX (ORCPT ); Thu, 14 Dec 2023 07:54:23 -0500 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52CE2113; Thu, 14 Dec 2023 04:54:30 -0800 (PST) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 3BECsBVp9840430, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 3BECsBVp9840430 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Dec 2023 20:54:11 +0800 Received: from RTEXDAG01.realtek.com.tw (172.21.6.100) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Thu, 14 Dec 2023 20:54:12 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG01.realtek.com.tw (172.21.6.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Thu, 14 Dec 2023 20:54:11 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7]) by RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7%5]) with mapi id 15.01.2375.007; Thu, 14 Dec 2023 20:54:11 +0800 From: JustinLai0215 To: Jakub Kicinski CC: "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "andrew@lunn.ch" , Ping-Ke Shih , Larry Chiu Subject: RE: [PATCH net-next v14 03/13] rtase: Implement the rtase_down function Thread-Topic: [PATCH net-next v14 03/13] rtase: Implement the rtase_down function Thread-Index: AQHaKbuZ68k3qmPPt0euso8G9Dk2ErCliPGAgAM8MgA= Date: Thu, 14 Dec 2023 12:54:11 +0000 Message-ID: <39c9b2df2a02412b84f6e7946f012917@realtek.com> References: <20231208094733.1671296-1-justinlai0215@realtek.com> <20231208094733.1671296-4-justinlai0215@realtek.com> <20231212112735.180d455f@kernel.org> In-Reply-To: <20231212112735.180d455f@kernel.org> Accept-Language: zh-TW, en-US Content-Language: zh-TW x-originating-ip: [172.21.210.185] x-kse-serverinfo: RTEXDAG01.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 14 Dec 2023 04:54:44 -0800 (PST) > > On Fri, 8 Dec 2023 17:47:23 +0800 Justin Lai wrote: > > + netif_stop_queue(dev); > > You most likely want to stop the napi before you call this. > Otherwise NAPI can do some clean up and restart the queue. > > > + /* give a racing hard_start_xmit a few cycles to complete */ > > + synchronize_rcu(); > > Call netif_tx_disable() instead of stop_queue(), it takes the tx lock so you don't > have to worry about in-flight packets. Thanks for your suggestion, I will modify it. > > > + netif_carrier_off(dev); > > + > > + for (i = 0; i < tp->int_nums; i++) { > > + ivec = &tp->int_vector[i]; > > + synchronize_irq(ivec->irq); > > Why? This is redundant code, I will remove it. > > > + /* wait for any pending NAPI task to complete */ > > + napi_disable(&ivec->napi); > > + }