DPDK patches and discussions
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@mellanox.com>
To: Ophir Munk <ophirmu@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Matan Azrad <matan@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH v3] net/mlx5: return EAGAIN on premature disable interrupt calls
Date: Wed, 22 Jul 2020 09:11:38 +0000	[thread overview]
Message-ID: <AM0PR05MB6707CBB3AD2DD1EBAD53B2CFC2790@AM0PR05MB6707.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20200721144107.25550-2-ophirmu@mellanox.com>

Hi,

> -----Original Message-----
> From: Ophir Munk <ophirmu@mellanox.com>
> Sent: Tuesday, July 21, 2020 5:41 PM
> To: dev@dpdk.org
> Cc: Raslan Darawsheh <rasland@mellanox.com>; Ophir Munk
> <ophirmu@mellanox.com>; Matan Azrad <matan@mellanox.com>
> Subject: [PATCH v3] net/mlx5: return EAGAIN on premature disable interrupt
> calls
> 
> RXQ interrupts under Linux are based on the epoll mechanism. An
> expected order of operations is as follows:
> 1. Call rte_eth_dev_rx_intr_enable(), to arm the CQ for receiving events
> on data input.
> 2. Block on rte_epoll_wait() with an array of file descriptors
> representing the CQ events. Upon data arrival the kernel will signal an
> input event on the corresponding CQ fd.
> 3. Call rte_eth_dev_rx_intr_disable() after the event was received and
> continue in polling mode. The mlx5 implementation of
> rte_eth_dev_rx_intr_disable() is to get the CQ event and ack it.
> 
> In practice applications may wake up from rte_epoll_wait() due to
> timeout with no event to ack but still call
> rte_eth_dev_rx_intr_disable() unconditionally.  In such cases the call
> should return EAGAIN (since the file descriptors are non-blocked), as
> opposed to EINVAL which indicates a real failure.  In case of EAGAIN the
> PMD should not warn on "Unable to disable interrupt on Rx queue".
> 
> This commit fixes a earlier commit where the returned value 0 from
> function devx_get_event() - was considered an error.
> 
> Fixes: 19e429e5c7c2 ("net/mlx5: implement CQ for RxQ using DevX API")
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> Acked-by: Raslan Darawsheh <rasland@mellanox.com>
> ---


Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

      reply	other threads:[~2020-07-22  9:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16  5:36 [dpdk-dev] [PATCH v1] " Ophir Munk
2020-07-21 14:24 ` [dpdk-dev] [PATCH v2] " Ophir Munk
2020-07-21 14:24   ` [dpdk-dev] [PATCH v2] net/mlx5: " Ophir Munk
2020-07-21 14:41     ` [dpdk-dev] [PATCH v3] " Ophir Munk
2020-07-21 14:41       ` [dpdk-dev] [PATCH v3] net/mlx5: " Ophir Munk
2020-07-22  9:11         ` Raslan Darawsheh [this message]

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=AM0PR05MB6707CBB3AD2DD1EBAD53B2CFC2790@AM0PR05MB6707.eurprd05.prod.outlook.com \
    --to=rasland@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=ophirmu@mellanox.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).