From patchwork Tue Feb 27 20: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: 129845 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp208727lja; Tue, 27 Feb 2018 12:01:16 -0800 (PST) X-Google-Smtp-Source: AG47ELui5UPgLBYvFAUgKG6uj+GZZSf3dWMSgW8j2kczuQfV0ulcdIa867KapwDJot8qQAAe2zyC X-Received: by 10.55.12.19 with SMTP id 19mr24779396qkm.277.1519761675479; Tue, 27 Feb 2018 12:01:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519761675; cv=none; d=google.com; s=arc-20160816; b=uVy0I2v1P0eSqsfLzjzbUdwtzcrJDmFXWpHOfwZi4ZRqS3r+tBb7IIlQk7wfRQ5RoZ hm8J2f2XDmmGbNKST2PiWZUwkIfZMqcRxCfi/3GyLOv1d7kEDCZbB6fNJvHAaaOM5bBa qN9UkSDN7NEEEiteJj7JmPtbhZCJjLLPI2x6jdYyZ/J8OSkGiW4Gy/kyTkjaFeqeHrrN xNXjCpsbuyuonJwuBYoid9EfhE2CyjJI9iKi44nHgfxA4MUGgNsEEFjJVcNlshcVbO1f Ywtga3wSuw1AKushuErruUD0GBnLdV7Uu+6yoNv1Er5u3+Llh1pDpgKxLkvsjQPCelaY 5HKg== 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=MbQDWOnuJMotj9/vN4a9GyMhDcxHbzf4vhgTdi72O3k=; b=SufaFxmscl1Knrs9wkaM7REANW0f66YxGjr00jqgDLQhCZ89Te2KhguPeY53lu2s9d atY/ToIUbwHfNBT0HOJYgJNQa9EgUZfjLKcXwlAI9DLqV05cQacJqeZpGm3CFbZsczGj YMupeCNfFQ+ojSpZRSUsUCKeHL7BVsbgO5mGHhDpyGMNvBlwuKwNDgkijCLfpNSO8OmZ Hobh0qpV6L88LZOfumAjCPfwBfGCeZs9AZfqLExbpwIvpkp+MX27kNAr2wY8/3rfD6rI YLFzIbLGmibm25Ei2z1zsRlFvsNKWQ1VXmRRlja+bA7JUXrYmKqXTVQWnnZFI7yKELZb EJIg== 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 a7si1139043qtk.231.2018.02.27.12.01.14; Tue, 27 Feb 2018 12:01:15 -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 EB1006176D; Tue, 27 Feb 2018 20:01:13 +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 6AFF761750; Tue, 27 Feb 2018 20:00:22 +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 791916173F; Tue, 27 Feb 2018 20:00:15 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 0055C61735 for ; Tue, 27 Feb 2018 20:00:14 +0000 (UTC) Received: from mxback10o.mail.yandex.net (mxback10o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::24]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 8C4E21841DE for ; Tue, 27 Feb 2018 23:00:12 +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 rnzQ6DQgRi-0CZ0h8lX; Tue, 27 Feb 2018 23:00:12 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Upcczghx1N-0BQuDtaN; Tue, 27 Feb 2018 23: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, 27 Feb 2018 23:00:00 +0300 Message-Id: <1519761609-20848-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519761609-20848-1-git-send-email-odpbot@yandex.ru> References: <1519761609-20848-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 502 Subject: [lng-odp] [PATCH API-NEXT v3 2/11] 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 502 (lumag:ipsec-imp-upd) ** https://github.com/Linaro/odp/pull/502 ** Patch: https://github.com/Linaro/odp/pull/502.patch ** Base sha: ce5c4f9e7ce9fe504451c29429b9ae9fb68083ae ** Merge commit sha: fcd6960c97fe9a0a399be4f3418ba3dd83134544 **/ 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 104d6c7dc..a564c0028 100644 --- a/test/validation/api/packet/packet.c +++ b/test/validation/api/packet/packet.c @@ -2605,6 +2605,8 @@ static void parse_eth_ipv4_udp(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]), @@ -2676,6 +2678,8 @@ static void parse_eth_ipv4_tcp(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]), @@ -2802,6 +2806,8 @@ static void parse_eth_vlan_ipv6_udp(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]), @@ -3056,6 +3062,8 @@ static void parse_eth_ipv6_ipsec_ah(void) CU_ASSERT(!odp_packet_has_ipv4(pkt[i])); CU_ASSERT(!odp_packet_has_tcp(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]),