net/mlx4: advertise supported RSS hash functions
[dpdk.git] / drivers / net / mlx4 / mlx4_ethdev.c
index 5f731e0..0a9c2e2 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright 2017 6WIND S.A.
- * Copyright 2017 Mellanox
+ * Copyright 2017 Mellanox Technologies, Ltd
  */
 
 /**
@@ -534,11 +534,14 @@ mlx4_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
  *   Pointer to Ethernet device structure.
  * @param mac_addr
  *   MAC address to register.
+ *
+ * @return
+ *   0 on success, negative errno value otherwise and rte_errno is set.
  */
-void
+int
 mlx4_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
 {
-       mlx4_mac_addr_add(dev, mac_addr, 0, 0);
+       return mlx4_mac_addr_add(dev, mac_addr, 0, 0);
 }
 
 /**
@@ -556,7 +559,6 @@ mlx4_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
        unsigned int max;
        char ifname[IF_NAMESIZE];
 
-       info->pci_dev = RTE_ETH_DEV_TO_PCI(dev);
        /* FIXME: we should ask the device for these values. */
        info->min_rx_bufsize = 32;
        info->max_rx_pktlen = 65536;
@@ -585,6 +587,8 @@ mlx4_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
                        ETH_LINK_SPEED_20G |
                        ETH_LINK_SPEED_40G |
                        ETH_LINK_SPEED_56G;
+       info->flow_type_rss_offloads =
+               mlx4_ibv_to_rss_types(priv->hw_rss_sup);
 }
 
 /**
@@ -711,7 +715,7 @@ mlx4_link_update(struct rte_eth_dev *dev, int wait_to_complete)
        }
        link_speed = ethtool_cmd_speed(&edata);
        if (link_speed == -1)
-               dev_link.link_speed = 0;
+               dev_link.link_speed = ETH_SPEED_NUM_NONE;
        else
                dev_link.link_speed = link_speed;
        dev_link.link_duplex = ((edata.duplex == DUPLEX_HALF) ?