Message ID | 1498574381-13480-2-git-send-email-sugesh.chandran@intel.com |
---|---|
State | Superseded |
Headers | show |
This patch looks good.
I had a comment on Patch 2.
On 6/27/17, 7:39 AM, "Sugesh Chandran" <sugesh.chandran@intel.com> wrote:
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@intel.com>
Suggested-by: Darrell Ball <dball@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 d2549b1..84cc434 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
Thank you Darrell Regards _Sugesh > -----Original Message----- > From: Darrell Ball [mailto:dball@vmware.com] > Sent: Sunday, July 9, 2017 5:39 PM > To: Chandran, Sugesh <sugesh.chandran@intel.com>; dev@openvswitch.org > Subject: Re: [PATCH v3 1/2] dp-packet : Update the rx checksum validation to > use DPDK checksum masks. > > This patch looks good. > I had a comment on Patch 2. > > On 6/27/17, 7:39 AM, "Sugesh Chandran" <sugesh.chandran@intel.com> > wrote: > > 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@intel.com> > Suggested-by: Darrell Ball <dball@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 d2549b1..84cc434 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 > > > >
diff --git a/lib/dp-packet.h b/lib/dp-packet.h index d2549b1..84cc434 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
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@intel.com> Suggested-by: Darrell Ball <dball@vmware.com> --- lib/dp-packet.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)