DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ethdev: fix switching domain allocation
@ 2019-12-19 12:47 Viacheslav Ovsiienko
  2020-01-14 15:32 ` Ferruh Yigit
  2020-01-16 16:19 ` [dpdk-dev] [PATCH v2] " Viacheslav Ovsiienko
  0 siblings, 2 replies; 7+ messages in thread
From: Viacheslav Ovsiienko @ 2019-12-19 12:47 UTC (permalink / raw)
  To: dev; +Cc: thomas, ferruh.yigit, declan.doherty, stable

The maximum amount of unique switching domain is supposed
to be equal to RTE_MAX_ETHPORTS. The current implementation
allows to allocate only RTE_MAX_ETHPORTS-1 domains.

Fixes: ce9250406323 ("ethdev: add switch domain allocator")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 lib/librte_ethdev/rte_ethdev.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 6e9cb24..4c2312c 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -5065,10 +5065,10 @@ enum rte_eth_switch_domain_state {
 	*domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID;
 
 	for (i = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID + 1;
-		i < RTE_MAX_ETHPORTS; i++) {
-		if (rte_eth_switch_domains[i].state ==
+		i <= RTE_MAX_ETHPORTS; i++) {
+		if (rte_eth_switch_domains[i - 1].state ==
 			RTE_ETH_SWITCH_DOMAIN_UNUSED) {
-			rte_eth_switch_domains[i].state =
+			rte_eth_switch_domains[i - 1].state =
 				RTE_ETH_SWITCH_DOMAIN_ALLOCATED;
 			*domain_id = i;
 			return 0;
@@ -5082,14 +5082,15 @@ enum rte_eth_switch_domain_state {
 rte_eth_switch_domain_free(uint16_t domain_id)
 {
 	if (domain_id == RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID ||
-		domain_id >= RTE_MAX_ETHPORTS)
+		domain_id > RTE_MAX_ETHPORTS)
 		return -EINVAL;
 
-	if (rte_eth_switch_domains[domain_id].state !=
+	if (rte_eth_switch_domains[domain_id - 1].state !=
 		RTE_ETH_SWITCH_DOMAIN_ALLOCATED)
 		return -EINVAL;
 
-	rte_eth_switch_domains[domain_id].state = RTE_ETH_SWITCH_DOMAIN_UNUSED;
+	rte_eth_switch_domains[domain_id - 1].state =
+		RTE_ETH_SWITCH_DOMAIN_UNUSED;
 
 	return 0;
 }
-- 
1.8.3.1


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

* Re: [dpdk-dev] [PATCH] ethdev: fix switching domain allocation
  2019-12-19 12:47 [dpdk-dev] [PATCH] ethdev: fix switching domain allocation Viacheslav Ovsiienko
@ 2020-01-14 15:32 ` Ferruh Yigit
  2020-01-15  8:50   ` Slava Ovsiienko
  2020-01-16 16:19 ` [dpdk-dev] [PATCH v2] " Viacheslav Ovsiienko
  1 sibling, 1 reply; 7+ messages in thread
From: Ferruh Yigit @ 2020-01-14 15:32 UTC (permalink / raw)
  To: Viacheslav Ovsiienko, dev; +Cc: thomas, declan.doherty, stable

On 12/19/2019 12:47 PM, Viacheslav Ovsiienko wrote:
> The maximum amount of unique switching domain is supposed
> to be equal to RTE_MAX_ETHPORTS. The current implementation
> allows to allocate only RTE_MAX_ETHPORTS-1 domains.
> 
> Fixes: ce9250406323 ("ethdev: add switch domain allocator")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
>  lib/librte_ethdev/rte_ethdev.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
> index 6e9cb24..4c2312c 100644
> --- a/lib/librte_ethdev/rte_ethdev.c
> +++ b/lib/librte_ethdev/rte_ethdev.c
> @@ -5065,10 +5065,10 @@ enum rte_eth_switch_domain_state {
>  	*domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID;
>  
>  	for (i = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID + 1;
> -		i < RTE_MAX_ETHPORTS; i++) {
> -		if (rte_eth_switch_domains[i].state ==
> +		i <= RTE_MAX_ETHPORTS; i++) {
> +		if (rte_eth_switch_domains[i - 1].state ==
>  			RTE_ETH_SWITCH_DOMAIN_UNUSED) {
> -			rte_eth_switch_domains[i].state =
> +			rte_eth_switch_domains[i - 1].state =
>  				RTE_ETH_SWITCH_DOMAIN_ALLOCATED;
>  			*domain_id = i;

I would keep the indexes same but change how to set the 'domain_id' to
"*domain_id = i + 1;", that makes logic simpler.

Would it be simpler if the invalid domain id value used as UINT16_MAX instead of
'0'? This enables using 'domain_id' as index and prevent this error prone indexing.

And I think it makes sense to start the loop with "i = 0", instead of
'RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID', you are walking through the port list,
why to involve the 'RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID' here.

>  			return 0;
> @@ -5082,14 +5082,15 @@ enum rte_eth_switch_domain_state {
>  rte_eth_switch_domain_free(uint16_t domain_id)
>  {
>  	if (domain_id == RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID ||
> -		domain_id >= RTE_MAX_ETHPORTS)
> +		domain_id > RTE_MAX_ETHPORTS)
>  		return -EINVAL;
>  
> -	if (rte_eth_switch_domains[domain_id].state !=
> +	if (rte_eth_switch_domains[domain_id - 1].state !=
>  		RTE_ETH_SWITCH_DOMAIN_ALLOCATED)
>  		return -EINVAL;
>  
> -	rte_eth_switch_domains[domain_id].state = RTE_ETH_SWITCH_DOMAIN_UNUSED;
> +	rte_eth_switch_domains[domain_id - 1].state =
> +		RTE_ETH_SWITCH_DOMAIN_UNUSED;
>  
>  	return 0;
>  }
> 


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

* Re: [dpdk-dev] [PATCH] ethdev: fix switching domain allocation
  2020-01-14 15:32 ` Ferruh Yigit
@ 2020-01-15  8:50   ` Slava Ovsiienko
  2020-01-15 12:39     ` Ferruh Yigit
  0 siblings, 1 reply; 7+ messages in thread
From: Slava Ovsiienko @ 2020-01-15  8:50 UTC (permalink / raw)
  To: Ferruh Yigit, dev; +Cc: Thomas Monjalon, declan.doherty, stable

> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Tuesday, January 14, 2020 17:32
> To: Slava Ovsiienko <viacheslavo@mellanox.com>; dev@dpdk.org
> Cc: Thomas Monjalon <thomas@monjalon.net>; declan.doherty@intel.com;
> stable@dpdk.org
> Subject: Re: [PATCH] ethdev: fix switching domain allocation
> 
> On 12/19/2019 12:47 PM, Viacheslav Ovsiienko wrote:
> > The maximum amount of unique switching domain is supposed to be equal
> > to RTE_MAX_ETHPORTS. The current implementation allows to allocate
> > only RTE_MAX_ETHPORTS-1 domains.
> >
> > Fixes: ce9250406323 ("ethdev: add switch domain allocator")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> > ---
> >  lib/librte_ethdev/rte_ethdev.c | 13 +++++++------
> >  1 file changed, 7 insertions(+), 6 deletions(-)
> >
> > diff --git a/lib/librte_ethdev/rte_ethdev.c
> > b/lib/librte_ethdev/rte_ethdev.c index 6e9cb24..4c2312c 100644
> > --- a/lib/librte_ethdev/rte_ethdev.c
> > +++ b/lib/librte_ethdev/rte_ethdev.c
> > @@ -5065,10 +5065,10 @@ enum rte_eth_switch_domain_state {
> >  	*domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID;
> >
> >  	for (i = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID + 1;
> > -		i < RTE_MAX_ETHPORTS; i++) {
> > -		if (rte_eth_switch_domains[i].state ==
> > +		i <= RTE_MAX_ETHPORTS; i++) {
> > +		if (rte_eth_switch_domains[i - 1].state ==
> >  			RTE_ETH_SWITCH_DOMAIN_UNUSED) {
> > -			rte_eth_switch_domains[i].state =
> > +			rte_eth_switch_domains[i - 1].state =
> >  				RTE_ETH_SWITCH_DOMAIN_ALLOCATED;
> >  			*domain_id = i;
> 
> I would keep the indexes same but change how to set the 'domain_id' to
> "*domain_id = i + 1;", that makes logic simpler.
Agree.

> Would it be simpler if the invalid domain id value used as UINT16_MAX
> instead of '0'? This enables using 'domain_id' as index and prevent this error
> prone indexing.

My concern was not to change the existing RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID
definition, which currently is zero. Currently, AFAIK, the switch feature is supported by mlx5
only, other PMDs do not bother to initialize the rte_eth_dev_info-> switch_info structure
(no one sets RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID to domain_id field for now).
So, changing the RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID from zero might cause
wrong switch capability reporting from PMDs.

> 
> And I think it makes sense to start the loop with "i = 0", instead of
> 'RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID', you are walking through the
> port list, why to involve the 'RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID'
> here.
I do not know why it was implemented in this way 😊
I just was trying to introduce the minimalistic fix. I'll think how to extend my fix a bit.

> 
> >  			return 0;
> > @@ -5082,14 +5082,15 @@ enum rte_eth_switch_domain_state {
> > rte_eth_switch_domain_free(uint16_t domain_id)  {
> >  	if (domain_id == RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID ||
> > -		domain_id >= RTE_MAX_ETHPORTS)
> > +		domain_id > RTE_MAX_ETHPORTS)
> >  		return -EINVAL;
> >
> > -	if (rte_eth_switch_domains[domain_id].state !=
> > +	if (rte_eth_switch_domains[domain_id - 1].state !=
> >  		RTE_ETH_SWITCH_DOMAIN_ALLOCATED)
> >  		return -EINVAL;
> >
> > -	rte_eth_switch_domains[domain_id].state =
> RTE_ETH_SWITCH_DOMAIN_UNUSED;
> > +	rte_eth_switch_domains[domain_id - 1].state =
> > +		RTE_ETH_SWITCH_DOMAIN_UNUSED;
> >
> >  	return 0;
> >  }
> >
With best regards,
Slava

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

* Re: [dpdk-dev] [PATCH] ethdev: fix switching domain allocation
  2020-01-15  8:50   ` Slava Ovsiienko
@ 2020-01-15 12:39     ` Ferruh Yigit
  0 siblings, 0 replies; 7+ messages in thread
From: Ferruh Yigit @ 2020-01-15 12:39 UTC (permalink / raw)
  To: Slava Ovsiienko, dev; +Cc: Thomas Monjalon, declan.doherty, stable

On 1/15/2020 8:50 AM, Slava Ovsiienko wrote:
>> -----Original Message-----
>> From: Ferruh Yigit <ferruh.yigit@intel.com>
>> Sent: Tuesday, January 14, 2020 17:32
>> To: Slava Ovsiienko <viacheslavo@mellanox.com>; dev@dpdk.org
>> Cc: Thomas Monjalon <thomas@monjalon.net>; declan.doherty@intel.com;
>> stable@dpdk.org
>> Subject: Re: [PATCH] ethdev: fix switching domain allocation
>>
>> On 12/19/2019 12:47 PM, Viacheslav Ovsiienko wrote:
>>> The maximum amount of unique switching domain is supposed to be equal
>>> to RTE_MAX_ETHPORTS. The current implementation allows to allocate
>>> only RTE_MAX_ETHPORTS-1 domains.
>>>
>>> Fixes: ce9250406323 ("ethdev: add switch domain allocator")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
>>> ---
>>>  lib/librte_ethdev/rte_ethdev.c | 13 +++++++------
>>>  1 file changed, 7 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/lib/librte_ethdev/rte_ethdev.c
>>> b/lib/librte_ethdev/rte_ethdev.c index 6e9cb24..4c2312c 100644
>>> --- a/lib/librte_ethdev/rte_ethdev.c
>>> +++ b/lib/librte_ethdev/rte_ethdev.c
>>> @@ -5065,10 +5065,10 @@ enum rte_eth_switch_domain_state {
>>>  	*domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID;
>>>
>>>  	for (i = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID + 1;
>>> -		i < RTE_MAX_ETHPORTS; i++) {
>>> -		if (rte_eth_switch_domains[i].state ==
>>> +		i <= RTE_MAX_ETHPORTS; i++) {
>>> +		if (rte_eth_switch_domains[i - 1].state ==
>>>  			RTE_ETH_SWITCH_DOMAIN_UNUSED) {
>>> -			rte_eth_switch_domains[i].state =
>>> +			rte_eth_switch_domains[i - 1].state =
>>>  				RTE_ETH_SWITCH_DOMAIN_ALLOCATED;
>>>  			*domain_id = i;
>>
>> I would keep the indexes same but change how to set the 'domain_id' to
>> "*domain_id = i + 1;", that makes logic simpler.
> Agree.
> 
>> Would it be simpler if the invalid domain id value used as UINT16_MAX
>> instead of '0'? This enables using 'domain_id' as index and prevent this error
>> prone indexing.
> 
> My concern was not to change the existing RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID
> definition, which currently is zero. Currently, AFAIK, the switch feature is supported by mlx5
> only, other PMDs do not bother to initialize the rte_eth_dev_info-> switch_info structure
> (no one sets RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID to domain_id field for now).
> So, changing the RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID from zero might cause
> wrong switch capability reporting from PMDs.

I think PMDs shouldn't have to initialize the values that they don't use/care,
otherwise it will be very error prone. Can this be handled in the API level?

Like in 'rte_eth_dev_info_get()', after "memset(dev_info, ..)" set 'switch_info'
as INVALID before dev_ops called. PMD can overwrite this if they want, otherwise
it will stay invalid and I think this is safer.

> 
>>
>> And I think it makes sense to start the loop with "i = 0", instead of
>> 'RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID', you are walking through the
>> port list, why to involve the 'RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID'
>> here.
> I do not know why it was implemented in this way 😊
> I just was trying to introduce the minimalistic fix. I'll think how to extend my fix a bit.
> 
>>
>>>  			return 0;
>>> @@ -5082,14 +5082,15 @@ enum rte_eth_switch_domain_state {
>>> rte_eth_switch_domain_free(uint16_t domain_id)  {
>>>  	if (domain_id == RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID ||
>>> -		domain_id >= RTE_MAX_ETHPORTS)
>>> +		domain_id > RTE_MAX_ETHPORTS)
>>>  		return -EINVAL;
>>>
>>> -	if (rte_eth_switch_domains[domain_id].state !=
>>> +	if (rte_eth_switch_domains[domain_id - 1].state !=
>>>  		RTE_ETH_SWITCH_DOMAIN_ALLOCATED)
>>>  		return -EINVAL;
>>>
>>> -	rte_eth_switch_domains[domain_id].state =
>> RTE_ETH_SWITCH_DOMAIN_UNUSED;
>>> +	rte_eth_switch_domains[domain_id - 1].state =
>>> +		RTE_ETH_SWITCH_DOMAIN_UNUSED;
>>>
>>>  	return 0;
>>>  }
>>>
> With best regards,
> Slava
> 


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

* [dpdk-dev] [PATCH v2] ethdev: fix switching domain allocation
  2019-12-19 12:47 [dpdk-dev] [PATCH] ethdev: fix switching domain allocation Viacheslav Ovsiienko
  2020-01-14 15:32 ` Ferruh Yigit
@ 2020-01-16 16:19 ` Viacheslav Ovsiienko
  2020-01-16 19:38   ` Ferruh Yigit
  1 sibling, 1 reply; 7+ messages in thread
From: Viacheslav Ovsiienko @ 2020-01-16 16:19 UTC (permalink / raw)
  To: dev; +Cc: matan, rasland, ferruh.yigit, stable

The maximum amount of unique swutching domain is supposed
to be equal RTE_MAX_ETHPORTS. Current implementation allows
to allocate only RTE_MAX_ETHPORTS-1 domains.

The definition of RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID is
changed from 0 to UINT16_MAX, the rte_eth_dev_info_get is
updated to initialize dev_ibfo structure accordingly.

Fixes: ce9250406323 ("ethdev: add switch domain allocator")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

---
v1: - http://patches.dpdk.org/patch/64011/
v2: - RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID is defined as UINT16_MAX
    - valid domain range to allocate: 0..RTE_MAX_ETHPORTS-1

 lib/librte_ethdev/rte_ethdev.c | 4 ++--
 lib/librte_ethdev/rte_ethdev.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 6e9cb24..19a88e9 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -2968,6 +2968,7 @@ struct rte_eth_dev *
 	 * return status and does not know if get is successful or not.
 	 */
 	memset(dev_info, 0, sizeof(struct rte_eth_dev_info));
+	dev_info->switch_info.domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
 	dev = &rte_eth_devices[port_id];
@@ -5064,8 +5065,7 @@ enum rte_eth_switch_domain_state {
 
 	*domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID;
 
-	for (i = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID + 1;
-		i < RTE_MAX_ETHPORTS; i++) {
+	for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
 		if (rte_eth_switch_domains[i].state ==
 			RTE_ETH_SWITCH_DOMAIN_UNUSED) {
 			rte_eth_switch_domains[i].state =
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 18a9def..d1a593a 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1196,7 +1196,7 @@ struct rte_eth_dev_portconf {
  * Default values for switch domain id when ethdev does not support switch
  * domain definitions.
  */
-#define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID	(0)
+#define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID	(UINT16_MAX)
 
 /**
  * Ethernet device associated switch information
-- 
1.8.3.1


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

* Re: [dpdk-dev] [PATCH v2] ethdev: fix switching domain allocation
  2020-01-16 16:19 ` [dpdk-dev] [PATCH v2] " Viacheslav Ovsiienko
@ 2020-01-16 19:38   ` Ferruh Yigit
  2020-01-17 13:20     ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  0 siblings, 1 reply; 7+ messages in thread
From: Ferruh Yigit @ 2020-01-16 19:38 UTC (permalink / raw)
  To: Viacheslav Ovsiienko, dev; +Cc: matan, rasland, stable

On 1/16/2020 4:19 PM, Viacheslav Ovsiienko wrote:
> The maximum amount of unique swutching domain is supposed
> to be equal RTE_MAX_ETHPORTS. Current implementation allows
> to allocate only RTE_MAX_ETHPORTS-1 domains.
> 
> The definition of RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID is
> changed from 0 to UINT16_MAX, the rte_eth_dev_info_get is
> updated to initialize dev_ibfo structure accordingly.
> 
> Fixes: ce9250406323 ("ethdev: add switch domain allocator")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> 
> ---
> v1: - http://patches.dpdk.org/patch/64011/
> v2: - RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID is defined as UINT16_MAX
>     - valid domain range to allocate: 0..RTE_MAX_ETHPORTS-1
> 

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

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] ethdev: fix switching domain allocation
  2020-01-16 19:38   ` Ferruh Yigit
@ 2020-01-17 13:20     ` Ferruh Yigit
  0 siblings, 0 replies; 7+ messages in thread
From: Ferruh Yigit @ 2020-01-17 13:20 UTC (permalink / raw)
  To: Viacheslav Ovsiienko, dev; +Cc: matan, rasland, stable

On 1/16/2020 7:38 PM, Ferruh Yigit wrote:
> On 1/16/2020 4:19 PM, Viacheslav Ovsiienko wrote:
>> The maximum amount of unique swutching domain is supposed
>> to be equal RTE_MAX_ETHPORTS. Current implementation allows
>> to allocate only RTE_MAX_ETHPORTS-1 domains.
>>
>> The definition of RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID is
>> changed from 0 to UINT16_MAX, the rte_eth_dev_info_get is
>> updated to initialize dev_ibfo structure accordingly.
>>
>> Fixes: ce9250406323 ("ethdev: add switch domain allocator")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
>>
>> ---
>> v1: - http://patches.dpdk.org/patch/64011/
>> v2: - RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID is defined as UINT16_MAX
>>     - valid domain range to allocate: 0..RTE_MAX_ETHPORTS-1
>>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 

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

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

end of thread, other threads:[~2020-01-17 13:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-19 12:47 [dpdk-dev] [PATCH] ethdev: fix switching domain allocation Viacheslav Ovsiienko
2020-01-14 15:32 ` Ferruh Yigit
2020-01-15  8:50   ` Slava Ovsiienko
2020-01-15 12:39     ` Ferruh Yigit
2020-01-16 16:19 ` [dpdk-dev] [PATCH v2] " Viacheslav Ovsiienko
2020-01-16 19:38   ` Ferruh Yigit
2020-01-17 13:20     ` [dpdk-dev] [dpdk-stable] " 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).