net/ice/base: use package info from ice segment metadata
[dpdk.git] / drivers / net / mlx5 / mlx5_ethdev.c
index 76ef026..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);
@@ -427,7 +431,8 @@ mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 
        if (dev->rx_pkt_burst == mlx5_rx_burst ||
            dev->rx_pkt_burst == mlx5_rx_burst_mprq ||
-           dev->rx_pkt_burst == mlx5_rx_burst_vec)
+           dev->rx_pkt_burst == mlx5_rx_burst_vec ||
+           dev->rx_pkt_burst == mlx5_rx_burst_mprq_vec)
                return ptypes;
        return NULL;
 }
@@ -486,11 +491,22 @@ mlx5_select_rx_function(struct rte_eth_dev *dev)
 
        MLX5_ASSERT(dev != NULL);
        if (mlx5_check_vec_rx_support(dev) > 0) {
-               rx_pkt_burst = mlx5_rx_burst_vec;
-               DRV_LOG(DEBUG, "port %u selected Rx vectorized function",
-                       dev->data->port_id);
+               if (mlx5_mprq_enabled(dev)) {
+                       rx_pkt_burst = mlx5_rx_burst_mprq_vec;
+                       DRV_LOG(DEBUG, "port %u selected vectorized"
+                               " MPRQ Rx function", dev->data->port_id);
+               } else {
+                       rx_pkt_burst = mlx5_rx_burst_vec;
+                       DRV_LOG(DEBUG, "port %u selected vectorized"
+                               " SPRQ Rx function", dev->data->port_id);
+               }
        } else if (mlx5_mprq_enabled(dev)) {
                rx_pkt_burst = mlx5_rx_burst_mprq;
+               DRV_LOG(DEBUG, "port %u selected MPRQ Rx function",
+                       dev->data->port_id);
+       } else {
+               DRV_LOG(DEBUG, "port %u selected SPRQ Rx function",
+                       dev->data->port_id);
        }
        return rx_pkt_burst;
 }