failsafe: skip devargs if not present in secondary
PATCH 1/1 failsafe: skip devargs if not present in secondary
When secondary process is run was noticing that the log always contained complaints about unable to parse devargs.
It turns out that an empty devargs turns into "" and this value is not parsable. Change the failsafe secondary to just skip doing devargs if it empty.
--- drivers/net/failsafe/failsafe.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/failsafe/failsafe.c +4 -0
@@ -364,6 +364,10 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)* A sub-device can be plugged later. */ FOREACH_SUBDEV(sdev, i, eth_dev) { +/* skip empty devargs */ +if (sdev->devargs.name[0 ] =='\0' ) +continue ; +/* rebuild devargs to be able to get the bus name. */ ret =rte_devargs_parse (&devargs, sdev->devargs.name);
Signature · 1 line
2.20.1
Hello Stephen,
Quoted 7 lines · Stephen Hemminger
When secondary process is run was noticing that the log always contained complaints about unable to parse devargs.
It turns out that an empty devargs turns into "" and this value is not parsable. Change the failsafe secondary to just skip doing devargs if it empty.
Commit log needs a little rework, a few typos.
Quoted 10 lines
Signed-off-by Stephen Hemminger <[email protected]>--- drivers/net/failsafe/failsafe.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/failsafe/failsafe.c +0
-0
drivers/net/failsafe/failsafe.c rte_pmd_failsafe_probe(struct rte_vdev_device *vdev) · line 370
Quoted 7 lines
drivers/net/failsafe/failsafe.c +4
-0@@ -364,6 +364,10 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)* A sub-device can be plugged later. */ FOREACH_SUBDEV(sdev, i, eth_dev) { +/* skip empty devargs */ +if (sdev->devargs.name[0 ] =='\0' ) +continue ; +
An empty devargs being named "" is part of the internals of rte_devargs. The clean solution would be to add a bool rte_devargs_empty() function and test the devargs with it.
The simple solution is your proposition.
Clean seems a little heavy-handed, but it would be more stable. If you agree, you can add the helper. I'm ok with keeping it simple otherwise.
Quoted 6 lines
drivers/net/failsafe/failsafe.c +0
-0/* rebuild devargs to be able to get the bus name. */ ret =rte_devargs_parse (&devargs, sdev->devargs.name);Signature · 1 line
2.20.1
Signature · 2 lines
Gaëtan Rivet 6WIND
Quoted 35 lines · On Mon, 24 Jun 2019 10:15:58 +0200 Gaëtan Rivet <[email protected]> wrote:
Hello Stephen,
Quoted 7 lines · Stephen Hemminger
When secondary process is run was noticing that the log always contained complaints about unable to parse devargs.
It turns out that an empty devargs turns into "" and this value is not parsable. Change the failsafe secondary to just skip doing devargs if it empty.
Commit log needs a little rework, a few typos.
Quoted 10 lines
Signed-off-by Stephen Hemminger <[email protected]>--- drivers/net/failsafe/failsafe.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/failsafe/failsafe.c +0
-0drivers/net/failsafe/failsafe.c rte_pmd_failsafe_probe(struct rte_vdev_device *vdev) · line 370
Quoted 7 lines
drivers/net/failsafe/failsafe.c +4
-0@@ -364,6 +364,10 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)* A sub-device can be plugged later. */ FOREACH_SUBDEV(sdev, i, eth_dev) { +/* skip empty devargs */ +if (sdev->devargs.name[0 ] =='\0' ) +continue ; +An empty devargs being named "" is part of the internals of
rte_devargs. The clean solution would be to add abool rte_devargs_empty()function and test the devargs with it.
Quoted 12 lines
The simple solution is your proposition.
Clean seems a little heavy-handed, but it would be more stable. If you agree, you can add the helper. I'm ok with keeping it simple otherwise.
Quoted 6 lines
drivers/net/failsafe/failsafe.c +0
-0/* rebuild devargs to be able to get the bus name. */ ret =rte_devargs_parse (&devargs, sdev->devargs.name);Signature · 1 line
2.20.1
Simpler is better.
Sorry, after working with failsafe my impression is that it is not built with that in mind.
Quoted 51 lines · Stephen Hemminger
Quoted 35 lines · On Mon, 24 Jun 2019 10:15:58 +0200 Gaëtan Rivet <[email protected]> wrote:
Hello Stephen,
Quoted 7 lines · Stephen Hemminger
When secondary process is run was noticing that the log always contained complaints about unable to parse devargs.
It turns out that an empty devargs turns into "" and this value is not parsable. Change the failsafe secondary to just skip doing devargs if it empty.
Commit log needs a little rework, a few typos.
Quoted 10 lines
Signed-off-by Stephen Hemminger <[email protected]>--- drivers/net/failsafe/failsafe.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/failsafe/failsafe.c +0
-0drivers/net/failsafe/failsafe.c rte_pmd_failsafe_probe(struct rte_vdev_device *vdev) · line 370
Quoted 7 lines
drivers/net/failsafe/failsafe.c +4
-0@@ -364,6 +364,10 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)* A sub-device can be plugged later. */ FOREACH_SUBDEV(sdev, i, eth_dev) { +/* skip empty devargs */ +if (sdev->devargs.name[0 ] =='\0' ) +continue ; +An empty devargs being named "" is part of the internals of
rte_devargs. The clean solution would be to add abool rte_devargs_empty()function and test the devargs with it.Quoted 12 lines
The simple solution is your proposition.
Clean seems a little heavy-handed, but it would be more stable. If you agree, you can add the helper. I'm ok with keeping it simple otherwise.
Quoted 6 lines
drivers/net/failsafe/failsafe.c +0
-0/* rebuild devargs to be able to get the bus name. */ ret =rte_devargs_parse (&devargs, sdev->devargs.name);Signature · 1 line
2.20.1
Quoted 1 line
Simpler is better.
Ok
Quoted 2 lines
Sorry, after working with failsafe my impression is that it is not built with that in mind.
Signature · 2 lines
Gaëtan Rivet 6WIND
Quoted 52 lines · Gaëtan Rivet
Quoted 51 lines · Stephen Hemminger
Quoted 47 lines · On Mon, 24 Jun 2019 10:15:58 +0200 Gaëtan Rivet <[email protected]> wrote:
Hello Stephen,
Quoted 7 lines · Stephen Hemminger
When secondary process is run was noticing that the log always contained complaints about unable to parse devargs.
It turns out that an empty devargs turns into "" and this value is not parsable. Change the failsafe secondary to just skip doing devargs if it empty.
Commit log needs a little rework, a few typos.
Quoted 10 lines
Signed-off-by Stephen Hemminger <[email protected]>--- drivers/net/failsafe/failsafe.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/failsafe/failsafe.c +0
-0drivers/net/failsafe/failsafe.c rte_pmd_failsafe_probe(struct rte_vdev_device *vdev) · line 370
Quoted 7 lines
drivers/net/failsafe/failsafe.c +4
-0@@ -364,6 +364,10 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)* A sub-device can be plugged later. */ FOREACH_SUBDEV(sdev, i, eth_dev) { +/* skip empty devargs */ +if (sdev->devargs.name[0 ] =='\0' ) +continue ; +An empty devargs being named "" is part of the internals of
rte_devargs. The clean solution would be to add abool rte_devargs_empty()function and test the devargs with it.The simple solution is your proposition.
Clean seems a little heavy-handed, but it would be more stable. If you agree, you can add the helper. I'm ok with keeping it simple otherwise.
Quoted 6 lines
drivers/net/failsafe/failsafe.c +0
-0/* rebuild devargs to be able to get the bus name. */ ret =rte_devargs_parse (&devargs, sdev->devargs.name);Signature · 1 line
2.20.1
Quoted 3 lines
Quoted 1 line
Simpler is better.
Ok
is this an ack :)
Quoted 4 lines
Quoted 3 lines
Sorry, after working with failsafe my impression is that it is not built with that in mind.
Gaëtan Rivet
Acked-byQuoted 53 lines · Ferruh Yigit
Quoted 52 lines · Gaëtan Rivet
Quoted 51 lines · Stephen Hemminger
Quoted 47 lines · On Mon, 24 Jun 2019 10:15:58 +0200 Gaëtan Rivet <[email protected]> wrote:
Hello Stephen,
Quoted 7 lines · Stephen Hemminger
When secondary process is run was noticing that the log always contained complaints about unable to parse devargs.
It turns out that an empty devargs turns into "" and this value is not parsable. Change the failsafe secondary to just skip doing devargs if it empty.
Commit log needs a little rework, a few typos.
Quoted 10 lines
Signed-off-by Stephen Hemminger <[email protected]>--- drivers/net/failsafe/failsafe.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/failsafe/failsafe.c +0
-0drivers/net/failsafe/failsafe.c rte_pmd_failsafe_probe(struct rte_vdev_device *vdev) · line 370
Quoted 7 lines
drivers/net/failsafe/failsafe.c +4
-0@@ -364,6 +364,10 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)* A sub-device can be plugged later. */ FOREACH_SUBDEV(sdev, i, eth_dev) { +/* skip empty devargs */ +if (sdev->devargs.name[0 ] =='\0' ) +continue ; +An empty devargs being named "" is part of the internals of
rte_devargs. The clean solution would be to add abool rte_devargs_empty()function and test the devargs with it.The simple solution is your proposition.
Clean seems a little heavy-handed, but it would be more stable. If you agree, you can add the helper. I'm ok with keeping it simple otherwise.
Quoted 6 lines
drivers/net/failsafe/failsafe.c +0
-0/* rebuild devargs to be able to get the bus name. */ ret =rte_devargs_parse (&devargs, sdev->devargs.name);Signature · 1 line
2.20.1
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Simpler is better.
Ok
is this an ack :)
Yes sorry,
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines
Sorry, after working with failsafe my impression is that it is not built with that in mind.
Signature · 2 lines
Gaëtan Rivet 6WIND
Ferruh Yigit
AppliedQuoted 20 lines · Gaëtan Rivet
Quoted 19 lines · Ferruh Yigit
Quoted 18 lines · Gaëtan Rivet
Quoted 17 lines · Stephen Hemminger
Quoted 14 lines · On Mon, 24 Jun 2019 10:15:58 +0200 Gaëtan Rivet <[email protected]> wrote:
Hello Stephen,
Quoted 7 lines · Stephen Hemminger
When secondary process is run was noticing that the log always contained complaints about unable to parse devargs.
It turns out that an empty devargs turns into "" and this value is not parsable. Change the failsafe secondary to just skip doing devargs if it empty.
Commit log needs a little rework, a few typos.
Quoted 1 line
Signed-off-by Stephen Hemminger <[email protected]>
<...>
Quoted 2 lines
Acked-by Gaetan Rivet <[email protected]>
Applied to dpdk-next-net/master, thanks.