DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/test: fix bond device name too long
@ 2016-05-27 15:20 Michal Jastrzebski
  2016-05-27 15:20 ` [dpdk-dev] [PATCH] bond: replace rte_panic with errno code return Michal Jastrzebski
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Michal Jastrzebski @ 2016-05-27 15:20 UTC (permalink / raw)
  To: dev

Bond device name was too long (grather than 32 signs) that
cause mempool allocation to fail.

Fixes: 92073ef961ee ("bond: unit tests")

Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
---
 app/test/test_link_bonding.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index 7cbc289..eeb1395 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -83,7 +83,7 @@
 #define MAX_PKT_BURST			(512)
 #define DEF_PKT_BURST			(16)
 
-#define BONDED_DEV_NAME			("unit_test_bonded_device")
+#define BONDED_DEV_NAME			("unit_test_bond_dev")
 
 #define INVALID_SOCKET_ID		(-1)
 #define INVALID_PORT_ID			(-1)
-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH] bond: replace rte_panic with errno code return
  2016-05-27 15:20 [dpdk-dev] [PATCH] app/test: fix bond device name too long Michal Jastrzebski
@ 2016-05-27 15:20 ` Michal Jastrzebski
  2016-05-27 16:13   ` Iremonger, Bernard
  2016-05-27 16:14 ` [dpdk-dev] [PATCH] app/test: fix bond device name too long Iremonger, Bernard
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Michal Jastrzebski @ 2016-05-27 15:20 UTC (permalink / raw)
  To: dev

This patch modifies bond_mode_alb_enable function.
When mempool allocation fails errno code is returned
instead of rte_panic. This allow to decide on application level
if it should quit or retry for mempool allocation.

Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
---
 drivers/net/bonding/rte_eth_bond_alb.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_alb.c b/drivers/net/bonding/rte_eth_bond_alb.c
index 3157543..194c1da 100644
--- a/drivers/net/bonding/rte_eth_bond_alb.c
+++ b/drivers/net/bonding/rte_eth_bond_alb.c
@@ -90,14 +90,14 @@ bond_mode_alb_enable(struct rte_eth_dev *bond_dev)
 		if (internals->mode6.mempool == NULL) {
 			RTE_LOG(ERR, PMD, "%s: Failed to initialize ALB mempool.\n",
 					bond_dev->data->name);
-			rte_panic(
-					"Failed to allocate memory pool ('%s')\n"
-					"for bond device '%s'\n",
-					mem_name, bond_dev->data->name);
+			goto mempool_alloc_error;
 		}
 	}
 
 	return 0;
+
+	mempool_alloc_error:
+	return -ENOMEM;
 }
 
 void bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] bond: replace rte_panic with errno code return
  2016-05-27 15:20 ` [dpdk-dev] [PATCH] bond: replace rte_panic with errno code return Michal Jastrzebski
@ 2016-05-27 16:13   ` Iremonger, Bernard
  2016-06-13 13:57     ` Bruce Richardson
  0 siblings, 1 reply; 13+ messages in thread
From: Iremonger, Bernard @ 2016-05-27 16:13 UTC (permalink / raw)
  To: Jastrzebski, MichalX K, dev

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Michal Jastrzebski
> Sent: Friday, May 27, 2016 4:21 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] bond: replace rte_panic with errno code return
> 
> This patch modifies bond_mode_alb_enable function.
> When mempool allocation fails errno code is returned instead of rte_panic.
> This allow to decide on application level if it should quit or retry for mempool
> allocation.
> 
> Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>

Acked-by: Bernard Iremonger<bernard.iremonger@intel.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] app/test: fix bond device name too long
  2016-05-27 15:20 [dpdk-dev] [PATCH] app/test: fix bond device name too long Michal Jastrzebski
  2016-05-27 15:20 ` [dpdk-dev] [PATCH] bond: replace rte_panic with errno code return Michal Jastrzebski
@ 2016-05-27 16:14 ` Iremonger, Bernard
  2016-06-13 20:14   ` Thomas Monjalon
  2016-05-27 16:38 ` Thomas Monjalon
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Iremonger, Bernard @ 2016-05-27 16:14 UTC (permalink / raw)
  To: Jastrzebski, MichalX K, dev

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Michal Jastrzebski
> Sent: Friday, May 27, 2016 4:21 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] app/test: fix bond device name too long
> 
> Bond device name was too long (grather than 32 signs) that cause mempool
> allocation to fail.
> 
> Fixes: 92073ef961ee ("bond: unit tests")
> 
> Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>

Acked-by: Bernard Iremonger<bernard.iremonger@intel.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] app/test: fix bond device name too long
  2016-05-27 15:20 [dpdk-dev] [PATCH] app/test: fix bond device name too long Michal Jastrzebski
  2016-05-27 15:20 ` [dpdk-dev] [PATCH] bond: replace rte_panic with errno code return Michal Jastrzebski
  2016-05-27 16:14 ` [dpdk-dev] [PATCH] app/test: fix bond device name too long Iremonger, Bernard
@ 2016-05-27 16:38 ` Thomas Monjalon
  2016-06-08 10:40   ` Thomas Monjalon
  2016-06-01  1:29 ` Xu, HuilongX
  2016-06-01  3:25 ` Xu, HuilongX
  4 siblings, 1 reply; 13+ messages in thread
From: Thomas Monjalon @ 2016-05-27 16:38 UTC (permalink / raw)
  To: dev; +Cc: Michal Jastrzebski, Iremonger, Bernard

2016-05-27 17:20, Michal Jastrzebski:
> Bond device name was too long (grather than 32 signs) that
> cause mempool allocation to fail.

Maybe that this kind of failure would be avoided if the test
was added to autotests (app/test/autotest_data.py).

Generally speaking, it would be a good idea to make an audit
on which tests are missing in "make fast_test" and "make test".

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] app/test: fix bond device name too long
  2016-05-27 15:20 [dpdk-dev] [PATCH] app/test: fix bond device name too long Michal Jastrzebski
                   ` (2 preceding siblings ...)
  2016-05-27 16:38 ` Thomas Monjalon
@ 2016-06-01  1:29 ` Xu, HuilongX
  2016-06-01  3:25 ` Xu, HuilongX
  4 siblings, 0 replies; 13+ messages in thread
From: Xu, HuilongX @ 2016-06-01  1:29 UTC (permalink / raw)
  To: Jastrzebski, MichalX K, dev

Tester-by: huilong xu<huilongx.xu@intel.com>
Test case: link_bonging_autotest
Package:dpdk.org master branch newest commit + this patch
Test cmdline: ./x86_64-native-linuxapp-gcc/app/test -c ffff -n 1
              Exec link_bonging_autotest cmdl
Test environment:
OS&kernel: dpdk-rhel72 3.10.0-327.el7.x86_64
Gcc: gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
Hugepage: 4096*2M

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Michal Jastrzebski
> Sent: Friday, May 27, 2016 11:21 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] app/test: fix bond device name too long
> 
> Bond device name was too long (grather than 32 signs) that
> cause mempool allocation to fail.
> 
> Fixes: 92073ef961ee ("bond: unit tests")
> 
> Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
> ---
>  app/test/test_link_bonding.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
> index 7cbc289..eeb1395 100644
> --- a/app/test/test_link_bonding.c
> +++ b/app/test/test_link_bonding.c
> @@ -83,7 +83,7 @@
>  #define MAX_PKT_BURST			(512)
>  #define DEF_PKT_BURST			(16)
> 
> -#define BONDED_DEV_NAME			("unit_test_bonded_device")
> +#define BONDED_DEV_NAME			("unit_test_bond_dev")
> 
>  #define INVALID_SOCKET_ID		(-1)
>  #define INVALID_PORT_ID			(-1)
> --
> 1.7.9.5

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] app/test: fix bond device name too long
  2016-05-27 15:20 [dpdk-dev] [PATCH] app/test: fix bond device name too long Michal Jastrzebski
                   ` (3 preceding siblings ...)
  2016-06-01  1:29 ` Xu, HuilongX
@ 2016-06-01  3:25 ` Xu, HuilongX
  4 siblings, 0 replies; 13+ messages in thread
From: Xu, HuilongX @ 2016-06-01  3:25 UTC (permalink / raw)
  To: Jastrzebski, MichalX K, dev

Test case: link_bonging_autotest 
Package:dpdk.org master branch newest commit + this patch 
Test cmdline: ./x86_64-native-linuxapp-gcc/app/test -c ffff -n 1
              Exec link_bonging_autotest cmdl Test environment:
OS&kernel: dpdk-rhel72 3.10.0-327.el7.x86_64
Gcc: gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
Hugepage: 4096*2M

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Michal Jastrzebski
> Sent: Friday, May 27, 2016 11:21 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] app/test: fix bond device name too long
> 
> Bond device name was too long (grather than 32 signs) that
> cause mempool allocation to fail.
> 
> Fixes: 92073ef961ee ("bond: unit tests")
> 
> Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
  Tested-by: huilong xu <huilongx.xu@intel.com>
> ---
>  app/test/test_link_bonding.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
> index 7cbc289..eeb1395 100644
> --- a/app/test/test_link_bonding.c
> +++ b/app/test/test_link_bonding.c
> @@ -83,7 +83,7 @@
>  #define MAX_PKT_BURST			(512)
>  #define DEF_PKT_BURST			(16)
> 
> -#define BONDED_DEV_NAME			("unit_test_bonded_device")
> +#define BONDED_DEV_NAME			("unit_test_bond_dev")
> 
>  #define INVALID_SOCKET_ID		(-1)
>  #define INVALID_PORT_ID			(-1)
> --
> 1.7.9.5

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] app/test: fix bond device name too long
  2016-05-27 16:38 ` Thomas Monjalon
@ 2016-06-08 10:40   ` Thomas Monjalon
  2016-06-08 11:50     ` Jastrzebski, MichalX K
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Monjalon @ 2016-06-08 10:40 UTC (permalink / raw)
  To: Michal Jastrzebski, Iremonger, Bernard; +Cc: dev

2016-05-27 18:38, Thomas Monjalon:
> 2016-05-27 17:20, Michal Jastrzebski:
> > Bond device name was too long (grather than 32 signs) that
> > cause mempool allocation to fail.
> 
> Maybe that this kind of failure would be avoided if the test
> was added to autotests (app/test/autotest_data.py).
> 
> Generally speaking, it would be a good idea to make an audit
> on which tests are missing in "make fast_test" and "make test".

Any comment please?

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] app/test: fix bond device name too long
  2016-06-08 10:40   ` Thomas Monjalon
@ 2016-06-08 11:50     ` Jastrzebski, MichalX K
  2016-06-08 13:31       ` Thomas Monjalon
  0 siblings, 1 reply; 13+ messages in thread
From: Jastrzebski, MichalX K @ 2016-06-08 11:50 UTC (permalink / raw)
  To: Thomas Monjalon, Iremonger, Bernard; +Cc: dev

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, June 08, 2016 12:40 PM
> To: Jastrzebski, MichalX K <michalx.k.jastrzebski@intel.com>; Iremonger,
> Bernard <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] app/test: fix bond device name too long
> 
> 2016-05-27 18:38, Thomas Monjalon:
> > 2016-05-27 17:20, Michal Jastrzebski:
> > > Bond device name was too long (grather than 32 signs) that
> > > cause mempool allocation to fail.
> >
> > Maybe that this kind of failure would be avoided if the test
> > was added to autotests (app/test/autotest_data.py).
> >
> > Generally speaking, it would be a good idea to make an audit
> > on which tests are missing in "make fast_test" and "make test".
> 
> Any comment please?

Hi Thomas,

There is a small timeout in test_tlb_tx_burst - big burst has to be generated to
detect balancing and small timeout has to be included between each burst, 
thus I am not sure if link_bonding_autotest can be classified to fast tests 
(test takes about 3-4 seconds).
We can add this test to autotests script for which time is not so critical.

Best regards
Michal

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] app/test: fix bond device name too long
  2016-06-08 11:50     ` Jastrzebski, MichalX K
@ 2016-06-08 13:31       ` Thomas Monjalon
  2016-06-08 14:27         ` Jastrzebski, MichalX K
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Monjalon @ 2016-06-08 13:31 UTC (permalink / raw)
  To: Jastrzebski, MichalX K; +Cc: Iremonger, Bernard, dev

2016-06-08 11:50, Jastrzebski, MichalX K:
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > 2016-05-27 18:38, Thomas Monjalon:
> > > 2016-05-27 17:20, Michal Jastrzebski:
> > > > Bond device name was too long (grather than 32 signs) that
> > > > cause mempool allocation to fail.
> > >
> > > Maybe that this kind of failure would be avoided if the test
> > > was added to autotests (app/test/autotest_data.py).
> > >
> > > Generally speaking, it would be a good idea to make an audit
> > > on which tests are missing in "make fast_test" and "make test".
> > 
> > Any comment please?
> 
> Hi Thomas,
> 
> There is a small timeout in test_tlb_tx_burst - big burst has to be generated to
> detect balancing and small timeout has to be included between each burst, 
> thus I am not sure if link_bonding_autotest can be classified to fast tests 
> (test takes about 3-4 seconds).
> We can add this test to autotests script for which time is not so critical.

The bug we see here could be detected by just initializing bonding.
Maybe we can consider having some basic/fast tests and others longer.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] app/test: fix bond device name too long
  2016-06-08 13:31       ` Thomas Monjalon
@ 2016-06-08 14:27         ` Jastrzebski, MichalX K
  0 siblings, 0 replies; 13+ messages in thread
From: Jastrzebski, MichalX K @ 2016-06-08 14:27 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Iremonger, Bernard, dev

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, June 08, 2016 3:31 PM
> To: Jastrzebski, MichalX K <michalx.k.jastrzebski@intel.com>
> Cc: Iremonger, Bernard <bernard.iremonger@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] app/test: fix bond device name too long
> 
> 2016-06-08 11:50, Jastrzebski, MichalX K:
> > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > > 2016-05-27 18:38, Thomas Monjalon:
> > > > 2016-05-27 17:20, Michal Jastrzebski:
> > > > > Bond device name was too long (grather than 32 signs) that
> > > > > cause mempool allocation to fail.
> > > >
> > > > Maybe that this kind of failure would be avoided if the test
> > > > was added to autotests (app/test/autotest_data.py).
> > > >
> > > > Generally speaking, it would be a good idea to make an audit
> > > > on which tests are missing in "make fast_test" and "make test".
> > >
> > > Any comment please?
> >
> > Hi Thomas,
> >
> > There is a small timeout in test_tlb_tx_burst - big burst has to be
> generated to
> > detect balancing and small timeout has to be included between each
> burst,
> > thus I am not sure if link_bonding_autotest can be classified to fast tests
> > (test takes about 3-4 seconds).
> > We can add this test to autotests script for which time is not so critical.
> 
> The bug we see here could be detected by just initializing bonding.
> Maybe we can consider having some basic/fast tests and others longer.

Actually this particular bug does not happen during bonding initialization, but
only after user will configure bond device in mode 6 (ALB). As only in mode 6 we need 
mempool allocation and we do rte_pktmbuf_pool_create giving as a mempool name -
bond device name BONDED_DEV_NAME.

Best regards
Michal

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] bond: replace rte_panic with errno code return
  2016-05-27 16:13   ` Iremonger, Bernard
@ 2016-06-13 13:57     ` Bruce Richardson
  0 siblings, 0 replies; 13+ messages in thread
From: Bruce Richardson @ 2016-06-13 13:57 UTC (permalink / raw)
  To: Iremonger, Bernard; +Cc: Jastrzebski, MichalX K, dev

On Fri, May 27, 2016 at 04:13:04PM +0000, Iremonger, Bernard wrote:
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Michal Jastrzebski
> > Sent: Friday, May 27, 2016 4:21 PM
> > To: dev@dpdk.org
> > Subject: [dpdk-dev] [PATCH] bond: replace rte_panic with errno code return
> > 
> > This patch modifies bond_mode_alb_enable function.
> > When mempool allocation fails errno code is returned instead of rte_panic.
> > This allow to decide on application level if it should quit or retry for mempool
> > allocation.
> > 
> > Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
> 
> Acked-by: Bernard Iremonger<bernard.iremonger@intel.com>
> 
Applied to dpdk-next-net/rel_16_07

/Bruce

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH] app/test: fix bond device name too long
  2016-05-27 16:14 ` [dpdk-dev] [PATCH] app/test: fix bond device name too long Iremonger, Bernard
@ 2016-06-13 20:14   ` Thomas Monjalon
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Monjalon @ 2016-06-13 20:14 UTC (permalink / raw)
  To: Jastrzebski, MichalX K; +Cc: dev, Iremonger, Bernard

> > Bond device name was too long (grather than 32 signs) that cause mempool
> > allocation to fail.
> > 
> > Fixes: 92073ef961ee ("bond: unit tests")
> > 
> > Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
> 
> Acked-by: Bernard Iremonger<bernard.iremonger@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-06-13 20:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-27 15:20 [dpdk-dev] [PATCH] app/test: fix bond device name too long Michal Jastrzebski
2016-05-27 15:20 ` [dpdk-dev] [PATCH] bond: replace rte_panic with errno code return Michal Jastrzebski
2016-05-27 16:13   ` Iremonger, Bernard
2016-06-13 13:57     ` Bruce Richardson
2016-05-27 16:14 ` [dpdk-dev] [PATCH] app/test: fix bond device name too long Iremonger, Bernard
2016-06-13 20:14   ` Thomas Monjalon
2016-05-27 16:38 ` Thomas Monjalon
2016-06-08 10:40   ` Thomas Monjalon
2016-06-08 11:50     ` Jastrzebski, MichalX K
2016-06-08 13:31       ` Thomas Monjalon
2016-06-08 14:27         ` Jastrzebski, MichalX K
2016-06-01  1:29 ` Xu, HuilongX
2016-06-01  3:25 ` Xu, HuilongX

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).