DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test/bonding: assign non-zero MAC to null devices
@ 2018-01-29 14:26 Radu Nicolau
  2018-01-31 19:31 ` Ferruh Yigit
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Radu Nicolau @ 2018-01-29 14:26 UTC (permalink / raw)
  To: dev; +Cc: thomas, ferruh.yigit, declan.doherty, Radu Nicolau

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 test/test/test_link_bonding_rssconf.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c
index cf9c4b0..518c4c1 100644
--- a/test/test/test_link_bonding_rssconf.c
+++ b/test/test/test_link_bonding_rssconf.c
@@ -505,6 +505,7 @@ test_setup(void)
 	int port_id;
 	char name[256];
 	struct slave_conf *port;
+	struct ether_addr mac_addr = {0};
 
 	if (test_params.mbuf_pool == NULL) {
 
@@ -536,6 +537,10 @@ test_setup(void)
 		TEST_ASSERT_SUCCESS(retval, "Failed to configure virtual ethdev %s\n",
 				name);
 
+		/* assign a non-zero MAC */
+		mac_addr.addr_bytes[5] = 0x10 + port->port_id;
+		rte_eth_dev_default_mac_addr_set(port->port_id, &mac_addr);
+
 		rte_eth_dev_info_get(port->port_id, &port->dev_info);
 	}
 
-- 
2.7.5

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

* Re: [dpdk-dev] [PATCH] test/bonding: assign non-zero MAC to null devices
  2018-01-29 14:26 [dpdk-dev] [PATCH] test/bonding: assign non-zero MAC to null devices Radu Nicolau
@ 2018-01-31 19:31 ` Ferruh Yigit
  2018-02-01 10:50 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
  2018-02-01 11:06 ` [dpdk-dev] [PATCH v3] " Radu Nicolau
  2 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2018-01-31 19:31 UTC (permalink / raw)
  To: Radu Nicolau, dev; +Cc: thomas, declan.doherty

On 1/29/2018 2:26 PM, Radu Nicolau wrote:

Hi Radu,

Can you please describe why this is needed?


> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> ---
>  test/test/test_link_bonding_rssconf.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c
> index cf9c4b0..518c4c1 100644
> --- a/test/test/test_link_bonding_rssconf.c
> +++ b/test/test/test_link_bonding_rssconf.c
> @@ -505,6 +505,7 @@ test_setup(void)
>  	int port_id;
>  	char name[256];
>  	struct slave_conf *port;
> +	struct ether_addr mac_addr = {0};
>  
>  	if (test_params.mbuf_pool == NULL) {
>  
> @@ -536,6 +537,10 @@ test_setup(void)
>  		TEST_ASSERT_SUCCESS(retval, "Failed to configure virtual ethdev %s\n",
>  				name);
>  
> +		/* assign a non-zero MAC */
> +		mac_addr.addr_bytes[5] = 0x10 + port->port_id;
> +		rte_eth_dev_default_mac_addr_set(port->port_id, &mac_addr);
> +
>  		rte_eth_dev_info_get(port->port_id, &port->dev_info);
>  	}
>  
> 

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

* [dpdk-dev] [PATCH v2] test/bonding: assign non-zero MAC to null devices
  2018-01-29 14:26 [dpdk-dev] [PATCH] test/bonding: assign non-zero MAC to null devices Radu Nicolau
  2018-01-31 19:31 ` Ferruh Yigit
@ 2018-02-01 10:50 ` Radu Nicolau
  2018-02-01 11:06 ` [dpdk-dev] [PATCH v3] " Radu Nicolau
  2 siblings, 0 replies; 5+ messages in thread
From: Radu Nicolau @ 2018-02-01 10:50 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, declan.doherty, thomas, Radu Nicolau

Prevent failure in rte_eth_dev_default_mac_addr_set() that
resunts in bonding add slave failure.

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
v2: update commit message

 test/test/test_link_bonding_rssconf.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c
index cf9c4b0..518c4c1 100644
--- a/test/test/test_link_bonding_rssconf.c
+++ b/test/test/test_link_bonding_rssconf.c
@@ -505,6 +505,7 @@ test_setup(void)
 	int port_id;
 	char name[256];
 	struct slave_conf *port;
+	struct ether_addr mac_addr = {0};
 
 	if (test_params.mbuf_pool == NULL) {
 
@@ -536,6 +537,10 @@ test_setup(void)
 		TEST_ASSERT_SUCCESS(retval, "Failed to configure virtual ethdev %s\n",
 				name);
 
+		/* assign a non-zero MAC */
+		mac_addr.addr_bytes[5] = 0x10 + port->port_id;
+		rte_eth_dev_default_mac_addr_set(port->port_id, &mac_addr);
+
 		rte_eth_dev_info_get(port->port_id, &port->dev_info);
 	}
 
-- 
2.7.5

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

* [dpdk-dev] [PATCH v3] test/bonding: assign non-zero MAC to null devices
  2018-01-29 14:26 [dpdk-dev] [PATCH] test/bonding: assign non-zero MAC to null devices Radu Nicolau
  2018-01-31 19:31 ` Ferruh Yigit
  2018-02-01 10:50 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
@ 2018-02-01 11:06 ` Radu Nicolau
  2018-02-05 15:43   ` Ferruh Yigit
  2 siblings, 1 reply; 5+ messages in thread
From: Radu Nicolau @ 2018-02-01 11:06 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, declan.doherty, thomas, Radu Nicolau

Prevent failure in rte_eth_dev_default_mac_addr_set() that
resunts in bonding add slave failure.

Fixes: aa7791ba8de0 ("net/bonding: fix setting slave MAC addresses")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
v3: update commit message

 test/test/test_link_bonding_rssconf.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c
index cf9c4b0..518c4c1 100644
--- a/test/test/test_link_bonding_rssconf.c
+++ b/test/test/test_link_bonding_rssconf.c
@@ -505,6 +505,7 @@ test_setup(void)
 	int port_id;
 	char name[256];
 	struct slave_conf *port;
+	struct ether_addr mac_addr = {0};
 
 	if (test_params.mbuf_pool == NULL) {
 
@@ -536,6 +537,10 @@ test_setup(void)
 		TEST_ASSERT_SUCCESS(retval, "Failed to configure virtual ethdev %s\n",
 				name);
 
+		/* assign a non-zero MAC */
+		mac_addr.addr_bytes[5] = 0x10 + port->port_id;
+		rte_eth_dev_default_mac_addr_set(port->port_id, &mac_addr);
+
 		rte_eth_dev_info_get(port->port_id, &port->dev_info);
 	}
 
-- 
2.7.5

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

* Re: [dpdk-dev] [PATCH v3] test/bonding: assign non-zero MAC to null devices
  2018-02-01 11:06 ` [dpdk-dev] [PATCH v3] " Radu Nicolau
@ 2018-02-05 15:43   ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2018-02-05 15:43 UTC (permalink / raw)
  To: Radu Nicolau, dev; +Cc: declan.doherty, thomas

On 2/1/2018 11:06 AM, Radu Nicolau wrote:
> Prevent failure in rte_eth_dev_default_mac_addr_set() that
> resunts in bonding add slave failure.
> 
> Fixes: aa7791ba8de0 ("net/bonding: fix setting slave MAC addresses")
> 
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.

(initialization changes as below to prevent build error:
struct ether_addr mac_addr = { .addr_bytes = {0} }; )

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

end of thread, other threads:[~2018-02-05 15:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-29 14:26 [dpdk-dev] [PATCH] test/bonding: assign non-zero MAC to null devices Radu Nicolau
2018-01-31 19:31 ` Ferruh Yigit
2018-02-01 10:50 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
2018-02-01 11:06 ` [dpdk-dev] [PATCH v3] " Radu Nicolau
2018-02-05 15:43   ` Ferruh Yigit

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