Re: [PATCH v1] common/cnxk: fix integer overflow

2024-07-22 Thread Jerin Jacob
On Thu, Jul 18, 2024 at 12:13 PM Ankur Dwivedi wrote: > > The expression flow_age->aging_poll_freq * NPC_AGE_WAIT_TIMEOUT_US is > evaluated using 32 bit arithmetic. An integer overflow may occur when > the value is too large to fit in 32 bits. This patch resolves this by > casting flow_age->aging_

[PATCH v1] common/cnxk: fix integer overflow

2024-07-17 Thread Ankur Dwivedi
The expression flow_age->aging_poll_freq * NPC_AGE_WAIT_TIMEOUT_US is evaluated using 32 bit arithmetic. An integer overflow may occur when the value is too large to fit in 32 bits. This patch resolves this by casting flow_age->aging_poll_freq to 64 bit. Coverity issue: 428156 Fixes: a4878294318e