40e7c02155
During an if-condition evaluation, a 2-bit flag evaluates to 'true' for
'0x1', '0x2' and '0x3'. Thus, from this perspective these flags are
indistinguishable. To make them distinct, respective bits must be
extracted with a mask and then checked for strict equality.
Specifically here, even if `PKT_TX_UDP_CKSUM` (value '0x3') was set, the
expression `mbuf->ol_flags & PKT_TX_TCP` (the second flag of value
'0x1') is evaluated first and the result is 'true'. In consequence, for
UDP packets the execution flow enters an incorrect branch.
Fixes:
|
||
---|---|---|
.. | ||
base | ||
ena_ethdev.c | ||
ena_ethdev.h | ||
ena_logs.h | ||
ena_platform.h | ||
Makefile | ||
meson.build | ||
rte_pmd_ena_version.map |