DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Harman Kalra <hkalra@marvell.com>
Cc: dpdk-dev <dev@dpdk.org>, Jerin Jacob <jerinj@marvell.com>,
	 Pavan Nikhilesh <pbhagavatula@marvell.com>
Subject: Re: [PATCH v3 01/11] event/octeontx: fix SSO fastpath
Date: Thu, 9 Jun 2022 21:23:22 +0530	[thread overview]
Message-ID: <CALBAE1Ok3YtH2vM7PF1U5AEUFgoetUTt=9S4H4yQPahU=X0TJg@mail.gmail.com> (raw)
In-Reply-To: <20220524084235.17796-1-hkalra@marvell.com>

On Tue, May 24, 2022 at 2:13 PM Harman Kalra <hkalra@marvell.com> 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 <hkalra@marvell.com>
    Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>


>
> Signed-off-by: Harman Kalra <hkalra@marvell.com>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
> 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
>

  parent reply	other threads:[~2022-06-09 15:53 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17 17:39 [PATCH 01/12] config: add thundert83 config Harman Kalra
2022-05-17 17:39 ` [PATCH 02/12] event/octeontx: fix SSO fastpath Harman Kalra
2022-05-23 16:10   ` [PATCH v2 01/11] " Harman Kalra
2022-05-23 16:10     ` [PATCH v2 02/11] net/octeontx: fix port close Harman Kalra
2022-05-23 16:10     ` [PATCH v2 03/11] net/octeontx: setting link attributes Harman Kalra
2022-05-23 16:10     ` [PATCH v2 04/11] net/octeontx: handle port reconfiguration Harman Kalra
2022-05-23 16:10     ` [PATCH v2 05/11] net/thunderx: implement polling of link state change Harman Kalra
2022-05-23 16:10     ` [PATCH v2 06/11] net/thunderx: reset Rx DMAC control register Harman Kalra
2022-05-23 16:10     ` [PATCH v2 07/11] net/thunderx: setting link attributes Harman Kalra
2022-05-23 16:10     ` [PATCH v2 08/11] net/octeontx: implement xstats Harman Kalra
2022-05-23 16:10     ` [PATCH v2 09/11] net/octeontx: support allmulticast Harman Kalra
2022-05-23 16:10     ` [PATCH v2 10/11] net/thunderx: device attach from secondary Harman Kalra
2022-05-23 16:11     ` [PATCH v2 11/11] net/thunderx: populate max and min MTU values Harman Kalra
2022-05-24  8:42   ` [PATCH v3 01/11] event/octeontx: fix SSO fastpath Harman Kalra
2022-05-24  8:42     ` [PATCH v3 02/11] net/octeontx: fix port close Harman Kalra
2022-05-24  8:42     ` [PATCH v3 03/11] net/octeontx: setting link attributes Harman Kalra
2022-05-24  8:42     ` [PATCH v3 04/11] net/octeontx: handle port reconfiguration Harman Kalra
2022-05-24  8:42     ` [PATCH v3 05/11] net/thunderx: implement polling of link state change Harman Kalra
2022-05-24  8:42     ` [PATCH v3 06/11] net/thunderx: reset Rx DMAC control register Harman Kalra
2022-05-24  8:42     ` [PATCH v3 07/11] net/thunderx: setting link attributes Harman Kalra
2022-05-24  8:42     ` [PATCH v3 08/11] net/octeontx: implement xstats Harman Kalra
2022-06-09 16:13       ` Jerin Jacob
2022-05-24  8:42     ` [PATCH v3 09/11] net/octeontx: support allmulticast Harman Kalra
2022-05-24  8:42     ` [PATCH v3 10/11] net/thunderx: device attach from secondary Harman Kalra
2022-05-24  8:42     ` [PATCH v3 11/11] net/thunderx: populate max and min MTU values Harman Kalra
2022-06-09 15:55       ` Jerin Jacob
2022-06-09 15:53     ` Jerin Jacob [this message]
2022-05-17 17:39 ` [PATCH 03/12] net/octeontx: fix port close Harman Kalra
2022-05-17 17:39 ` [PATCH 04/12] net/octeontx: setting link attributes Harman Kalra
2022-05-17 17:39 ` [PATCH 05/12] net/octeontx: handle port reconfiguration Harman Kalra
2022-05-17 17:39 ` [PATCH 06/12] net/thunderx: implement polling of link state change Harman Kalra
2022-05-17 17:39 ` [PATCH 07/12] net/thunderx: reset Rx DMAC control register Harman Kalra
2022-05-17 17:39 ` [PATCH 08/12] net/thunderx: setting link attributes Harman Kalra
2022-05-17 17:39 ` [PATCH 09/12] net/octeontx: implement xstats Harman Kalra
2022-05-17 17:39 ` [PATCH 10/12] net/octeontx: support allmulticast Harman Kalra
2022-05-17 17:39 ` [PATCH 11/12] net/thunderx: device attach from secondary Harman Kalra
2022-05-17 17:39 ` [PATCH 12/12] net/thunderx: populate max and min MTU values Harman Kalra
2022-05-18  6:10 ` [PATCH 01/12] config: add thundert83 config Ruifeng Wang
2022-05-23 13:34 ` [PATCH v2] config: add thunderX t83 config Harman Kalra
2022-06-01 22:02   ` Thomas Monjalon

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='CALBAE1Ok3YtH2vM7PF1U5AEUFgoetUTt=9S4H4yQPahU=X0TJg@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=hkalra@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=pbhagavatula@marvell.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).