[dpdk-dev] [PATCH v2 4/4] app/testpmd:test NVGRE Tx checksum offload
Liu, Jijiang
jijiang.liu at intel.com
Sun Feb 15 02:13:53 CET 2015
> -----Original Message-----
> From: Olivier MATZ [mailto:olivier.matz at 6wind.com]
> Sent: Friday, February 13, 2015 5:53 PM
> To: Liu, Jijiang; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 4/4] app/testpmd:test NVGRE Tx checksum
> offload
>
> Hi Jijiang,
>
>
> On 02/12/2015 01:45 AM, Jijiang Liu wrote:
> > Enhance csum fwd engine based on current TX checksum framework in order
> to test TX Checksum offload for NVGRE packet.
> >
> > It includes:
> > - IPv4 and IPv6 packet
> > - outer L3, inner L3 and L4 checksum offload for Tx side.
> >
> > [...]
> > @@ -231,20 +235,25 @@ parse_gre(struct simple_gre_hdr *gre_hdr, struct
> testpmd_offload_info *info)
> > struct ether_hdr *eth_hdr;
> > struct ipv4_hdr *ipv4_hdr;
> > struct ipv6_hdr *ipv6_hdr;
> > + uint8_t gre_len = 0;
> >
> > - /* if flags != 0; it's not supported */
> > - if (gre_hdr->flags != 0)
> > + /* check which fields are supported */
> > + if (gre_hdr->flags != 0 &&
> > + (gre_hdr->flags & _htons(GRE_SUPPORTED_FIELDS)) == 0)
> > return;
> >
> > + gre_len += sizeof(struct simple_gre_hdr);
> > +
> > + if (gre_hdr->flags & _htons(GRE_KEY_PRESENT))
> > + gre_len += GRE_KEY_LEN;
> > +
>
> I think this test won't work if the flags contains both supported and unsupported
> flags.
>
> What about this instead:
>
> if ((gre_hdr->flags & _htons(~GRE_SUPPORTED_FIELDS)) != 0)
> return;
>
That's correct, I will update it in next version.
>
> Regards,
> Olivier
More information about the dev
mailing list