[PATCH] ethdev: fix Tx queue mask endianness

Thomas Monjalon thomas at monjalon.net
Thu Jun 29 17:31:09 CEST 2023


29/06/2023 15:58, David Marchand:
> Even if harmless, this endianness tag is incorrect as the tx_queue field
> is declared as a host integer.
> Additionally, this breaks OVS compilation with sparse.
> 
> Fixes: 41f6bdc7615a ("ethdev: add Tx queue flow matching item")
> 
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> ---
>  lib/ethdev/rte_flow.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
> index 3fe57140f9..86ed98c562 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -2307,7 +2307,7 @@ struct rte_flow_item_tx_queue {
>  /** Default mask for RTE_FLOW_ITEM_TX_QUEUE. */
>  #ifndef __cplusplus
>  static const struct rte_flow_item_tx_queue rte_flow_item_tx_queue_mask = {
> -	.tx_queue = RTE_BE16(0xffff),
> +	.tx_queue = 0xffff,

As I said in an earlier comment about the same issue,
UINT16_MAX would be better.





More information about the dev mailing list