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 7B425A0540; Thu, 9 Jun 2022 17:53:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3560E40689; Thu, 9 Jun 2022 17:53:50 +0200 (CEST) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) by mails.dpdk.org (Postfix) with ESMTP id 6307140220 for ; Thu, 9 Jun 2022 17:53:49 +0200 (CEST) Received: by mail-qt1-f178.google.com with SMTP id t21so10420862qtw.11 for ; Thu, 09 Jun 2022 08:53:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x/Mh090SDPHO4EDCQpVLdqW9ONkt6i2CKWH6iD8Ip4g=; b=ReUQsL95bGcBRLOogg528Q7fkZjTxB2XhJCTkvTSmr/GPmitVYKLLxhzK56s47HZw1 otWJgBRHDT868nfdcI/uG3lbWbf71jwuEg3K/dXS043ZXOci8cw/Fod3wuGriHXJAxyV hCVlS8WYTlfTCL9fUUSBNeJYxMPdd2k7grbiWDIRYcX0uJLgt9Ym+LQPlbkzxoUAWY7F ZPduj4s7h3OWzGE6g8519UDG/ORA4cOsWN0oHQs5zSpw+Dj5KvVPIF6C51TpP4jlac+p 5soPqTJc1jXElJiwizc6nV3tb8Zbmua5dZp84wbcHUop4asy6kICN0TrLQ5MnbzvcIIL s4dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x/Mh090SDPHO4EDCQpVLdqW9ONkt6i2CKWH6iD8Ip4g=; b=0urOB2E83hutHnaHJLvsFa67TqFH/MpnG4Uzr7IiqYpfzQQ3ZcasEYZtG7qGR7dRuD 1UxWPnqYZktaEJKAFJGnvq081NHNbf84EryTq3sjqk3HsYnqtp4uQmXgfK5EmH0PhvMQ bfDyzLbkroePB9NQCku1d5lOL3hY2Ct/S9nlK68H8QUxSdJGX8FHeinugdbdvTvSnaKo r/Eoi9L51xqU1SKbe5Q4HjLDt3uzaV2PbubT2/MQSinGUCuCjRPSJjzgnrQFiSB/kMaL Zc4skUZt80/qArvEoVBBlZujWnAFWvgRYYq3zZXEaRlwOheZ8E3yvXZgLeVeV6qdnUBf Nm8A== X-Gm-Message-State: AOAM531f3XQk1/i0M3Fn3PtANT7hNcYNqKrbcOpKlUIFqlxhnkG5XU68 nMjjp/DQ6bmLBeLOdK2uzjMk8xYl1P2E0w3sy68= X-Google-Smtp-Source: ABdhPJwx9zOXYR7KdT9uTm7+b+TlOspi/lj4LFyGwewdlKdHV60NR95HLYDmvQo0z1C4ag23iqsvqjxEq1WfAxN4I+I= X-Received: by 2002:a05:622a:8d:b0:305:11c0:bfcb with SMTP id o13-20020a05622a008d00b0030511c0bfcbmr2082644qtw.410.1654790028643; Thu, 09 Jun 2022 08:53:48 -0700 (PDT) MIME-Version: 1.0 References: <20220517173941.189330-2-hkalra@marvell.com> <20220524084235.17796-1-hkalra@marvell.com> In-Reply-To: <20220524084235.17796-1-hkalra@marvell.com> From: Jerin Jacob Date: Thu, 9 Jun 2022 21:23:22 +0530 Message-ID: Subject: Re: [PATCH v3 01/11] event/octeontx: fix SSO fastpath To: Harman Kalra Cc: dpdk-dev , Jerin Jacob , Pavan Nikhilesh 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 Tue, May 24, 2022 at 2:13 PM Harman Kalra wrote: > > Segmentation fault is observed as soon as any dpdk application > with ethdev event is launched. Handling the event types > appropriately. > > Also fixing sub event type violation as in OCTEONTX event device we > use sub_event_type to store the ethernet port identifier when we receive > work from OCTEONTX ethernet device. This violates the event device spec > as sub_event_type should be 0 in the initial receive stage. > Set sub_event_type to 0 after copying the port id in single workslot > mode. > > Fixes: 8dc6c2f12ecf ("crypto/octeontx: add crypto adapter data path") Updated the git commit as follows and applied to dpdk-next-net-eventdev/for-main. Thanks event/octeontx: fix SSO fastpath Segmentation fault is observed as soon as any application with ethdev event is launched as ev->mbuf was not set properly. Fixing sub event type violation as in OCTEONTX event device sub_event_type is used to store the ethernet port identifier when work is received from OCTEONTX ethernet device. This violates the event device spec as sub_event_type should be 0 in the initial receive stage. Setting sub_event_type to 0 after copying the port id in single workslot mode. Fixes: 44a2cebbd489 ("crypto/octeontx: add crypto adapter data path") Cc: stable@dpdk.org Signed-off-by: Harman Kalra Signed-off-by: Pavan Nikhilesh > > Signed-off-by: Harman Kalra > Signed-off-by: Pavan Nikhilesh > --- > V3: > * fixing sub event type violation > V2: > * Seperated out a generic patch from the series > > drivers/event/octeontx/ssovf_worker.h | 24 +++++++++++++++--------- > 1 file changed, 15 insertions(+), 9 deletions(-) > > diff --git a/drivers/event/octeontx/ssovf_worker.h b/drivers/event/octeontx/ssovf_worker.h > index e6ee292688..57be476394 100644 > --- a/drivers/event/octeontx/ssovf_worker.h > +++ b/drivers/event/octeontx/ssovf_worker.h > @@ -179,16 +179,22 @@ ssows_get_work(struct ssows *ws, struct rte_event *ev, const uint16_t flag) > ev->event = sched_type_queue | (get_work0 & 0xffffffff); > > if (get_work1) { > - if (ev->event_type == RTE_EVENT_TYPE_ETHDEV) > - get_work1 = (uintptr_t)ssovf_octeontx_wqe_to_pkt( > - get_work1, (ev->event >> 20) & 0x7F, flag, > - ws->lookup_mem); > - else if (ev->event_type == RTE_EVENT_TYPE_CRYPTODEV) > + if (ev->event_type == RTE_EVENT_TYPE_ETHDEV) { > + uint16_t port = (ev->event >> 20) & 0x7F; > + > + ev->sub_event_type = 0; > + ev->mbuf = ssovf_octeontx_wqe_to_pkt( > + get_work1, port, flag, ws->lookup_mem); > + } else if (ev->event_type == RTE_EVENT_TYPE_CRYPTODEV) { > get_work1 = otx_crypto_adapter_dequeue(get_work1); > - ev->u64 = get_work1; > - } else if (unlikely((get_work0 & 0xFFFFFFFF) == 0xFFFFFFFF)) { > - ssovf_octeontx_wqe_free(get_work1); > - return 0; > + ev->u64 = get_work1; > + } else { > + if (unlikely((get_work0 & 0xFFFFFFFF) == 0xFFFFFFFF)) { > + ssovf_octeontx_wqe_free(get_work1); > + return 0; > + } > + ev->u64 = get_work1; > + } > } > > return !!get_work1; > -- > 2.18.0 >