net/ice: clean GTPU flow type for flow director
[dpdk.git] / drivers / net / mlx5 / mlx5_ethdev.c
index 2cd05c5..51b39dd 100644 (file)
@@ -10,7 +10,7 @@
 #include <stdlib.h>
 #include <errno.h>
 
-#include <rte_ethdev_driver.h>
+#include <ethdev_driver.h>
 #include <rte_bus_pci.h>
 #include <rte_mbuf.h>
 #include <rte_common.h>
@@ -85,8 +85,6 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
                return -rte_errno;
        }
 
-       if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
-               dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
        if ((dev->data->dev_conf.txmode.offloads &
                        DEV_TX_OFFLOAD_SEND_ON_TIMESTAMP) &&
                        rte_mbuf_dyn_tx_timestamp_register(NULL, NULL) != 0) {
@@ -312,8 +310,8 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
        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);
@@ -340,14 +338,22 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
                         * representors (more than 4K) or PFs (more than 15)
                         * this approach must be reconsidered.
                         */
-                       if ((info->switch_info.port_id >>
-                               MLX5_PORT_ID_BONDING_PF_SHIFT) ||
+                       /* Switch port ID for VF representors: 0 - 0xFFE */
+                       if ((info->switch_info.port_id != 0xffff &&
+                               info->switch_info.port_id >=
+                               ((1 << MLX5_PORT_ID_BONDING_PF_SHIFT) - 1)) ||
                            priv->pf_bond > MLX5_PORT_ID_BONDING_PF_MASK) {
                                DRV_LOG(ERR, "can't update switch port ID"
                                             " for bonding device");
                                MLX5_ASSERT(false);
                                return -ENODEV;
                        }
+                       /*
+                        * Switch port ID for Host PF representor
+                        * (representor_id is -1) , set to 0xFFF
+                        */
+                       if (info->switch_info.port_id == 0xffff)
+                               info->switch_info.port_id = 0xfff;
                        info->switch_info.port_id |=
                                priv->pf_bond << MLX5_PORT_ID_BONDING_PF_SHIFT;
                }