aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk
diff options
context:
space:
mode:
authorJieqiang Wang <jieqiang.wang@arm.com>2023-08-21 15:58:10 +0800
committerMohammed HAWARI <momohawari@gmail.com>2023-11-06 10:21:35 +0000
commit505f4e1db1c0c4cc934b1206be283e88d47af0fe (patch)
tree1ef47532904a5916e6155f086cf49678dcdfb34b /src/plugins/dpdk
parent7444fd2a0d177796cacb7c040323cdc327afa97a (diff)
dpdk: correct the printing of Rx offloading flags
DPDK added new Rx checksum flags[1] to handle cases like the virtual drivers. Current check of flags is not strict enough for flags like RTE_MBUF_F_RX_IP_CKSUM_NONE and will always be true no matter the checksum in packet is good or bad. Fix this issue by comparing the result of AND operation with the correspinding Rx checksum flags. Before this patch, packet trace prints the offload flags as below: Packet Offload Flags PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid PKT_RX_IP_CKSUM_NONE (0x0090) no IP cksum of RX pkt. PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid PKT_RX_L4_CKSUM_NONE (0x0108) no L4 cksum of RX pkt. After this patch, packet offload flags would be like: Packet Offload Flags PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid Type: fix [1] https://github.com/DPDK/dpdk/commit/5842289a546ceb0072bd7faccb93821e21848e07 Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com> Change-Id: I3182022d9ccd46b2fc55bb3edfbfac9062ed7c89
Diffstat (limited to 'src/plugins/dpdk')
-rw-r--r--src/plugins/dpdk/device/format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c
index 11435343cc8..1fd609a68a5 100644
--- a/src/plugins/dpdk/device/format.c
+++ b/src/plugins/dpdk/device/format.c
@@ -706,7 +706,7 @@ format_dpdk_pkt_offload_flags (u8 * s, va_list * va)
s = format (s, "Packet Offload Flags");
#define _(F, S) \
- if (*ol_flags & RTE_MBUF_F_##F) \
+ if ((*ol_flags & RTE_MBUF_F_##F) == RTE_MBUF_F_##F) \
{ \
s = format (s, "\n%U%s (0x%04x) %s", format_white_space, indent, \
"PKT_" #F, RTE_MBUF_F_##F, S); \