Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp938435rdb; Wed, 6 Dec 2023 04:31:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IHptip6Y9CYYUWjd/0jGypTnmcLztHG4gw3gClTs4FNTSEKSl94/rvonZCYUrOMdfslHGVO X-Received: by 2002:a05:6a20:3d85:b0:18f:97c:9266 with SMTP id s5-20020a056a203d8500b0018f097c9266mr605830pzi.75.1701865919035; Wed, 06 Dec 2023 04:31:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701865919; cv=none; d=google.com; s=arc-20160816; b=AFYUutHaZxCK6tqMtwY8u4Lpd0sdEseYsGmhq+SZ/gybzPQIAiiz/avpA/yCrhXKrH eTs4amxnVhxn0oLd5ejh4ZK4h9NEORd1LbtW7IkftcKlJelhY5fEe39HaUI8vYfGr70C TwlTznS5Y+gh0fefGYD9YthtpHn0rWCf6zpi3bVvPSXVlhGH+CFtQXDkJ81zY6JMY1GD 6PdaceXmYVSq5jOE/iG+LqcQGAU1+3EPOvH6xmDI2+9PiLZiy6IxcqFcHbpbLldwFwdD NWa0TQo7QiTLvazTlUpnayZr8xYaTXYGWw1y+7BDPYSsc2hX4SZ1W/dbhwEFJgByS5ar DEVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:subject:cc:user-agent:mime-version:date:message-id; bh=8/QHfOoCtFRtpV8rz6fNq58KXUVlA+MO6P4IU+VMMq8=; fh=18zIc7u7NMcow7QGxryLb5hzZf1l9wOOuXcUSowS1mY=; b=Cz3j3Vo2Eu3LP2bvflPG3U5zXCYdN3HUwJvpWWoSF1qYi6s5/ujCvBZ2Swz3bxfwk+ Th7pd1pmV0eG0S0w+Bw0ICE1u9lu/AIIbFaqqDYKk1+v5HI/wsytat0HyK0nGlELJAN1 f9tOu1fy3tq4ljlE1XbK3/u+3bI2L+hMxhRNMLR3oIIM1kpCxJfuOqbhXT0QQ4IZXK1w TLE/8jJmIhSf06nl6iFw4JrEe7We3r4VcB3q0PxCYXlRmpd9Ut8jnFYWjNryjI4li2OP 0nhipnTRYhALis+/8YhJeuNSN8kbX0q1BbyDuCHt+rzGhED6lzGTAWQL/peccJ7fsreN PT6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id i5-20020a63cd05000000b005b95fbb1745si7292306pgg.562.2023.12.06.04.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 04:31:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id CFC5281AA502; Wed, 6 Dec 2023 04:31:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378244AbjLFMbl (ORCPT + 99 others); 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 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 pete.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 (pete.vger.email [0.0.0.0]); Wed, 06 Dec 2023 04:31:56 -0800 (PST) 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