From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 466BEA00C4; Fri, 5 Aug 2022 12:06:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28D9A40C35; Fri, 5 Aug 2022 12:06:49 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 92737400D5 for ; Fri, 5 Aug 2022 12:06:47 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2750hEvv007880; Fri, 5 Aug 2022 03:06:46 -0700 Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam04lp2172.outbound.protection.outlook.com [104.47.73.172]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3hrg4ckkk2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 Aug 2022 03:06:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FzkrhlKfXisdQnfCXgZmTf3le43ZQwv73ZhMps6UD5+EOzm7m3fZSj0TdvSMHudK4+uaLKMSiIsesE12PehEZstvRPqD4ozCIWQF97H5GSKOjGLVSTgx3139ihTKOMRnFIgu/ycRKLQkd2rmnv25F38koKN/4UxjtKt+jZ63v2bxM4ku8h2C2l7dtwvPNrpW9zzfbZni9/UxhtF/Nf1GPmoygQKafX8SHFJWKsJR2yIW4oQTTdTn8c8Zf2IRP3PDUuzVorGGLC5ScNiKTVMwhQn40pLwEVpVJr6EXF+5igG60gpxQ9BOt77GBQw52xomdgWh/fY/CTv+9k+tmV3sWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KsNesB0hm2kodRlt50xMU+Sfi5suupsSTOcy96pISX4=; b=UQ/XC9TRdy7cOfywI8knNADCQoHZaxqGXA8bErHQBK0NLNrRUJBnv1lLZzccIs/I6qRVegdqqU4wzM3/JtAtenFBbZLB9BOhPa4hAURRaxjIke7qsJ9jYiAqAe5+MmeQ6tpWrw7oRV6kJumR1a1FIDMRfoU3ZOJ5Ad/7Kgv+lOcKcUW3L1+B80UAYSyMpaOwgQlkt2NamcAuWF6tYqYDKZB7FUeB9sdIeOL2C9nBJNC9g8EqX40rEfNFEZkUPaRz1Vl/veVr26WWsTpixM0W2YUiYEw4nOkA6kuxQXpHjqRIF7R2BhraERiQPdenPgRr2U67zpVAudEHE03KpfJDAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KsNesB0hm2kodRlt50xMU+Sfi5suupsSTOcy96pISX4=; b=YPyqoUqOyJMKquMr+OcYj6SQjiCTPTxZSu+uoBFrndIPPFz+i5r2MRAT2eli8DxSfHdzvdwf/Znz8fZjX5nC25yGNyYMCtFCx5VHBZpKfuAbZTmwpqHLM3uQiStVupGaY7xXtPxNIqljmmrWP+Dn3aelSMI4Y5wgAKZhAZG2shs= Received: from MW2PR18MB2282.namprd18.prod.outlook.com (2603:10b6:907:f::19) by BYAPR18MB2903.namprd18.prod.outlook.com (2603:10b6:a03:10d::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.16; Fri, 5 Aug 2022 10:06:43 +0000 Received: from MW2PR18MB2282.namprd18.prod.outlook.com ([fe80::a97e:4fef:7055:efa7]) by MW2PR18MB2282.namprd18.prod.outlook.com ([fe80::a97e:4fef:7055:efa7%3]) with mapi id 15.20.5504.016; Fri, 5 Aug 2022 10:06:42 +0000 From: Volodymyr Fialko To: Suanming Mou , "dev@dpdk.org" , Radu Nicolau , Akhil Goyal CC: Jerin Jacob Kollanukkaran , Anoob Joseph Subject: RE: [PATCH 3/6] examples/ipsec-secgw: add lookaside event mode Thread-Topic: [PATCH 3/6] examples/ipsec-secgw: add lookaside event mode Thread-Index: AQHYp+4btf00PyriSEKTJqQjj+DXNq2fpl8AgABuoNA= Date: Fri, 5 Aug 2022 10:06:42 +0000 Message-ID: References: <20220804103626.102688-1-vfialko@marvell.com> <20220804103626.102688-4-vfialko@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2eb262a3-dd52-44eb-09aa-08da76ca327a x-ms-traffictypediagnostic: BYAPR18MB2903:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fm9obP+PtLxPHH/vYx0N5ztFW4UhUmqEu3rpG1nmqs+xsDZ9n9aKsR23z9ScRtU9AOi3xeBCaXCTTFmIjPn5J4l76ekz8pp7zNIHO2DFX9JNNPnAWNMVboH2GOQ0GRFBVw8BoqX6p4we1z7xLgyRI+DFsCpbmcdBhVDj4WqH47aJIVef3J2RRIAaKcuCHX0x6K+AGPTVT5lmKks/9ihUIqxKzNy3RWQPBqpO7Po8XdnXImpvp4eTNxuPD23weFFO92gFmAUj45SIhLCLuwsUc9KUP09J+XXifPVbFxwwCAOvse4sbLD8DruD3t5vMBoGepGBJKiNLHa7A79md02FMdda/zXQ7X2kFW20bqr/xbbA/vlx4JrXp8QgNmiqd4KthybzaHtdQNGYfxEkjYk8X+eRUxE0o/1OEisZ0PDCU6xU0J1WOPl4icP3bBG6MiS2j9yLlkjfNCiwBDbu476MHQ2sp5SzYrLezP+bWLjoQ49mX8mCKnubHRlqw9jE63euUPeq0YaZEbJMRfZOnLQ52rC1icQDttK6vHXIzP/l4O0ZSbPGTvy+6yV5ybsjpcOgHPxMlWcFpJJtZunAavPn2z5Jhe9JtnPO7CC0fiGsIvXnazsO35IEBo4EUazz0MZmNyPqyI4y3j7DelKOUPSJy00OCqapbsCnDggfqf7jfmcLkn00ax1AZ3VJ+gJ5tLQ17r1snAQFXBiSrlnQVXF+nd+ryNv7jjzSV/DGX9UlDlfjuNemSPBuRRXE0d2Cy8/R/T1g1cfHBWxxPK9k0TxUH365OTJwITq4akFk8FUzExE= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR18MB2282.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(366004)(136003)(376002)(396003)(346002)(39860400002)(4326008)(8676002)(64756008)(66476007)(5660300002)(66446008)(66946007)(66556008)(316002)(6636002)(55016003)(76116006)(52536014)(8936002)(122000001)(2906002)(86362001)(38070700005)(33656002)(38100700002)(478600001)(71200400001)(41300700001)(54906003)(110136005)(107886003)(26005)(6506007)(7696005)(9686003)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?0bxelFXL24lubwY3LPWEUe0iCN+UeJ8SG2407WlpN2xvOajpNkbUYesY6ffk?= =?us-ascii?Q?6dNWzXdh8c6EsNScNojfnZxSaORQvVk6EU0kEB51IgHGs/hTIiiTdvCL6sp3?= =?us-ascii?Q?EEGbyHZT7a2VmhkiBrJnxXTLCRpR3vhKQy9OdGSBb2Ae0zoZwVKMT+b31gNN?= =?us-ascii?Q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DKiwgwhzeUHyCKdNjGR?= =?us-ascii?Q?F/iRYMHWPcNDpdgR7vjygwtxaFnd85xjYeTq7CL5kMZJb4QFEv4nXsY5FpQa?= =?us-ascii?Q?YfwKnLbdgYfE9kqrlJJxglqxlDQ7XyBEV/rpdBgQx5zmJYxQa5BsHO4k9k31?= =?us-ascii?Q?HB92wtM7hR5dcVXiPU8lp1q2qhEouIE4q8HEj0+8CqZuLweFntOLzf737Z+y?= =?us-ascii?Q?PBBNN/uB04LDwtRyzSyoDVjmDrpTmIDUAGa9WMg9h4hBXuAa2ddnvCu2c5i7?= =?us-ascii?Q?1GYvAvYeUJHz0iUCse7YXiD1odG5nh8zcOrEzHG7Kr9qzInUARWCfYIMuGBH?= =?us-ascii?Q?eMhIBikLjZ/55d3ClVH6favxGz2cMoKjlSI/SGzJbkmOeBQjk1AkYoWS4L5T?= =?us-ascii?Q?nOdlReHtdrXNTS37hxK/0717JUx/Xiu6IFof8bVeWf67XZsfBz7DfsBMGZ5k?= =?us-ascii?Q?yUVCg3cF23iDY+CCGyeQIg5FmMdGWhJoFY72IQpL6Axhn5qELw8JYjn3G5C7?= =?us-ascii?Q?+1iVAiZQzNT36AryaDA=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW2PR18MB2282.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2eb262a3-dd52-44eb-09aa-08da76ca327a X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Aug 2022 10:06:42.8207 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: bxBPCuBA8BwheAHg3csol1YMVAPQ4a6KQ0qhpx0Neh+EGf4zOfSQkjKvZ8sPHW4G5rkyNhnVoEnUfqH3iGab/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2903 X-Proofpoint-GUID: 0atDwscCg5zOqtcnCodiys83OMvIRk8q X-Proofpoint-ORIG-GUID: 0atDwscCg5zOqtcnCodiys83OMvIRk8q X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-05_03,2022-08-05_01,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org snip > > static inline int > > process_ipsec_ev_inbound(struct ipsec_ctx *ctx, struct route_table *rt= , > > - struct rte_event *ev) > > + const struct eh_event_link_info *ev_link, struct rte_event *ev) > > { > > struct ipsec_sa *sa =3D NULL; > > struct rte_mbuf *pkt; > > @@ -340,7 +437,22 @@ process_ipsec_ev_inbound(struct ipsec_ctx *ctx, > > struct route_table *rt, > > goto drop_pkt_and_exit; > > } > > break; > > + case PKT_TYPE_IPSEC_IPV4: > > + case PKT_TYPE_IPSEC_IPV6: > > + rte_pktmbuf_adj(pkt, RTE_ETHER_HDR_LEN); > > + pkt_l3_len_set(pkt); >=20 > One small question, in case free_pkts() happens inside pkt_l3_len_set(pkt= ), > can the pkt still be used in sad_lookup() below? > Should return value be added to pkt_l3_len_set() in case pkt free? >=20 Hi, thank you for noticing this. Return value should be checked, I'll address this issue in v2. > > + > > + sad_lookup(&ctx->sa_ctx->sad, &pkt, (void **)&sa, 1); > > + sa =3D ipsec_mask_saptr(sa); > > + if (unlikely(sa =3D=3D NULL)) { > > + RTE_LOG_DP(DEBUG, IPSEC, "Cannot find sa\n"); > > + goto drop_pkt_and_exit; > > + } > > snip