ping
On 14.01.16 12:56, 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);
}
+
+ if (pktio_fixup_checksums(pkt) != 0) {
+ odp_packet_free(pkt);
+ break;
+ }
+
tx_ev[alloc] = odp_packet_to_event(pkt);
}
--
Regards,
Ivan Khoronzhuk
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp