From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: David Marchand <david.marchand@redhat.com>, dev@dpdk.org
Cc: stable@dpdk.org, Chenbo Xia <chenbo.xia@intel.com>,
Jianfeng Tan <jianfeng.tan@intel.com>,
Yuanhan Liu <yuanhan.liu@linux.intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 1/2] net/virtio: reconfigure LSC handler when required
Date: Tue, 14 Sep 2021 10:36:11 +0200 [thread overview]
Message-ID: <ee68281b-3ef3-8780-8e70-922117f4bd6d@redhat.com> (raw)
In-Reply-To: <20210831155411.17672-2-david.marchand@redhat.com>
On 8/31/21 5:54 PM, David Marchand wrote:
> There is no reason to re-register a interrupt handler for LSC if this
> feature was not requested in the first place.
> A simple usecase is when asking for Rx interrupts without LSC interrupt.
>
> Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> drivers/net/virtio/virtio_ethdev.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index e58085a2c9..314a291e8c 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -1684,13 +1684,15 @@ virtio_configure_intr(struct rte_eth_dev *dev)
> }
> }
>
> - /* Re-register callback to update max_intr */
> - rte_intr_callback_unregister(dev->intr_handle,
> - virtio_interrupt_handler,
> - dev);
> - rte_intr_callback_register(dev->intr_handle,
> - virtio_interrupt_handler,
> - dev);
> + if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
> + /* Re-register callback to update max_intr */
> + rte_intr_callback_unregister(dev->intr_handle,
> + virtio_interrupt_handler,
> + dev);
> + rte_intr_callback_register(dev->intr_handle,
> + virtio_interrupt_handler,
> + dev);
> + }
>
> /* DO NOT try to remove this! This function will enable msix, or QEMU
> * will encounter SIGSEGV when DRIVER_OK is sent.
>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
next prev parent reply other threads:[~2021-09-14 8:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-30 15:13 [dpdk-dev] [PATCH] " David Marchand
2021-08-31 15:54 ` [dpdk-dev] [PATCH v2 0/2] virtio-user interrupt fixes David Marchand
2021-08-31 15:54 ` [dpdk-dev] [PATCH v2 1/2] net/virtio: reconfigure LSC handler when required David Marchand
2021-09-14 8:36 ` Maxime Coquelin [this message]
2021-08-31 15:54 ` [dpdk-dev] [PATCH v2 2/2] net/virtio: fix virtio-user Rx interrupts with multi queue David Marchand
2021-09-14 8:39 ` Maxime Coquelin
2021-09-14 11:27 ` [dpdk-dev] [PATCH v2 0/2] virtio-user interrupt fixes Maxime Coquelin
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=ee68281b-3ef3-8780-8e70-922117f4bd6d@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=chenbo.xia@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jianfeng.tan@intel.com \
--cc=stable@dpdk.org \
--cc=yuanhan.liu@linux.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).