summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-12-08 09:55:07 +0100
committerNeale Ranns <nranns@cisco.com>2016-12-08 10:04:28 +0000
commit2c4dbff25b3c461e7576f35508f780ea784ef7d4 (patch)
tree9e8d831fc07b8c08c8fdc89bd4a10ee26c1eab93
parent10fd425cd244e6a7e08651bf7192eec1a2dcab76 (diff)
dpdk: don't drop packets if l4 checksum is flagged as bad
Sometimes NICs are flagging checksum 0 as bad, which is not always true. Change-Id: Ibb0147c94f436966e6afa472025bdf92c41f201e Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--vnet/vnet/devices/dpdk/dpdk.h1
-rw-r--r--vnet/vnet/devices/dpdk/node.c11
2 files changed, 2 insertions, 10 deletions
diff --git a/vnet/vnet/devices/dpdk/dpdk.h b/vnet/vnet/devices/dpdk/dpdk.h
index 554b95f6aa9..771c91fdc6e 100644
--- a/vnet/vnet/devices/dpdk/dpdk.h
+++ b/vnet/vnet/devices/dpdk/dpdk.h
@@ -467,7 +467,6 @@ struct rte_mbuf *dpdk_zerocopy_replicate_packet_mb (vlib_buffer_t * b);
_(NONE, "no error") \
_(RX_PACKET_ERROR, "Rx packet errors") \
_(RX_BAD_FCS, "Rx bad fcs") \
- _(L4_CHECKSUM_ERROR, "Rx L4 checksum errors") \
_(IP_CHECKSUM_ERROR, "Rx ip checksum errors") \
_(RX_ALLOC_FAIL, "rx buf alloc from free list failed") \
_(RX_ALLOC_NO_PHYSMEM, "rx buf alloc failed no physmem") \
diff --git a/vnet/vnet/devices/dpdk/node.c b/vnet/vnet/devices/dpdk/node.c
index 758bcfb91ac..5f9c95aada2 100644
--- a/vnet/vnet/devices/dpdk/node.c
+++ b/vnet/vnet/devices/dpdk/node.c
@@ -79,11 +79,6 @@ dpdk_rx_error_from_mb (struct rte_mbuf *mb, u32 * next, u8 * error)
*error = DPDK_ERROR_IP_CHECKSUM_ERROR;
*next = VNET_DEVICE_INPUT_NEXT_DROP;
}
- else if (mb->ol_flags & PKT_RX_L4_CKSUM_BAD)
- {
- *error = DPDK_ERROR_L4_CHECKSUM_ERROR;
- *next = VNET_DEVICE_INPUT_NEXT_DROP;
- }
else
*error = DPDK_ERROR_NONE;
}
@@ -353,8 +348,7 @@ dpdk_device_input (dpdk_main_t * dm, dpdk_device_t * xd,
dpdk_rx_next_from_mb (mb3, b3, &next3);
}
- if (PREDICT_FALSE (or_ol_flags & (PKT_RX_IP_CKSUM_BAD |
- PKT_RX_L4_CKSUM_BAD)))
+ if (PREDICT_FALSE (or_ol_flags & PKT_RX_IP_CKSUM_BAD))
{
dpdk_rx_error_from_mb (mb0, &next0, &error0);
dpdk_rx_error_from_mb (mb1, &next1, &error1);
@@ -564,8 +558,7 @@ poll_rate_limit (dpdk_main_t * dm)
@em Uses:
- <code>struct rte_mbuf mb->ol_flags</code>
- - PKT_EXT_RX_PKT_ERROR, PKT_EXT_RX_BAD_FCS
- PKT_RX_IP_CKSUM_BAD, PKT_RX_L4_CKSUM_BAD
+ - PKT_RX_IP_CKSUM_BAD
- <code> RTE_ETH_IS_xxx_HDR(mb->packet_type) </code>
- packet classification result