[v4,0/3] vfio: fix broken msix interrupt initialization
mbox series

Message ID 20190718143628.169623-1-ndabilpuram@marvell.com
Headers show
Series
  • vfio: fix broken msix interrupt initialization
Related show

Message

Nithin Dabilpuram July 18, 2019, 2:36 p.m. UTC
A final patch for below mentioned RFC patch discussions.

[RFC PATCH v3 1/3] vfio: revert change that does intr eventfd setup at probe
http://mails.dpdk.org/archives/dev/2019-July/138358.html
 [RFC PATCH v3 2/3] eal: add mask and unmask interrupt APIs
http://mails.dpdk.org/archives/dev/2019-July/138357.html
[RFC PATCH v3 3/3] drivers/net: use unmask API in interrupt handlers
http://mails.dpdk.org/archives/dev/2019-July/138359.html

Please also refer to below discussions
http://mails.dpdk.org/archives/dev/2019-July/138184.html
http://mails.dpdk.org/archives/dev/2019-July/138113.html

This patch set basically reverts vfio patch that moves eventfd setup
to probe time (1/3) because msix initialization is broken.
It adds new ack interrupt api for purposes of simple and light 
weight ack method and also to avoid race conditions
that was the root cause of this discussion.

Nithin Dabilpuram (3):
  vfio: revert change that does intr eventfd setup at probe
  eal: add ack interrupt API
  drivers/net: use ack API in interrupt handlers

 drivers/bus/pci/linux/pci_vfio.c               |  78 ++++---
 drivers/net/atlantic/Makefile                  |   1 +
 drivers/net/atlantic/atl_ethdev.c              |   2 +-
 drivers/net/atlantic/meson.build               |   2 +
 drivers/net/avp/Makefile                       |   1 +
 drivers/net/avp/avp_ethdev.c                   |   2 +-
 drivers/net/avp/meson.build                    |   1 +
 drivers/net/axgbe/Makefile                     |   1 +
 drivers/net/axgbe/axgbe_ethdev.c               |   4 +-
 drivers/net/axgbe/meson.build                  |   1 +
 drivers/net/bnx2x/Makefile                     |   1 +
 drivers/net/bnx2x/bnx2x_ethdev.c               |   2 +-
 drivers/net/bnx2x/meson.build                  |   1 +
 drivers/net/e1000/em_ethdev.c                  |   4 +-
 drivers/net/e1000/igb_ethdev.c                 |   6 +-
 drivers/net/fm10k/Makefile                     |   1 +
 drivers/net/fm10k/fm10k_ethdev.c               |   6 +-
 drivers/net/fm10k/meson.build                  |   1 +
 drivers/net/i40e/i40e_ethdev.c                 |   2 +-
 drivers/net/iavf/iavf_ethdev.c                 |   2 +-
 drivers/net/ice/Makefile                       |   1 +
 drivers/net/ice/ice_ethdev.c                   |   4 +-
 drivers/net/ice/meson.build                    |   1 +
 drivers/net/ixgbe/ixgbe_ethdev.c               |   6 +-
 drivers/net/nfp/nfp_net.c                      |   2 +-
 drivers/net/qede/Makefile                      |   1 +
 drivers/net/qede/meson.build                   |   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 +-
 lib/librte_eal/common/include/rte_interrupts.h |  18 ++
 lib/librte_eal/freebsd/eal/eal_interrupts.c    |   9 +
 lib/librte_eal/linux/eal/eal_interrupts.c      | 291 +++++++++++++++++++++----
 lib/librte_eal/rte_eal_version.map             |   1 +
 35 files changed, 368 insertions(+), 117 deletions(-)

Comments

David Marchand July 22, 2019, 7:38 p.m. UTC | #1
On Thu, Jul 18, 2019 at 4:36 PM Nithin Dabilpuram
<ndabilpuram@marvell.com> wrote:
>
> A final patch for below mentioned RFC patch discussions.
>
> [RFC PATCH v3 1/3] vfio: revert change that does intr eventfd setup at probe
> http://mails.dpdk.org/archives/dev/2019-July/138358.html
>  [RFC PATCH v3 2/3] eal: add mask and unmask interrupt APIs
> http://mails.dpdk.org/archives/dev/2019-July/138357.html
> [RFC PATCH v3 3/3] drivers/net: use unmask API in interrupt handlers
> http://mails.dpdk.org/archives/dev/2019-July/138359.html
>
> Please also refer to below discussions
> http://mails.dpdk.org/archives/dev/2019-July/138184.html
> http://mails.dpdk.org/archives/dev/2019-July/138113.html
>
> This patch set basically reverts vfio patch that moves eventfd setup
> to probe time (1/3) because msix initialization is broken.
> It adds new ack interrupt api for purposes of simple and light
> weight ack method and also to avoid race conditions
> that was the root cause of this discussion.

Thanks a lot for working on this.

I only have small comments (sent in separate mails), you already did
all the work.
I prepared incremental patches if you agree with those comments:
- patch 2 https://github.com/david-marchand/dpdk/commit/374acb3409c206ffcb1bf6b5a7e8bb0bfca4e2b9
- patch 3 https://github.com/david-marchand/dpdk/commit/71102b9301b2a55a057a605f8e48e4a24f9d74a3

And a squashed branch:
https://github.com/david-marchand/dpdk/commits/interrupt_fixes
Nithin Dabilpuram July 23, 2019, 5:32 a.m. UTC | #2
On 7/23/2019 1:08 AM, David Marchand wrote:
> External Email
>
> ----------------------------------------------------------------------
> On Thu, Jul 18, 2019 at 4:36 PM Nithin Dabilpuram
> <ndabilpuram@marvell.com> wrote:
>> A final patch for below mentioned RFC patch discussions.
>>
>> [RFC PATCH v3 1/3] vfio: revert change that does intr eventfd setup at probe
>> http://mails.dpdk.org/archives/dev/2019-July/138358.html
>>   [RFC PATCH v3 2/3] eal: add mask and unmask interrupt APIs
>> http://mails.dpdk.org/archives/dev/2019-July/138357.html
>> [RFC PATCH v3 3/3] drivers/net: use unmask API in interrupt handlers
>> http://mails.dpdk.org/archives/dev/2019-July/138359.html
>>
>> Please also refer to below discussions
>> http://mails.dpdk.org/archives/dev/2019-July/138184.html
>> http://mails.dpdk.org/archives/dev/2019-July/138113.html
>>
>> This patch set basically reverts vfio patch that moves eventfd setup
>> to probe time (1/3) because msix initialization is broken.
>> It adds new ack interrupt api for purposes of simple and light
>> weight ack method and also to avoid race conditions
>> that was the root cause of this discussion.
> Thanks a lot for working on this.
>
> I only have small comments (sent in separate mails), you already did
> all the work.
> I prepared incremental patches if you agree with those comments:
> - patch 2 https://github.com/david-marchand/dpdk/commit/374acb3409c206ffcb1bf6b5a7e8bb0bfca4e2b9
> - patch 3 https://github.com/david-marchand/dpdk/commit/71102b9301b2a55a057a605f8e48e4a24f9d74a3
>
> And a squashed branch:
> https://github.com/david-marchand/dpdk/commits/interrupt_fixes
Thanks David. I'm fine with the comments and your incremental change. 
You can send a v3 or Thomas can pick from your repo, anything should be 
fine.
>
>