[ovs-dev] [PATCH v4 1/2] dp-packet : Update the rx checksum validation to use DPDK checksum masks.
Sugesh Chandran
sugesh.chandran at intel.com
Mon Jul 10 12:31:28 UTC 2017
DPDK ports use masks while reporting rx checksum flags. OVS should use these
mask along with reported checksum flag while validating the rx checksum.
Signed-off-by: Sugesh Chandran <sugesh.chandran at intel.com>
Suggested-by: Darrell Ball <dball at vmware.com>
---
lib/dp-packet.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/dp-packet.h b/lib/dp-packet.h
index 38282bd..71d2fa7 100644
--- a/lib/dp-packet.h
+++ b/lib/dp-packet.h
@@ -612,7 +612,8 @@ static inline bool
dp_packet_ip_checksum_valid(struct dp_packet *p)
{
#ifdef DPDK_NETDEV
- return p->mbuf.ol_flags & PKT_RX_IP_CKSUM_GOOD;
+ return (p->mbuf.ol_flags & PKT_RX_IP_CKSUM_MASK) ==
+ PKT_RX_IP_CKSUM_GOOD;
#else
return 0 && p;
#endif
@@ -622,7 +623,8 @@ static inline bool
dp_packet_l4_checksum_valid(struct dp_packet *p)
{
#ifdef DPDK_NETDEV
- return p->mbuf.ol_flags & PKT_RX_L4_CKSUM_GOOD;
+ return (p->mbuf.ol_flags & PKT_RX_L4_CKSUM_MASK) ==
+ PKT_RX_L4_CKSUM_GOOD;
#else
return 0 && p;
#endif
--
2.7.4
More information about the dev
mailing list