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 34645A034F; Mon, 30 Aug 2021 10:28:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7670341144; Mon, 30 Aug 2021 10:28:15 +0200 (CEST) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id EF28D41135 for ; Mon, 30 Aug 2021 10:28:12 +0200 (CEST) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Gyk2q2JTzz1DDxx for ; Mon, 30 Aug 2021 16:27:31 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.8; Mon, 30 Aug 2021 16:28:10 +0800 From: "Min Hu (Connor)" To: CC: , Date: Mon, 30 Aug 2021 16:26:51 +0800 Message-ID: <1630312011-65160-4-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1630312011-65160-1-git-send-email-humin29@huawei.com> References: <1630312011-65160-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 3/3] net/hns3: fix Tx push capability 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 Sender: "dev" This patch fixes Tx push capability to be compatible with Kunpeng 920, as Tx push is only supported on Kunpeng 930. Fixes: 23e317dd1fbf ("net/hns3: support Tx push quick doorbell for performance") Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_cmd.c | 3 +++ drivers/net/hns3/hns3_cmd.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c index 928f938..6a1e634 100644 --- a/drivers/net/hns3/hns3_cmd.c +++ b/drivers/net/hns3/hns3_cmd.c @@ -423,6 +423,7 @@ hns3_get_caps_name(uint32_t caps_id) } dev_caps[] = { { HNS3_CAPS_FD_QUEUE_REGION_B, "fd_queue_region" }, { HNS3_CAPS_PTP_B, "ptp" }, + { HNS3_CAPS_TX_PUSH_B, "tx_push" }, { HNS3_CAPS_PHY_IMP_B, "phy_imp" }, { HNS3_CAPS_TQP_TXRX_INDEP_B, "tqp_txrx_indep" }, { HNS3_CAPS_HW_PAD_B, "hw_pad" }, @@ -492,6 +493,8 @@ hns3_parse_capability(struct hns3_hw *hw, hns3_warn(hw, "ignore PTP capability due to lack of " "rxd advanced layout capability."); } + if (hns3_get_bit(caps, HNS3_CAPS_TX_PUSH_B)) + hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_TX_PUSH_B, 1); if (hns3_get_bit(caps, HNS3_CAPS_PHY_IMP_B)) hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_COPPER_B, 1); if (hns3_get_bit(caps, HNS3_CAPS_TQP_TXRX_INDEP_B)) diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h index 88683df..a4683de 100644 --- a/drivers/net/hns3/hns3_cmd.h +++ b/drivers/net/hns3/hns3_cmd.h @@ -315,6 +315,7 @@ enum HNS3_CAPS_BITS { */ HNS3_CAPS_FD_QUEUE_REGION_B = 2, HNS3_CAPS_PTP_B, + HNS3_CAPS_TX_PUSH_B = 6, HNS3_CAPS_PHY_IMP_B = 7, HNS3_CAPS_TQP_TXRX_INDEP_B, HNS3_CAPS_HW_PAD_B, -- 2.7.4