patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 19.11.6] ethdev: fix data type in TC queues
@ 2020-11-03  9:04 Lijun Ou
  2020-11-03  9:21 ` Luca Boccassi
  0 siblings, 1 reply; 4+ messages in thread
From: Lijun Ou @ 2020-11-03  9:04 UTC (permalink / raw)
  To: stable, luca.boccassi; +Cc: linuxarm

From: Huisong Li <lihuisong@huawei.com>

[ upstream commit 9f6dc8592d54aa2ec1800c53977a31bd7922147b ]

Currently, base and nb_queue in the tc_rxq and tc_txq information
of queue and TC mapping on both TX and RX paths are uint8_t.
However, these data will be truncated when queue number under a TC
is greater than 256. So it is necessary for base and nb_queue to
change from uint8_t to uint16_t.

Fixes: 89d6728c7837 ("ethdev: get DCB information")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Reviewed-by: Dongdong Liu <liudongdong3@huawei.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 doc/guides/rel_notes/release_19_11.rst | 5 +++++
 lib/librte_ethdev/rte_ethdev.h         | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index acd18a3..cba8ebd 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -457,6 +457,11 @@ API Changes
 * ethdev: changed ``rte_eth_dev_owner_delete`` return value from ``void`` to
   ``int`` to provide a way to report various error conditions.
 
+* ethdev: Modified field type of ``base`` and ``nb_queue`` in struct
+  ``rte_eth_dcb_tc_queue_mapping`` from ``uint8_t`` to ``uint16_t``.
+  As the data of ``uint8_t`` will be truncated when queue number under
+  a TC is greater than 256.
+
 * ethdev: The deprecated function ``rte_eth_dev_count`` was removed.
   The function ``rte_eth_dev_count_avail`` is a drop-in replacement.
   If the intent is to iterate over ports, ``RTE_ETH_FOREACH_*`` macros
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 51f9f25..5fedff0 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1360,13 +1360,13 @@ struct rte_eth_xstat_name {
 struct rte_eth_dcb_tc_queue_mapping {
 	/** rx queues assigned to tc per Pool */
 	struct {
-		uint8_t base;
-		uint8_t nb_queue;
+		uint16_t base;
+		uint16_t nb_queue;
 	} tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
 	/** rx queues assigned to tc per Pool */
 	struct {
-		uint8_t base;
-		uint8_t nb_queue;
+		uint16_t base;
+		uint16_t nb_queue;
 	} tc_txq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
 };
 
-- 
2.7.4


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

* Re: [dpdk-stable] [PATCH 19.11.6] ethdev: fix data type in TC queues
  2020-11-03  9:04 [dpdk-stable] [PATCH 19.11.6] ethdev: fix data type in TC queues Lijun Ou
@ 2020-11-03  9:21 ` Luca Boccassi
  2020-11-04 10:35   ` oulijun
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Boccassi @ 2020-11-03  9:21 UTC (permalink / raw)
  To: Lijun Ou, stable; +Cc: linuxarm

On Tue, 2020-11-03 at 17:04 +0800, Lijun Ou wrote:
> From: Huisong Li <lihuisong@huawei.com>
> 
> [ upstream commit 9f6dc8592d54aa2ec1800c53977a31bd7922147b ]
> 
> Currently, base and nb_queue in the tc_rxq and tc_txq information
> of queue and TC mapping on both TX and RX paths are uint8_t.
> However, these data will be truncated when queue number under a TC
> is greater than 256. So it is necessary for base and nb_queue to
> change from uint8_t to uint16_t.
> 
> Fixes: 89d6728c7837 ("ethdev: get DCB information")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Huisong Li <lihuisong@huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> Reviewed-by: Dongdong Liu <liudongdong3@huawei.com>
> Acked-by: Thomas Monjalon <thomas@monjalon.net>
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>  doc/guides/rel_notes/release_19_11.rst | 5 +++++
>  lib/librte_ethdev/rte_ethdev.h         | 8 ++++----
>  2 files changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
> index acd18a3..cba8ebd 100644
> --- a/doc/guides/rel_notes/release_19_11.rst
> +++ b/doc/guides/rel_notes/release_19_11.rst
> @@ -457,6 +457,11 @@ API Changes
>  * ethdev: changed ``rte_eth_dev_owner_delete`` return value from ``void`` to
>    ``int`` to provide a way to report various error conditions.
>  
> +* ethdev: Modified field type of ``base`` and ``nb_queue`` in struct
> +  ``rte_eth_dcb_tc_queue_mapping`` from ``uint8_t`` to ``uint16_t``.
> +  As the data of ``uint8_t`` will be truncated when queue number under
> +  a TC is greater than 256.
> +
>  * ethdev: The deprecated function ``rte_eth_dev_count`` was removed.
>    The function ``rte_eth_dev_count_avail`` is a drop-in replacement.
>    If the intent is to iterate over ports, ``RTE_ETH_FOREACH_*`` macros
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index 51f9f25..5fedff0 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -1360,13 +1360,13 @@ struct rte_eth_xstat_name {
>  struct rte_eth_dcb_tc_queue_mapping {
>  	/** rx queues assigned to tc per Pool */
>  	struct {
> -		uint8_t base;
> -		uint8_t nb_queue;
> +		uint16_t base;
> +		uint16_t nb_queue;
>  	} tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
>  	/** rx queues assigned to tc per Pool */
>  	struct {
> -		uint8_t base;
> -		uint8_t nb_queue;
> +		uint16_t base;
> +		uint16_t nb_queue;
>  	} tc_txq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
>  };

Hi,

Thanks for the patch, but isn't this an ABI breakage? This is a public
header right?

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-stable] [PATCH 19.11.6] ethdev: fix data type in TC queues
  2020-11-03  9:21 ` Luca Boccassi
@ 2020-11-04 10:35   ` oulijun
  2020-11-04 10:53     ` Luca Boccassi
  0 siblings, 1 reply; 4+ messages in thread
From: oulijun @ 2020-11-04 10:35 UTC (permalink / raw)
  To: Luca Boccassi, stable; +Cc: linuxarm



在 2020/11/3 17:21, Luca Boccassi 写道:
> On Tue, 2020-11-03 at 17:04 +0800, Lijun Ou wrote:
>> From: Huisong Li <lihuisong@huawei.com>
>>
>> [ upstream commit 9f6dc8592d54aa2ec1800c53977a31bd7922147b ]
>>
>> Currently, base and nb_queue in the tc_rxq and tc_txq information
>> of queue and TC mapping on both TX and RX paths are uint8_t.
>> However, these data will be truncated when queue number under a TC
>> is greater than 256. So it is necessary for base and nb_queue to
>> change from uint8_t to uint16_t.
>>
>> Fixes: 89d6728c7837 ("ethdev: get DCB information")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
>> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
>> Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
>> Reviewed-by: Dongdong Liu <liudongdong3@huawei.com>
>> Acked-by: Thomas Monjalon <thomas@monjalon.net>
>> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>>   doc/guides/rel_notes/release_19_11.rst | 5 +++++
>>   lib/librte_ethdev/rte_ethdev.h         | 8 ++++----
>>   2 files changed, 9 insertions(+), 4 deletions(-)
>>
>> diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
>> index acd18a3..cba8ebd 100644
>> --- a/doc/guides/rel_notes/release_19_11.rst
>> +++ b/doc/guides/rel_notes/release_19_11.rst
>> @@ -457,6 +457,11 @@ API Changes
>>   * ethdev: changed ``rte_eth_dev_owner_delete`` return value from ``void`` to
>>     ``int`` to provide a way to report various error conditions.
>>   
>> +* ethdev: Modified field type of ``base`` and ``nb_queue`` in struct
>> +  ``rte_eth_dcb_tc_queue_mapping`` from ``uint8_t`` to ``uint16_t``.
>> +  As the data of ``uint8_t`` will be truncated when queue number under
>> +  a TC is greater than 256.
>> +
>>   * ethdev: The deprecated function ``rte_eth_dev_count`` was removed.
>>     The function ``rte_eth_dev_count_avail`` is a drop-in replacement.
>>     If the intent is to iterate over ports, ``RTE_ETH_FOREACH_*`` macros
>> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
>> index 51f9f25..5fedff0 100644
>> --- a/lib/librte_ethdev/rte_ethdev.h
>> +++ b/lib/librte_ethdev/rte_ethdev.h
>> @@ -1360,13 +1360,13 @@ struct rte_eth_xstat_name {
>>   struct rte_eth_dcb_tc_queue_mapping {
>>   	/** rx queues assigned to tc per Pool */
>>   	struct {
>> -		uint8_t base;
>> -		uint8_t nb_queue;
>> +		uint16_t base;
>> +		uint16_t nb_queue;
>>   	} tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
>>   	/** rx queues assigned to tc per Pool */
>>   	struct {
>> -		uint8_t base;
>> -		uint8_t nb_queue;
>> +		uint16_t base;
>> +		uint16_t nb_queue;
>>   	} tc_txq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
>>   };
> 
> Hi,
> 
> Thanks for the patch, but isn't this an ABI breakage? This is a public
> header right?
> 
I understand that an ABI breakage has been announced.

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

* Re: [dpdk-stable] [PATCH 19.11.6] ethdev: fix data type in TC queues
  2020-11-04 10:35   ` oulijun
@ 2020-11-04 10:53     ` Luca Boccassi
  0 siblings, 0 replies; 4+ messages in thread
From: Luca Boccassi @ 2020-11-04 10:53 UTC (permalink / raw)
  To: oulijun, stable; +Cc: linuxarm

On Wed, 2020-11-04 at 18:35 +0800, oulijun wrote:
> 
> 在 2020/11/3 17:21, Luca Boccassi 写道:
> > On Tue, 2020-11-03 at 17:04 +0800, Lijun Ou wrote:
> > > From: Huisong Li <lihuisong@huawei.com>
> > > 
> > > [ upstream commit 9f6dc8592d54aa2ec1800c53977a31bd7922147b ]
> > > 
> > > Currently, base and nb_queue in the tc_rxq and tc_txq information
> > > of queue and TC mapping on both TX and RX paths are uint8_t.
> > > However, these data will be truncated when queue number under a TC
> > > is greater than 256. So it is necessary for base and nb_queue to
> > > change from uint8_t to uint16_t.
> > > 
> > > Fixes: 89d6728c7837 ("ethdev: get DCB information")
> > > Cc: stable@dpdk.org
> > > 
> > > Signed-off-by: Huisong Li <lihuisong@huawei.com>
> > > Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> > > Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> > > Reviewed-by: Dongdong Liu <liudongdong3@huawei.com>
> > > Acked-by: Thomas Monjalon <thomas@monjalon.net>
> > > Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > > ---
> > >   doc/guides/rel_notes/release_19_11.rst | 5 +++++
> > >   lib/librte_ethdev/rte_ethdev.h         | 8 ++++----
> > >   2 files changed, 9 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
> > > index acd18a3..cba8ebd 100644
> > > --- a/doc/guides/rel_notes/release_19_11.rst
> > > +++ b/doc/guides/rel_notes/release_19_11.rst
> > > @@ -457,6 +457,11 @@ API Changes
> > >   * ethdev: changed ``rte_eth_dev_owner_delete`` return value from ``void`` to
> > >     ``int`` to provide a way to report various error conditions.
> > >   
> > > +* ethdev: Modified field type of ``base`` and ``nb_queue`` in struct
> > > +  ``rte_eth_dcb_tc_queue_mapping`` from ``uint8_t`` to ``uint16_t``.
> > > +  As the data of ``uint8_t`` will be truncated when queue number under
> > > +  a TC is greater than 256.
> > > +
> > >   * ethdev: The deprecated function ``rte_eth_dev_count`` was removed.
> > >     The function ``rte_eth_dev_count_avail`` is a drop-in replacement.
> > >     If the intent is to iterate over ports, ``RTE_ETH_FOREACH_*`` macros
> > > diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> > > index 51f9f25..5fedff0 100644
> > > --- a/lib/librte_ethdev/rte_ethdev.h
> > > +++ b/lib/librte_ethdev/rte_ethdev.h
> > > @@ -1360,13 +1360,13 @@ struct rte_eth_xstat_name {
> > >   struct rte_eth_dcb_tc_queue_mapping {
> > >   	/** rx queues assigned to tc per Pool */
> > >   	struct {
> > > -		uint8_t base;
> > > -		uint8_t nb_queue;
> > > +		uint16_t base;
> > > +		uint16_t nb_queue;
> > >   	} tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
> > >   	/** rx queues assigned to tc per Pool */
> > >   	struct {
> > > -		uint8_t base;
> > > -		uint8_t nb_queue;
> > > +		uint16_t base;
> > > +		uint16_t nb_queue;
> > >   	} tc_txq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
> > >   };
> > 
> > Hi,
> > 
> > Thanks for the patch, but isn't this an ABI breakage? This is a public
> > header right?
> > 
> I understand that an ABI breakage has been announced.

Sure, that's fine for mainline 20.11 - but we never break ABI in LTS
releases. Hence I will skip this patch for 19.11.6.

-- 
Kind regards,
Luca Boccassi

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

end of thread, other threads:[~2020-11-04 10:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03  9:04 [dpdk-stable] [PATCH 19.11.6] ethdev: fix data type in TC queues Lijun Ou
2020-11-03  9:21 ` Luca Boccassi
2020-11-04 10:35   ` oulijun
2020-11-04 10:53     ` Luca Boccassi

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