From patchwork Mon Aug 20 11:00:00 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: 144599 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3827124ljj; Mon, 20 Aug 2018 04:03:03 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyp4GTheaOZeLwAevnsMwQcmqGioWifuji6fY3Nzt+E6LYyqxh2F8KGzYVnON9qB+D0jTPc X-Received: by 2002:ac8:3a05:: with SMTP id w5-v6mr5108420qte.142.1534762983542; Mon, 20 Aug 2018 04:03:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534762983; cv=none; d=google.com; s=arc-20160816; b=BcPe1JWZ88xNilUV6O92CaED6aWKtbM3kBw5sOR6QP4TORLmD3ecupfabBio/esqqr pH1/21gCSTVipp6rDRt+hcEcI9D8rt8t6L8wqhYqISD/kmV+y5Ba+EmpID0GNYpzlNo5 W0Z4JwifFEp/SSL06y37p5kbt0rjdLa9AtFkd6EEAJjJWwn8nDVwqZ0Wf7N+Ibk0Y02/ ZBL/BbywVEvQbkz/d146n+LEZ4oxlydINMCpnyJDNvoS98DT8xkkjykaQcnpEJeuKJnn 21RJBRlkKpC+Uu1NTruIKc8p5UqubY3SsLybfygoAqWGHNIrjlfeag/bU0I1md2XK1JY IgPA== 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=LQQ87RLf8H5IEWgJgVS4nmq76/Xl9cgOI5w6iOEicmE=; b=XdAGM7qT3lcsGPqkX47VYCttqctTQfbc+3XsjQYDY+WyzQbXqFs7eRdaeWjGGdvS/N ApNmGGslHCWhiO4NO7V38UvRGPEI+trJBMMNjOBOWvSWYJvMpT4kvavukCbU9WepODUc 5MBUDVJQ3U/Z3ey1P1B1/jnjymjekyaI5Ymj7sb2kmj1UT0LjGyPzki7WoOvhslThIou jpfgl5Tv+iDef+uNrvchxZmwlMaU27ymcW/yRTIR0mdQO2sbt/f2Ru8pnLfaqIaVN83w KBLpECNmzBEetauBEy8atEoy0aGq1ZOSgSc1FxiiGi4sAcehJuTYCCOzVwJCXaZCu6Oh 0WRw== 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 c123-v6si3188671qkf.346.2018.08.20.04.03.03; Mon, 20 Aug 2018 04:03:03 -0700 (PDT) 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 2B6D86863A; Mon, 20 Aug 2018 11:03:03 +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=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW 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 8D8E56863F; Mon, 20 Aug 2018 11:00:41 +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 E35C560816; Mon, 20 Aug 2018 11:00:23 +0000 (UTC) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [37.140.190.179]) by lists.linaro.org (Postfix) with ESMTPS id 952FE60816 for ; Mon, 20 Aug 2018 11:00:15 +0000 (UTC) Received: from mxback4j.mail.yandex.net (mxback4j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10d]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 3259A3D83358 for ; Mon, 20 Aug 2018 14:00:12 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback4j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id hVjXnvyeU6-0COGWxrn; Mon, 20 Aug 2018 14:00:12 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id x8w3cLDY5J-0Bt8boQO; Mon, 20 Aug 2018 14: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: Mon, 20 Aug 2018 11:00:00 +0000 Message-Id: <1534762808-15588-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534762808-15588-1-git-send-email-odpbot@yandex.ru> References: <1534762808-15588-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 674 Subject: [lng-odp] [PATCH v3 3/11] validation: pktio: parser: add SCTP 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: Dmitry Eremin-Solenikov Add SCTP packet parsing test, checking that protocol is properly recognized. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 674 (lumag:sctp-checksum) ** https://github.com/Linaro/odp/pull/674 ** Patch: https://github.com/Linaro/odp/pull/674.patch ** Base sha: dc28824415ea510e3ef62e47f7640bf4a8420fde ** Merge commit sha: b482f9618a6edb2a2f2491ee5a7af757eab93b24 **/ test/validation/api/pktio/parser.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/validation/api/pktio/parser.c b/test/validation/api/pktio/parser.c index f22a62555..10c7962f0 100644 --- a/test/validation/api/pktio/parser.c +++ b/test/validation/api/pktio/parser.c @@ -381,6 +381,24 @@ static void parser_test_vlan_qinq_ipv4_udp(void) odp_packet_free(pkt); } +static void parser_test_ipv4_sctp(void) +{ + odp_packet_t pkt; + + pkt = loopback_packet(pktio_a, pktio_b, test_packet_ipv4_sctp, + sizeof(test_packet_ipv4_sctp)); + CU_ASSERT_FATAL(pkt != ODP_PACKET_INVALID); + CU_ASSERT(odp_packet_has_eth(pkt)); + CU_ASSERT(odp_packet_has_ipv4(pkt)); + CU_ASSERT(odp_packet_has_sctp(pkt)); + + CU_ASSERT(!odp_packet_has_ipv6(pkt)); + CU_ASSERT(!odp_packet_has_tcp(pkt)); + CU_ASSERT(!odp_packet_has_udp(pkt)); + + odp_packet_free(pkt); +} + static void parser_test_ipv6_icmp(void) { odp_packet_t pkt; @@ -564,6 +582,7 @@ odp_testinfo_t parser_suite[] = { ODP_TEST_INFO(parser_test_ipv4_udp), ODP_TEST_INFO_CONDITIONAL(parser_test_vlan_ipv4_udp, loop_pktio), ODP_TEST_INFO_CONDITIONAL(parser_test_vlan_qinq_ipv4_udp, loop_pktio), + ODP_TEST_INFO(parser_test_ipv4_sctp), ODP_TEST_INFO(parser_test_ipv6_icmp), ODP_TEST_INFO(parser_test_ipv6_tcp), ODP_TEST_INFO(parser_test_ipv6_udp),