From patchwork Thu Mar 1 17: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: 130346 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp3048262edc; Thu, 1 Mar 2018 09:05:14 -0800 (PST) X-Google-Smtp-Source: AG47ELu685Nxs12ku7sc3430epIXlZrur3j6tlEEB2Hmd8jsfZhwzWJ/Gu86Daa/dLpUC6Wb0xPH X-Received: by 10.237.46.165 with SMTP id k34mr4024218qtd.64.1519923914474; Thu, 01 Mar 2018 09:05:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519923914; cv=none; d=google.com; s=arc-20160816; b=OzqQRhTDzM+IyOAUNMAENtObgJDbLYcepo4GbhHe7vGnYEgHbvnUBMYsAf6wVFRLDn VOhIwkbHKMHpnnpnzAW8HltVHVWjGg8TrPowTLyzHL2j/YyvJviZdQ963CEOgN/PWz20 48qPXrJTOVeeEYm2RUcniLnbyVaP2l0+mtmC7s2Q5fb5SJRlOzI2+x49PYycFq80nKs7 UXbOx2RAYL8zflQyhg+0jeAY1bcHMHydFtj/ulaTjShndtlQ1FsghgsHJanukycpQDaE rsXMEpSbIJEHhOF3LRdl0WiE57vHtGn6B0jqmsofzYOBSG8XqXPO+pCHBYXbQYrNvNHL 0D+g== 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=7P2EX4kg5jpp72CIAr/aAj/TUc+XRxN6cCOHgK7/uIs=; b=AoGwuTEeRfXHhSJeYXJmzbVfoq5isli3AyAOLvS29f/WcUKYDh/NQekAy9bLyzJi1P gQhg6McAckg6PtnNG9vn3UWsq50/y4ZwWEQb45wS6MfbX6R6k8cxgaq0GLi7W9QFjm+6 6AoeZiS1aIcxe9Lyze8dwHngrRm9MDhFZ6xlYW/GmfAQDI6kt18g0ZC4zix2t4+rs7kd 76T+Gow3LXwVuUMY/CoeAly0ZuBLE+igqgHwdKg883AduRlczpDRMMecjztaZZRBNxnr TrgAlp+G1o966/9vPiMWXdIyoCgf7ELQeSW3aJLuzuYvsEFcFy/p8+85dz97ONzehilN f3jA== 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 b69si4737300qka.469.2018.03.01.09.05.13; Thu, 01 Mar 2018 09:05:14 -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 D752560852; Thu, 1 Mar 2018 17:05: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 C1068617A3; Thu, 1 Mar 2018 17:01:01 +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 1BCEE61789; Thu, 1 Mar 2018 17:00:25 +0000 (UTC) Received: from forward103o.mail.yandex.net (forward103o.mail.yandex.net [37.140.190.177]) by lists.linaro.org (Postfix) with ESMTPS id 5ECDF61783 for ; Thu, 1 Mar 2018 17:00:17 +0000 (UTC) Received: from mxback19j.mail.yandex.net (mxback19j.mail.yandex.net [IPv6:2a02:6b8:0:1619::95]) by forward103o.mail.yandex.net (Yandex) with ESMTP id D6E495885298 for ; Thu, 1 Mar 2018 20:00:15 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback19j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 8ph9IA7yhK-0FbWD5B6; Thu, 01 Mar 2018 20:00:15 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 7MkXJ9JJAA-0ECmbLWX; Thu, 01 Mar 2018 20:00:14 +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, 1 Mar 2018 20:00:00 +0300 Message-Id: <1519923609-31634-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519923609-31634-1-git-send-email-odpbot@yandex.ru> References: <1519923609-31634-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 505 Subject: [lng-odp] [PATCH v1 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: e8f50fefcd57a92e0971dc1172c5402c56b8370a **/ 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 2ed801640..e2425fc0c 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]),