From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B2974A046B for ; Tue, 20 Aug 2019 18:04:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ABDA31BEF1; Tue, 20 Aug 2019 18:04:17 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 77E371BEEE for ; Tue, 20 Aug 2019 18:04:15 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7KFo2OU027702; Tue, 20 Aug 2019 09:04:13 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=BDbZ3HCuc28+Uv+IhKGTYW9OLJXFuGhlDpE7f/5NCzE=; b=Pr07ChI75F4cfpG+rDYt5uf+fNNEaiSaTCxmSqU8ifbHVXw9N8fQDCpE6Aud0YQ4GiDq kG+abjQ0uKEANbV2fE1NldTqBLDGi9WHj/x69OR6+JC2WDC8gzYWHeT0N14K6/N1lqt8 G+rrlkRIV1oSaMqam99ZgLzgaD0E+L8Q3BA78rbKfs98YdK4xhbdFMV/t7dtbcfAsSSk sXNJENznKdmCA6dJTWmvLAK1wX1d8/7lGbblEL61j9zr9GKsO2dOrfPVWfexohUt/qGk HF2YhbOIYcxN2ceyudQhHtzNLHkEaFOKBdTihvTBy3goGZ+A2BUpI403hE8WeGqvsvwI Ng== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2ug8d7aean-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 20 Aug 2019 09:04:13 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 20 Aug 2019 09:04:12 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 20 Aug 2019 09:04:11 -0700 Received: from vvenus375.il.marvell.com (unknown [10.5.120.75]) by maili.marvell.com (Postfix) with ESMTP id A74943F7044; Tue, 20 Aug 2019 09:04:10 -0700 (PDT) From: To: CC: , , Date: Tue, 20 Aug 2019 19:22:08 +0300 Message-ID: <20190820162208.12769-1-michaelsh@marvell.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-20_06:2019-08-19,2019-08-20 signatures=0 Subject: [dpdk-dev] [PATCH] examples/ipsec-secgw: add offload error handling X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Michael Shamis Added error handler for offload mode. Signed-off-by: Michael Shamis --- examples/ipsec-secgw/ipsec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c index dc85adfe5..583c91658 100644 --- a/examples/ipsec-secgw/ipsec.c +++ b/examples/ipsec-secgw/ipsec.c @@ -566,6 +566,12 @@ ipsec_dequeue(ipsec_xform_fn xform_func, struct ipsec_ctx *ipsec_ctx, rte_pktmbuf_free(pkt); continue; } + } else if (sa->type == + RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL) { + if (cops[j]->status) { + rte_pktmbuf_free(pkt); + continue; + } } pkts[nb_pkts++] = pkt; } -- 2.23.0