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 08EBD423B7; Thu, 12 Jan 2023 14:00:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B3B9942D22; Thu, 12 Jan 2023 14:00:17 +0100 (CET) Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53]) by mails.dpdk.org (Postfix) with ESMTP id BC23940E25 for ; Thu, 12 Jan 2023 14:00:16 +0100 (CET) Received: by mail-vs1-f53.google.com with SMTP id k4so18921023vsc.4 for ; Thu, 12 Jan 2023 05:00:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=riRNPQwcWZMLbQ2qOc6OB3Y5kBgNVhoZjfQRwo2kTDA=; b=OxnUQVY0JNurVQIw2BgOcn7EkPkf3DlW1ztMYTqSZQowuu+gvs/AiTqfge8RvSFzlL pJLnP6ZzOGhIP5byjsyV3i3R1GaELIPONG422mjCQwoJjUDBuHSDRumggx3bQ/W2tmSF lF+r5i07ZI+WsWRBqU5rqASSJqnRQQbPGNHCJ4SvDxx4VJ8u4hBZjVN2wfIQ68Q+eSoY naEBX5Jvt1Y8OYhgyOQFu1apRhWClw1Sfaf675TniF78KDMdo2yzpPCP6c9MOLHowWNS don4xS/2Z4sTp0BoNropJYfsAyeAy4Cu9COm0dk2n5YMPiqjMOcKAvJwwAC9a3lZsBIp LRcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=riRNPQwcWZMLbQ2qOc6OB3Y5kBgNVhoZjfQRwo2kTDA=; b=ZkZFPAp07lACFAjSr1VQrAWNOiA8NgBHJ9Ffh9nKIFjOGgOHGlXhDtGrYVrWJlDdKZ 4onGuyldVEnLV2aScURBnUiQQC15o8zCFEeSdWcCLyqh3bnbOw+Vau71CjpCcf4YtEsJ RPU3lpjGB1umxIGjz4v0eVAwSwBz2oe7+eI9h3GlPelKCB/xnwJ27RuGhxEWnBkcaay7 jNUYRjE8EdmFITSRE5u1YI+RSdQBG+hBdeIsfBCoJGIjz1/haKXYsvSdVP15tsCDhfKQ y7HsJR8o/QoC0AEOnjmFqojggxH0t+qa/8Vms7t5J4UxQ3AmtUJPmgy9GVPpM8bV1T17 hgcg== X-Gm-Message-State: AFqh2kod9tWLW/yeYa5sLTNmHF/JFteE648mnlUX2rusLQl6tRD2VNgp hPtidvzOOVldYZHh5QJsEMiu4YxCuK2pvVyoC4KugpnOVV8= X-Google-Smtp-Source: AMrXdXt/Wzb9eBGUXoSKbhA1xCCYH6nWDglmTsGGeHkQ5mpp9Bb8ePYZvivZhLOwAEPYlE1OxbGM4ydNnGnaXheZilk= X-Received: by 2002:a67:f845:0:b0:3d0:ee83:9599 with SMTP id b5-20020a67f845000000b003d0ee839599mr419431vsp.45.1673528416071; Thu, 12 Jan 2023 05:00:16 -0800 (PST) MIME-Version: 1.0 References: <20221201064652.1885734-1-ganapati.kundapura@intel.com> <20221207064945.1665368-1-ganapati.kundapura@intel.com> <20221207064945.1665368-5-ganapati.kundapura@intel.com> In-Reply-To: From: Jerin Jacob Date: Thu, 12 Jan 2023 18:29:49 +0530 Message-ID: Subject: Re: [PATCH v3 5/5] eventdev/crypto: fix failed events To: "Gujjar, Abhinandan S" Cc: "Kundapura, Ganapati" , "dev@dpdk.org" , "jerinj@marvell.com" , "Naga Harish K, S V" , "Jayatheerthan, Jay" , "vfialko@marvell.com" Content-Type: text/plain; charset="UTF-8" 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 On Wed, Dec 7, 2022 at 12:26 PM Gujjar, Abhinandan S wrote: > > Acked-by: Abhinandan Gujjar > > > -----Original Message----- > > From: Kundapura, Ganapati > > Sent: Wednesday, December 7, 2022 12:20 PM > > To: dev@dpdk.org; jerinj@marvell.com; Naga Harish K, S V > > ; Gujjar, Abhinandan S > > > > Cc: Jayatheerthan, Jay ; vfialko@marvell.com > > Subject: [PATCH v3 5/5] eventdev/crypto: fix failed events > > > > Circular buffer stores events failed to enqueue to eventdev for retrying later. > > Current implementation adds the same crypto op to circular buffer instead of > > pointing all the ops in a batch. > > > > This fix updates the pointer to pointing to correct ops in the batch. > > > > Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation") > > > > Signed-off-by: Ganapati Kundapura Updated the git commit as follows and series applied to dpdk-next-net-eventdev/for-main. Thanks ommit 948973d20dbd465f8fcc502f9e3af3b0de3db1e6 (HEAD -> for-main) Author: Ganapati Kundapura Date: Wed Dec 7 00:49:45 2022 -0600 eventdev/crypto: fix failed events Circular buffer stores events failed to enqueue to eventdev for retrying later. Current implementation adds the same crypto op to circular buffer instead of pointing all the ops in a batch. This fix updates the pointer to pointing to correct ops in the batch. Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation") Cc: stable@dpdk.org Signed-off-by: Ganapati Kundapura Acked-by: Abhinandan Gujjar commit 32fb46e8e37e4cd6f965c9e577243693b99c02d4 Author: Ganapati Kundapura Date: Wed Dec 7 00:49:44 2022 -0600 eventdev/crypto: fix overflow in circular buffer In case of crypto enqueue failures, even though back pressure flag is set to stop further dequeue from eventdev, the current logic does not stop dequeueing events for max_nb events. This is fixed by checking the back pressure just before dequeuing events from event device. Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation") Cc: stable@dpdk.org Signed-off-by: Ganapati Kundapura Acked-by: Abhinandan Gujjar commit 74bf35c7b2510e9d3da409607a13b5887ceeb590 Author: Ganapati Kundapura Date: Wed Dec 7 00:49:43 2022 -0600 eventdev/crypto: fix wrong offset used while flushing events Events enqueued to eventdev from the beginning of the circular buffer. This leads to invalid or already freed events getting enqueued to eventdev from the circular buffer. Fixed by enqueuing the events to eventdev from the head pointer of circular buffer. Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation") Cc: stable@dpdk.org Signed-off-by: Ganapati Kundapura Acked-by: Abhinandan Gujjar commit 1597b6602c3d90887c2ec65031377c2dba0aacf1 Author: Ganapati Kundapura Date: Wed Dec 7 00:49:42 2022 -0600 eventdev/crypto: fix wrong crypto enqueue count stats crypto_enq_count is updated on failure to enqueue ops to cryptodev. Updated crypto_enq_count on successful enqueue of ops to cryptodev. Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation") Cc: stable@dpdk.org Signed-off-by: Ganapati Kundapura Acked-by: Abhinandan Gujjar commit 2b3049e5e61cff02488e402358854ae5e9b0279d Author: Ganapati Kundapura Date: Wed Dec 7 00:49:41 2022 -0600 eventdev/crypto: select enqueue mode based on implicit release capability In the current implementation adapter queries event device's capability for implicit release support. This information is used to decide whether events are enqueued back as NEW or FWD events. This patch updates the adapter to query the port caps for implicit release to decide on events enqueuing back as NEW/FWD events. Signed-off-by: Ganapati Kundapura Acked-by: Abhinandan Gujjar > > --- > > v3: > > * Updated commit message > > > > v2: > > * Updated subject line commit message > > > > diff --git a/lib/eventdev/rte_event_crypto_adapter.c > > b/lib/eventdev/rte_event_crypto_adapter.c > > index 31b8255..5d962a1 100644 > > --- a/lib/eventdev/rte_event_crypto_adapter.c > > +++ b/lib/eventdev/rte_event_crypto_adapter.c > > @@ -753,7 +753,7 @@ eca_crypto_adapter_deq_run(struct > > event_crypto_adapter *adapter, > > for (i = nb_enqueued; i < n; i++) > > eca_circular_buffer_add( > > &adapter->ebuf, > > - ops[nb_enqueued]); > > + ops[i]); > > > > check: > > nb_deq += n; > > -- > > 2.6.4 >