dpdk/0219-net-hns3-fix-Tx-push-capability.patch
speech_white 1c77287214 sync to master branch
sync patches ranges from versoin 9 t0 17 from master branch

Signed-off-by: speech_white <humin29@huawei.com>
2021-12-17 10:45:19 +08:00

54 lines
2.0 KiB
Diff

From 85289d2ec86fa522962d6599521af0a2f604ac52 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Mon, 30 Aug 2021 16:26:51 +0800
Subject: [PATCH] net/hns3: fix Tx push capability
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")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
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 928f938536..6a1e634684 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 88683dfaaa..a4683de0aa 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.33.0