Skip to content

Commit

Permalink
netdev-dpdk: Add debug.
Browse files Browse the repository at this point in the history
Signed-off-by: David Marchand <[email protected]>
  • Loading branch information
david-marchand committed Sep 12, 2023
1 parent 275e3c1 commit 3c27c06
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/netdev-dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2696,22 +2696,22 @@ netdev_dpdk_rxq_recv(struct netdev_rxq *rxq, struct dp_packet_batch *batch,
fragment_offset = rte_be_to_cpu_16(ipv4_hdr->fragment_offset);
if (fragment_offset & RTE_IPV4_HDR_DF_FLAG)
continue;
if (ipv4_hdr->packet_id == rx->packet_id) {
if (rte_be_to_cpu_16(ipv4_hdr->packet_id) == rx->packet_id) {
if ((fragment_offset & RTE_IPV4_HDR_OFFSET_MASK) != rx->fragment_offset) {
VLOG_WARN("Incorrect fragment");
VLOG_WARN("Incorrect fragment for packet_id %"PRIu16", expecting offset %"PRIu16", received %"PRIu16, rx->packet_id, rx->fragment_offset * RTE_IPV4_HDR_OFFSET_UNITS, RTE_IPV4_HDR_OFFSET_UNITS * RTE_IPV4_HDR_OFFSET_UNITS);
rx->fragment_offset = 0;
} else if (!(fragment_offset & RTE_IPV4_HDR_MF_FLAG)) {
rx->fragment_offset = 0;
} else {
rx->fragment_offset += (rte_be_to_cpu_16(ipv4_hdr->total_length) - sizeof(*ipv4_hdr)) / RTE_IPV4_HDR_OFFSET_UNITS;
}
} else if (rx->fragment_offset != 0) {
VLOG_WARN("Incorrect fragment");
VLOG_WARN("Missing some fragments for packet_id %"PRIu16, rx->packet_id);
rx->fragment_offset = 0;
} else {
rx->fragment_offset = (rte_be_to_cpu_16(ipv4_hdr->total_length) - sizeof(*ipv4_hdr)) / RTE_IPV4_HDR_OFFSET_UNITS;
}
rx->packet_id = ipv4_hdr->packet_id;
rx->packet_id = rte_be_to_cpu_16(ipv4_hdr->packet_id);
}

if (policer) {
Expand Down

0 comments on commit 3c27c06

Please sign in to comment.