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 6E3A642996 for ; Thu, 20 Apr 2023 12:49:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6738A41156; Thu, 20 Apr 2023 12:49:44 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id BC0C440687 for ; Thu, 20 Apr 2023 12:49:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681987781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+jJ1CBdx5WPk6gLiXbrN7CV0HV4IUudyYXyhdMg9Tdk=; b=Ho5OiXdjUXJSdJG19pd9w3SJI6b9o0Zz/+XsIrtCOY6KN9sHqzofABLIZua5dFlC7DAv52 74/AqlEr28tcOpLj5eyLfdWonHHNQG+nlGiIauUVRApF5E+Tz79UwFlfUtP9ZeI+t3Z+Lh BKtcizL5y2hSeieexM+rpt1VSRVC1g0= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-668-aABxzUIqPsynaqrHZOTRNw-1; Thu, 20 Apr 2023 06:49:40 -0400 X-MC-Unique: aABxzUIqPsynaqrHZOTRNw-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3f080f9ea3eso2189025e9.1 for ; Thu, 20 Apr 2023 03:49:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681987779; x=1684579779; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+jJ1CBdx5WPk6gLiXbrN7CV0HV4IUudyYXyhdMg9Tdk=; b=OG8YBWk/VQlhILoh6h1JGQSe6YOuCBiFIQG+tWAfg17XHLDXY3fb1u2WU6aqufE/Mp vLF+12BPhYaN/WiZmsWotCQZVKAKpIcEnH+sU0wDn/sCb6WguPuMdFOUBDC6PaKKyfj/ PP2Ax/xnhPuOlTPFFPtYFjriXfJhYeavQy/AtNi36KbkvJmlGKqTWI75d/aMEaqvAPp5 tufJ0Q9siVPQUiDU2YnJvZ6dXlU/r+SXPGeGl4TZXZNMANvb2aDmLYjzRzwoJAW0DI0U cQskcELEuYlkBpYYLNdgXYhQLYbgA+hQgi+DZpC6Ir6qHrvJq42P1Rr/AG6KybF9CApD YYQg== X-Gm-Message-State: AAQBX9fbpNktD6q2VZIIOSumU4oAQIpFDU3SXtnjl8lTnes+yKPhLh7V zoX8Jf3P4sfh15eq68poc78/86SVwd5FKEoz2qQ00rQ4SMLgopRaqW6z06xBqSw577AlGQujt1U kdQWxFJw= X-Received: by 2002:adf:e507:0:b0:2f5:7ce1:781d with SMTP id j7-20020adfe507000000b002f57ce1781dmr1139229wrm.50.1681987779141; Thu, 20 Apr 2023 03:49:39 -0700 (PDT) X-Google-Smtp-Source: AKy350agV8rVXiR/8bK0S8p4Z7ZTP9/QYGsUqetxPFKWduHPtDz6rT09Rpvn+w1Gko0S1hc9bGragg== X-Received: by 2002:adf:e507:0:b0:2f5:7ce1:781d with SMTP id j7-20020adfe507000000b002f57ce1781dmr1139212wrm.50.1681987778759; Thu, 20 Apr 2023 03:49:38 -0700 (PDT) Received: from [192.168.0.36] ([78.19.110.151]) by smtp.gmail.com with ESMTPSA id r3-20020a05600c35c300b003f1836c98b7sm2718800wmq.48.2023.04.20.03.49.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Apr 2023 03:49:38 -0700 (PDT) Message-ID: Date: Thu, 20 Apr 2023 11:49:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 To: Saoirse O'Donovan , Kai Ji , Pablo de Lara Cc: dev@dpdk.org, piotrx.bronowski@intel.com, stable@dpdk.org, "Xueming(Steven) Li" References: <20230418142249.38447-1-saoirse.odonovan@intel.com> <20230420103141.8770-1-saoirse.odonovan@intel.com> From: Kevin Traynor Subject: Re: [PATCH v2] crypto/ipsec_mb: enqueue counter fix In-Reply-To: <20230420103141.8770-1-saoirse.odonovan@intel.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 20/04/2023 11:31, Saoirse O'Donovan wrote: > This patch removes enqueue op counter update from the process_op_bit > function where the process is now done in dequeue stage. The original > stats increment was incorrect as they shouldn't have been updated at all > in this function. > > Fixes: 4f1cfda59ad3 ("crypto/ipsec_mb: move snow3g PMD") > Cc: piotrx.bronowski@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Saoirse O'Donovan > > --- > v2: Added cc stable for 21.11 and 22.11 backport. > > A similar fix has been sent to 20.11 LTS stable, in the interest of > time. In that fix, the enqueued stat is still in use, therefore only the > fix to the count increment was necessary. > Thanks for the explanation. As it has the correct tags, we will pick this up for 21.11 and 22.11 LTS releases in the normal workflow, which is after it has been released as part of a DPDK main branch release. thanks, Kevin. > Here is the mail archive link: > https://mails.dpdk.org/archives/stable/2023-April/043550.html > --- > drivers/crypto/ipsec_mb/pmd_snow3g.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/crypto/ipsec_mb/pmd_snow3g.c b/drivers/crypto/ipsec_mb/pmd_snow3g.c > index 8ed069f428..e64df1a462 100644 > --- a/drivers/crypto/ipsec_mb/pmd_snow3g.c > +++ b/drivers/crypto/ipsec_mb/pmd_snow3g.c > @@ -372,9 +372,10 @@ process_ops(struct rte_crypto_op **ops, struct snow3g_session *session, > /** Process a crypto op with length/offset in bits. */ > static int > process_op_bit(struct rte_crypto_op *op, struct snow3g_session *session, > - struct ipsec_mb_qp *qp, uint16_t *accumulated_enqueued_ops) > + struct ipsec_mb_qp *qp) > { > - uint32_t enqueued_op, processed_op; > + unsigned int processed_op; > + int ret; > > switch (session->op) { > case IPSEC_MB_OP_ENCRYPT_ONLY: > @@ -421,9 +422,10 @@ process_op_bit(struct rte_crypto_op *op, struct snow3g_session *session, > > if (unlikely(processed_op != 1)) > return 0; > - enqueued_op = rte_ring_enqueue(qp->ingress_queue, op); > - qp->stats.enqueued_count += enqueued_op; > - *accumulated_enqueued_ops += enqueued_op; > + > + ret = rte_ring_enqueue(qp->ingress_queue, op); > + if (ret != 0) > + return ret; > > return 1; > } > @@ -439,7 +441,6 @@ snow3g_pmd_dequeue_burst(void *queue_pair, > struct snow3g_session *prev_sess = NULL, *curr_sess = NULL; > uint32_t i; > uint8_t burst_size = 0; > - uint16_t enqueued_ops = 0; > uint8_t processed_ops; > uint32_t nb_dequeued; > > @@ -479,8 +480,7 @@ snow3g_pmd_dequeue_burst(void *queue_pair, > prev_sess = NULL; > } > > - processed_ops = process_op_bit(curr_c_op, curr_sess, > - qp, &enqueued_ops); > + processed_ops = process_op_bit(curr_c_op, curr_sess, qp); > if (processed_ops != 1) > break; >