From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3CC144263D; Tue, 26 Sep 2023 06:03:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0CA4840271; Tue, 26 Sep 2023 06:03:27 +0200 (CEST) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id EE81B4026F for ; Tue, 26 Sep 2023 06:03:25 +0200 (CEST) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4RvmJ53vTwz15NRl; Tue, 26 Sep 2023 12:01:09 +0800 (CST) Received: from [10.67.121.59] (10.67.121.59) by kwepemm000004.china.huawei.com (7.193.23.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 26 Sep 2023 12:03:22 +0800 Message-ID: <7af8f26a-2327-eb6a-d204-564b66880972@huawei.com> Date: Tue, 26 Sep 2023 12:03:21 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH 3/5] net/hns3: optimize free mbuf code for SVE Tx To: Ferruh Yigit , Dongdong Liu , , , CC: Honnappa Nagarahalli , Ruifeng Wang , haijie References: <20230711102448.11627-1-liudongdong3@huawei.com> <20230711102448.11627-4-liudongdong3@huawei.com> <8a469b5d-6047-4123-ad47-6416385b0de9@amd.com> From: "lihuisong (C)" In-Reply-To: <8a469b5d-6047-4123-ad47-6416385b0de9@amd.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.59] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm000004.china.huawei.com (7.193.23.18) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 在 2023/9/25 22:21, Ferruh Yigit 写道: > On 7/11/2023 11:24 AM, Dongdong Liu wrote: >> From: Huisong Li >> >> Currently, hns3 SVE Tx checks the valid bits of all descriptors >> in a batch and then determines whether to release the corresponding >> mbufs. Actually, once the valid bit of any descriptor in a batch >> isn't cleared, driver does not need to scan the rest of descriptors. >> >> If we optimize SVE codes algorithm about this function, the performance >> of a single queue for 64B packet is improved by ~2% on txonly forwarding >> mode. And if use C code to scan all descriptors, the performance is >> improved by ~8%. >> >> So this patch selects C code to optimize this code to improve the SVE >> Tx performance. >> >> Signed-off-by: Huisong Li >> Signed-off-by: Dongdong Liu >> > SVE Tx optimized by removing SVE implementation :) Yes. I didn't remove it, TBH. but I have no other idea.😂 > > Do you have any insight why generic vector implementation is faster? I guess the number of instructions for this SVE code block is greater than C code with scanning one by one. But If the burst size is bigger, such as 128 and more, the SVE performance can be enhanced a little. > > > > .