From patchwork Wed Feb 7 02:00:05 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: 127103 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp20233ljc; Tue, 6 Feb 2018 18:00:57 -0800 (PST) X-Google-Smtp-Source: AH8x227pFMiLfM+SA6FFG9SWY86rUygPN8Ef4nUqNFGDK+DJLZpse8oPUxcjx3k/4kIxoBWI/uc3 X-Received: by 10.55.40.167 with SMTP id o39mr6184240qko.294.1517968857430; Tue, 06 Feb 2018 18:00:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517968857; cv=none; d=google.com; s=arc-20160816; b=zXjGzWM4qOpopW9f6AOElHfQ+KzNm8NChouyj+wUGvkjhG+RxjPNvwaonW/tAeqWRM ycN1Gv4VWqhtVMS65gPvePzO1bsuFJ/hOrrwFS/Ozdd54FBglXcYjevs0edOjJJ1x6ji IZ7D/dixTxzs24ay/5Y1s277c4ulKHLfna78piwnlNnWweRU3KCYoyKamrR/Tx5PK9SQ V9BPUcpEjJgScZ8anm57r1rinlFMJnSY4IAadW/a3fmDMPfrfYHbHDeBxADEwbm9Xmta JxqXJVVylLOwdWgP2EvYj228IV7bFiO2/lIDzyb9RIRkDWvQgP6m75pe68IMsaEliQZL LANA== 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=iar6Hhzvs6BnKvcyYPqbG+nIVO8UAZiWeIyaW0MjJBY=; b=UigdAOKzcSx1/UNQ6YWifZ1NF4BuzSxC4jNIbTBtFUzBhZUyTx2W74CWPfyLv78iCs vI8h2uC+Rs3Hd+7m0Jvo6yjT5VCM1upaPxi0AdtWtTgdOZ54AIk5dIJiCcbEezfjwniG Hk0Z3mZel+WTTKeYhnZIvUgCpVhYQEJSKPxUmmNfEnntUkxlZ5uJHh7WdsaoatyqUGQ6 yzoO9m26YAhRTmPyp94BmTCHGflJTm3kTujlAeSekqn1l2yo38n/OOVW/TAYfFSBlegN Ss0bKdIo08ohtYM1IpGRgGLG3SW+ViVd7avuqoH4af1i9+DYsINGJIqEpJO1/gfaV+bQ jHmw== 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 1si375215qko.286.2018.02.06.18.00.57; Tue, 06 Feb 2018 18:00:57 -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 0717A61764; Wed, 7 Feb 2018 02:00:57 +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 9CA356074A; Wed, 7 Feb 2018 02:00:51 +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 916456074A; Wed, 7 Feb 2018 02:00:48 +0000 (UTC) Received: from forward102o.mail.yandex.net (forward102o.mail.yandex.net [37.140.190.182]) by lists.linaro.org (Postfix) with ESMTPS id 478DD608A9 for ; Wed, 7 Feb 2018 02:00:22 +0000 (UTC) Received: from mxback2j.mail.yandex.net (mxback2j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10b]) by forward102o.mail.yandex.net (Yandex) with ESMTP id 7A2E65A0461D for ; Wed, 7 Feb 2018 05:00:20 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback2j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id AUDbBVtdyK-0KDOIC5E; Wed, 07 Feb 2018 05:00:20 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id nKioYpbuPJ-0DVOqtLt; Wed, 07 Feb 2018 05:00:13 +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: Wed, 7 Feb 2018 05:00:05 +0300 Message-Id: <1517968807-18097-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517968807-18097-1-git-send-email-odpbot@yandex.ru> References: <1517968807-18097-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 456 Subject: [lng-odp] [PATCH v3 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: e8666889f21113d1d24bf1d03ccd0bde538eabf0 **/ 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 Wed Feb 7 02:00:06 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: 127104 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp20714ljc; Tue, 6 Feb 2018 18:01:32 -0800 (PST) X-Google-Smtp-Source: AH8x227MsIrhqgUfuU/G6tNJ0GCrwfp2ajuzfDJnK2+wjWDs1x6T+/w5aZRewjyTxieZfwXbl70J X-Received: by 10.233.244.4 with SMTP id y4mr5771189qkl.289.1517968892843; Tue, 06 Feb 2018 18:01:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517968892; cv=none; d=google.com; s=arc-20160816; b=ZuCGnH4ecB/3l/jg8ZRvTl5nrV3i6FsB7CeM1IZYt/ocKM7mET7GiR5J89uxXpFpk6 82wH7Qq8HPgcqkKArhLwqU3Rf4bP4T6+3bhepH5OqPPCCC3sV1NRJoR1bi9KG6gyz2Y9 WDnqAyelSsDNATl+K3Ne9GetntKDWrEKpVT6ha8b0h8ytgJwnVKxceleADeIO72wiUVt 12w1avauxXiEaWYnki/ADNLcX1jBoNBNCgkSu8l8W/HzATTvi6DgJHBK3Hufff4nOb/z qkbkJyFqMauOSqz1HB9+KSMFw5jfz38zW1XZftTAv6UCjqaP9z5akt7KW+1Yu5vxsrWQ jXGQ== 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=Fj/9tWBoPjfnQLN7rkTUsfneQhUfZNXfG//i0bWKk3A=; b=y4BV0sriagd04DL2I7E4Z1BXeeyKVffV19KxrwBXi1bAW134u/F6epH/NHbNz/3A8k pKQZg5wm8oKws55mfFzXoW9ONgt4tfwlLi4Hsi2aJxcIYIhWcmiUnyz83ib+L9BId0Qf grKu0kD/IkSwguRNEE2D1MroJ28r39l+0mt/1Jv+ef4YbT9deJRMaYxylnYyQz5Umoqm dTKdfZ/xAm28m0nCvUbp97Q7yRPdPdohSTBeKbANv79hnpExdARN06KSk7Y1sxOX4+CQ IPvXpqQGk5Z/y8b5ImPf4Gxb+24dsomJWYfLhSWG1dCY0oa8c7dRvqijsrTT53Bj9yRR qrgA== 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 j12si405196qtc.112.2018.02.06.18.01.32; Tue, 06 Feb 2018 18:01:32 -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 7AAB5617C5; Wed, 7 Feb 2018 02:01:32 +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 0AE5F61517; Wed, 7 Feb 2018 02:00:54 +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 0B7E76074A; Wed, 7 Feb 2018 02:00:49 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id BA0A56063C for ; Wed, 7 Feb 2018 02:00:28 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward106j.mail.yandex.net (Yandex) with ESMTP id EA6631802C20 for ; Wed, 7 Feb 2018 05:00:26 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id mvhR5tmVSM-0QdW3xK4; Wed, 07 Feb 2018 05:00:26 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id nKioYpbuPJ-0KVOwMh4; Wed, 07 Feb 2018 05:00:20 +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: Wed, 7 Feb 2018 05:00:06 +0300 Message-Id: <1517968807-18097-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517968807-18097-1-git-send-email-odpbot@yandex.ru> References: <1517968807-18097-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 456 Subject: [lng-odp] [PATCH v3 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: e8666889f21113d1d24bf1d03ccd0bde538eabf0 **/ platform/linux-generic/include/odp/api/plat/packet_flag_inlines.h | 8 ++++++++ platform/linux-generic/pktio/loop.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/include/odp/api/plat/packet_flag_inlines.h b/platform/linux-generic/include/odp/api/plat/packet_flag_inlines.h index 3212248f3..e96f7c8ed 100644 --- a/platform/linux-generic/include/odp/api/plat/packet_flag_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/packet_flag_inlines.h @@ -71,4 +71,12 @@ static inline int _odp_packet_has_ts(odp_packet_t pkt) return flags.timestamp; } +static inline int _odp_packet_has_ipsec(odp_packet_t pkt) +{ + _odp_packet_input_flags_t flags; + + flags.all = _odp_packet_input_flags(pkt); + return flags.ipsec; +} + #endif diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c index 79c21ee7a..a210c74ef 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -155,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_packet_has_ipsec(pkt)) _odp_ipsec_try_inline(&pkt); pktio_entry->s.stats.in_octets += pkt_len; From patchwork Wed Feb 7 02: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: 127105 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp21109ljc; Tue, 6 Feb 2018 18:02:04 -0800 (PST) X-Google-Smtp-Source: AH8x2249+NI93zeWj/fwDEhrxbjorkU6OfucCfI+3pEZ6ixpvpM0OndwBJ886oT4l+tM+Rmric01 X-Received: by 10.55.129.195 with SMTP id c186mr6360685qkd.352.1517968924367; Tue, 06 Feb 2018 18:02:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517968924; cv=none; d=google.com; s=arc-20160816; b=p89H5CH5fpKL7y/FJZCXUqc+c1BATHh4SA0zeqYCRAgOELtjuW75QZU0kezjXgefa/ Zr69tIV/sTZz+/OCL2yfm9/8003P0UlZljKrpQ3Ia1pauN7xrMszB9zOn+6hEo7k/iIl z28p5O6pjbf4Ej02MmA9JScVRq1TRTazO1fZT7LuUXMFz00LnM+h/kcxSoZFe/2r4SSG UCYx+sEMOcGgLpYl9119/R4HmKeog6VGMraYJSeauODRy8QoPpLJWz/yzykbbMfPSHMb rquRD5x+f/VkfQb7bI/6wd0xpHoOZ6H/ySxz/VXSPn2HoPOHOVAIuTqujN1kJUza+U9W ISBg== 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=zL8ggeSCi+XVBSmJ0fclFoJ/Q0sUAXkaluby/x6u/AY=; b=oCOAFnl0h9VdznpoJlkiwtSQ8BxT4nFzCbUW0gS7lkpdh1rf39S1KyY+er97uxY4QM E1yh6/nbrIjUx93DPuclA8G858nrxexS3zBLWDZ7MPXiuj1/V47MyrtTd3W4jtNMdCgO dTTFlXiaLA0gg4h0A+kyeC6D7z6r4AGzENh/nltCPfDBFM8olmFK/0tjiKVI9c/fghDy GxQb8p4OVl9AaZo44e+BZdt4fu8kN55NZsR3/Cr9eRFcx2QuHzX61WJnU4P/XyDY0jr4 DzdIBdbPdz2DSu1s45DtGNXy/TEXz106zKgEXg5d46mkMUWBujbZRji5G8GyrbwjaYdp LHuQ== 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 i10si376762qke.483.2018.02.06.18.02.04; Tue, 06 Feb 2018 18:02:04 -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 15BA5616E9; Wed, 7 Feb 2018 02:02:04 +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 5589B6074A; Wed, 7 Feb 2018 02:00:58 +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 5D28060670; Wed, 7 Feb 2018 02:00:49 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 73A44614E1 for ; Wed, 7 Feb 2018 02:00:35 +0000 (UTC) Received: from mxback15j.mail.yandex.net (mxback15j.mail.yandex.net [IPv6:2a02:6b8:0:1619::91]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 0CDFE18534C for ; Wed, 7 Feb 2018 05:00:34 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback15j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id quGB12qyXL-0XvWolPU; Wed, 07 Feb 2018 05:00:34 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id nKioYpbuPJ-0QVCmK80; Wed, 07 Feb 2018 05:00:26 +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: Wed, 7 Feb 2018 05:00:07 +0300 Message-Id: <1517968807-18097-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517968807-18097-1-git-send-email-odpbot@yandex.ru> References: <1517968807-18097-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 456 Subject: [lng-odp] [PATCH v3 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: e8666889f21113d1d24bf1d03ccd0bde538eabf0 **/ 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 a210c74ef..3ee2e33af 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -156,6 +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 && + !pkt_hdr->p.error_flags.ip_err && _odp_packet_has_ipsec(pkt)) _odp_ipsec_try_inline(&pkt);