From: David Marchand <david.marchand@redhat.com>
To: Yang Ming <ming.1.yang@nokia-sbell.com>
Cc: dev@dpdk.org, "Ji, Kai" <kai.ji@intel.com>,
Pablo de Lara <pablo.de.lara.guarch@intel.com>
Subject: Re: [PATCH v2 2/2] crypto/ipsec_mb: fix QP release in secondary
Date: Mon, 5 May 2025 17:31:10 +0200 [thread overview]
Message-ID: <CAJFAV8xkOQED3U0B9U8HEL88A4s+6+HLPxFWS=zeEJ-i2jm4vQ@mail.gmail.com> (raw)
In-Reply-To: <6d31ea07-8bbb-4e9c-ab88-be50e0132e31@nokia-sbell.com>
Hello,
On Thu, Apr 24, 2025 at 4:26 PM Yang Ming <ming.1.yang@nokia-sbell.com> wrote:
>
> Hi,
>
> On 2025/4/7 13:25, Yang Ming wrote:
> > From: myang <ming.1.yang@nokia-sbell.com>
> >
> > When a secondary process tries to release a queue pair (QP) that
> > does not belong to it, error logs occur:
> > CRYPTODEV: ipsec_mb_ipc_request() line 373: Unable to release
> > qp_id=0
> > EAL: Message data is too long
> > EAL: Fail to handle message: ipsec_mb_mp_msg
> > EAL: Fail to recv reply for request /tmp/dpdk/l2hi/mp_socket:
> > ipsec_mb_mp_msg
> >
> > This patch ensures that a secondary process only frees a QP if
> > it actually owns it, preventing conflicts and resolving the
> > issue.
> >
> > Signed-off-by: myang <ming.1.yang@nokia-sbell.com>
> > ---
> > drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
> > index 910efb1a97..50ee140ccd 100644
> > --- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
> > +++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
> > @@ -138,6 +138,7 @@ int
> > ipsec_mb_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
> > {
> > struct ipsec_mb_qp *qp = dev->data->queue_pairs[qp_id];
> > + uint16_t process_id = (uint16_t)getpid();
> >
> > if (!qp)
> > return 0;
> > @@ -152,8 +153,10 @@ ipsec_mb_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
> > rte_free(qp);
> > dev->data->queue_pairs[qp_id] = NULL;
> > } else { /* secondary process */
> > - return ipsec_mb_secondary_qp_op(dev->data->dev_id, qp_id,
> > - NULL, 0, RTE_IPSEC_MB_MP_REQ_QP_FREE);
> > + if (qp->qp_used_by_pid == process_id)
> > + return ipsec_mb_secondary_qp_op(dev->data->dev_id,
> > + qp_id, NULL, 0,
> > + RTE_IPSEC_MB_MP_REQ_QP_FREE);
> > }
> > return 0;
> > }
>
> Hi Experts,
>
> Is there any chance to review and accept this patch?
Don't forget to Cc maintainers.
--
David Marchand
next prev parent reply other threads:[~2025-05-05 15:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 10:36 [PATCH] eal: prevent socket closure before MP sync Yang Ming
2025-03-17 13:56 ` Stephen Hemminger
2025-03-27 9:28 ` [External] " Yang Ming
2025-04-07 3:52 ` Yang Ming
2025-04-07 5:25 ` [PATCH v2 1/2] " Yang Ming
2025-04-07 5:25 ` [PATCH v2 2/2] crypto/ipsec_mb: fix QP release in secondary Yang Ming
2025-04-24 14:26 ` Yang Ming
2025-05-05 15:31 ` David Marchand [this message]
2025-05-07 15:25 ` Ji, Kai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJFAV8xkOQED3U0B9U8HEL88A4s+6+HLPxFWS=zeEJ-i2jm4vQ@mail.gmail.com' \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=kai.ji@intel.com \
--cc=ming.1.yang@nokia-sbell.com \
--cc=pablo.de.lara.guarch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).