This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 3ce9d6ab16d064b0f83508e2f0b2e476d64b15e1 (commit) from d7ec85bbba32e9747307bd1cd76a061a39e7c731 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 3ce9d6ab16d064b0f83508e2f0b2e476d64b15e1 Author: Petri Savolainen petri.savolainen@linaro.org Date: Tue Jan 16 16:06:13 2018 +0200
validation: packet: minimal chksum status test
There was no references into chksum status functions in validation test suite. Add minimal test to see at least that functions exist. Parse function should be updated with a checksum implementation, before actual checksum checking can be tested.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/validation/api/packet/packet.c b/test/validation/api/packet/packet.c index 75e50d53..78ccbeae 100644 --- a/test/validation/api/packet/packet.c +++ b/test/validation/api/packet/packet.c @@ -2466,6 +2466,8 @@ void packet_test_parse(void) odp_packet_parse_param_t parse; int ret, num_test_pkt, i; uint32_t len, max_len; + odp_packet_chksum_status_t chksum_status; + odp_proto_chksums_t all_chksums; int num_pkt = 10; odp_packet_t pkt[num_pkt]; uint32_t offset[num_pkt]; @@ -2480,6 +2482,12 @@ void packet_test_parse(void) sizeof(test_packet_ipv6_udp), sizeof(test_packet_vlan_ipv6_udp) };
+ all_chksums.all_chksum = 0; + all_chksums.chksum.ipv4 = 1; + all_chksums.chksum.udp = 1; + all_chksums.chksum.tcp = 1; + all_chksums.chksum.sctp = 1; + num_test_pkt = sizeof(test_pkt_len) / sizeof(uint32_t); max_len = 0;
@@ -2509,11 +2517,16 @@ void packet_test_parse(void) CU_ASSERT(ret == 0);
offset[i] = 0; + + chksum_status = odp_packet_l3_chksum_status(pkt[i]); + CU_ASSERT(chksum_status == ODP_PACKET_CHKSUM_UNKNOWN); + chksum_status = odp_packet_l4_chksum_status(pkt[i]); + CU_ASSERT(chksum_status == ODP_PACKET_CHKSUM_UNKNOWN); }
parse.proto = ODP_PROTO_ETH; parse.last_layer = ODP_PROTO_LAYER_ALL; - parse.chksums.all_chksum = 0; + parse.chksums = all_chksums;
CU_ASSERT(odp_packet_parse(pkt[0], offset[0], &parse) == 0); CU_ASSERT(odp_packet_parse_multi(&pkt[1], &offset[1],
-----------------------------------------------------------------------
Summary of changes: test/validation/api/packet/packet.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
hooks/post-receive