From patchwork Wed Feb 21 16:59:57 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: 129106 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp840217ljc; Wed, 21 Feb 2018 09:03:27 -0800 (PST) X-Google-Smtp-Source: AH8x2247JSfz8ZOXln29QYAzbAtQEHI7B9zbcMqFWCY9XN/BQnWvUEScsno/7SFbdkQvNmCTkcLY X-Received: by 10.200.49.108 with SMTP id h41mr5903832qtb.227.1519232607777; Wed, 21 Feb 2018 09:03:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519232607; cv=none; d=google.com; s=arc-20160816; b=WBW048RBS2fhPVKY7zzgMa2EyU3+lTJiDT3QzX4Zh9zZn8GUzHSldTKGldOwsWTMZZ aaTMCqNG3yKsy5zBCKrvWYot3wQYTd4axHHGKheiTaBbozEnISDSJno8mN8wolNkB3HT wCZugFWJrg5lLwAtRcxzN7pLz1+gG8+9isHixYvXGtTiMKFAZ4C4qQb2l/GlW7DruMhW gihLbShuDllWbV831HN9rvGRj1MYfpK/hEbp24FoR975Z2rJG6D5/pOowRVVdMZgFgQ/ 4euzziAOHN1fOcilyX+b+J9qkcYgWyyW8Mt/egfpWFL27DtHoDjtzprHEHbbs35ePN8b VNMw== 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=X83oJGoFPAGrslyeqnhhQ1qcqtxtmEyB3Fpy1MfXBwA=; b=mM1ICX7fevVgIxbmx4HrgoF4eyt1eQVRiGF8ASKvUivoo4q5n3mnpxmmmviq4GshcC Urm1SGyPqXOVZ4AQwUJU09SY6Y8yxcYpkSyJjzNh6cwKCR0PTRh02S0GzuhurLfH+5Gz cZfv+FrDTIcZlEgzVdllI4lrKZXmJOkP1NuWJHXiGVIFh0zcz7tUKJ3jbOvPWogseAi1 WXXR30F47oG7peNdgGDFhgwAUrbD9s2E62dgvmzF0x2ffeCC9rPL3RUtOtD/J8JpaTWx SjfQmeVprzV63Y7EKYWPl4n7pyFCirfwr0lkkIrud+eYniN6HA8ycbIONvY7ti3lT40d xSEQ== 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 k64si234865qte.406.2018.02.21.09.03.20; Wed, 21 Feb 2018 09:03:27 -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 5B610617B5; Wed, 21 Feb 2018 17:03:20 +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 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 5D639609DB; Wed, 21 Feb 2018 17:00: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 49DE86179A; Wed, 21 Feb 2018 17:00:18 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id A665161750 for ; Wed, 21 Feb 2018 17:00:15 +0000 (UTC) Received: from mxback8g.mail.yandex.net (mxback8g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:169]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 38E324305C97 for ; Wed, 21 Feb 2018 20:00:14 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback8g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id VVBky2h53i-0EmaCvYL; Wed, 21 Feb 2018 20:00:14 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id yTStk9eEsG-0Du4f2Pw; Wed, 21 Feb 2018 20: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: Wed, 21 Feb 2018 19:59:57 +0300 Message-Id: <1519232408-28445-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519232408-28445-1-git-send-email-odpbot@yandex.ru> References: <1519232408-28445-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 494 Subject: [lng-odp] [PATCH API-NEXT v1 4/15] validation: packet: verify odp_packet_l2_type() 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 Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 494 (lumag:ipsec-tfc-imp) ** https://github.com/Linaro/odp/pull/494 ** Patch: https://github.com/Linaro/odp/pull/494.patch ** Base sha: ea2afab619ae74108a03798bc358fdfcd29fdd88 ** Merge commit sha: 7bc900650676584bfb99c8a92c3d8812b458f172 **/ test/validation/api/packet/packet.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/validation/api/packet/packet.c b/test/validation/api/packet/packet.c index f829d0cb1..91e69204e 100644 --- a/test/validation/api/packet/packet.c +++ b/test/validation/api/packet/packet.c @@ -2552,6 +2552,8 @@ void packet_test_parse(void) CU_ASSERT(odp_packet_has_udp(pkt[i])); CU_ASSERT(!odp_packet_has_ipv6(pkt[i])); CU_ASSERT(!odp_packet_has_tcp(pkt[i])); + CU_ASSERT_EQUAL(odp_packet_l2_type(pkt[i]), + ODP_PROTO_L2_TYPE_ETH); CU_ASSERT_EQUAL(odp_packet_l3_type(pkt[i]), ODP_PROTO_L3_TYPE_IPV4); CU_ASSERT_EQUAL(odp_packet_l4_type(pkt[i]), @@ -2620,6 +2622,8 @@ void packet_test_parse(void) CU_ASSERT(odp_packet_has_tcp(pkt[i])); CU_ASSERT(!odp_packet_has_ipv6(pkt[i])); CU_ASSERT(!odp_packet_has_udp(pkt[i])); + CU_ASSERT_EQUAL(odp_packet_l2_type(pkt[i]), + ODP_PROTO_L2_TYPE_ETH); CU_ASSERT_EQUAL(odp_packet_l3_type(pkt[i]), ODP_PROTO_L3_TYPE_IPV4); CU_ASSERT_EQUAL(odp_packet_l4_type(pkt[i]), @@ -2655,6 +2659,8 @@ void packet_test_parse(void) CU_ASSERT(odp_packet_has_udp(pkt[i])); CU_ASSERT(!odp_packet_has_ipv4(pkt[i])); CU_ASSERT(!odp_packet_has_tcp(pkt[i])); + CU_ASSERT_EQUAL(odp_packet_l2_type(pkt[i]), + ODP_PROTO_L2_TYPE_ETH); CU_ASSERT_EQUAL(odp_packet_l3_type(pkt[i]), ODP_PROTO_L3_TYPE_IPV6); CU_ASSERT_EQUAL(odp_packet_l4_type(pkt[i]), @@ -2690,6 +2696,8 @@ void packet_test_parse(void) CU_ASSERT(odp_packet_has_tcp(pkt[i])); CU_ASSERT(!odp_packet_has_ipv4(pkt[i])); CU_ASSERT(!odp_packet_has_udp(pkt[i])); + CU_ASSERT_EQUAL(odp_packet_l2_type(pkt[i]), + ODP_PROTO_L2_TYPE_ETH); CU_ASSERT_EQUAL(odp_packet_l3_type(pkt[i]), ODP_PROTO_L3_TYPE_IPV6); CU_ASSERT_EQUAL(odp_packet_l4_type(pkt[i]),