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 3C188A034C; Thu, 20 Jan 2022 14:26:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F2DAB426EF; Thu, 20 Jan 2022 14:26:05 +0100 (CET) Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) by mails.dpdk.org (Postfix) with ESMTP id 5019F40042 for ; Thu, 20 Jan 2022 14:26:04 +0100 (CET) Received: by mail-io1-f52.google.com with SMTP id z19so6890689ioj.1 for ; Thu, 20 Jan 2022 05:26:04 -0800 (PST) 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=pWxJYMnIWFpdwLLEXFW1FUvp3j9fOBVCWa7uzzhyKyA=; b=YZ+5E51vXGrp0ZN2OcgRrth4q208xe0I774F1geBZ9tnBjzoq9fDIjC355ckpR3z1S dNAEb9f4vi6ihDTE7Y6r4+gq7rBup5YvWBtxAmkpoT8lLgr1yehyL9/ygipXQxREuSGc Z3guuvcY4i8L+18yk3AsymH84idZTzftuX1LvL+v/IMDxSz8aV2JmuGur5KqK4BMQcIe WRPOA0rYgxHHaYnnzD0BkQlWJF0qHgwj0N6WNt9w0W1xwylMGfOyg7wrpi9tfb9FPSvo ld9BqQZozGo2DWpS9/i6Hz8QqJQ5Y3PMNzBnK94lQV/Y3gEOOLiMqNhsmWbsQRAPQXAn Qg1A== 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=pWxJYMnIWFpdwLLEXFW1FUvp3j9fOBVCWa7uzzhyKyA=; b=ZixVnnEl813cPQEHzBZX1ynqKnIjFEHc9ag3llg4ryBBKd+E6fxCP2owVHPonYiNUv //gDzXroemocJLEzSNku3zy5gYkCIDlTHrtnmozCsDdg6PFXtuy6ytdWb/Ub9zZjZ6VU jJ8ulzArvHXPU9iR9NpXhGCEdC6f9eL39xNV9f1s0uCrntniqCwvf1X3WB0tKN/nPaVJ JEbdONsymVp35egwMvwYOFc3XR9nssazV583nINIP9Rqk4SexUSfH2b0PGUUYue9WFBd Zo38fslpchXrvq1qRNqBT9pQ4XPZG0320p9q5na+jNWdPICcWunXYhfvkHf1sCiRKv8J rp+w== X-Gm-Message-State: AOAM533VdeXTaHQZa2k95iybxPWMTcxwqemU0jGj6jGoEkMB7Y9Gqikb QSe2PqpfW9ByeHxP7y1NdmKJoO77LNGX2y7YV7Y= X-Google-Smtp-Source: ABdhPJxXDZEcG/GtI6nXY9cox3LV3Wq+Bw+aoV8nBrH2CicLrRhNvuwKwrt9wJe8Ys4KOC2wiHs0tsQfKWY5OEs4Xl4= X-Received: by 2002:a02:bb87:: with SMTP id g7mr507872jan.79.1642685163651; Thu, 20 Jan 2022 05:26:03 -0800 (PST) MIME-Version: 1.0 References: <20211213083143.4233-1-pbhagavatula@marvell.com> In-Reply-To: From: Jerin Jacob Date: Thu, 20 Jan 2022 18:55:37 +0530 Message-ID: Subject: Re: [PATCH] eventdev: fix missing internal port checks To: "Jayatheerthan, Jay" Cc: "Naga Harish K, S V" , "pbhagavatula@marvell.com" , "jerinj@marvell.com" , "dev@dpdk.org" 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, Dec 14, 2021 at 5:13 PM Jayatheerthan, Jay wrote: > > > Acked-by: Jay Jayatheerthan Updated git commit as eventdev/eth_rx: fix missing internal port checks When event delivery is through internal port, stats are mainitained by HW and we should avoid reading SW data structures for stats. Fix missing internal port checks. Fixes: 995b150c1ae1 ("eventdev/eth_rx: add queue stats API") Cc: stable@dpdk.org Signed-off-by: Pavan Nikhilesh Acked-by: Jay Jayatheerthan Applied to dpdk-next-net-eventdev/for-main. Thanks > > > > -----Original Message----- > > From: Naga Harish K, S V > > Sent: Tuesday, December 14, 2021 4:23 PM > > To: Jayatheerthan, Jay ; pbhagavatula@marvell.com; jerinj@marvell.com > > Cc: dev@dpdk.org > > Subject: RE: [PATCH] eventdev: fix missing internal port checks > > > > The patch looks good to me. > > > > > -----Original Message----- > > > From: Jayatheerthan, Jay > > > Sent: Tuesday, December 14, 2021 11:23 AM > > > To: pbhagavatula@marvell.com; jerinj@marvell.com; Naga Harish K, S V > > > > > > Cc: dev@dpdk.org > > > Subject: RE: [PATCH] eventdev: fix missing internal port checks > > > > > > @Harish, could you take a look at this please ? > > > > > > -Jay > > > > > > > > > > -----Original Message----- > > > > From: pbhagavatula@marvell.com > > > > Sent: Monday, December 13, 2021 2:02 PM > > > > To: jerinj@marvell.com; Jayatheerthan, Jay > > > > > > > > Cc: dev@dpdk.org; Pavan Nikhilesh > > > > Subject: [PATCH] eventdev: fix missing internal port checks > > > > > > > > From: Pavan Nikhilesh > > > > > > > > When event delivery is through internal port, stats are mainitained by > > > > HW and we should avoid reading SW data structures for stats. > > > > Fix missing internal port checks. > > > > > > > > Fixes: 995b150c1ae1 ("eventdev/eth_rx: add queue stats API") > > > > > > > > Signed-off-by: Pavan Nikhilesh > > > > --- > > > > lib/eventdev/rte_event_eth_rx_adapter.c | 24 ++++++++++++++---------- > > > > 1 file changed, 14 insertions(+), 10 deletions(-) > > > > > > > > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c > > > > b/lib/eventdev/rte_event_eth_rx_adapter.c > > > > index 809416d9b7..da223aacac 100644 > > > > --- a/lib/eventdev/rte_event_eth_rx_adapter.c > > > > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c > > > > @@ -2984,15 +2984,17 @@ > > > rte_event_eth_rx_adapter_queue_stats_get(uint8_t id, > > > > return -EINVAL; > > > > } > > > > > > > > - queue_info = &dev_info->rx_queue[rx_queue_id]; > > > > - event_buf = queue_info->event_buf; > > > > - q_stats = queue_info->stats; > > > > + if (dev_info->internal_event_port == 0) { > > > > + queue_info = &dev_info->rx_queue[rx_queue_id]; > > > > + event_buf = queue_info->event_buf; > > > > + q_stats = queue_info->stats; > > > > > > > > - stats->rx_event_buf_count = event_buf->count; > > > > - stats->rx_event_buf_size = event_buf->events_size; > > > > - stats->rx_packets = q_stats->rx_packets; > > > > - stats->rx_poll_count = q_stats->rx_poll_count; > > > > - stats->rx_dropped = q_stats->rx_dropped; > > > > + stats->rx_event_buf_count = event_buf->count; > > > > + stats->rx_event_buf_size = event_buf->events_size; > > > > + stats->rx_packets = q_stats->rx_packets; > > > > + stats->rx_poll_count = q_stats->rx_poll_count; > > > > + stats->rx_dropped = q_stats->rx_dropped; > > > > + } > > > > > > > > dev = &rte_eventdevs[rx_adapter->eventdev_id]; > > > > if (dev->dev_ops->eth_rx_adapter_queue_stats_get != NULL) { @@ > > > > -3086,8 +3088,10 @@ > > > rte_event_eth_rx_adapter_queue_stats_reset(uint8_t id, > > > > return -EINVAL; > > > > } > > > > > > > > - queue_info = &dev_info->rx_queue[rx_queue_id]; > > > > - rxa_queue_stats_reset(queue_info); > > > > + if (dev_info->internal_event_port == 0) { > > > > + queue_info = &dev_info->rx_queue[rx_queue_id]; > > > > + rxa_queue_stats_reset(queue_info); > > > > + } > > > > > > > > dev = &rte_eventdevs[rx_adapter->eventdev_id]; > > > > if (dev->dev_ops->eth_rx_adapter_queue_stats_reset != NULL) { > > > > -- > > > > 2.34.0 >