On Thu, Jan 14, 2016 at 12:56:31PM +0200, Ivan Khoronzhuk wrote: > In case of one loop pktio the MAC address is not set in the packets > but should be. > > Signed-off-by: Ivan Khoronzhuk <ivan.khoronz...@linaro.org> > --- > test/validation/pktio/pktio.c | 18 ++++++++++++++---- > 1 file changed, 14 insertions(+), 4 deletions(-) > > diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c > index 536ef6c..a756af4 100644 > --- a/test/validation/pktio/pktio.c > +++ b/test/validation/pktio/pktio.c > @@ -830,11 +830,21 @@ void pktio_test_start_stop(void) > pktio_init_packet(pkt); > if (num_ifaces > 1) { > pktio_pkt_set_macs(pkt, pktio[0], pktio[1]); > - if (pktio_fixup_checksums(pkt) != 0) { > - odp_packet_free(pkt); > - break; > - } > + } else { > + uint32_t len; > + odph_ethhdr_t *eth; > + > + eth = (odph_ethhdr_t *)odp_packet_l2_ptr(pkt, &len); > + ret = odp_pktio_mac_addr(pktio[0], > + ð->dst, sizeof(eth->dst)); > + CU_ASSERT(ret == ODPH_ETHADDR_LEN);
Elsewhere we just call pktio_pkt_set_macs() and pass the same pktio as both the src and dest, any reason not to do that here? Actually this reminded me that I sent a different fix for this some time back that moved the setting of MACs and checksum into the create function, this way it's less likely the same error will be made in future - http://patches.opendataplane.org/patch/3515/ It wouldn't apply now but I could rebase it... -- Stuart. _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp