[1/1] eal: fix error log in rte_dev_probe
Checks
Commit Message
In the device probing, there is no need to log the error message in the
case, that device has been already probed and return with -EEXIST.
Fixes: 244d5130719c ("eal: enable hotplug on multi-process")
Cc: stable@dpdk.org
Signed-off-by: Lipei Liang <lianglipei@huawei.com>
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
lib/eal/common/eal_common_dev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Comments
Hi Yunjian, Thomas,
On Mon, Dec 5, 2022 at 9:02 AM Yunjian Wang <wangyunjian@huawei.com> wrote:
>
> In the device probing, there is no need to log the error message in the
> case, that device has been already probed and return with -EEXIST.
>
> Fixes: 244d5130719c ("eal: enable hotplug on multi-process")
> Cc: stable@dpdk.org
>
> Signed-off-by: Lipei Liang <lianglipei@huawei.com>
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
It seems it is a partial fix and a duplicate work for:
https://patchwork.dpdk.org/project/dpdk/patch/20190302024253.15594-3-thomas@monjalon.net/
This patch is part of a series:
https://patchwork.dpdk.org/project/dpdk/list/?series=3612
I see no activity on it, but there were some comments.
Thomas, do you intend to work on this series of yours?
> -----Original Message-----
> From: David Marchand [mailto:david.marchand@redhat.com]
> Sent: Thursday, January 5, 2023 4:34 PM
> To: wangyunjian <wangyunjian@huawei.com>; Thomas Monjalon
> <thomas@monjalon.net>
> Cc: dev@dpdk.org; qi.z.zhang@intel.com; anatoly.burakov@intel.com;
> Huangshaozhang <huangshaozhang@huawei.com>; stable@dpdk.org;
> lianglipei <lianglipei@huawei.com>
> Subject: Re: [dpdk-dev] [PATCH 1/1] eal: fix error log in rte_dev_probe
>
> Hi Yunjian, Thomas,
>
> On Mon, Dec 5, 2022 at 9:02 AM Yunjian Wang <wangyunjian@huawei.com>
> wrote:
> >
> > In the device probing, there is no need to log the error message in
> > the case, that device has been already probed and return with -EEXIST.
> >
> > Fixes: 244d5130719c ("eal: enable hotplug on multi-process")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Lipei Liang <lianglipei@huawei.com>
> > Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
>
> It seems it is a partial fix and a duplicate work for:
> https://patchwork.dpdk.org/project/dpdk/patch/20190302024253.15594-3-tho
> mas@monjalon.net/
I agree with Thomas's patch. Can we consider merging this patch first?
Because this err log can easily mislead problem troubleshooting.
>
> This patch is part of a series:
> https://patchwork.dpdk.org/project/dpdk/list/?series=3612
> I see no activity on it, but there were some comments.
>
> Thomas, do you intend to work on this series of yours?
>
>
> --
> David Marchand
@@ -264,17 +264,17 @@ rte_dev_probe(const char *devargs)
ret = local_dev_probe(devargs, &dev);
if (ret != 0) {
- RTE_LOG(ERR, EAL,
- "Failed to attach device on primary process\n");
-
/**
* it is possible that secondary process failed to attached a
* device that primary process have during initialization,
* so for -EEXIST case, we still need to sync with secondary
* process.
*/
- if (ret != -EEXIST)
+ if (ret != -EEXIST) {
+ RTE_LOG(ERR, EAL,
+ "Failed to attach device on primary process\n");
return ret;
+ }
}
/* primary send attach sync request to secondary. */