net/mlx5: fix buffer split offload advertising
PATCH 1/1 net/mlx5: fix buffer split offload advertising
The buffer split Rx offload is not compatible with Multi-Packet Receiving Queue (MPRQ) Rx offload, hence, the buffer split offload flag RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT and other related values should be advertised only if there is no MPRQ engaged.
--- drivers/net/mlx5/mlx5_ethdev.c | 4 ++-- drivers/net/mlx5/mlx5_rxq.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/mlx5/mlx5_ethdev.c +2 -2
@@ -310,8 +310,8 @@ info->max_mac_addrs =MLX5_MAX_UC_MAC_ADDRESSES ; info->rx_queue_offload_capa =mlx5_get_rx_queue_offloads (dev); info->rx_seg_capa.max_nseg =MLX5_MAX_RXQ_NSEG ; - info->rx_seg_capa.multi_pools =1 ; - info->rx_seg_capa.offset_allowed =1 ; + info->rx_seg_capa.multi_pools = !config->mprq.enabled; + info->rx_seg_capa.offset_allowed = !config->mprq.enabled; info->rx_seg_capa.offset_align_log2 =0 ; info->rx_offload_capa = (mlx5_get_rx_port_offloads () | info->rx_queue_offload_capa);
drivers/net/mlx5/mlx5_rxq.c +2 -2
@@ -402,14 +402,14 @@struct mlx5_priv *priv = dev->data->dev_private;struct mlx5_dev_config *config = &priv->config;uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER | -RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT |DEV_RX_OFFLOAD_TIMESTAMP |DEV_RX_OFFLOAD_JUMBO_FRAME |DEV_RX_OFFLOAD_RSS_HASH ); +if (!config->mprq.enabled) + offloads |=RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT ;if (config->hw_fcs_strip) offloads |=DEV_RX_OFFLOAD_KEEP_CRC ; -if (config->hw_csum) offloads |= (DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM |
Signature · 1 line
1.8.3.1
Quoted 13 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Viacheslav Ovsiienko
Sent: Friday, December 11, 2020 1:45 PM
To: [email protected]
Cc: Raslan Darawsheh <[email protected]>; Matan Azrad <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] net/mlx5: fix buffer split offload advertisingThe buffer split Rx offload is not compatible with Multi-Packet Receiving Queue (MPRQ) Rx offload, hence, the buffer split offload flag
RTE_ETH_RX_OFFLOAD_BUFFER_SPLITand other related values should be advertised only if there is no MPRQ engaged.
Quoted 4 lines
Fixes 6c8f7f1c1877 ("net/mlx5: report Rx buffer split capabilities")Signed-off-by Viacheslav Ovsiienko <[email protected]>
Quoted 43 lines
---
drivers/net/mlx5/mlx5_ethdev.c| 4 ++--drivers/net/mlx5/mlx5_rxq.c| 4 ++--2 files changed, 4 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/drivers/net/mlx5/mlx5_ethdev.cindex a3910cf..45ee7e4 100644drivers/net/mlx5/mlx5_ethdev.c +2
-2@@ -310,8 +310,8 @@ info->max_mac_addrs =MLX5_MAX_UC_MAC_ADDRESSES ; info->rx_queue_offload_capa =mlx5_get_rx_queue_offloads (dev); info->rx_seg_capa.max_nseg =MLX5_MAX_RXQ_NSEG ; - info->rx_seg_capa.multi_pools =1 ; - info->rx_seg_capa.offset_allowed =1 ; + info->rx_seg_capa.multi_pools = !config->mprq.enabled; + info->rx_seg_capa.offset_allowed = !config->mprq.enabled; info->rx_seg_capa.offset_align_log2 =0 ; info->rx_offload_capa = (mlx5_get_rx_port_offloads () | info->rx_queue_offload_capa);drivers/net/mlx5/mlx5_rxq.c index renamed from drivers/net/mlx5/mlx5_rxq.c +0
-0da7a8b3..a2613b0 100644
drivers/net/mlx5/mlx5_rxq.c +2
-3@@ -402,14 +402,14 @@struct mlx5_priv *priv = dev->data->dev_private;struct mlx5_dev_config *config = &priv->config;uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER | -RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT |DEV_RX_OFFLOAD_TIMESTAMP |DEV_RX_OFFLOAD_JUMBO_FRAME |DEV_RX_OFFLOAD_RSS_HASH ); +if (!config->mprq.enabled) + offloads |=RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT ;if (config->hw_fcs_strip) offloads |=DEV_RX_OFFLOAD_KEEP_CRC ; -if (config->hw_csum) offloads |= (DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM | --1.8.3.1
Hi,
Quoted 13 lines
-----Original Message-----
From: Viacheslav Ovsiienko <[email protected]>
Sent: Friday, December 11, 2020 1:45 PM
To: [email protected]
Cc: Raslan Darawsheh <[email protected]>; Matan Azrad <[email protected]>; [email protected]
Subject: [PATCH] net/mlx5: fix buffer split offload advertisingThe buffer split Rx offload is not compatible with Multi-Packet Receiving Queue (MPRQ) Rx offload, hence, the buffer split offload flag
RTE_ETH_RX_OFFLOAD_BUFFER_SPLITand other related values should be advertised only if there is no MPRQ engaged.
Quoted 5 lines
Fixes 6c8f7f1c1877 ("net/mlx5: report Rx buffer split capabilities")Signed-off-by Viacheslav Ovsiienko <[email protected]>---
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh