From patchwork Mon Feb 26 15: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: 129668 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp300853lja; Mon, 26 Feb 2018 07:06:20 -0800 (PST) X-Google-Smtp-Source: AH8x227tYo65FlJsVdeed4kNeLQMKdYedWtcmtrTFq5TzAzPnIhpVMCzBBTCRLOtVlKZ0KEVbQ40 X-Received: by 10.129.156.204 with SMTP id t195mr6848815ywg.48.1519657580126; Mon, 26 Feb 2018 07:06:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519657580; cv=none; d=google.com; s=arc-20160816; b=M3pEgTwdfXRNEqxOEi3pMH2Du/CxJwcq8E1cwa6uOio29ywghOZDAIm5mhKT/G/hGO Rb2ExJ6QhM7uB5HBHXAyoa+97B3UK+mDE8XLcQLHqSuhpR3mN7FkxCMEO5llvhgD8Hkc cuv7xebtpSM18fQ8qO+nJQvvidaATsbPn4BYuvIjrDL8C7Cw1agELjqMRyKoqvmWjNTj YaY3wkVil8b8mcRoofPvhMFtoxjuB97xpYsMLCbtNwNfRwG0rPRA6NTc7uJzAV32mY5R ZmgZKtcPJ+nulZHixCvWbARpLBscPzrF9ewkRNd7PKiScgGETMT3DPFo5g9Caz9cvXDa 6nJA== 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=IJFMjwV064sdAm5D2JDq9GPo0HBaWBquUQ3YcBJ1p3c=; b=pBnACttIZfVwTYhvhr27ON9hwK5km/9V/ENVGEycxg7CUlbW/ouUNlRJlZmpwOuhqD Zgju9K8mHI3mko4u2+6ytyz01iQT1uLFOQOKuaKIlxwowUA0ttBXP96P0j4USEYz1Iv7 JwD1nHvLTzAuXwvrbB6PgXYWuMELIJquNLrLErJmjkHvarKhi99dhj4HQBtxXFCdPWuH dTXn+NHaILSX89Xoxx9l2tGvNjOB7bI9EcgCk19IzNWpgdYHukGnlzs6ZsTJKbDCWfuh B5CHSY+LUNWUDJ8GY0VPMPHt7snhP1vYhrf0EO3zXTdJmLwju3nUpjV2uG9Qm5lhp1ac v/yg== 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 g21si1502976ywk.580.2018.02.26.07.06.19; Mon, 26 Feb 2018 07:06: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 C2158608C6; Mon, 26 Feb 2018 15:06: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, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 C5ACC617A2; Mon, 26 Feb 2018 15:00:59 +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 5905761799; Mon, 26 Feb 2018 15:00:26 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id 8CEDD61795 for ; Mon, 26 Feb 2018 15:00:14 +0000 (UTC) Received: from mxback9j.mail.yandex.net (mxback9j.mail.yandex.net [IPv6:2a02:6b8:0:1619::112]) by forward101o.mail.yandex.net (Yandex) with ESMTP id EC2E31344621 for ; Mon, 26 Feb 2018 18:00:12 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback9j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id i97ExySxPC-0Ckq0R0C; Mon, 26 Feb 2018 18:00:12 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id kHvqsGsU0k-0CTOw6kU; Mon, 26 Feb 2018 18:00:12 +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: Mon, 26 Feb 2018 18:00:00 +0300 Message-Id: <1519657209-30140-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519657209-30140-1-git-send-email-odpbot@yandex.ru> References: <1519657209-30140-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 502 Subject: [lng-odp] [PATCH API-NEXT v1 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: c91eae61d19350dd19aacf18c1148c9491398c14 ** Merge commit sha: 8c909084626ccef140542645cd34549ce7f4bcde **/ 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]),