On Fri, Apr 29, 2016 at 1:23 PM, Maxim Uvarov <[email protected]> wrote:
> Chksum routines updated to serarch l4 and udp flags > set in the packets. Because there is syntetic allocated > packet we need also set required bits. > > Signed-off-by: Maxim Uvarov <[email protected]> > Reviewed-by: Bill Fischofer <[email protected]> > --- > helper/test/chksum.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/helper/test/chksum.c b/helper/test/chksum.c > index f47fa64..749d495 100644 > --- a/helper/test/chksum.c > +++ b/helper/test/chksum.c > @@ -111,6 +111,7 @@ int main(int argc TEST_UNUSED, char *argv[] > TEST_UNUSED) > ip->proto = ODPH_IPPROTO_UDP; > ip->id = odp_cpu_to_be_16(1); > ip->chksum = 0; > + odp_packet_has_ipv4_set(test_packet, 1); > odph_ipv4_csum_update(test_packet); > > /* udp */ > @@ -122,6 +123,7 @@ int main(int argc TEST_UNUSED, char *argv[] > TEST_UNUSED) > udp->dst_port = 0; > udp->length = odp_cpu_to_be_16(udat_size + ODPH_UDPHDR_LEN); > udp->chksum = 0; > + odp_packet_has_udp_set(test_packet, 1); > udp->chksum = odph_ipv4_udp_chksum(test_packet); > > if (udp->chksum == 0) > -- > 2.7.1.250.gff4ea60 > > _______________________________________________ > lng-odp mailing list > [email protected] > https://lists.linaro.org/mailman/listinfo/lng-odp >
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
