From 684366134c27242e93d41e7c025b24f709671996 Mon Sep 17 00:00:00 2001 From: Jie Wang Date: Wed, 27 Oct 2021 10:01:52 +0800 Subject: [PATCH] app/testpmd: fix L2TPv2 message type In "msg_type |= 0xc800", wider "51200" has high-order bits (0xc800) that don't affect the narrower left-hand side. This patch fixes coverity issue by changing the definition type of "msg_type" from uint8_t to uint16_t. Coverity issue: 373651 Fixes: 748530f0354e ("app/testpmd: support L2TPv2 and PPP protocol pattern") Signed-off-by: Jie Wang Reviewed-by: Ferruh Yigit --- app/test-pmd/cmdline_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index d8218771fb..24b224e632 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -5880,7 +5880,7 @@ parse_vc_item_l2tpv2_type(struct context *ctx, const struct token *token, struct rte_flow_item_l2tpv2 *l2tpv2_mask; struct rte_flow_item *item; uint32_t data_size; - uint8_t msg_type = 0; + uint16_t msg_type = 0; struct buffer *out = buf; const struct arg *arg;