From mboxrd@z Thu Jan 1 00:00:00 1970 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 B90B2FA373D for ; Fri, 28 Oct 2022 00:50:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233598AbiJ1AuL (ORCPT ); Thu, 27 Oct 2022 20:50:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232906AbiJ1AuK (ORCPT ); Thu, 27 Oct 2022 20:50:10 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1A723B732; Thu, 27 Oct 2022 17:50:07 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Mz3jh6j9VzVj98; Fri, 28 Oct 2022 08:45:12 +0800 (CST) Received: from dggpemm500005.china.huawei.com (7.185.36.74) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 28 Oct 2022 08:50:02 +0800 Received: from [10.69.30.204] (10.69.30.204) by dggpemm500005.china.huawei.com (7.185.36.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 28 Oct 2022 08:50:01 +0800 Subject: Re: [PATCH V7 net-next 0/6] ethtool: add support to set/get tx copybreak buf size and rx buf len To: Gal Pressman , Guangbin Huang , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , References: <20211118121245.49842-1-huangguangbin2@huawei.com> <40d6352e-8c6b-404f-8b6a-df1816239ab0@nvidia.com> <4466b159-7476-f833-ec22-ee234b70110b@huawei.com> From: Yunsheng Lin Message-ID: <0cf97cc1-1a99-21f6-93ef-e8c2f4c6f03c@huawei.com> Date: Fri, 28 Oct 2022 08:50:00 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.69.30.204] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500005.china.huawei.com (7.185.36.74) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-s390@vger.kernel.org On 2022/10/27 17:03, Gal Pressman wrote: > On 27/10/2022 03:49, Yunsheng Lin wrote: >> On 2022/10/26 22:00, Gal Pressman wrote: >>> On 18/11/2021 14:12, Guangbin Huang wrote: >>>> From: Hao Chen >>>> >>>> This series add support to set/get tx copybreak buf size and rx buf len via >>>> ethtool and hns3 driver implements them. >>>> >>>> Tx copybreak buf size is used for tx copybreak feature which for small size >>>> packet or frag. Use ethtool --get-tunable command to get it, and ethtool >>>> --set-tunable command to set it, examples are as follow: >>>> >>>> 1. set tx spare buf size to 102400: >>>> $ ethtool --set-tunable eth1 tx-buf-size 102400 >>>> >>>> 2. get tx spare buf size: >>>> $ ethtool --get-tunable eth1 tx-buf-size >>>> tx-buf-size: 102400 >>> Hi Guangbin, >>> Can you please clarify the difference between TX copybreak and TX >>> copybreak buf size? >> Hi Gal, >> 'TX copybreak buf size' is the size of buffer allocated to a queue >> in order to support copybreak handling when skb->len <= 'TX copybreak', >> >> see hns3_can_use_tx_bounce() for 'TX copybreak' and >> hns3_init_tx_spare_buffer() for 'TX copybreak buf size'. > > Thanks Yunsheng! > IIUC, there's a single buffer per TX queue, not per TX packet, correct? Yes. > > One way to implement TX copybreak is using an inline WQE, where the WQE > itself serves as the bounce buffer, sounds like 'TX copybreak buf size' > cannot be used in such case? If TX copybreak is using an inline WQE, I suppose 'TX copybreak buf size' is not needed. > . >