From patchwork Thu Mar 1 21:00:44 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: 130419 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp3281571edc; Thu, 1 Mar 2018 13:05:20 -0800 (PST) X-Google-Smtp-Source: AG47ELsWEwK0pPtOiOtCY0dC2Qn7vZda3Uwdr+xGp5bX/ZKgI/sWLT1127oFHxtXp3zKqsm/k39t X-Received: by 10.55.113.69 with SMTP id m66mr4896696qkc.84.1519938320534; Thu, 01 Mar 2018 13:05:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519938320; cv=none; d=google.com; s=arc-20160816; b=KSOPgQvGWn68Q31yefm1ovoRY1E+v0zydrXKqpdCryz1i2lztzocrXpqGSZgDDOZAu /r5BhPU6reNXHn/F1GN6BpZwIVsKLDcwnjnjNPgPuDOSUFzr2zyHRs7AksYiFLlNzeH+ 4n1npMcOdRYqyobtONp0jBTmIES0YnmA1m2f5pkC7pTsNfBJK8jYcT7I22CW3zG48eKJ VgHBERnMi3jhlfhAZjTlbvtq6UpRUfQPbZzpbDsyuEFh+1CgR2oBtF0aXqVWkDQ1eg0b 8Vs5SDC8KDgTTO0FLmwvMLzFgIalPPvj6LHn5Oty7v6eMsDHAaeWLM4PhuvSPlMPMc9n Xdng== 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=KGetF2oDKPRl+sFfHilJ1UwNrpGbMIegKuEzXNF6gx0=; b=UIV5GvNcbnOPCZp3zNjP/G+J5JtKYU5DFcjD/b0vTc82D2Lof0b4U8+CQrPUvpOaer y1iuHkKoGcatDH18vPGj9Ekj2c9Af05C0u1tOYDbb5Ba3nsIwKuvXZLu7I9itFYfKDHh k5N88MKyyjGqMxA7wxNLzG2w7eFYiBtxJyZfY+krZPGCn6N8SJyympvgFOR8gfUrd4jU jGRpRS+kk0U7R9/VgfpsSXfLfeiBlvmpAvdEIWfaBbZ4BveTHuRCD4ZK2Oi07job1Tbi tmXZSyYAMtO3nhlrfP8uPzHAa0/ULlvXk+ErRfW4UFexKb4pAP/tvSNw7a7Kbwj3a1xv A+XQ== 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 q63si1465193qki.5.2018.03.01.13.05.20; Thu, 01 Mar 2018 13:05:20 -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 F15FC62798; Thu, 1 Mar 2018 21:05:19 +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 AAA0D6279D; Thu, 1 Mar 2018 21:01:36 +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 C7EF662791; Thu, 1 Mar 2018 21:01:20 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 12A4E617D4 for ; Thu, 1 Mar 2018 21:01:05 +0000 (UTC) Received: from mxback2j.mail.yandex.net (mxback2j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10b]) by forward104p.mail.yandex.net (Yandex) with ESMTP id E3D4D18210A for ; Fri, 2 Mar 2018 00:01:01 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback2j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 3QGdkg4R9U-11wKdigp; Fri, 02 Mar 2018 00:01:01 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id BpjAadXdWb-112ePGV5; Fri, 02 Mar 2018 00:01:01 +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: Fri, 2 Mar 2018 00:00:44 +0300 Message-Id: <1519938053-24031-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519938053-24031-1-git-send-email-odpbot@yandex.ru> References: <1519938053-24031-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 505 Subject: [lng-odp] [PATCH v2 4/13] 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 Reviewed-by: Bill Fischofer Signed-off-by: Maxim Uvarov --- /** Email created from pull request 505 (muvarov:devel/master_merge_api-next) ** https://github.com/Linaro/odp/pull/505 ** Patch: https://github.com/Linaro/odp/pull/505.patch ** Base sha: 284f52d72ec19df3774c7409780f1f9eea33b8e6 ** Merge commit sha: 5da68bf06572d3d0651c37cbba03aa91995ec465 **/ 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]),