From: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>
To: "Hyong Youb Kim (hyonkim)" <hyonkim@cisco.com>
Cc: David Marchand <david.marchand@redhat.com>,
Thomas Monjalon <thomas@monjalon.net>,
Ferruh Yigit <ferruh.yigit@intel.com>,
Igor Russkikh <igor.russkikh@aquantia.com>,
Pavel Belous <pavel.belous@aquantia.com>,
Allain Legacy <allain.legacy@windriver.com>,
Matt Peters <matt.peters@windriver.com>,
Ravi Kumar <ravi1.kumar@amd.com>, Rasesh Mody <rmody@marvell.com>,
Shahed Shaikh <shshaikh@marvell.com>,
Wenzhuo Lu <wenzhuo.lu@intel.com>,
Qi Zhang <qi.z.zhang@intel.com>,
Xiao Wang <xiao.w.wang@intel.com>,
Beilei Xing <beilei.xing@intel.com>,
Jingjing Wu <jingjing.wu@intel.com>,
Qiming Yang <qiming.yang@intel.com>,
"Konstantin Ananyev" <konstantin.ananyev@intel.com>,
Alejandro Lucero <alejandro.lucero@netronome.com>,
Andrew Rybchenko <arybchenko@solarflare.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>,
Tiwei Bie <tiwei.bie@intel.com>,
Zhihong Wang <zhihong.wang@intel.com>,
"Yong Wang" <yongwang@vmware.com>,
Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
"John Daley (johndale)" <johndale@cisco.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [RFC PATCH v3 3/3] drivers/net: use unmask API in interrupt handlers
Date: Wed, 17 Jul 2019 07:47:45 +0000 [thread overview]
Message-ID: <DM6PR18MB2427C150A006E10854FEF161AFC90@DM6PR18MB2427.namprd18.prod.outlook.com> (raw)
In-Reply-To: <MWHPR11MB18393CB9A20D9B5ED6996297BFC90@MWHPR11MB1839.namprd11.prod.outlook.com>
On Wed, Jul 17, 2019 at 06:01:47AM +0000, Hyong Youb Kim (hyonkim) wrote:
> > -----Original Message-----
> > From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > Sent: Wednesday, July 17, 2019 1:44 AM
> [...]
> > Subject: [RFC PATCH v3 3/3] drivers/net: use unmask API in interrupt
> > handlers
> >
> > Replace rte_intr_enable() with rte_intr_unmask() API
> > for unmasking in interrupt handlers and rx_queue_intr_enable()
> > in callbacks of PMD's whose original intent was to unmask interrupts
> > after handling is completed if device is backed by UIO, IGB_UIO or
> > VFIO(with INTx).
> >
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > ---
> >
> > v3:
> > * Change all PMD's that use rte_intr_enable() in
> > rx_queue_intr_enable() or in irq handler to use
> > new unmask api.
> >
> > drivers/net/atlantic/atl_ethdev.c | 2 +-
> > drivers/net/avp/avp_ethdev.c | 2 +-
> > drivers/net/axgbe/axgbe_ethdev.c | 4 ++--
> > drivers/net/bnx2x/bnx2x_ethdev.c | 2 +-
> > drivers/net/e1000/em_ethdev.c | 4 ++--
> > drivers/net/e1000/igb_ethdev.c | 6 +++---
> > drivers/net/fm10k/fm10k_ethdev.c | 6 +++---
> > drivers/net/i40e/i40e_ethdev.c | 2 +-
> > drivers/net/iavf/iavf_ethdev.c | 2 +-
> > drivers/net/ice/ice_ethdev.c | 4 ++--
> > drivers/net/ixgbe/ixgbe_ethdev.c | 6 +++---
> > drivers/net/nfp/nfp_net.c | 2 +-
> > drivers/net/qede/qede_ethdev.c | 8 ++++----
> > drivers/net/sfc/sfc_intr.c | 4 ++--
> > drivers/net/virtio/virtio_ethdev.c | 16 +++++++++++++++-
> > drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +-
> > 16 files changed, 43 insertions(+), 29 deletions(-)
> >
> [...]
> > diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
> > index 1a7aa17..5484d31 100644
> > --- a/drivers/net/nfp/nfp_net.c
> > +++ b/drivers/net/nfp/nfp_net.c
> > @@ -1412,7 +1412,7 @@ nfp_net_irq_unmask(struct rte_eth_dev *dev)
> > if (hw->ctrl & NFP_NET_CFG_CTRL_MSIXAUTO) {
> > /* If MSI-X auto-masking is used, clear the entry */
> > rte_wmb();
> > - rte_intr_enable(&pci_dev->intr_handle);
> > + rte_intr_unmask(&pci_dev->intr_handle);
>
> I mentioned this part earlier. The comment suggests the driver really
> needs to clear Mask bit in MSI-X Table, if MSI-X is used?
> rte_intr_unmask() + vfio-pci does not do that. The maintainers should
> say something..
>
Ok, if this comment meant that rte_intr_enable() is a must even with
VFIO-MSIX, then I can leave it as it is with rte_intr_unmask().
If it for MSIX interrupts via IGB_UIO, then rte_intr_unmask() will work.
> [...]
> > diff --git a/drivers/net/qede/qede_ethdev.c
> > b/drivers/net/qede/qede_ethdev.c
> > index 82363e6..6648139 100644
> > --- a/drivers/net/qede/qede_ethdev.c
> > +++ b/drivers/net/qede/qede_ethdev.c
> > @@ -248,8 +248,8 @@ qede_interrupt_handler_intx(void *param)
> > if (status & 0x1) {
> > qede_interrupt_action(ECORE_LEADING_HWFN(edev));
> >
> > - if (rte_intr_enable(eth_dev->intr_handle))
> > - DP_ERR(edev, "rte_intr_enable failed\n");
> > + if (rte_intr_unmask(eth_dev->intr_handle))
> > + DP_ERR(edev, "rte_intr_unmask failed\n");
> > }
> > }
> >
> > @@ -261,8 +261,8 @@ qede_interrupt_handler(void *param)
> > struct ecore_dev *edev = &qdev->edev;
> >
> > qede_interrupt_action(ECORE_LEADING_HWFN(edev));
> > - if (rte_intr_enable(eth_dev->intr_handle))
> > - DP_ERR(edev, "rte_intr_enable failed\n");
> > + if (rte_intr_unmask(eth_dev->intr_handle))
> > + DP_ERR(edev, "rte_intr_unmask failed\n");
> > }
>
> I thought you were going to remove rte_intr_enable from this handler
> altogether.
>
Here again, if it was done for case of IGB_UIO with MSIx, then
I think it is needed. If maintainer confirms that it is not needed in this
i.e qede_interrupt_handler(), then I can remove this unmask.
> [...]
>
> Thanks.
> -Hyong
>
next prev parent reply other threads:[~2019-07-17 7:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 16:50 [dpdk-dev] [RFC PATCH] vfio: avoid re-installing irq handler Jerin Jacob Kollanukkaran
2019-07-16 5:58 ` Hyong Youb Kim (hyonkim)
2019-07-16 6:47 ` Jerin Jacob Kollanukkaran
2019-07-16 7:49 ` Hyong Youb Kim (hyonkim)
2019-07-16 9:56 ` Jerin Jacob Kollanukkaran
2019-07-16 6:46 ` [dpdk-dev] [RFC PATCH] eal: add mask and unmask interrupt apis Nithin Dabilpuram
2019-07-16 7:01 ` [dpdk-dev] [RFC PATCH v2] " Nithin Dabilpuram
2019-07-16 16:44 ` [dpdk-dev] [RFC PATCH v3 1/3] vfio: revert change that does intr eventfd setup at probe Nithin Dabilpuram
2019-07-16 16:44 ` [dpdk-dev] [RFC PATCH v3 2/3] eal: add mask and unmask interrupt APIs Nithin Dabilpuram
2019-07-17 5:55 ` Hyong Youb Kim (hyonkim)
2019-07-17 6:14 ` Jerin Jacob Kollanukkaran
2019-07-17 7:09 ` Hyong Youb Kim (hyonkim)
2019-07-17 8:03 ` Jerin Jacob Kollanukkaran
2019-07-17 8:45 ` Hyong Youb Kim (hyonkim)
2019-07-17 9:20 ` Jerin Jacob Kollanukkaran
2019-07-17 9:51 ` Hyong Youb Kim (hyonkim)
2019-07-17 10:43 ` Jerin Jacob Kollanukkaran
2019-07-17 11:06 ` Hyong Youb Kim (hyonkim)
2019-07-17 11:16 ` Jerin Jacob Kollanukkaran
2019-07-17 12:04 ` Nithin Kumar Dabilpuram
2019-07-16 16:44 ` [dpdk-dev] [RFC PATCH v3 3/3] drivers/net: use unmask API in interrupt handlers Nithin Dabilpuram
2019-07-17 6:01 ` Hyong Youb Kim (hyonkim)
2019-07-17 7:47 ` Nithin Kumar Dabilpuram [this message]
2019-07-16 20:06 ` [dpdk-dev] [RFC PATCH v3 1/3] vfio: revert change that does intr eventfd setup at probe Stephen Hemminger
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=DM6PR18MB2427C150A006E10854FEF161AFC90@DM6PR18MB2427.namprd18.prod.outlook.com \
--to=ndabilpuram@marvell.com \
--cc=alejandro.lucero@netronome.com \
--cc=allain.legacy@windriver.com \
--cc=arybchenko@solarflare.com \
--cc=beilei.xing@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=hyonkim@cisco.com \
--cc=igor.russkikh@aquantia.com \
--cc=jerinj@marvell.com \
--cc=jingjing.wu@intel.com \
--cc=johndale@cisco.com \
--cc=konstantin.ananyev@intel.com \
--cc=matt.peters@windriver.com \
--cc=maxime.coquelin@redhat.com \
--cc=pavel.belous@aquantia.com \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=ravi1.kumar@amd.com \
--cc=rmody@marvell.com \
--cc=shshaikh@marvell.com \
--cc=thomas@monjalon.net \
--cc=tiwei.bie@intel.com \
--cc=wenzhuo.lu@intel.com \
--cc=xiao.w.wang@intel.com \
--cc=yongwang@vmware.com \
--cc=zhihong.wang@intel.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).