DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
From: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>
To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	"Burakov, Anatoly" <anatoly.burakov@intel.com>,
	Hyong Youb Kim <hyonkim@cisco.com>,
	"David Marchand" <david.marchand@redhat.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>
Cc: John Daley <johndale@cisco.com>,
	Shahed Shaikh <shshaikh@marvell.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v3 2/3] eal: add ack interrupt API
Date: Thu, 18 Jul 2019 13:30:20 +0000
Message-ID: <19d7fdbf-e21b-8ea9-0b8b-fde250318ce9@marvell.com> (raw)
In-Reply-To: <BYAPR18MB2424702B8A091D75EDD9B284C8C80@BYAPR18MB2424.namprd18.prod.outlook.com>


On 7/18/2019 6:57 PM, Jerin Jacob Kollanukkaran wrote:
>> -----Original Message-----
>> From: Burakov, Anatoly <anatoly.burakov@intel.com>
>> Sent: Thursday, July 18, 2019 6:43 PM
>> To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Hyong Youb Kim
>> <hyonkim@cisco.com>; David Marchand <david.marchand@redhat.com>;
>> Thomas Monjalon <thomas@monjalon.net>; Ferruh Yigit
>> <ferruh.yigit@intel.com>; Bruce Richardson <bruce.richardson@intel.com>
>> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; John Daley
>> <johndale@cisco.com>; Shahed Shaikh <shshaikh@marvell.com>;
>> dev@dpdk.org
>> Subject: [EXT] Re: [dpdk-dev] [PATCH v3 2/3] eal: add ack interrupt API
>> On 18-Jul-19 9:46 AM, Nithin Dabilpuram wrote:
>>> Add new ack interrupt API to avoid using
>>> VFIO_IRQ_SET_ACTION_TRIGGER(rte_intr_enable()) for acking interrupt
>>> purpose for VFIO based interrupt handlers.
>>> This implementation is specific to Linux.
>>>
>>> Using rte_intr_enable() for acking interrupt has below issues
>>>
>>>    * Time consuming to do for every interrupt received as it will
>>>      free_irq() followed by request_irq() and all other initializations
>>>    * A race condition because of a window between free_irq() and
>>>      request_irq() with packet reception still on and device still
>>>      enabled and would throw warning messages like below.
>>>      [158764.159833] do_IRQ: 9.34 No irq handler for vector
>>>
>>> In this patch, rte_intr_ack() is a no-op for VFIO_MSIX/VFIO_MSI
>>> interrupts as they are edge triggered and kernel would not mask the
>>> interrupt before delivering the event to userspace and we don't need to
>> ack.
>>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
>>> Signed-off-by: Jerin Jacob <jerinj@marvell.com>
>>> Tested-by: Shahed Shaikh <shshaikh@marvell.com>
>>> ---
>> <snip>
>>
>>>     */
>>>    int rte_intr_disable(const struct rte_intr_handle *intr_handle);
>>>
>>> +/**
>>> + * It acks an interrupt raised for the specified handle.
>>> + *
>>> + * Call this function to ack an interrupt from interrupt
>>> + * handler either from application or driver, so that
>>> + * new interrupts are raised.
>>> + *
>>> + * @note PMD generally calls this function at the end of its IRQ callback.
>>> + *    Internally, it unmasks the interrupt if possible. For INTx, unmasking
>>> + *    is required as the interrupt is auto-masked prior to invoking
>>> + *    callback. For MSI/MSI-X, unmasking is typically not needed as the
>>> + *    interrupt is not auto-masked. In fact, for interrupt handle types
>>> + *    VFIO_MSIX and VFIO_MSI, this function is no-op.
>> I've added this comment in previous revision's discussion, but i'll copy it here
>> as well.
>>
>> Does the user of this API even cares about these details? I would think that it
>> would be easier to just mandate calling this function at the end of each
>> interrupt callback, regardless of which interrupt mode is used.
>>
>> IMO internal details (about no-ops and such) are better explained in the
>> implementation, not in the public-facing API header.
> +1 to move the comment under @note to implementation.
Ok. I'll just move this note alone to implementation of function in next 
revision.
>

  reply index

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17 11:58 [dpdk-dev] [PATCH 0/3] vfio: fix broken msix interrupt initialization Nithin Dabilpuram
2019-07-17 11:58 ` [dpdk-dev] [PATCH 1/3] vfio: revert change that does intr eventfd setup at probe Nithin Dabilpuram
2019-07-19  9:13   ` Nowak, DamianX
2019-07-17 11:58 ` [dpdk-dev] [PATCH 2/3] eal: add ack interrupt API Nithin Dabilpuram
2019-07-17 11:58 ` [dpdk-dev] [PATCH 3/3] drivers/net: use ack API in interrupt handlers Nithin Dabilpuram
2019-07-17 12:47   ` Hyong Youb Kim (hyonkim)
2019-07-17 17:18   ` Shahed Shaikh
2019-07-17 12:43 ` [dpdk-dev] [PATCH v2 0/3] vfio: fix broken msix interrupt initialization Nithin Dabilpuram
2019-07-17 12:43   ` [dpdk-dev] [PATCH v2 1/3] vfio: revert change that does intr eventfd setup at probe Nithin Dabilpuram
2019-07-17 12:43   ` [dpdk-dev] [PATCH v2 2/3] eal: add ack interrupt API Nithin Dabilpuram
2019-07-17 12:57     ` Hyong Youb Kim (hyonkim)
2019-07-17 14:35       ` [dpdk-dev] [EXT] " Nithin Kumar Dabilpuram
2019-07-17 15:05         ` Hyong Youb Kim (hyonkim)
2019-07-17 15:16           ` Nithin Kumar Dabilpuram
2019-07-18 10:22           ` Burakov, Anatoly
2019-07-17 12:43   ` [dpdk-dev] [PATCH v2 3/3] drivers/net: use ack API in interrupt handlers Nithin Dabilpuram
2019-07-18  8:46 ` [dpdk-dev] [PATCH v3 0/3] vfio: fix broken msix interrupt initialization Nithin Dabilpuram
2019-07-18  8:46   ` [dpdk-dev] [PATCH v3 1/3] vfio: revert change that does intr eventfd setup at probe Nithin Dabilpuram
2019-07-18  8:46   ` [dpdk-dev] [PATCH v3 2/3] eal: add ack interrupt API Nithin Dabilpuram
2019-07-18 13:13     ` Burakov, Anatoly
2019-07-18 13:27       ` [dpdk-dev] [EXT] " Jerin Jacob Kollanukkaran
2019-07-18 13:30         ` Nithin Kumar Dabilpuram [this message]
2019-07-18  8:46   ` [dpdk-dev] [PATCH v3 3/3] drivers/net: use ack API in interrupt handlers Nithin Dabilpuram
2019-07-18 14:36 ` [dpdk-dev] [PATCH v4 0/3] vfio: fix broken msix interrupt initialization Nithin Dabilpuram
2019-07-18 14:36   ` [dpdk-dev] [PATCH v4 1/3] vfio: revert change that does intr eventfd setup at probe Nithin Dabilpuram
2019-07-19  8:28     ` Yao, Lei A
2019-07-22 19:27     ` David Marchand
2019-07-18 14:36   ` [dpdk-dev] [PATCH v4 2/3] eal: add ack interrupt API Nithin Dabilpuram
2019-07-22 19:28     ` David Marchand
2019-07-18 14:36   ` [dpdk-dev] [PATCH v4 3/3] drivers/net: use ack API in interrupt handlers Nithin Dabilpuram
2019-07-22 19:29     ` David Marchand
2019-07-22 19:38   ` [dpdk-dev] [PATCH v4 0/3] vfio: fix broken msix interrupt initialization David Marchand
2019-07-23  5:32     ` [dpdk-dev] [EXT] " Nithin Kumar Dabilpuram
2019-07-23  8:04 ` [dpdk-dev] [PATCH v5 " David Marchand
2019-07-23  8:04   ` [dpdk-dev] [PATCH v5 1/3] vfio: revert change that does intr eventfd setup at probe David Marchand
2019-07-23  8:04   ` [dpdk-dev] [PATCH v5 2/3] eal: add ack interrupt API David Marchand
2019-07-23  8:04   ` [dpdk-dev] [PATCH v5 3/3] drivers/net: use ack API in interrupt handlers David Marchand
2019-07-23 10:01   ` [dpdk-dev] [PATCH v5 0/3] vfio: fix broken msix interrupt initialization Thomas Monjalon

Reply instructions:

You may reply publically 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=19d7fdbf-e21b-8ea9-0b8b-fde250318ce9@marvell.com \
    --to=ndabilpuram@marvell.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hyonkim@cisco.com \
    --cc=jerinj@marvell.com \
    --cc=johndale@cisco.com \
    --cc=shshaikh@marvell.com \
    --cc=thomas@monjalon.net \
    /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

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org dpdk-dev@archiver.kernel.org
	public-inbox-index dpdk-dev


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox