net/mlx5: report Rx buffer split capabilities
authorViacheslav Ovsiienko <viacheslavo@nvidia.com>
Mon, 26 Oct 2020 11:55:04 +0000 (11:55 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:02 +0000 (23:35 +0100)
Add rte_eth_dev_info->rx_seg_capa parameters:
  - receiving to multiple pools is supported
  - buffer offsets are supported
  - no offset alignment requirement
  - reports the maximal number of segments
  - reports the buffer split offload flag

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_ethdev.c
drivers/net/mlx5/mlx5_rxq.c

index 623f969..3399e95 100644 (file)
@@ -312,6 +312,10 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
        info->max_tx_queues = max;
        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.offset_align_log2 = 0;
        info->rx_offload_capa = (mlx5_get_rx_port_offloads() |
                                 info->rx_queue_offload_capa);
        info->tx_offload_capa = mlx5_get_tx_port_offloads(dev);
index 1e0f7a6..e75f5ee 100644 (file)
@@ -402,6 +402,7 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)
        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);