[08/12] net/hns3: fix return value for unsupported tuple

Message ID 20220519122917.2334-9-humin29@huawei.com (mailing list archive)
State Changes Requested, archived
Delegated to: Andrew Rybchenko
Headers
Series bugfix for hns3 PMD |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

humin (Q) May 19, 2022, 12:29 p.m. UTC
  From: Huisong Li <lihuisong@huawei.com>

Driver should return false for unsupported tuple. This patch fixes it.

Fixes: 18a4b4c3fa80 ("net/hns3: add default to switch when parsing fd tuple")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_fdir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index 2a7978ac07..a0d6598e57 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -631,7 +631,7 @@  static bool hns3_fd_convert_tuple(struct hns3_hw *hw,
 		break;
 	default:
 		hns3_warn(hw, "not support tuple of (%u)", tuple);
-		break;
+		return false;
 	}
 	return true;
 }