From patchwork Thu Aug 16 09:59:59 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: 144340 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1869569ljj; Thu, 16 Aug 2018 03:02:53 -0700 (PDT) X-Google-Smtp-Source: AA+uWPysk4LP3lVaUcEp7oCt+9NNX5e+4R9uprF3HIxohztaMgqVIk1iFGTw0p3SToiO0W7lU0+G X-Received: by 2002:ac8:1779:: with SMTP id u54-v6mr29283168qtk.285.1534413773728; Thu, 16 Aug 2018 03:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534413773; cv=none; d=google.com; s=arc-20160816; b=AL89PKmsBP9vbes92VnJR61pLY6Bc7UoK91qb5cQyJ5v2GV516Z3cSLr1Z/oBIsI9b o9m/VtbAiwEp3RNQsBJT3FV6xTERB4CRbrH356RpCimmvtr1ElJo+b4f6fF+XDy6STf5 J9saGq/VOa/QoT4+0uFazpattLUK95TumPgCtSQFnHcYxGQC6xKW0hw3FIkvto+E4dMy kpPKV756CDosGipOUDe66bejFjlVb7FfOiHrSMAPK+Hbe8x86MbaUXGyKlZIdoQfRfsE eiertGCHQeyA7oWLBJn3ZYM6N+jgmgG8L2vt6NNvmXbmMp14akYqn8RnV6xNKMBMqTvC CfBw== 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=VORBJU/j+l0FDx7qob877qyhAk/vRVYKWqeZXjj5Sk4=; b=thfXtsStUyHsYVz5dF3URFkNdC2Tckb3rPEnjuDjIHwrLzexAz4G49QJEWwhK1JdM+ eWg9mrM9vAE+U1PGkPRyZGwWAp5nVLTmf84tGit3n7TtEp/zaFZOxSMMVVWBv1OFA7vt 6fb7gsBHs3FeGxJIjoF6rWGTSm6NV3CNvjK+72GO8lclSqRT88/ZMCYIw3443upm5DvO 0AZ57OEYNjdjO766JlCB7fDK1JYAhpWoq1aK7QeypIqyZhLdFljawgryGsG2JO09Wj6n EeXbxIDbxSXXVyeNqg1zjA75/7DTCUcyFTJxw9ies54vDBJXY36LIvPHwMeW60oTafJf xYnA== 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 m5-v6si6108994qte.73.2018.08.16.03.02.53; Thu, 16 Aug 2018 03:02:53 -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 5539C68655; Thu, 16 Aug 2018 10:02:53 +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 EDEED60730; Thu, 16 Aug 2018 10:01:32 +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 7079168633; Thu, 16 Aug 2018 10:01:23 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 218A56861E for ; Thu, 16 Aug 2018 10:00:19 +0000 (UTC) Received: from mxback8j.mail.yandex.net (mxback8j.mail.yandex.net [IPv6:2a02:6b8:0:1619::111]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 5B5352A23987 for ; Thu, 16 Aug 2018 13:00:17 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback8j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id M9M253FCJ1-0Bied9M4; Thu, 16 Aug 2018 13:00:11 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id LpjbZWHmdB-0ArqFg1k; Thu, 16 Aug 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: Thu, 16 Aug 2018 09:59:59 +0000 Message-Id: <1534413607-8630-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534413607-8630-1-git-send-email-odpbot@yandex.ru> References: <1534413607-8630-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 674 Subject: [lng-odp] [PATCH v2 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: 44d3d4f3c02fc6f3ee9811bc4dc5f01561e519a4 **/ 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),