From patchwork Sat Jan 13 23:00:07 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: 124428 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp230242lje; Sat, 13 Jan 2018 15:01:07 -0800 (PST) X-Google-Smtp-Source: ACJfBotf/fhcCc+IG8rYVcntMZkmlta+hK6CLuPkVJp5wqHgKGzyzqm7stoLhgnfcef/5o8ydiWP X-Received: by 10.200.53.209 with SMTP id l17mr671642qtb.273.1515884467728; Sat, 13 Jan 2018 15:01:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515884467; cv=none; d=google.com; s=arc-20160816; b=cHIi+4OJ99477TIcl6Z1hXNVZGHh5D4iv6kXP+jEMdZd+wYTrPxKWeC5RHt9yT4qpa q+kODtACDRTfVpa38rFGAZ9Z2Y526enuWdFgWuT8iYZnTxJgm5mrLzkq0cLtReH/fvNP 6scQMOQomvLoaWJRre5jv0fDbll7FbeHYti6vM6wTrnvS1Ewn8HvhFvHZUVcIPs4KwRG OrMtwSpYfT5qjr1g4gLbhBdeIyO/bCrX6JVNYH3Z+XT1B4OlytUu5IPILvo+qKPyvTu2 CbOhTV3L2f4rOap9/zvPerr3kLlfpJYSk8u57E3EUqdvRskz8z+JG8QB1jcBi3dqQF0k HBwQ== 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=hx54WPEhgYBiEQFrMWJTxWskEOllmMC6sXSp8iSopTs=; b=VUb6eqMYdUJRhFGe2mTEowtZgZXwoTxDy9XXKPWLjZR5cbWfeTOCBDmiUA4SaRgxXG SqDd6PMRZc9OBLtF5yiPHUb8JuNIB9tIVvBGjTlJ5lUL4HBqayShqvQ7dwlbjNXeUntv DqXSIKaGeeejzOzfffyxbP1eYcY6059m3uM5K6R2WazCbBUlpO2AuL4LRv5Qz/js51Eq VAjvHDjvnQWImWCmjm6ej+7C+fh6Zzld1p+BxvjYu5n7G8D+cEEnbKwVtbja9kLjwfWq apkAlJcs8uIhi57rqPepz2aNadKrq8jmjUNud60ExmKtBWCntQH5sFkxPBuB4LBS+BDd JsfA== 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 c27si1123494qte.160.2018.01.13.15.01.07; Sat, 13 Jan 2018 15:01:07 -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 67A4561758; Sat, 13 Jan 2018 23:01:07 +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_H2 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 DA3526151F; Sat, 13 Jan 2018 23:00:27 +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 5FE8F61736; Sat, 13 Jan 2018 23:00:21 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id B4F30608E8 for ; Sat, 13 Jan 2018 23:00:17 +0000 (UTC) Received: from mxback15j.mail.yandex.net (mxback15j.mail.yandex.net [IPv6:2a02:6b8:0:1619::91]) by forward105p.mail.yandex.net (Yandex) with ESMTP id DFED74081F43 for ; Sun, 14 Jan 2018 02:00:15 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback15j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id DfZZnUXce7-0FtuSxIq; Sun, 14 Jan 2018 02:00:15 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id OeJ5YhkKll-0Fxuo5bA; Sun, 14 Jan 2018 02:00:15 +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: Sun, 14 Jan 2018 02:00:07 +0300 Message-Id: <1515884413-15125-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515884413-15125-1-git-send-email-odpbot@yandex.ru> References: <1515884413-15125-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 389 Subject: [lng-odp] [PATCH v3][WIP 1/7] validation: ipsec: fix packet checksums 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 389 (lumag:parse-checksums) ** https://github.com/Linaro/odp/pull/389 ** Patch: https://github.com/Linaro/odp/pull/389.patch ** Base sha: 49ebafae0edebbc750742d8874ad0a7588286dea ** Merge commit sha: e6a448356c90f142122e5b5d4796bdf19e04e8c6 **/ test/validation/api/ipsec/ipsec.c | 1 + test/validation/api/ipsec/test_vectors.h | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/validation/api/ipsec/ipsec.c b/test/validation/api/ipsec/ipsec.c index ea3cff052..322b03ad2 100644 --- a/test/validation/api/ipsec/ipsec.c +++ b/test/validation/api/ipsec/ipsec.c @@ -905,6 +905,7 @@ int ipsec_config(odp_instance_t ODP_UNUSED inst) ipsec_config.outbound_mode = suite_context.outbound_op_mode; ipsec_config.inbound.default_queue = suite_context.queue; ipsec_config.inbound.parse_level = ODP_PROTO_LAYER_ALL; + ipsec_config.inbound.chksums.all_chksum = ~0; if (ODP_IPSEC_OK != odp_ipsec_config(&ipsec_config)) return -1; diff --git a/test/validation/api/ipsec/test_vectors.h b/test/validation/api/ipsec/test_vectors.h index a6b8616b6..0a46ec758 100644 --- a/test/validation/api/ipsec/test_vectors.h +++ b/test/validation/api/ipsec/test_vectors.h @@ -264,7 +264,7 @@ static const ODP_UNUSED ipsec_test_packet pkt_ipv4_icmp_0_ah_sha256_1_bad1 = { /* IP */ 0x45, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x33, 0xab, 0xd9, 0xc0, 0xa8, 0x6f, 0x02, + 0x40, 0x33, 0xab, 0xdb, 0xc0, 0xa8, 0x6f, 0x02, 0xc0, 0xa8, 0xde, 0x02, /* AH */ @@ -664,7 +664,7 @@ static const ODP_UNUSED ipsec_test_packet pkt_ipv4_icmp_0_esp_aes_cbc_null_1 = { /* IP */ 0x45, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x32, 0xab, 0xca, 0xc0, 0xa8, 0x6f, 0x02, + 0x40, 0x32, 0xab, 0xda, 0xc0, 0xa8, 0x6f, 0x02, 0xc0, 0xa8, 0xde, 0x02, /* ESP */ @@ -1494,7 +1494,7 @@ static const ipsec_test_packet pkt_mcgrew_gcm_test_2_esp = { /* IP - not a part of RFC, added for simplicity */ 0x45, 0x00, 0x00, 0x74, 0x69, 0x8f, 0x00, 0x00, - 0x80, 0x32, 0x4d, 0x76, 0xc0, 0xa8, 0x01, 0x02, + 0x80, 0x32, 0x4d, 0x75, 0xc0, 0xa8, 0x01, 0x02, 0xc0, 0xa8, 0x01, 0x01, /* ESP */ @@ -1552,7 +1552,7 @@ static const ipsec_test_packet pkt_mcgrew_gcm_test_3_esp = { /* IP - not a part of RFC, added for simplicity */ 0x45, 0x00, 0x00, 0x68, 0x69, 0x8f, 0x00, 0x00, - 0x80, 0x32, 0x4d, 0x82, 0xc0, 0xa8, 0x01, 0x02, + 0x80, 0x32, 0x4d, 0x81, 0xc0, 0xa8, 0x01, 0x02, 0xc0, 0xa8, 0x01, 0x01, /* ESP */ @@ -1610,7 +1610,7 @@ static const ipsec_test_packet pkt_mcgrew_gcm_test_4_esp = { /* IP - not a part of RFC, added for simplicity */ 0x45, 0x00, 0x00, 0x74, 0x69, 0x8f, 0x00, 0x00, - 0x80, 0x32, 0x4d, 0x76, 0xc0, 0xa8, 0x01, 0x02, + 0x80, 0x32, 0x4d, 0x75, 0xc0, 0xa8, 0x01, 0x02, 0xc0, 0xa8, 0x01, 0x01, /* ESP */ @@ -1708,7 +1708,7 @@ static const ipsec_test_packet pkt_mcgrew_gcm_test_15_esp = { /* IP - not a part of RFC, added for simplicity */ 0x45, 0x00, 0x00, 0x68, 0x69, 0x8f, 0x00, 0x00, - 0x80, 0x32, 0x4d, 0xb2, 0xc0, 0xa8, 0x01, 0x02, + 0x80, 0x32, 0x4d, 0x81, 0xc0, 0xa8, 0x01, 0x02, 0xc0, 0xa8, 0x01, 0x01, /* ESP */ @@ -1752,7 +1752,7 @@ static const ODP_UNUSED ipsec_test_packet 0x11, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, /* UDP encap */ - 0x11, 0x94, 0x11, 0x94, 0x00, 0x90, 0x00, 0x00, + 0x11, 0x94, 0x11, 0x94, 0x00, 0x90, 0x51, 0x33, /* ESP */ 0x00, 0x00, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x01,