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 5FCA6A0579; Tue, 20 Apr 2021 10:59:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3CD4441638; Tue, 20 Apr 2021 10:59:44 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id C38E741319 for ; Tue, 20 Apr 2021 10:59:41 +0200 (CEST) Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FPcy60smFz17R9q for ; Tue, 20 Apr 2021 16:57:18 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.498.0; Tue, 20 Apr 2021 16:59:38 +0800 From: "Min Hu (Connor)" To: CC: Date: Tue, 20 Apr 2021 16:59:49 +0800 Message-ID: <1618909192-17431-3-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618909192-17431-1-git-send-email-humin29@huawei.com> References: <1618909192-17431-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 2/5] net/hns3: fix enum variable used as boolean 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" params->leaf.cman has enum type which is not isomorphic with boolean type, however it is used as a boolean expression. This patch fixed it. Fixes: c09c7847d892 ("net/hns3: support traffic management") Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_tm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_tm.c b/drivers/net/hns3/hns3_tm.c index 165d1fb..aae4970 100644 --- a/drivers/net/hns3/hns3_tm.c +++ b/drivers/net/hns3/hns3_tm.c @@ -385,7 +385,7 @@ hns3_tm_leaf_node_param_check(struct rte_eth_dev *dev __rte_unused, return -EINVAL; } - if (params->leaf.cman) { + if (params->leaf.cman != RTE_TM_CMAN_TAIL_DROP) { error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS_CMAN; error->message = "congestion management not supported"; return -EINVAL; -- 2.7.4