Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E489C6FD1C for ; Thu, 9 Mar 2023 12:26:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230381AbjCIM0V (ORCPT ); Thu, 9 Mar 2023 07:26:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjCIM0K (ORCPT ); Thu, 9 Mar 2023 07:26:10 -0500 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2063.outbound.protection.outlook.com [40.107.117.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CF2DEB886; Thu, 9 Mar 2023 04:26:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GBL+EVgp5OUg0SzJU5Ow4m0CYzykhIFPhyGFmQkUQUo3kAxIidgPOBU2D+/FpizdGmi1N5dcrdipXo0zxlI3fSoJqBCqGvBDT1MHIrAJbVCHOLG9RJ9G2WjRXSxovMZP235dLP3/rgeHsFPtCGTU4dpioNiUrA/7xwoy+D8Vko3f/I+1VIIp3Kbww5cNWsV79a9oC177p8WAWKQrHjShfmO+WNHYZImSi+ycuBzyBOgDfAgcnpwX2Gz7e9/hGGsZBbFRG7ft5YwrfLUcjPuXXkvABIVyLvulHQi35zV/Pir8g7/QvkK+4JCBjBzlHF0qgEWz0Z2jsC+Vw8SJu/PNgQ== 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=YYH35GGoyOy5pn5rQsQNKo8uXa85R2SxQrRK1WNnKfc=; b=iBEvLP+ZLisbgeeYoNL9iLpIJXRMH3KsT2kXFIyTmx4HC78L6OPK/z7V/danSRftD7RUA2ifE06bBLBhU61pzNq+xYIiDI1Aew7jJHmHEqB8qiVxzdrHYM/hD7CZ391Ohp6ClgPuVphRXqgipHB+yKyMufxJrxoFmnAPaKzoHxgbWsTmjwC1FAHODkn3PK6iZ/q8+AkNOhEtL68z7Gmhsu3bHirFLT3wvukuXI5gIIGtey/uHmtQfG9DpDqZw/NxrHobUlbbJFwZINPrz3Sr39+ExL7itXM0akVHKeDWH2lVrW6NUiM4CFh9kBSsBAEI7gTYgYqXUNTtAeCUBNoEAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jaguarmicro.com; dmarc=pass action=none header.from=jaguarmicro.com; dkim=pass header.d=jaguarmicro.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jaguarmicro.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YYH35GGoyOy5pn5rQsQNKo8uXa85R2SxQrRK1WNnKfc=; b=iJfkcqMQSxYH2ugzryaLcCFt/DYMaFTpAOmn3vVDDtPuws8Prz8RR439JqSs88vRKQ/dden+0SNOQjwsRuzX6vOidGjwvM5pSWYBYx4MEWFubJV6vXOCCPruil6rrlORvTTcjhOAXYYHexAlyWEXoXbxhmPKoqbVFRXLyAdEpwj6eqSBdaiyUJlFn4bOGTzfbZTKAgp9ef+19Sj5t1d9YILzoUaAA4LqLQKUUERK2MBxhx56lbxIso2nWFoGdPpu/gVHdAfmaXtrNqDlU8fPrhr/X3PgJXrvmkpV8i3vxhSFf2NfBWMVjYb1fVGwidkXIEhmTD5pa8DxmFv2d16itg== Received: from TY2PR06MB3424.apcprd06.prod.outlook.com (2603:1096:404:104::19) by TYZPR06MB5640.apcprd06.prod.outlook.com (2603:1096:400:28e::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18; Thu, 9 Mar 2023 12:26:03 +0000 Received: from TY2PR06MB3424.apcprd06.prod.outlook.com ([fe80::47ae:ff02:a2c9:845c]) by TY2PR06MB3424.apcprd06.prod.outlook.com ([fe80::47ae:ff02:a2c9:845c%3]) with mapi id 15.20.6178.016; Thu, 9 Mar 2023 12:26:03 +0000 From: Angus Chen To: Yunsheng Lin , "mst@redhat.com" , "jasowang@redhat.com" , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "ast@kernel.org" , "daniel@iogearbox.net" , "hawk@kernel.org" , "john.fastabend@gmail.com" CC: "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bpf@vger.kernel.org" , Xuan Zhuo Subject: RE: [PATCH] virtio_net: Use NETDEV_TX_BUSY when has no buf to send Thread-Topic: [PATCH] virtio_net: Use NETDEV_TX_BUSY when has no buf to send Thread-Index: AQHZUlvJVaF65+0La0G3anKk81ITKa7yRcUAgAAVJpA= Date: Thu, 9 Mar 2023 12:26:02 +0000 Message-ID: References: <20230309074952.975-1-angus.chen@jaguarmicro.com> <866b9077-1600-4c93-3da8-4006cbf6abe7@huawei.com> In-Reply-To: <866b9077-1600-4c93-3da8-4006cbf6abe7@huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=jaguarmicro.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: TY2PR06MB3424:EE_|TYZPR06MB5640:EE_ x-ms-office365-filtering-correlation-id: e421615c-bd0d-4a86-f6cc-08db209972ba x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pL4PwRT5lJiTKlrd9EGi026v9O/tDC7/lfddky9B+AW/OXjvAIp8Yma+9qtJfJT63Wa7b/76e+u0SpKT7Y/V2hQV4mn+MsYN1WXgtxlGlLf+29O2MonWCkcwg/MT2VuESF1bt8LPZixwEwdlZ7wHaMDozrULKo3ZjUCQgcoeL3BiD5nTDQeJ2Fl5vAvQDuf/FcGEOEa8oczCt0xQXzu7Y6nqOikM0XZQWLpBmWcxBzjX9VIu9ao5TJKP+gcP1nvLX9G9vdClYWlCCvqbew5IXRUwCWCkXquNdT1FYNYXwxOBv/vN/b6AHmf6+d1O1qYEMgQ1YaRl7AOY7+TQ8/KW4XKhEo4sgdIthHsTCtB2r32Z29X8R8wPJREPqvgvUPwTZOKwOubTTsyJEYIdubRg+CIj4S47Q798eHVq+UiJqfg877+h0MOaS8pBXB01VhWER1QM8mYaCneqlphXoV5ZwSM6CXoVaBzjJ40tqG7Hv/gxaMMjBBj+MIDiBMAIJ5TMTcrqIQ/SnGZfDKc6Q7pqglx8tZYTZhDhirwZh80sXYm7LZQmHQ/Ia8mLkEZLzvyQccYS7G3qZjC05Y4dvRCS4lSfw6ad4QxlVqTTQ6DNfRlwxP6FH9kVFv7t/K0fnUFKJWWOxh8bpwuqrElK/8Qlmds0h7eNfnBPi0acvaMFyhwtxdeQgHEqYYT6tfMayMnkNo5iyrY1AVu4KIPooLa7yA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TY2PR06MB3424.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(376002)(39830400003)(366004)(136003)(396003)(346002)(451199018)(33656002)(54906003)(110136005)(478600001)(966005)(7696005)(316002)(5660300002)(71200400001)(7416002)(52536014)(2906002)(66476007)(8936002)(64756008)(44832011)(76116006)(66556008)(8676002)(66946007)(66446008)(41300700001)(4326008)(122000001)(186003)(38070700005)(55016003)(921005)(38100700002)(86362001)(9686003)(53546011)(26005)(6506007)(83380400001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?Rzdsam5kV0w3aVgwNjRUZHhWYWprN1Rta0czbkd6Z0Mwck42SFBnaGFoRDhZ?= =?utf-8?B?c0Z2c0pQQ1I0N3dpWFpua2MyeUdUNDJhb0FEWWhhUHhvdExrb2dsSXRscmhm?= =?utf-8?B?VUNUSWwrd0hqZGkwYkVBYTh4VW5YUit0VkQyMmJIcDE0VWJTMjZURkMzaHRx?= =?utf-8?B?NWxjOVlicElIYVlCUkhqRmZvVmpjdkxjRlpKSko2bUI1anErZzN3d1ZWVEtI?= =?utf-8?B?N2pVSFd6VzZaME5MQTQzT3lTc2xId2h4aEh1RVYrQjZCOGhiU1JMa0hUc0ha?= =?utf-8?B?TVlQUjdOWjBFNnMwT3JPNjA3TDg4cFZ6clJUVUptUXhDdkdETmhaTTZsa3lK?= =?utf-8?B?akg5L1NvcGF1d3pqWm9LRFpYYlhRa2ZLREVDdVVWaFhqeHNtRWxaUHFHMWFE?= =?utf-8?B?bCtyV05Rb2VxQVViYXMwVHFFZ21EOHhuTDcxTzZWbmRCZWVIR0lUK013SVM0?= =?utf-8?B?ZWZhNktmdXpBaWRqcTFscUNHWkZuREpjRjY0UjZxNWx2ZXZvb243dzczL0xq?= =?utf-8?B?S012dHdpUkhQSlFxaHVJYXI4OHBNQzVibFBMczRkNjB3azA4SVdUWHlLYXEw?= =?utf-8?B?LzZrMHAxTm9NU3NYMGowajNERU0weVcySDB1aVVieVcrUk1ublN1a2x0aDRw?= =?utf-8?B?ZU5rd0p1cWsxcnRHYnlSd3RUNnlSbFA1czVYdnRuaUpSS2F3b1BFNC9EOHdG?= =?utf-8?B?L3kxdzd2RHRXRUVvWGJCelBVbDdnMTgvWUpIY2VoWHBRS2lDN1I4NUZ0eEMw?= =?utf-8?B?UWRkWXZyUGI1U0puVGE3T3IxVEFaWjFybCt1UzV5dmFGYVZVTnhiVXpuYjNM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vWWhCWEI2ZUh2?= =?utf-8?B?K2gzdUlmSnlVUjJYZlZUUDhpZDZaaVRwSW8zS2k5ZFpraHhqNkpLR1Btbnpr?= =?utf-8?B?UW9VN0l1Ky9SdGtZT0txcm94MkMyZ2lkeUhsOE9EbWRRZ0JSSFpiK2VIWU0y?= =?utf-8?B?a205WFFXSUh2bGRnb2RONVNzMDZubFdTa0kxcFJjU3NheFlxclN5VVJyNWFM?= =?utf-8?B?Ky9WNXp3VFNnMUFTQ2RxTitwUW9BdkVIY3RaVkZlT1Q0bjdRVm85aytrOHpS?= =?utf-8?B?RWZGbFAyWXp1Wm9LMFBpTEo5WTNVOGsyTVhTYzRETmVvbndwMnZLd0lOdEty?= =?utf-8?B?eTM3dWk3SEpqRTVOaW9yVzMxbEMvUDVXQlJjNkFnTmFlaFFHVmcwc0JVOFQ0?= =?utf-8?B?amZOMzRhbGxXUG9JYiswa3kvZ2U0K2FoV3R3cEpadHpXMW1aOVFlbEZkUUNY?= =?utf-8?B?ZUE9PQ==?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: jaguarmicro.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TY2PR06MB3424.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e421615c-bd0d-4a86-f6cc-08db209972ba X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Mar 2023 12:26:02.9685 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 1e45a5c2-d3e1-46b3-a0e6-c5ebf6d8ba7b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: WENaslZyIVqp/lhIvt5nTJs+UQwNGIhKHdTPSjptdFLcymGXzZZRwyOMb1gz1BlwDdBLwej7jTzZDLQgnlMOIWPHxD+2lIf/UrCzGX/YMh0= X-MS-Exchange-Transport-CrossTen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