From patchwork Tue Feb 13 10:00:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 128206 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4084130ljc; Tue, 13 Feb 2018 02:01:32 -0800 (PST) X-Google-Smtp-Source: AH8x226/JPRSbQ8duu0YA5m2ABWgG/mf+DpeuyG+2ZAYGhkch4MFrYyCgFXZ2dUuHs2zTJukteEn X-Received: by 10.200.24.152 with SMTP id s24mr963023qtj.239.1518516092592; Tue, 13 Feb 2018 02:01:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518516092; cv=none; d=google.com; s=arc-20160816; b=0ma26jMrfXNg20IXgArN+QBrdHtbQjuTc1b++oQ9plOeJ9SEiKZv+lO3c/FnY+sjiq JhqKW0a/AcU9VgW3Ux2wgbD5nrA+gX4YFpfERczfNNv7bCjj6BbMh3UeDOWtQJxH7MfK BAUPpzgOBEGU0QSPydSjOlJEs8QUXVRnZHs2go8yyytjlUL945B69WAfh2Ffqp0pqI6z eY7frkhz+vg3HQVyzvY1ZDPaZStNztxqoMOlewlZjtAefQcLyjagIGxS6RDWKyVEnG1d GA6G7NQWnIMiKn61krma807xR5/YyfP9Q7rLlCsrEn2tDUbr4Prui1mnZwMLKw+PCe+m imGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=jtMWplpXZLaiSye7l/n3VHQNlFk1HcUSlC96BPNAnAM=; b=ZenUMP7RUwp3xoyLVPJWaaM7pjCNHl+lC/M0r87IzZveAx2SSTMO9WuKzLMyTX23pA xTnKfjXqerucjULj4sHNRJYoItBkaW/4h0W4bIYbeir+lHJevuZLzlBFbksSc3KzOI+w ryY/RTCwRLlXLFm5OmUWLqQPlcZgiB+cqeDueeoFBbRkCEOtoxVw8YYHPdC8gBAnSs4t 2tc11g/J6xg+wmIDMniMCZO3GRcaoi6zP7MGwQirAJl6gviC81lWOs0BpvQLMWbUp83L Z9KgnLkjEPm8v5cMmjI0W5ZfoOrmoVqpaMGoZnQWaBLLbVeKRj1U7dD8JMmqpQVwrv8E w9qw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id m5si709598qkf.78.2018.02.13.02.01.32; Tue, 13 Feb 2018 02:01:32 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 3F12361519; Tue, 13 Feb 2018 10:01:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id C1E88609D9; Tue, 13 Feb 2018 10:00:31 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 3284E61773; Tue, 13 Feb 2018 10:00:15 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id 183446172B for ; Tue, 13 Feb 2018 10:00:12 +0000 (UTC) Received: from mxback8j.mail.yandex.net (mxback8j.mail.yandex.net [IPv6:2a02:6b8:0:1619::111]) by forward102j.mail.yandex.net (Yandex) with ESMTP id 1AF735603952 for ; Tue, 13 Feb 2018 13:00:11 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback8j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id uq5TmEtGjd-0A6OlZLc; Tue, 13 Feb 2018 13:00:11 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 6ASWNO8Dvc-0AaWDWRY; Tue, 13 Feb 2018 13:00:10 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 13 Feb 2018 13:00:06 +0300 Message-Id: <1518516009-30109-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518516009-30109-1-git-send-email-odpbot@yandex.ru> References: <1518516009-30109-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 472 Subject: [lng-odp] [PATCH v1 1/4] validation: common: remove camel case names X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Petri Savolainen Rename struct fields to not use camel case names. Signed-off-by: Petri Savolainen --- /** Email created from pull request 472 (psavol:master-parser-validation) ** https://github.com/Linaro/odp/pull/472 ** Patch: https://github.com/Linaro/odp/pull/472.patch ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847 ** Merge commit sha: aa702da6919f7e56a6ed59d3120233c97590b4f1 **/ test/common/odp_cunit_common.c | 52 +++++++++++----------- test/common/odp_cunit_common.h | 12 ++--- .../validation/api/classification/classification.c | 20 ++++----- test/validation/api/crypto/odp_crypto_test_inp.c | 4 +- test/validation/api/ipsec/ipsec.c | 4 +- test/validation/api/packet/packet.c | 8 ++-- test/validation/api/pool/pool.c | 4 +- 7 files changed, 52 insertions(+), 52 deletions(-) diff --git a/test/common/odp_cunit_common.c b/test/common/odp_cunit_common.c index 6e51388f5..d8a17a75e 100644 --- a/test/common/odp_cunit_common.c +++ b/test/common/odp_cunit_common.c @@ -126,8 +126,8 @@ static odp_suiteinfo_t *cunit_get_suite_info(const char *suite_name) { odp_suiteinfo_t *sinfo; - for (sinfo = global_testsuites; sinfo->pName; sinfo++) - if (strcmp(sinfo->pName, suite_name) == 0) + for (sinfo = global_testsuites; sinfo->name; sinfo++) + if (strcmp(sinfo->name, suite_name) == 0) return sinfo; return NULL; @@ -138,8 +138,8 @@ static odp_testinfo_t *cunit_get_test_info(odp_suiteinfo_t *sinfo, { odp_testinfo_t *tinfo; - for (tinfo = sinfo->pTests; tinfo->pName; tinfo++) - if (strcmp(tinfo->pName, test_name) == 0) + for (tinfo = sinfo->testinfo_tbl; tinfo->name; tinfo++) + if (strcmp(tinfo->name, test_name) == 0) return tinfo; return NULL; @@ -167,14 +167,14 @@ static int _cunit_suite_init(void) return -1; /* execute its init function */ - if (sinfo->pInitFunc) { - ret = sinfo->pInitFunc(); + if (sinfo->init_func) { + ret = sinfo->init_func(); if (ret) return ret; } /* run any configured conditional checks and mark inactive tests */ - for (tinfo = sinfo->pTests; tinfo->pName; tinfo++) { + for (tinfo = sinfo->testinfo_tbl; tinfo->name; tinfo++) { CU_pTest ptest; CU_ErrorCode err; @@ -182,7 +182,7 @@ static int _cunit_suite_init(void) continue; /* test is inactive, mark it as such */ - ptest = CU_get_test_by_name(tinfo->pName, cur_suite); + ptest = CU_get_test_by_name(tinfo->name, cur_suite); if (ptest) err = CU_set_test_active(ptest, CU_FALSE); else @@ -190,7 +190,7 @@ static int _cunit_suite_init(void) if (err != CUE_SUCCESS) { fprintf(stderr, "%s: failed to set test %s inactive\n", - __func__, tinfo->pName); + __func__, tinfo->name); return -1; } } @@ -211,15 +211,15 @@ static int cunit_register_suites(odp_suiteinfo_t testsuites[]) CU_pSuite suite; CU_pTest test; - for (sinfo = testsuites; sinfo->pName; sinfo++) { - suite = CU_add_suite(sinfo->pName, - _cunit_suite_init, sinfo->pCleanupFunc); + for (sinfo = testsuites; sinfo->name; sinfo++) { + suite = CU_add_suite(sinfo->name, + _cunit_suite_init, sinfo->term_func); if (!suite) return CU_get_error(); - for (tinfo = sinfo->pTests; tinfo->pName; tinfo++) { - test = CU_add_test(suite, tinfo->pName, - tinfo->pTestFunc); + for (tinfo = sinfo->testinfo_tbl; tinfo->name; tinfo++) { + test = CU_add_test(suite, tinfo->name, + tinfo->test_func); if (!test) return CU_get_error(); } @@ -235,7 +235,7 @@ static int cunit_update_test(CU_pSuite suite, CU_pTest test = NULL; CU_ErrorCode err; odp_testinfo_t *tinfo; - const char *test_name = updated_tinfo->pName; + const char *test_name = updated_tinfo->name; tinfo = cunit_get_test_info(sinfo, test_name); if (tinfo) @@ -247,7 +247,7 @@ static int cunit_update_test(CU_pSuite suite, return -1; } - err = CU_set_test_func(test, updated_tinfo->pTestFunc); + err = CU_set_test_func(test, updated_tinfo->test_func); if (err != CUE_SUCCESS) { fprintf(stderr, "%s: failed to update test func for %s\n", __func__, test_name); @@ -267,31 +267,31 @@ static int cunit_update_suite(odp_suiteinfo_t *updated_sinfo) odp_testinfo_t *tinfo; /* find previously registered suite with matching name */ - sinfo = cunit_get_suite_info(updated_sinfo->pName); + sinfo = cunit_get_suite_info(updated_sinfo->name); if (sinfo) { /* lookup the associated CUnit suite */ - suite = CU_get_suite_by_name(updated_sinfo->pName, + suite = CU_get_suite_by_name(updated_sinfo->name, CU_get_registry()); } if (!sinfo || !suite) { fprintf(stderr, "%s: unable to find existing suite named %s\n", - __func__, updated_sinfo->pName); + __func__, updated_sinfo->name); return -1; } - sinfo->pInitFunc = updated_sinfo->pInitFunc; - sinfo->pCleanupFunc = updated_sinfo->pCleanupFunc; + sinfo->init_func = updated_sinfo->init_func; + sinfo->term_func = updated_sinfo->term_func; - err = CU_set_suite_cleanupfunc(suite, updated_sinfo->pCleanupFunc); + err = CU_set_suite_cleanupfunc(suite, updated_sinfo->term_func); if (err != CUE_SUCCESS) { fprintf(stderr, "%s: failed to update cleanup func for %s\n", - __func__, updated_sinfo->pName); + __func__, updated_sinfo->name); return -1; } - for (tinfo = updated_sinfo->pTests; tinfo->pName; tinfo++) { + for (tinfo = updated_sinfo->testinfo_tbl; tinfo->name; tinfo++) { int ret; ret = cunit_update_test(suite, sinfo, tinfo); @@ -345,7 +345,7 @@ int odp_cunit_update(odp_suiteinfo_t testsuites[]) int ret = 0; odp_suiteinfo_t *sinfo; - for (sinfo = testsuites; sinfo->pName && ret == 0; sinfo++) + for (sinfo = testsuites; sinfo->name && ret == 0; sinfo++) ret = cunit_update_suite(sinfo); return ret; diff --git a/test/common/odp_cunit_common.h b/test/common/odp_cunit_common.h index 390e8f57b..f6d384321 100644 --- a/test/common/odp_cunit_common.h +++ b/test/common/odp_cunit_common.h @@ -23,16 +23,16 @@ typedef int (*cunit_test_check_active)(void); typedef struct { - const char *pName; - CU_TestFunc pTestFunc; + const char *name; + CU_TestFunc test_func; cunit_test_check_active check_active; } odp_testinfo_t; typedef struct { - const char *pName; - CU_InitializeFunc pInitFunc; - CU_CleanupFunc pCleanupFunc; - odp_testinfo_t *pTests; + const char *name; + CU_InitializeFunc init_func; + CU_CleanupFunc term_func; + odp_testinfo_t *testinfo_tbl; } odp_suiteinfo_t; static inline int odp_cunit_test_inactive(void) { return 0; } diff --git a/test/validation/api/classification/classification.c b/test/validation/api/classification/classification.c index a0d290ec5..ef621f72d 100644 --- a/test/validation/api/classification/classification.c +++ b/test/validation/api/classification/classification.c @@ -12,18 +12,18 @@ #include "classification.h" odp_suiteinfo_t classification_suites[] = { - { .pName = "classification basic", - .pTests = classification_suite_basic, + { .name = "classification basic", + .testinfo_tbl = classification_suite_basic, }, - { .pName = "classification pmr tests", - .pTests = classification_suite_pmr, - .pInitFunc = classification_suite_pmr_init, - .pCleanupFunc = classification_suite_pmr_term, + { .name = "classification pmr tests", + .testinfo_tbl = classification_suite_pmr, + .init_func = classification_suite_pmr_init, + .term_func = classification_suite_pmr_term, }, - { .pName = "classification tests", - .pTests = classification_suite, - .pInitFunc = classification_suite_init, - .pCleanupFunc = classification_suite_term, + { .name = "classification tests", + .testinfo_tbl = classification_suite, + .init_func = classification_suite_init, + .term_func = classification_suite_term, }, ODP_SUITE_INFO_NULL, }; diff --git a/test/validation/api/crypto/odp_crypto_test_inp.c b/test/validation/api/crypto/odp_crypto_test_inp.c index ad9784a69..df1c7b6f5 100644 --- a/test/validation/api/crypto/odp_crypto_test_inp.c +++ b/test/validation/api/crypto/odp_crypto_test_inp.c @@ -1230,14 +1230,14 @@ int crypto_suite_term(void) int i; int first = 1; - for (i = 0; crypto_suite[i].pName; i++) { + for (i = 0; crypto_suite[i].name; i++) { if (crypto_suite[i].check_active && crypto_suite[i].check_active() == ODP_TEST_INACTIVE) { if (first) { first = 0; printf("\n\n Inactive tests:\n"); } - printf(" %s\n", crypto_suite[i].pName); + printf(" %s\n", crypto_suite[i].name); } } return 0; diff --git a/test/validation/api/ipsec/ipsec.c b/test/validation/api/ipsec/ipsec.c index ea3cff052..b16f84ac9 100644 --- a/test/validation/api/ipsec/ipsec.c +++ b/test/validation/api/ipsec/ipsec.c @@ -789,14 +789,14 @@ static int ipsec_suite_term(odp_testinfo_t *suite) if (suite_context.pktio != ODP_PKTIO_INVALID) pktio_stop(suite_context.pktio); - for (i = 0; suite[i].pName; i++) { + for (i = 0; suite[i].name; i++) { if (suite[i].check_active && suite[i].check_active() == ODP_TEST_INACTIVE) { if (first) { first = 0; printf("\n\n Inactive tests:\n"); } - printf(" %s\n", suite[i].pName); + printf(" %s\n", suite[i].name); } } diff --git a/test/validation/api/packet/packet.c b/test/validation/api/packet/packet.c index 78ccbeaef..1188c683c 100644 --- a/test/validation/api/packet/packet.c +++ b/test/validation/api/packet/packet.c @@ -2703,10 +2703,10 @@ odp_testinfo_t packet_suite[] = { }; odp_suiteinfo_t packet_suites[] = { - { .pName = "packet tests", - .pTests = packet_suite, - .pInitFunc = packet_suite_init, - .pCleanupFunc = packet_suite_term, + { .name = "packet tests", + .testinfo_tbl = packet_suite, + .init_func = packet_suite_init, + .term_func = packet_suite_term, }, ODP_SUITE_INFO_NULL, }; diff --git a/test/validation/api/pool/pool.c b/test/validation/api/pool/pool.c index 84c17720d..3a2c74122 100644 --- a/test/validation/api/pool/pool.c +++ b/test/validation/api/pool/pool.c @@ -230,8 +230,8 @@ odp_testinfo_t pool_suite[] = { }; odp_suiteinfo_t pool_suites[] = { - { .pName = "Pool tests", - .pTests = pool_suite, + { .name = "Pool tests", + .testinfo_tbl = pool_suite, }, ODP_SUITE_INFO_NULL, }; From patchwork Tue Feb 13 10:00:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 128208 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4086580ljc; Tue, 13 Feb 2018 02:04:26 -0800 (PST) X-Google-Smtp-Source: AH8x227rP4rGJP3pVw1W/Bd1r8eKaZMwFBma9f72ZyFjcfOAcuT16a9sN4S6NNGsNc/ls4I8TWHj X-Received: by 10.237.52.34 with SMTP id w31mr986305qtd.257.1518516266249; Tue, 13 Feb 2018 02:04:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518516266; cv=none; d=google.com; s=arc-20160816; b=H6lyUREIdLv8wc/dMEft5onHu/pP+x3HA2ahHge87rr2zyhYi0QDofZECqZyZVntJo Q/THeM/IxRCPAPq0znxSp56EPMsSFhXbm5y43lODMpib+mjfDYc032b/wTT8fIyDjGZK beXZvjWBYRHVqB1Z2Uvj2ejHpzSo1TcDe/qiCbwnvsJtKjPq+CBjzGbzmH/X3I+Gfygz Xk9iOb+jDcogHFUSI5VgnRnfPO1BafdNHbxWLY/iBmJJVOtU9c/eO4tSZuMpruiMm7+J 4RrQMcNWShACFHweaP/NJW0CEpd1zkcVNqO9/9NZ2DQHr6dYh66Fca7oz2KPuS+dv3zB zLkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=0memTclRqh48qo+AcCD0Xp0oVHM5ml931eZcxTTdsBE=; b=kNETrIphJJ22njQhm1S5qTVmgcmMnfHRgwyuFCyqMbKGRm6nZKGz1F7SHKV1S+yIGd Pd0dlJp01VjJYeB07y7/bH8tFXX0DMtlJXGkfdr+YL6DBXa6XRZfsVkZs09JmCWMc9Lj i5k8AXe/TDrfxsw15f3ZwMD165EnMeoFoXb5xHvbh5rxF9xocwFWv4WBAnk6kWJ8f0cX r+I+uccGFUqMl6hb6XY+231xeHCy/5BH31hJf88CTb8JX/pr79VWE7QuHyaVT/iC0KWu w5dwawcLL0LskRXDKSBbBt7b6sVgE2/IcnOip5kyFXkc7hjW95n1m2rnEm2d6uBq/p31 kzCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id o24si3242669qto.49.2018.02.13.02.04.26; Tue, 13 Feb 2018 02:04:26 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id E837E617B4; Tue, 13 Feb 2018 10:04:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 0835D6176F; Tue, 13 Feb 2018 10:00:45 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 4F90C6150C; Tue, 13 Feb 2018 10:00:35 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id C7EBC6172B for ; Tue, 13 Feb 2018 10:00:15 +0000 (UTC) Received: from mxback10o.mail.yandex.net (mxback10o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::24]) by forward100o.mail.yandex.net (Yandex) with ESMTP id D7EBF2A231EE for ; Tue, 13 Feb 2018 13:00:11 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback10o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id h3mSSwVRwZ-0BOaCxVI; Tue, 13 Feb 2018 13:00:11 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 6ASWNO8Dvc-0BaGcntj; Tue, 13 Feb 2018 13:00:11 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 13 Feb 2018 13:00:07 +0300 Message-Id: <1518516009-30109-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518516009-30109-1-git-send-email-odpbot@yandex.ru> References: <1518516009-30109-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 472 Subject: [lng-odp] [PATCH v1 2/4] validation: packet: create parse test suite X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Petri Savolainen Move parse tests into own suite before adding new test cases. There will be many parse test cases as there are many combinations of good and bad packet formats. Signed-off-by: Petri Savolainen --- /** Email created from pull request 472 (psavol:master-parser-validation) ** https://github.com/Linaro/odp/pull/472 ** Patch: https://github.com/Linaro/odp/pull/472.patch ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847 ** Merge commit sha: aa702da6919f7e56a6ed59d3120233c97590b4f1 **/ test/validation/api/packet/packet.c | 215 +++++++++++++++++++++++------------- test/validation/api/packet/packet.h | 1 - 2 files changed, 137 insertions(+), 79 deletions(-) diff --git a/test/validation/api/packet/packet.c b/test/validation/api/packet/packet.c index 1188c683c..ea3db0c61 100644 --- a/test/validation/api/packet/packet.c +++ b/test/validation/api/packet/packet.c @@ -41,6 +41,25 @@ static struct udata_struct { "abcdefg", }; +static struct { + odp_pool_t pool; + odp_proto_chksums_t all_chksums; + int num_pkt; +} parse_test; + +static uint32_t parse_test_pkt_len[] = { + sizeof(test_packet_arp), + sizeof(test_packet_ipv4_icmp), + sizeof(test_packet_ipv4_tcp), + sizeof(test_packet_ipv4_udp), + sizeof(test_packet_vlan_ipv4_udp), + sizeof(test_packet_vlan_qinq_ipv4_udp), + sizeof(test_packet_ipv6_icmp), + sizeof(test_packet_ipv6_tcp), + sizeof(test_packet_ipv6_udp), + sizeof(test_packet_vlan_ipv6_udp) +}; + #define packet_compare_offset(pkt1, off1, pkt2, off2, len) \ _packet_compare_offset((pkt1), (off1), (pkt2), (off2), (len), __LINE__) @@ -2459,41 +2478,18 @@ void packet_test_ref(void) odp_packet_free(ref_pkt[1]); } -void packet_test_parse(void) +static int packet_parse_suite_init(void) { - odp_pool_t pool; + int num_test_pkt, i; + uint32_t max_len; odp_pool_param_t param; - 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]; - uint32_t test_pkt_len[] = {sizeof(test_packet_arp), - sizeof(test_packet_ipv4_icmp), - sizeof(test_packet_ipv4_tcp), - sizeof(test_packet_ipv4_udp), - sizeof(test_packet_vlan_ipv4_udp), - sizeof(test_packet_vlan_qinq_ipv4_udp), - sizeof(test_packet_ipv6_icmp), - sizeof(test_packet_ipv6_tcp), - 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); + + num_test_pkt = sizeof(parse_test_pkt_len) / sizeof(uint32_t); max_len = 0; for (i = 0; i < num_test_pkt; i++) { - if (max_len < test_pkt_len[i]) - max_len = test_pkt_len[i]; + if (max_len < parse_test_pkt_len[i]) + max_len = parse_test_pkt_len[i]; } odp_pool_param_init(¶m); @@ -2503,19 +2499,59 @@ void packet_test_parse(void) param.pkt.len = max_len; param.pkt.num = 100; - pool = odp_pool_create("test_parse_pool", ¶m); - CU_ASSERT_FATAL(pool != ODP_POOL_INVALID); + parse_test.pool = odp_pool_create("parse_test_pool", ¶m); + + if (parse_test.pool == ODP_POOL_INVALID) + return -1; + + parse_test.all_chksums.all_chksum = 0; + parse_test.all_chksums.chksum.ipv4 = 1; + parse_test.all_chksums.chksum.udp = 1; + parse_test.all_chksums.chksum.tcp = 1; + parse_test.all_chksums.chksum.sctp = 1; + + parse_test.num_pkt = 10; + + return 0; +} + +static int packet_parse_suite_term(void) +{ + if (odp_pool_destroy(parse_test.pool)) + return -1; + + return 0; +} + +static void parse_test_alloc(odp_packet_t pkt[], const uint8_t test_packet[], + uint32_t len) +{ + int ret, i; + int num_pkt = parse_test.num_pkt; - /* Ethernet/IPv4/UDP */ - len = sizeof(test_packet_ipv4_udp); - ret = odp_packet_alloc_multi(pool, len, pkt, num_pkt); + ret = odp_packet_alloc_multi(parse_test.pool, len, pkt, num_pkt); CU_ASSERT_FATAL(ret == num_pkt); for (i = 0; i < num_pkt; i++) { - ret = odp_packet_copy_from_mem(pkt[i], 0, len, - test_packet_ipv4_udp); - CU_ASSERT(ret == 0); + ret = odp_packet_copy_from_mem(pkt[i], 0, len, test_packet); + CU_ASSERT_FATAL(ret == 0); + } +} +/* Ethernet/IPv4/UDP */ +static void parse_eth_ipv4_udp(void) +{ + odp_packet_parse_param_t parse; + int i; + odp_packet_chksum_status_t chksum_status; + int num_pkt = parse_test.num_pkt; + odp_packet_t pkt[num_pkt]; + uint32_t offset[num_pkt]; + + parse_test_alloc(pkt, test_packet_ipv4_udp, + sizeof(test_packet_ipv4_udp)); + + for (i = 0; i < num_pkt; i++) { offset[i] = 0; chksum_status = odp_packet_l3_chksum_status(pkt[i]); @@ -2526,7 +2562,7 @@ void packet_test_parse(void) parse.proto = ODP_PROTO_ETH; parse.last_layer = ODP_PROTO_LAYER_ALL; - parse.chksums = all_chksums; + parse.chksums = parse_test.all_chksums; CU_ASSERT(odp_packet_parse(pkt[0], offset[0], &parse) == 0); CU_ASSERT(odp_packet_parse_multi(&pkt[1], &offset[1], @@ -2541,19 +2577,22 @@ void packet_test_parse(void) } odp_packet_free_multi(pkt, num_pkt); +} - /* IPv4/UDP */ - len = sizeof(test_packet_ipv4_udp); - ret = odp_packet_alloc_multi(pool, len, pkt, num_pkt); - CU_ASSERT_FATAL(ret == num_pkt); +/* IPv4/UDP */ +static void parse_ipv4_udp(void) +{ + odp_packet_parse_param_t parse; + int i; + int num_pkt = parse_test.num_pkt; + odp_packet_t pkt[num_pkt]; + uint32_t offset[num_pkt]; - for (i = 0; i < num_pkt; i++) { - ret = odp_packet_copy_from_mem(pkt[i], 0, len, - test_packet_ipv4_udp); - CU_ASSERT(ret == 0); + parse_test_alloc(pkt, test_packet_ipv4_udp, + sizeof(test_packet_ipv4_udp)); + for (i = 0; i < num_pkt; i++) offset[i] = 14; - } parse.proto = ODP_PROTO_IPV4; parse.last_layer = ODP_PROTO_LAYER_L4; @@ -2571,19 +2610,22 @@ void packet_test_parse(void) } odp_packet_free_multi(pkt, num_pkt); +} - /* Ethernet/IPv4/TCP */ - len = sizeof(test_packet_ipv4_tcp); - ret = odp_packet_alloc_multi(pool, len, pkt, num_pkt); - CU_ASSERT_FATAL(ret == num_pkt); +/* Ethernet/IPv4/TCP */ +static void parse_eth_ipv4_tcp(void) +{ + odp_packet_parse_param_t parse; + int i; + int num_pkt = parse_test.num_pkt; + odp_packet_t pkt[num_pkt]; + uint32_t offset[num_pkt]; - for (i = 0; i < num_pkt; i++) { - ret = odp_packet_copy_from_mem(pkt[i], 0, len, - test_packet_ipv4_tcp); - CU_ASSERT(ret == 0); + parse_test_alloc(pkt, test_packet_ipv4_tcp, + sizeof(test_packet_ipv4_tcp)); + for (i = 0; i < num_pkt; i++) offset[i] = 0; - } parse.proto = ODP_PROTO_ETH; parse.last_layer = ODP_PROTO_LAYER_L4; @@ -2601,19 +2643,22 @@ void packet_test_parse(void) } odp_packet_free_multi(pkt, num_pkt); +} - /* Ethernet/IPv6/UDP */ - len = sizeof(test_packet_ipv6_udp); - ret = odp_packet_alloc_multi(pool, len, pkt, num_pkt); - CU_ASSERT_FATAL(ret == num_pkt); +/* Ethernet/IPv6/UDP */ +static void parse_eth_ipv6_udp(void) +{ + odp_packet_parse_param_t parse; + int i; + int num_pkt = parse_test.num_pkt; + odp_packet_t pkt[num_pkt]; + uint32_t offset[num_pkt]; - for (i = 0; i < num_pkt; i++) { - ret = odp_packet_copy_from_mem(pkt[i], 0, len, - test_packet_ipv6_udp); - CU_ASSERT(ret == 0); + parse_test_alloc(pkt, test_packet_ipv6_udp, + sizeof(test_packet_ipv6_udp)); + for (i = 0; i < num_pkt; i++) offset[i] = 0; - } parse.proto = ODP_PROTO_ETH; parse.last_layer = ODP_PROTO_LAYER_L4; @@ -2632,19 +2677,22 @@ void packet_test_parse(void) } odp_packet_free_multi(pkt, num_pkt); +} - /* Ethernet/IPv6/TCP */ - len = sizeof(test_packet_ipv6_tcp); - ret = odp_packet_alloc_multi(pool, len, pkt, num_pkt); - CU_ASSERT_FATAL(ret == num_pkt); +/* Ethernet/IPv6/TCP */ +static void parse_eth_ipv6_tcp(void) +{ + odp_packet_parse_param_t parse; + int i; + int num_pkt = parse_test.num_pkt; + odp_packet_t pkt[num_pkt]; + uint32_t offset[num_pkt]; - for (i = 0; i < num_pkt; i++) { - ret = odp_packet_copy_from_mem(pkt[i], 0, len, - test_packet_ipv6_tcp); - CU_ASSERT(ret == 0); + parse_test_alloc(pkt, test_packet_ipv6_tcp, + sizeof(test_packet_ipv6_tcp)); + for (i = 0; i < num_pkt; i++) offset[i] = 0; - } parse.proto = ODP_PROTO_ETH; parse.last_layer = ODP_PROTO_LAYER_ALL; @@ -2663,8 +2711,6 @@ void packet_test_parse(void) } odp_packet_free_multi(pkt, num_pkt); - - odp_pool_destroy(pool); } odp_testinfo_t packet_suite[] = { @@ -2698,7 +2744,15 @@ odp_testinfo_t packet_suite[] = { ODP_TEST_INFO(packet_test_align), ODP_TEST_INFO(packet_test_offset), ODP_TEST_INFO(packet_test_ref), - ODP_TEST_INFO(packet_test_parse), + ODP_TEST_INFO_NULL, +}; + +odp_testinfo_t packet_parse_suite[] = { + ODP_TEST_INFO(parse_eth_ipv4_udp), + ODP_TEST_INFO(parse_ipv4_udp), + ODP_TEST_INFO(parse_eth_ipv4_tcp), + ODP_TEST_INFO(parse_eth_ipv6_udp), + ODP_TEST_INFO(parse_eth_ipv6_tcp), ODP_TEST_INFO_NULL, }; @@ -2708,6 +2762,11 @@ odp_suiteinfo_t packet_suites[] = { .init_func = packet_suite_init, .term_func = packet_suite_term, }, + { .name = "packet parse tests", + .testinfo_tbl = packet_parse_suite, + .init_func = packet_parse_suite_init, + .term_func = packet_parse_suite_term, + }, ODP_SUITE_INFO_NULL, }; diff --git a/test/validation/api/packet/packet.h b/test/validation/api/packet/packet.h index 1d9947afa..798b272b9 100644 --- a/test/validation/api/packet/packet.h +++ b/test/validation/api/packet/packet.h @@ -40,7 +40,6 @@ void packet_test_extend_ref(void); void packet_test_align(void); void packet_test_offset(void); void packet_test_ref(void); -void packet_test_parse(void); /* test arrays: */ extern odp_testinfo_t packet_suite[]; From patchwork Tue Feb 13 10:00:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 128209 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4087559ljc; Tue, 13 Feb 2018 02:05:38 -0800 (PST) X-Google-Smtp-Source: AH8x224e4TYViDrqjaI2EgoWx2uZLShsfrgeZGJJxNGxJDs4PiCpDN/iNl0R6TckR1bHmJeMTcQU X-Received: by 10.55.110.193 with SMTP id j184mr1021170qkc.70.1518516338486; Tue, 13 Feb 2018 02:05:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518516338; cv=none; d=google.com; s=arc-20160816; b=Bz3ruD5U5hdQo44MCjcP67VFP1bNL49cU2XW8r7KNysMXL/8bbTlFalMbzDRXH1Z74 ZP9tG1pfnkZRO+UcGdqyEjHqP4QvOGMBQiqqODGAQhZk3yjBzXjnNxgMhQEPQSDULbOB O6MUxivm7Zi3OPtj6TWMlbENiu5o842/ozAuGvzhoDKpMZhYsRm2yBYJ2MvMh0BLscRy wqlxrBwkpDlwKpnKozWpCZuc7pnSrpxWQokhVBaVPwfeqtQyhwUAq5IyyLzOdHKQxZmO wB/Vy2iusQjaiSde+2NKMVAKH2R1mGaYUJlsf1iuZLHg/eVxajrhL+M1sYxHv5guRXXn FJLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=fSck4GEeAXkB1FBadCL6KRbF1aqXHIa2DMnhRkREGyk=; b=wHjuS+CQDz8e8VPJ1YJd45AzbZAVKj2AXR6OH2Dkktnxw3xJ2W4YRLY65oy/lxenHS J+e7j2AXzAuZk4Rch/RFOO/uZ/Hdk1muREqghJLiaAlmwEV1sQOrUHvZ3Z4DHex1Uc5/ TtPspoh8JwSuiTjuVqBn8jy7T4VvwJpSyM+M0iJTNYyMUFQQ/rATCOX2GTQYUveZGR9b uJbhl4+zqI9cq3NurUk9xEnnptan3spTzexfR83Oy4iWSfCFiEjZbysf9YzqynbMNthA 1agN35N7OKCNoSId9WlYBnzGjrG7rWtXgzAnScSz915UHIp3CsAx7bx05aKdrGHk1W4G ONGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id v187si1856262qkd.474.2018.02.13.02.05.38; Tue, 13 Feb 2018 02:05:38 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 10B37608DF; Tue, 13 Feb 2018 10:05:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id B37306174B; Tue, 13 Feb 2018 10:03:29 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 9C0676174B; Tue, 13 Feb 2018 10:03:25 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id 3DF236174B for ; Tue, 13 Feb 2018 10:01:05 +0000 (UTC) Received: from mxback7o.mail.yandex.net (mxback7o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::21]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 4743C42FE7 for ; Tue, 13 Feb 2018 13:00:13 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback7o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id xRMXuh0DCR-0DHaAZGW; Tue, 13 Feb 2018 13:00:13 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 6ASWNO8Dvc-0Ba8CUpX; Tue, 13 Feb 2018 13:00:11 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 13 Feb 2018 13:00:08 +0300 Message-Id: <1518516009-30109-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518516009-30109-1-git-send-email-odpbot@yandex.ru> References: <1518516009-30109-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 472 Subject: [lng-odp] [PATCH v1 3/4] validation: packet: add parser test cases X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Petri Savolainen Add remaining test cases for packet formats already defined in test_packet_parser.h file. Signed-off-by: Petri Savolainen --- /** Email created from pull request 472 (psavol:master-parser-validation) ** https://github.com/Linaro/odp/pull/472 ** Patch: https://github.com/Linaro/odp/pull/472.patch ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847 ** Merge commit sha: aa702da6919f7e56a6ed59d3120233c97590b4f1 **/ test/validation/api/packet/packet.c | 219 ++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) diff --git a/test/validation/api/packet/packet.c b/test/validation/api/packet/packet.c index ea3db0c61..1ec3585b5 100644 --- a/test/validation/api/packet/packet.c +++ b/test/validation/api/packet/packet.c @@ -2636,6 +2636,7 @@ static void parse_eth_ipv4_tcp(void) num_pkt - 1, &parse) == (num_pkt - 1)); for (i = 0; i < num_pkt; i++) { + CU_ASSERT(odp_packet_has_eth(pkt[i])); CU_ASSERT(odp_packet_has_ipv4(pkt[i])); CU_ASSERT(odp_packet_has_tcp(pkt[i])); CU_ASSERT(!odp_packet_has_ipv6(pkt[i])); @@ -2713,6 +2714,218 @@ static void parse_eth_ipv6_tcp(void) odp_packet_free_multi(pkt, num_pkt); } +/* Ethernet/VLAN/IPv4/UDP */ +static void parse_eth_vlan_ipv4_udp(void) +{ + odp_packet_parse_param_t parse; + int i; + int num_pkt = parse_test.num_pkt; + odp_packet_t pkt[num_pkt]; + uint32_t offset[num_pkt]; + + parse_test_alloc(pkt, test_packet_vlan_ipv4_udp, + sizeof(test_packet_vlan_ipv4_udp)); + + for (i = 0; i < num_pkt; i++) + offset[i] = 0; + + parse.proto = ODP_PROTO_ETH; + parse.last_layer = ODP_PROTO_LAYER_L4; + parse.chksums.all_chksum = 0; + + CU_ASSERT(odp_packet_parse(pkt[0], offset[0], &parse) == 0); + CU_ASSERT(odp_packet_parse_multi(&pkt[1], &offset[1], + num_pkt - 1, &parse) == (num_pkt - 1)); + + for (i = 0; i < num_pkt; i++) { + CU_ASSERT(odp_packet_has_eth(pkt[i])); + CU_ASSERT(odp_packet_has_vlan(pkt[i])); + CU_ASSERT(odp_packet_has_ipv4(pkt[i])); + CU_ASSERT(odp_packet_has_udp(pkt[i])); + CU_ASSERT(!odp_packet_has_ipv6(pkt[i])); + CU_ASSERT(!odp_packet_has_tcp(pkt[i])); + } + + odp_packet_free_multi(pkt, num_pkt); +} + +/* Ethernet/VLAN/IPv6/UDP */ +static void parse_eth_vlan_ipv6_udp(void) +{ + odp_packet_parse_param_t parse; + int i; + int num_pkt = parse_test.num_pkt; + odp_packet_t pkt[num_pkt]; + uint32_t offset[num_pkt]; + + parse_test_alloc(pkt, test_packet_vlan_ipv6_udp, + sizeof(test_packet_vlan_ipv6_udp)); + + for (i = 0; i < num_pkt; i++) + offset[i] = 0; + + parse.proto = ODP_PROTO_ETH; + parse.last_layer = ODP_PROTO_LAYER_L4; + parse.chksums.all_chksum = 0; + + CU_ASSERT(odp_packet_parse(pkt[0], offset[0], &parse) == 0); + CU_ASSERT(odp_packet_parse_multi(&pkt[1], &offset[1], + num_pkt - 1, &parse) == (num_pkt - 1)); + + for (i = 0; i < num_pkt; i++) { + CU_ASSERT(odp_packet_has_eth(pkt[i])); + CU_ASSERT(odp_packet_has_vlan(pkt[i])); + CU_ASSERT(odp_packet_has_ipv6(pkt[i])); + CU_ASSERT(odp_packet_has_udp(pkt[i])); + CU_ASSERT(!odp_packet_has_ipv4(pkt[i])); + CU_ASSERT(!odp_packet_has_tcp(pkt[i])); + } + + odp_packet_free_multi(pkt, num_pkt); +} + +/* Ethernet/VLAN/VLAN/IPv4/UDP */ +static void parse_eth_vlan_qinq_ipv4_udp(void) +{ + odp_packet_parse_param_t parse; + int i; + int num_pkt = parse_test.num_pkt; + odp_packet_t pkt[num_pkt]; + uint32_t offset[num_pkt]; + + parse_test_alloc(pkt, test_packet_vlan_qinq_ipv4_udp, + sizeof(test_packet_vlan_qinq_ipv4_udp)); + + for (i = 0; i < num_pkt; i++) + offset[i] = 0; + + parse.proto = ODP_PROTO_ETH; + parse.last_layer = ODP_PROTO_LAYER_L4; + parse.chksums.all_chksum = 0; + + CU_ASSERT(odp_packet_parse(pkt[0], offset[0], &parse) == 0); + CU_ASSERT(odp_packet_parse_multi(&pkt[1], &offset[1], + num_pkt - 1, &parse) == (num_pkt - 1)); + + for (i = 0; i < num_pkt; i++) { + CU_ASSERT(odp_packet_has_eth(pkt[i])); + CU_ASSERT(odp_packet_has_vlan(pkt[i])); + CU_ASSERT(odp_packet_has_vlan_qinq(pkt[i])); + CU_ASSERT(odp_packet_has_ipv4(pkt[i])); + CU_ASSERT(odp_packet_has_udp(pkt[i])); + CU_ASSERT(!odp_packet_has_ipv6(pkt[i])); + CU_ASSERT(!odp_packet_has_tcp(pkt[i])); + } + + odp_packet_free_multi(pkt, num_pkt); +} + +/* Ethernet/ARP */ +static void parse_eth_arp(void) +{ + odp_packet_parse_param_t parse; + int i; + int num_pkt = parse_test.num_pkt; + odp_packet_t pkt[num_pkt]; + uint32_t offset[num_pkt]; + + parse_test_alloc(pkt, test_packet_arp, + sizeof(test_packet_arp)); + + for (i = 0; i < num_pkt; i++) + offset[i] = 0; + + parse.proto = ODP_PROTO_ETH; + parse.last_layer = ODP_PROTO_LAYER_L4; + parse.chksums.all_chksum = 0; + + CU_ASSERT(odp_packet_parse(pkt[0], offset[0], &parse) == 0); + CU_ASSERT(odp_packet_parse_multi(&pkt[1], &offset[1], + num_pkt - 1, &parse) == (num_pkt - 1)); + + for (i = 0; i < num_pkt; i++) { + CU_ASSERT(odp_packet_has_eth(pkt[i])); + CU_ASSERT(odp_packet_has_eth_bcast(pkt[i])); + CU_ASSERT(odp_packet_has_arp(pkt[i])); + CU_ASSERT(!odp_packet_has_vlan(pkt[i])); + CU_ASSERT(!odp_packet_has_ipv4(pkt[i])); + CU_ASSERT(!odp_packet_has_ipv6(pkt[i])); + CU_ASSERT(!odp_packet_has_udp(pkt[i])); + } + + odp_packet_free_multi(pkt, num_pkt); +} + +/* Ethernet/IPv4/ICMP */ +static void parse_eth_ipv4_icmp(void) +{ + odp_packet_parse_param_t parse; + int i; + int num_pkt = parse_test.num_pkt; + odp_packet_t pkt[num_pkt]; + uint32_t offset[num_pkt]; + + parse_test_alloc(pkt, test_packet_ipv4_icmp, + sizeof(test_packet_ipv4_icmp)); + + for (i = 0; i < num_pkt; i++) + offset[i] = 0; + + parse.proto = ODP_PROTO_ETH; + parse.last_layer = ODP_PROTO_LAYER_L4; + parse.chksums.all_chksum = 0; + + CU_ASSERT(odp_packet_parse(pkt[0], offset[0], &parse) == 0); + CU_ASSERT(odp_packet_parse_multi(&pkt[1], &offset[1], + num_pkt - 1, &parse) == (num_pkt - 1)); + + for (i = 0; i < num_pkt; i++) { + CU_ASSERT(odp_packet_has_eth(pkt[i])); + CU_ASSERT(odp_packet_has_ipv4(pkt[i])); + CU_ASSERT(odp_packet_has_icmp(pkt[i])); + CU_ASSERT(!odp_packet_has_eth_bcast(pkt[i])); + CU_ASSERT(!odp_packet_has_ipv6(pkt[i])); + CU_ASSERT(!odp_packet_has_tcp(pkt[i])); + } + + odp_packet_free_multi(pkt, num_pkt); +} + +/* Ethernet/IPv6/ICMP */ +static void parse_eth_ipv6_icmp(void) +{ + odp_packet_parse_param_t parse; + int i; + int num_pkt = parse_test.num_pkt; + odp_packet_t pkt[num_pkt]; + uint32_t offset[num_pkt]; + + parse_test_alloc(pkt, test_packet_ipv6_icmp, + sizeof(test_packet_ipv6_icmp)); + + for (i = 0; i < num_pkt; i++) + offset[i] = 0; + + parse.proto = ODP_PROTO_ETH; + parse.last_layer = ODP_PROTO_LAYER_L4; + parse.chksums.all_chksum = 0; + + CU_ASSERT(odp_packet_parse(pkt[0], offset[0], &parse) == 0); + CU_ASSERT(odp_packet_parse_multi(&pkt[1], &offset[1], + num_pkt - 1, &parse) == (num_pkt - 1)); + + for (i = 0; i < num_pkt; i++) { + CU_ASSERT(odp_packet_has_eth(pkt[i])); + CU_ASSERT(odp_packet_has_ipv6(pkt[i])); + CU_ASSERT(odp_packet_has_icmp(pkt[i])); + CU_ASSERT(!odp_packet_has_eth_bcast(pkt[i])); + CU_ASSERT(!odp_packet_has_ipv4(pkt[i])); + CU_ASSERT(!odp_packet_has_tcp(pkt[i])); + } + + odp_packet_free_multi(pkt, num_pkt); +} + odp_testinfo_t packet_suite[] = { ODP_TEST_INFO(packet_test_alloc_free), ODP_TEST_INFO(packet_test_alloc_free_multi), @@ -2753,6 +2966,12 @@ odp_testinfo_t packet_parse_suite[] = { ODP_TEST_INFO(parse_eth_ipv4_tcp), ODP_TEST_INFO(parse_eth_ipv6_udp), ODP_TEST_INFO(parse_eth_ipv6_tcp), + ODP_TEST_INFO(parse_eth_vlan_ipv4_udp), + ODP_TEST_INFO(parse_eth_vlan_ipv6_udp), + ODP_TEST_INFO(parse_eth_vlan_qinq_ipv4_udp), + ODP_TEST_INFO(parse_eth_arp), + ODP_TEST_INFO(parse_eth_ipv4_icmp), + ODP_TEST_INFO(parse_eth_ipv6_icmp), ODP_TEST_INFO_NULL, }; From patchwork Tue Feb 13 10:00:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 128207 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4084969ljc; Tue, 13 Feb 2018 02:02:31 -0800 (PST) X-Google-Smtp-Source: AH8x225obhXmI8BC8EKR7Xaizphkb256P9ZdNEPrF9OwI31AjWQSOrwRNJegqf8Z0FO5WAUJu8w4 X-Received: by 10.237.56.99 with SMTP id j90mr1038514qte.334.1518516151485; Tue, 13 Feb 2018 02:02:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518516151; cv=none; d=google.com; s=arc-20160816; b=HD0RsH75bckhAag60nFWX57bB/WVC/m9HgZ3gqvAh+QwCVsRvKluHDgxdv1JoyzxVR 6/xssIDu2DutqE7Z6Lq5P1ooTJyecQ15U8oHwaW/Fo3zl7K4z1fxijLHYGRvBKGyP0ap 6VjDWuciLcyE7LN8l/1AAs12mf1grP4MfvPTIwNruqOLxHvfRpWKcG8Q8mtlZF74XcJ0 GhiJVvhtnu5KBgjdCFlMEaXC41LFfH543eTWEKNXCXteYzVRtL7uiPwqFC9j6yHHiSCw etHN67IEXNK7ss1IZIqfi7uPHYSfl8hfJjCFxaHUS/LucmWqV34/PC9Opfa45K1XjhDD sYPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=FjNjh7FEurX5VY/Z2MCI8l3wZF5skIdKoxfDXm6Vxlg=; b=iFeA2EQ9mfLfSQpMNWt//RHvcQBFPLeyk5M4rVymD2AJL9mJifxg8rQI0xG/2DbLNE epeiVfT/PTtTfVz9SYd++6MZgbM2NuLgzCAPAl2eos99hQybl8I8zkoSzDGnaS8O5r5p 14IDJ8lPUXrGp6vdwIYNMqXRiyO2XN7j9dTy2HGNcgo7hvqoqH/CRJA9wysJzcyUd+2D SXCETfSK18LWET+stsJyQ4dicV6v3P0UM8hWxXxit1kXhaWOztHnaAvWzuDZ3FSc0oUD TZBFr2psdNNgL87KAOqQRmzk8xnBkjsIIy2XBCflGZz0FV1AgKEr8QhNTGMb8g9vwnkO wclA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id n59si3265229qtd.443.2018.02.13.02.02.31; Tue, 13 Feb 2018 02:02:31 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 2594C6179A; Tue, 13 Feb 2018 10:02:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 4816A61514; Tue, 13 Feb 2018 10:00:39 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D312D6063B; Tue, 13 Feb 2018 10:00:20 +0000 (UTC) Received: from forward100j.mail.yandex.net (forward100j.mail.yandex.net [5.45.198.240]) by lists.linaro.org (Postfix) with ESMTPS id 84A9E614E1 for ; Tue, 13 Feb 2018 10:00:15 +0000 (UTC) Received: from mxback12g.mail.yandex.net (mxback12g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:91]) by forward100j.mail.yandex.net (Yandex) with ESMTP id 1BA565D844E1 for ; Tue, 13 Feb 2018 13:00:14 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback12g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id WlTRzkwlOX-0EnKS0Gx; Tue, 13 Feb 2018 13:00:14 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 6ASWNO8Dvc-0DaW3PUO; Tue, 13 Feb 2018 13:00:13 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 13 Feb 2018 13:00:09 +0300 Message-Id: <1518516009-30109-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518516009-30109-1-git-send-email-odpbot@yandex.ru> References: <1518516009-30109-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 472 Subject: [lng-odp] [PATCH v1 4/4] validation: packet: add IPv4 SCTP parse test X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Petri Savolainen Added test for IPv4 / SCTP packet with payload data chunk type. Signed-off-by: Petri Savolainen --- /** Email created from pull request 472 (psavol:master-parser-validation) ** https://github.com/Linaro/odp/pull/472 ** Patch: https://github.com/Linaro/odp/pull/472.patch ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847 ** Merge commit sha: aa702da6919f7e56a6ed59d3120233c97590b4f1 **/ test/common/test_packet_parser.h | 74 ++++++++++++++++++------------------- test/validation/api/packet/packet.c | 39 ++++++++++++++++++- 2 files changed, 75 insertions(+), 38 deletions(-) diff --git a/test/common/test_packet_parser.h b/test/common/test_packet_parser.h index 918e0ad65..22c7e6c57 100644 --- a/test/common/test_packet_parser.h +++ b/test/common/test_packet_parser.h @@ -4,12 +4,6 @@ * SPDX-License-Identifier: BSD-3-Clause */ -/** - * @file - * - * Test packets for parser tests - */ - #ifndef TEST_PACKET_PARSER_H_ #define TEST_PACKET_PARSER_H_ @@ -21,9 +15,7 @@ extern "C" { /* Test packets without CRC */ -/** - * ARP request - */ +/* ARP request */ static const uint8_t test_packet_arp[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x09, 0x00, 0x04, 0x00, 0x08, 0x06, 0x00, 0x01, @@ -35,9 +27,7 @@ static const uint8_t test_packet_arp[] = { 0x0E, 0x0F, 0x10, 0x11 }; -/** - * ICMPv4 echo reply - */ +/* ICMPv4 echo reply */ static const uint8_t test_packet_ipv4_icmp[] = { 0x00, 0x00, 0x09, 0x00, 0x05, 0x00, 0x00, 0x00, 0x09, 0x00, 0x04, 0x00, 0x08, 0x00, 0x45, 0x00, @@ -49,9 +39,7 @@ static const uint8_t test_packet_ipv4_icmp[] = { 0x0E, 0x0F, 0x10, 0x11 }; -/** - * IPv4 TCP - */ +/* IPv4 TCP */ static const uint8_t test_packet_ipv4_tcp[] = { 0x00, 0x00, 0x09, 0x00, 0x05, 0x00, 0x00, 0x00, 0x09, 0x00, 0x04, 0x00, 0x08, 0x00, 0x45, 0x00, @@ -63,9 +51,7 @@ static const uint8_t test_packet_ipv4_tcp[] = { 0x02, 0x03, 0x04, 0x05 }; -/** - * IPv4 UDP - */ +/* IPv4 UDP */ static const uint8_t test_packet_ipv4_udp[] = { 0x00, 0x00, 0x09, 0x00, 0x05, 0x00, 0x00, 0x00, 0x09, 0x00, 0x04, 0x00, 0x08, 0x00, 0x45, 0x00, @@ -77,9 +63,8 @@ static const uint8_t test_packet_ipv4_udp[] = { 0x0E, 0x0F, 0x10, 0x11 }; -/** - * VLAN IPv4 UDP - * - ID: 23 +/* VLAN IPv4 UDP + * - type 0x8100, tag 23 */ static const uint8_t test_packet_vlan_ipv4_udp[] = { 0x00, 0x00, 0x09, 0x00, 0x05, 0x00, 0x00, 0x00, @@ -92,10 +77,9 @@ static const uint8_t test_packet_vlan_ipv4_udp[] = { 0x0A, 0x0B, 0x0C, 0x0D }; -/** - * VLAN Q-in-Q IPv4 UDP - * - Outer: Tag Protocol ID 0x88a8, VLAN ID 1 - * - Inner: Tag Protocol ID 0x8100, VLAN ID 2 +/* VLAN Q-in-Q IPv4 UDP + * - Outer: type 0x88a8, tag 1 + * - Inner: type 0x8100, tag 2 */ static const uint8_t test_packet_vlan_qinq_ipv4_udp[] = { 0x00, 0x00, 0x09, 0x00, 0x05, 0x00, 0x00, 0x00, @@ -108,9 +92,7 @@ static const uint8_t test_packet_vlan_qinq_ipv4_udp[] = { 0x06, 0x07, 0x08, 0x09 }; -/** - * ICMPv6 echo request - */ +/* ICMPv6 echo request */ static const uint8_t test_packet_ipv6_icmp[] = { 0x00, 0x00, 0x09, 0x00, 0x05, 0x00, 0x00, 0x00, 0x09, 0x00, 0x04, 0x00, 0x86, 0xDD, 0x60, 0x30, @@ -122,9 +104,7 @@ static const uint8_t test_packet_ipv6_icmp[] = { 0x1B, 0xC2, 0x00, 0x01, 0x00, 0x02 }; -/** - * IPv6 TCP - */ +/* IPv6 TCP */ static const uint8_t test_packet_ipv6_tcp[] = { 0x00, 0x00, 0x09, 0x00, 0x05, 0x00, 0x00, 0x00, 0x09, 0x00, 0x04, 0x00, 0x86, 0xDD, 0x60, 0x30, @@ -138,9 +118,7 @@ static const uint8_t test_packet_ipv6_tcp[] = { 0x00, 0x00 }; -/** - * IPv6 UDP - */ +/* IPv6 UDP */ static const uint8_t test_packet_ipv6_udp[] = { 0x00, 0x00, 0x09, 0x00, 0x05, 0x00, 0x00, 0x00, 0x09, 0x00, 0x04, 0x00, 0x86, 0xDD, 0x60, 0x30, @@ -152,9 +130,8 @@ static const uint8_t test_packet_ipv6_udp[] = { 0x00, 0x3F, 0x00, 0x08, 0x9B, 0x68 }; -/** - * VLAN IPv6 - * - ID: 23 +/* VLAN IPv6 + * - type 0x8100, tag 23 */ static const uint8_t test_packet_vlan_ipv6_udp[] = { 0x00, 0x00, 0x09, 0x00, 0x05, 0x00, 0x00, 0x00, @@ -168,6 +145,29 @@ static const uint8_t test_packet_vlan_ipv6_udp[] = { 0x9B, 0x68 }; +/* IPv4 SCTP + * - chunk type: payload data + */ +static const uint8_t test_packet_ipv4_sctp[] = { + 0x00, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x00, 0x01, + 0x02, 0x03, 0x04, 0x05, 0x08, 0x00, 0x45, 0x00, + 0x00, 0x77, 0x00, 0x01, 0x00, 0x00, 0x40, 0x84, + 0xF8, 0xAE, 0xC0, 0xA8, 0x00, 0x01, 0xC0, 0xA8, + 0x00, 0x02, 0x04, 0xD2, 0x16, 0x2E, 0xDE, 0xAD, + 0xBE, 0xEF, 0x31, 0x44, 0xE3, 0xFE, 0x00, 0x00, + 0x00, 0x57, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x68, + 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6D, 0x79, + 0x20, 0x64, 0x75, 0x6D, 0x6D, 0x79, 0x20, 0x70, + 0x61, 0x79, 0x6C, 0x6F, 0x61, 0x64, 0x20, 0x73, + 0x74, 0x72, 0x69, 0x6E, 0x67, 0x2E, 0x20, 0x54, + 0x68, 0x65, 0x20, 0x6C, 0x65, 0x6E, 0x67, 0x74, + 0x68, 0x20, 0x6F, 0x66, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6E, 0x67, + 0x20, 0x69, 0x73, 0x20, 0x37, 0x31, 0x20, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x2E +}; + #ifdef __cplusplus } #endif diff --git a/test/validation/api/packet/packet.c b/test/validation/api/packet/packet.c index 1ec3585b5..d73010c9c 100644 --- a/test/validation/api/packet/packet.c +++ b/test/validation/api/packet/packet.c @@ -57,7 +57,8 @@ static uint32_t parse_test_pkt_len[] = { sizeof(test_packet_ipv6_icmp), sizeof(test_packet_ipv6_tcp), sizeof(test_packet_ipv6_udp), - sizeof(test_packet_vlan_ipv6_udp) + sizeof(test_packet_vlan_ipv6_udp), + sizeof(test_packet_ipv4_sctp) }; #define packet_compare_offset(pkt1, off1, pkt2, off2, len) \ @@ -2926,6 +2927,41 @@ static void parse_eth_ipv6_icmp(void) odp_packet_free_multi(pkt, num_pkt); } +/* Ethernet/IPv4/SCTP */ +static void parse_eth_ipv4_sctp(void) +{ + odp_packet_parse_param_t parse; + int i; + int num_pkt = parse_test.num_pkt; + odp_packet_t pkt[num_pkt]; + uint32_t offset[num_pkt]; + + parse_test_alloc(pkt, test_packet_ipv4_sctp, + sizeof(test_packet_ipv4_sctp)); + + for (i = 0; i < num_pkt; i++) + offset[i] = 0; + + parse.proto = ODP_PROTO_ETH; + parse.last_layer = ODP_PROTO_LAYER_L4; + parse.chksums.all_chksum = 0; + + CU_ASSERT(odp_packet_parse(pkt[0], offset[0], &parse) == 0); + CU_ASSERT(odp_packet_parse_multi(&pkt[1], &offset[1], + num_pkt - 1, &parse) == (num_pkt - 1)); + + for (i = 0; i < num_pkt; i++) { + CU_ASSERT(odp_packet_has_eth(pkt[i])); + CU_ASSERT(odp_packet_has_ipv4(pkt[i])); + CU_ASSERT(odp_packet_has_sctp(pkt[i])); + CU_ASSERT(!odp_packet_has_ipv6(pkt[i])); + CU_ASSERT(!odp_packet_has_tcp(pkt[i])); + CU_ASSERT(!odp_packet_has_udp(pkt[i])); + } + + odp_packet_free_multi(pkt, num_pkt); +} + odp_testinfo_t packet_suite[] = { ODP_TEST_INFO(packet_test_alloc_free), ODP_TEST_INFO(packet_test_alloc_free_multi), @@ -2972,6 +3008,7 @@ odp_testinfo_t packet_parse_suite[] = { ODP_TEST_INFO(parse_eth_arp), ODP_TEST_INFO(parse_eth_ipv4_icmp), ODP_TEST_INFO(parse_eth_ipv6_icmp), + ODP_TEST_INFO(parse_eth_ipv4_sctp), ODP_TEST_INFO_NULL, };