From patchwork Tue Feb 6 20:00:14 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: 127095 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3233137ljc; Tue, 6 Feb 2018 12:01:34 -0800 (PST) X-Google-Smtp-Source: AH8x2251wybApOgzh0TnF6t0kHehQ++i1SnO8G4OGHFb7O3E3VAcc8KxiA891VJRufjzFhudFCcl X-Received: by 10.55.6.134 with SMTP id 128mr5115058qkg.113.1517947293863; Tue, 06 Feb 2018 12:01:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517947293; cv=none; d=google.com; s=arc-20160816; b=fuO7dHT3i72pGgQdC/Y2JhbP5h0Lemp+azyydfhXoLDx/b0TQl3tJwyAPoc1HkCG/v +0HmT+j8PxbJJG4heSYC9mjXPzvWU+g08OH6+E9UN1JZ/R6RFHAEsoUuag5KOHqe3nE4 swzNbDd1EuMbIMeGTmoviLfJIXv/r4JU7ZPF1FbVUFDWg4uMUjcmTHMdoLczKpYZjUkq 1qfNrqBpu5KRKFKqSuKg8EZAlx7DBXVAl3UJRMNWxGd4DbhS7JbOyuhCFDoEzsMeJaV8 RDFRcaFoB4IdvE5olEPm6k+3B/H+cAvg7uM0pSEdjH7Itt4oLmwyD8pXyZR48TB7p8gx nr5g== 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=kp7P18qduJtGArIDiQcyh+mcGrZsrLFBMBZOzXEHh1A=; b=S77d+tvrlM2eA2uYkYFJFkq5L+1fsO6Yt0DMaeJrANyZ97DbHlXxUT0lRLLfQAJj6I vwTJUHnHOIJxGFlMN9igH+VolXtyx+woKpb6dCORM7XKJ1EZFaC5EMpYPulFUdPjaD6W 95G/A/dstv15bEJNAlOreMBKbxESEuFf1OJiTcbXW1s9B+fWBTaW04ISuz1M+raBs8Qc kBlKvAomE5x4FJc+uFCaVsCIQlx2EU5mHykjJy31eXGDapWXJg+uYAhBTfGz/GvBLbBB IRPBcl7pA5NuzZxOcB/sgCEPIu1wRGlAZmmbcG/5N+IEtGC/WNAVBe7pznxf6bvIPbmi +iCw== 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 p65si2530185qka.53.2018.02.06.12.01.33; Tue, 06 Feb 2018 12:01:33 -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 82ECF61735; Tue, 6 Feb 2018 20:01:33 +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 472116151E; Tue, 6 Feb 2018 20:00: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 BFDEE608ED; Tue, 6 Feb 2018 20:00:29 +0000 (UTC) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by lists.linaro.org (Postfix) with ESMTPS id 050BD60672 for ; Tue, 6 Feb 2018 20:00:28 +0000 (UTC) Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 1EC1E2D8354E for ; Tue, 6 Feb 2018 23:00:24 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback3j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 6ZdazhW40L-0NfGmFJq; Tue, 06 Feb 2018 23:00:24 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id UiwDHD0Ynz-0N6aop44; Tue, 06 Feb 2018 23:00:23 +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, 6 Feb 2018 23:00:14 +0300 Message-Id: <1517947216-12970-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517947216-12970-1-git-send-email-odpbot@yandex.ru> References: <1517947216-12970-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 456 Subject: [lng-odp] [PATCH v1 1/3] linux-gen: use packet pointer in _odp_ipsec_try_inline 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 _odp_ipsec_try_inline() can change packet handle during decryption. Return new package handler via packet pointer argument. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 456 (lumag:ipsec-fix) ** https://github.com/Linaro/odp/pull/456 ** Patch: https://github.com/Linaro/odp/pull/456.patch ** Base sha: 257b08b35ceea41bad5a7f1c626496cf111e657a ** Merge commit sha: 6f522c3fa758a8b611b2c0f92ace175b16a2517c **/ platform/linux-generic/include/odp_ipsec_internal.h | 2 +- platform/linux-generic/odp_ipsec.c | 10 +++++----- platform/linux-generic/pktio/loop.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/platform/linux-generic/include/odp_ipsec_internal.h b/platform/linux-generic/include/odp_ipsec_internal.h index bdb86c400..8a7b42c50 100644 --- a/platform/linux-generic/include/odp_ipsec_internal.h +++ b/platform/linux-generic/include/odp_ipsec_internal.h @@ -262,7 +262,7 @@ int _odp_ipsec_sa_replay_update(ipsec_sa_t *ipsec_sa, uint32_t seq, * @retval 0 if packet was processed and will be queue using IPsec inline * processing */ -int _odp_ipsec_try_inline(odp_packet_t pkt); +int _odp_ipsec_try_inline(odp_packet_t *pkt); /** * @} diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c index 586653d4e..0ef8b88a7 100644 --- a/platform/linux-generic/odp_ipsec.c +++ b/platform/linux-generic/odp_ipsec.c @@ -1628,7 +1628,7 @@ int odp_ipsec_out_enq(const odp_packet_t pkt_in[], int num_in, return in_pkt; } -int _odp_ipsec_try_inline(odp_packet_t pkt) +int _odp_ipsec_try_inline(odp_packet_t *pkt) { odp_ipsec_op_status_t status; ipsec_sa_t *ipsec_sa; @@ -1637,7 +1637,7 @@ int _odp_ipsec_try_inline(odp_packet_t pkt) memset(&status, 0, sizeof(status)); - ipsec_sa = ipsec_in_single(pkt, ODP_IPSEC_SA_INVALID, &pkt, &status); + ipsec_sa = ipsec_in_single(*pkt, ODP_IPSEC_SA_INVALID, pkt, &status); /* * Route packet back in case of lookup failure or early error before * lookup @@ -1645,14 +1645,14 @@ int _odp_ipsec_try_inline(odp_packet_t pkt) if (NULL == ipsec_sa) return -1; - packet_subtype_set(pkt, ODP_EVENT_PACKET_IPSEC); - result = ipsec_pkt_result(pkt); + packet_subtype_set(*pkt, ODP_EVENT_PACKET_IPSEC); + result = ipsec_pkt_result(*pkt); memset(result, 0, sizeof(*result)); result->status = status; result->sa = ipsec_sa->ipsec_sa_hdl; result->flag.inline_mode = 1; - pkt_hdr = packet_hdr(pkt); + pkt_hdr = packet_hdr(*pkt); pkt_hdr->p.input_flags.dst_queue = 1; pkt_hdr->dst_queue = queue_fn->from_ext(ipsec_sa->queue); diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c index 0cf45acbd..79c21ee7a 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -156,7 +156,7 @@ static int loopback_recv(pktio_entry_t *pktio_entry, int index ODP_UNUSED, /* Try IPsec inline processing */ if (pktio_entry->s.config.inbound_ipsec && odp_packet_has_ipsec(pkt)) - _odp_ipsec_try_inline(pkt); + _odp_ipsec_try_inline(&pkt); pktio_entry->s.stats.in_octets += pkt_len; pkts[num_rx++] = pkt; From patchwork Tue Feb 6 20:00:15 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: 127096 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3234737ljc; Tue, 6 Feb 2018 12:02:54 -0800 (PST) X-Google-Smtp-Source: AH8x225vrXpprB9B1YWR1p3SP2sY7xdcmTRo9keERX+r9NO3eFs5/xhkFpPeC2KDors3mN8rJUNO X-Received: by 10.200.50.3 with SMTP id x3mr5161104qta.130.1517947374371; Tue, 06 Feb 2018 12:02:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517947374; cv=none; d=google.com; s=arc-20160816; b=FrTN423dq/bnG8G7WwPVJ7MON5TXHlAaKtjpMpjkE4HWYuVf2vRPHFT5pgCJuukSvC ltqH0e9VgTO+i/cg5emlrzN8JFLE/0o1o7u5os81r8XrkA5GQBBDsB72F7DqN65dnYfP mvsAjlJ6+UUUeUqvICv7KUYKmSu01L20MOJG3u6xI8ENwvlvjfkMVQZy2y1QCuC7kvCm SRZAZN42IWNjIJXtHyeK9Z5dZdUwhpuiCHW828xxpCPztmxL48rdTI7IoGF5zlDGj07z 9MVNlRb14ERYtNPwcB6pPBsWGxMAv8BcdFqoM/kLH+W8NJitp9ojjXijm1eX4f1aAynZ 2fHA== 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=bXAVFq3RBnDWSvBSZ4sFaMfwEkvlce4jkJNrU1eCQBM=; b=h0pbErQ5lohi3jDhmmtxDuv+77pcFOqHuQ8w1zDbSsl0kxxve3KHTGK/aXCe8P41qn g30EBT17haHSDBu0392X08WP6fSDt8+xevJIvugrJjMniTeLphopZq4FSlkmx5Dx1hMV U8aC0IZupTRbW0/jpSVcMSbm+Yb236g5qHB0VQidDBGH90gLGgRQWsOPvmjRpJvYW65a o5CymzoI4FyLwbYspS7ZKAZLjQry4uL/ayj0n/B7qP/P/BpbvvbbCoAeRf9A/hQhtZi6 NtTAfHr4406C1KmNGTCRJod9H5tdCzw0SA0MlQjmLgxxkLX+kx0dVWdbs9KAzbaW8DFE x4sw== 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 i58si1184669qtc.438.2018.02.06.12.02.54; Tue, 06 Feb 2018 12:02:54 -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 018F76171C; Tue, 6 Feb 2018 20:02:53 +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 0F95860C48; Tue, 6 Feb 2018 20:01:30 +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 7A5B860B0E; Tue, 6 Feb 2018 20:01:24 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id C472F60B52 for ; Tue, 6 Feb 2018 20:00:32 +0000 (UTC) Received: from mxback15g.mail.yandex.net (mxback15g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:94]) by forward102j.mail.yandex.net (Yandex) with ESMTP id 06C5B5601867 for ; Tue, 6 Feb 2018 23:00:25 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback15g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id FYggm6AW9U-0OjOZLDO; Tue, 06 Feb 2018 23:00:24 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id UiwDHD0Ynz-0O6SJ2vY; Tue, 06 Feb 2018 23:00:24 +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, 6 Feb 2018 23:00:15 +0300 Message-Id: <1517947216-12970-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517947216-12970-1-git-send-email-odpbot@yandex.ru> References: <1517947216-12970-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 456 Subject: [lng-odp] [PATCH v1 2/3] linux-gen: ptkio: loop: inline odp_packet_has_ipsec 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 456 (lumag:ipsec-fix) ** https://github.com/Linaro/odp/pull/456 ** Patch: https://github.com/Linaro/odp/pull/456.patch ** Base sha: 257b08b35ceea41bad5a7f1c626496cf111e657a ** Merge commit sha: 6f522c3fa758a8b611b2c0f92ace175b16a2517c **/ platform/linux-generic/pktio/loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c index 79c21ee7a..1533a1b3c 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -155,7 +155,7 @@ static int loopback_recv(pktio_entry_t *pktio_entry, int index ODP_UNUSED, /* Try IPsec inline processing */ if (pktio_entry->s.config.inbound_ipsec && - odp_packet_has_ipsec(pkt)) + pkt_hdr->p.input_flags.ipsec) _odp_ipsec_try_inline(&pkt); pktio_entry->s.stats.in_octets += pkt_len; From patchwork Tue Feb 6 20:00:16 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: 127094 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3232523ljc; Tue, 6 Feb 2018 12:01:01 -0800 (PST) X-Google-Smtp-Source: AH8x22631WfEhdm/TgW4yxOmvEWEMC7O/teuAIRrNXCcFPjiUNqu//Y8Friu07XnH6NhG+9ZOUKD X-Received: by 10.200.49.121 with SMTP id h54mr4941884qtb.227.1517947261197; Tue, 06 Feb 2018 12:01:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517947261; cv=none; d=google.com; s=arc-20160816; b=zvKjwIMKenM3eGT7EHmj6J+6TqrvnndM2ufLZnkaeckKPIuP/LBD4SqylI+fmjgU9V bSKWNf2I3hTlBZNzbgCGYveWDrwgq8vDI6/Hpi/NZzoc4pz6I0rBxxvRJDlmUa7lzecv b1wqfaHTR/Jh+1NOGfumZZCAI/CRY3TghgtaNfVIk+nDBCJCyVUTPIdL72SwYZ9F8huJ e2IDgElFVR3l6uzV7Ssm6vHT/biEMMajBJQNGYTZhfVKDyhgL2dO74ulZtaHiOr3h9st /gj2VSJPJKtocKaNGK1yG7qhE/9Pg5RWSG967JSVdXsmOYmI9/02iJszAu+ia0vC9v+l j75Q== 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=J/hwQC4Hf8DO0VxzCFBye2BD+gb66eODzE0AtrnffVg=; b=jyFUiW+f/GIHA5YgaqCX/Snco6eDbIFfdT399KQ0prp4f3A86dFRVeBuO0/dB+51v0 Q+cpdSBAK4+B9TKrdjhf32leAMzJp7YO+/MNwxyaLl3rFLqUjwvPnw22GPFYJUmgT+yq 9d20WVU2AveX3ogRrGbXeTUqLHQxNaEaL4XmpPGvP7KEM7m1369T4b3t2/qRElIwXqlm oftf7bR+JTKyojlkdrUQEA4/jioHzM4aQDLnLzVOM8EqzXdxxZ7kf1iBjLu3tuUSC97N lV9CsJ1UUFZsz7sczZA42huyOf/T+KSRYmCYWjYxQWDt8sBc3/Lu9h6gL8fXbwBJr59m +VFA== 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 r24si346258qte.248.2018.02.06.12.01.00; Tue, 06 Feb 2018 12:01:01 -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 DB85C617BE; Tue, 6 Feb 2018 20:01:00 +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 BE53B60A1A; Tue, 6 Feb 2018 20:00:31 +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 A99EE608EF; Tue, 6 Feb 2018 20:00:28 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id 68C2D6074F for ; Tue, 6 Feb 2018 20:00:27 +0000 (UTC) Received: from mxback2j.mail.yandex.net (mxback2j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10b]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 06C8E13448C9 for ; Tue, 6 Feb 2018 23:00:26 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback2j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id EyiDBOQE62-0PEOwB3c; Tue, 06 Feb 2018 23:00:25 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id UiwDHD0Ynz-0P6S1aX8; Tue, 06 Feb 2018 23:00:25 +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, 6 Feb 2018 23:00:16 +0300 Message-Id: <1517947216-12970-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517947216-12970-1-git-send-email-odpbot@yandex.ru> References: <1517947216-12970-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 456 Subject: [lng-odp] [PATCH v1 3/3] linux-gen: pktio: loop: check for ip error before trying IPsec 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 Check for ip_err error flag before calling _odp_ipsec_try_inline(). Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 456 (lumag:ipsec-fix) ** https://github.com/Linaro/odp/pull/456 ** Patch: https://github.com/Linaro/odp/pull/456.patch ** Base sha: 257b08b35ceea41bad5a7f1c626496cf111e657a ** Merge commit sha: 6f522c3fa758a8b611b2c0f92ace175b16a2517c **/ platform/linux-generic/pktio/loop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c index 1533a1b3c..b56059b96 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -155,6 +155,7 @@ static int loopback_recv(pktio_entry_t *pktio_entry, int index ODP_UNUSED, /* Try IPsec inline processing */ if (pktio_entry->s.config.inbound_ipsec && + !pkt_hdr->p.error_flags.ip_err && pkt_hdr->p.input_flags.ipsec) _odp_ipsec_try_inline(&pkt);