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 DDBACC4167B for ; Wed, 6 Dec 2023 12:31:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378241AbjLFMbl (ORCPT ); Wed, 6 Dec 2023 07:31:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378058AbjLFMbk (ORCPT ); Wed, 6 Dec 2023 07:31:40 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 929C7D3; Wed, 6 Dec 2023 04:31:46 -0800 (PST) Received: from kwepemm000007.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SlcB52hG2z1Q65Q; Wed, 6 Dec 2023 20:27:57 +0800 (CST) Received: from [10.67.120.192] (10.67.120.192) by kwepemm000007.china.huawei.com (7.193.23.189) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 6 Dec 2023 20:31:44 +0800 Message-ID: Date: Wed, 6 Dec 2023 20:31:43 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird CC: , , , , , Subject: Re: [PATCH V3 net 1/2] net: hns: fix wrong head when modify the tx feature when sending packets To: Paolo Abeni , , , , , , References: <20231204143232.3221542-1-shaojijie@huawei.com> <20231204143232.3221542-2-shaojijie@huawei.com> From: Jijie Shao In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.120.192] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm000007.china.huawei.com (7.193.23.189) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org on 2023/12/6 19:18, Paolo Abeni wrote: > + priv->ops.fill_desc = fill_desc_v2; > + priv->ops.maybe_stop_tx = hns_nic_maybe_stop_tx_v2; > Side note: since both 'fill_desc' and 'maybe_stop_tx' have constant > values, for net-next you should really consider replacing the function > pointers with direct-calls. > > You currently have at least 2 indirect calls per wire packet, which > hurt performances a lot in case security issues mitigations are in > place. > > Cheers, > > Paolo Thank you for your advice. Currently, because the hardware behavior is different, the two versions of ops are retained to unify the subsequent process. We will try to unify the two version ops, and if that does not work, we will consider maintaining the status quo. Thanks again! Jijie