From: Brian Dooley Date: Mon, 21 Feb 2022 18:06:58 +0000 (+0000) Subject: examples/l2fwd-crypto: fix port mask overflow X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=aaf4ac404362752e9c8effa4641bb480187d04ec;p=dpdk.git examples/l2fwd-crypto: fix port mask overflow Coverity flags an issue with 32-bit value. If max ethports value is configured with a value larger than 32 there will be an issue. Coverity issue: 375863 Unintentional integer overflow Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application") Cc: stable@dpdk.org Signed-off-by: Brian Dooley Acked-by: Akhil Goyal --- diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 4d9f8861af..bbdb263143 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -2719,7 +2719,7 @@ initialize_ports(struct l2fwd_crypto_options *options) last_portid = portid; } - l2fwd_enabled_port_mask |= (1 << portid); + l2fwd_enabled_port_mask |= (1ULL << portid); enabled_portcount++; }