* [dpdk-dev] [PATCH] pci/vfio: fixup rte_intr_callback_unregister() handling
@ 2018-10-24 10:11 Darek Stojaczyk
2018-10-26 14:23 ` Burakov, Anatoly
2018-11-20 11:04 ` Kevin Traynor
0 siblings, 2 replies; 5+ messages in thread
From: Darek Stojaczyk @ 2018-10-24 10:11 UTC (permalink / raw)
To: dev; +Cc: anatoly.burakov, Darek Stojaczyk, jia.guo, stable
This function is documented to return the number of unregistered
callbacks or negative numbers on error, but pci_vfio checks for
ret != 0 to detect failures. Not anymore.
Fixes: c115fd000c32 ("vfio: handle hotplug request notifier")
Cc: jia.guo@intel.com
Cc: stable@dpdk.org
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
---
drivers/bus/pci/linux/pci_vfio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index b1f0683fe..305cc0601 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -341,7 +341,7 @@ pci_vfio_enable_notifier(struct rte_pci_device *dev, int vfio_dev_fd)
ret = rte_intr_callback_unregister(&dev->vfio_req_intr_handle,
pci_vfio_req_handler,
(void *)&dev->device);
- if (ret)
+ if (ret < 0)
RTE_LOG(ERR, EAL,
"Fail to unregister req notifier handler.\n");
goto error;
@@ -373,7 +373,7 @@ pci_vfio_disable_notifier(struct rte_pci_device *dev)
ret = rte_intr_callback_unregister(&dev->vfio_req_intr_handle,
pci_vfio_req_handler,
(void *)&dev->device);
- if (ret) {
+ if (ret < 0) {
RTE_LOG(ERR, EAL,
"fail to unregister req notifier handler.\n");
return -1;
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] pci/vfio: fixup rte_intr_callback_unregister() handling
2018-10-24 10:11 [dpdk-dev] [PATCH] pci/vfio: fixup rte_intr_callback_unregister() handling Darek Stojaczyk
@ 2018-10-26 14:23 ` Burakov, Anatoly
2018-10-29 0:10 ` Thomas Monjalon
2018-11-20 11:04 ` Kevin Traynor
1 sibling, 1 reply; 5+ messages in thread
From: Burakov, Anatoly @ 2018-10-26 14:23 UTC (permalink / raw)
To: Darek Stojaczyk, dev; +Cc: jia.guo, stable
On 24-Oct-18 11:11 AM, Darek Stojaczyk wrote:
> This function is documented to return the number of unregistered
> callbacks or negative numbers on error, but pci_vfio checks for
> ret != 0 to detect failures. Not anymore.
>
> Fixes: c115fd000c32 ("vfio: handle hotplug request notifier")
> Cc: jia.guo@intel.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
> ---
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
--
Thanks,
Anatoly
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] pci/vfio: fixup rte_intr_callback_unregister() handling
2018-10-26 14:23 ` Burakov, Anatoly
@ 2018-10-29 0:10 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2018-10-29 0:10 UTC (permalink / raw)
To: Darek Stojaczyk; +Cc: dev, Burakov, Anatoly, jia.guo
26/10/2018 16:23, Burakov, Anatoly:
> On 24-Oct-18 11:11 AM, Darek Stojaczyk wrote:
> > This function is documented to return the number of unregistered
> > callbacks or negative numbers on error, but pci_vfio checks for
> > ret != 0 to detect failures. Not anymore.
> >
> > Fixes: c115fd000c32 ("vfio: handle hotplug request notifier")
> > Cc: jia.guo@intel.com
> > Cc: stable@dpdk.org
No need for stable backport here.
> > Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
>
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] pci/vfio: fixup rte_intr_callback_unregister() handling
2018-10-24 10:11 [dpdk-dev] [PATCH] pci/vfio: fixup rte_intr_callback_unregister() handling Darek Stojaczyk
2018-10-26 14:23 ` Burakov, Anatoly
@ 2018-11-20 11:04 ` Kevin Traynor
2018-11-20 11:05 ` Kevin Traynor
1 sibling, 1 reply; 5+ messages in thread
From: Kevin Traynor @ 2018-11-20 11:04 UTC (permalink / raw)
To: Darek Stojaczyk, dev; +Cc: anatoly.burakov, jia.guo, stable
On 10/24/2018 11:11 AM, Darek Stojaczyk wrote:
> This function is documented to return the number of unregistered
> callbacks or negative numbers on error, but pci_vfio checks for
> ret != 0 to detect failures. Not anymore.
>
> Fixes: c115fd000c32 ("vfio: handle hotplug request notifier")
> Cc: jia.guo@intel.com
> Cc: stable@dpdk.org
The Fixes: commit indicates this is not for stable, and the modified
function was added in that commit. If there is some equivalent fix for
stable, please send a backport for that.
>
> Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
> ---
> drivers/bus/pci/linux/pci_vfio.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
> index b1f0683fe..305cc0601 100644
> --- a/drivers/bus/pci/linux/pci_vfio.c
> +++ b/drivers/bus/pci/linux/pci_vfio.c
> @@ -341,7 +341,7 @@ pci_vfio_enable_notifier(struct rte_pci_device *dev, int vfio_dev_fd)
> ret = rte_intr_callback_unregister(&dev->vfio_req_intr_handle,
> pci_vfio_req_handler,
> (void *)&dev->device);
> - if (ret)
> + if (ret < 0)
> RTE_LOG(ERR, EAL,
> "Fail to unregister req notifier handler.\n");
> goto error;
> @@ -373,7 +373,7 @@ pci_vfio_disable_notifier(struct rte_pci_device *dev)
> ret = rte_intr_callback_unregister(&dev->vfio_req_intr_handle,
> pci_vfio_req_handler,
> (void *)&dev->device);
> - if (ret) {
> + if (ret < 0) {
> RTE_LOG(ERR, EAL,
> "fail to unregister req notifier handler.\n");
> return -1;
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] pci/vfio: fixup rte_intr_callback_unregister() handling
2018-11-20 11:04 ` Kevin Traynor
@ 2018-11-20 11:05 ` Kevin Traynor
0 siblings, 0 replies; 5+ messages in thread
From: Kevin Traynor @ 2018-11-20 11:05 UTC (permalink / raw)
To: Darek Stojaczyk, dev; +Cc: anatoly.burakov, jia.guo, stable
On 11/20/2018 11:04 AM, Kevin Traynor wrote:
> On 10/24/2018 11:11 AM, Darek Stojaczyk wrote:
>> This function is documented to return the number of unregistered
>> callbacks or negative numbers on error, but pci_vfio checks for
>> ret != 0 to detect failures. Not anymore.
>>
>> Fixes: c115fd000c32 ("vfio: handle hotplug request notifier")
>> Cc: jia.guo@intel.com
>> Cc: stable@dpdk.org
>
> The Fixes: commit indicates this is not for stable, and the modified
> function was added in that commit. If there is some equivalent fix for
> stable, please send a backport for that.
>
oh, I should have read the rest of the thread before replying. Ignore
previous mail, thanks.
>>
>> Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
>> ---
>> drivers/bus/pci/linux/pci_vfio.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
>> index b1f0683fe..305cc0601 100644
>> --- a/drivers/bus/pci/linux/pci_vfio.c
>> +++ b/drivers/bus/pci/linux/pci_vfio.c
>> @@ -341,7 +341,7 @@ pci_vfio_enable_notifier(struct rte_pci_device *dev, int vfio_dev_fd)
>> ret = rte_intr_callback_unregister(&dev->vfio_req_intr_handle,
>> pci_vfio_req_handler,
>> (void *)&dev->device);
>> - if (ret)
>> + if (ret < 0)
>> RTE_LOG(ERR, EAL,
>> "Fail to unregister req notifier handler.\n");
>> goto error;
>> @@ -373,7 +373,7 @@ pci_vfio_disable_notifier(struct rte_pci_device *dev)
>> ret = rte_intr_callback_unregister(&dev->vfio_req_intr_handle,
>> pci_vfio_req_handler,
>> (void *)&dev->device);
>> - if (ret) {
>> + if (ret < 0) {
>> RTE_LOG(ERR, EAL,
>> "fail to unregister req notifier handler.\n");
>> return -1;
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-11-20 11:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-24 10:11 [dpdk-dev] [PATCH] pci/vfio: fixup rte_intr_callback_unregister() handling Darek Stojaczyk
2018-10-26 14:23 ` Burakov, Anatoly
2018-10-29 0:10 ` Thomas Monjalon
2018-11-20 11:04 ` Kevin Traynor
2018-11-20 11:05 ` Kevin Traynor
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).