drivers/net: add generic ethdev macro to get PCI device
[dpdk.git] / drivers / net / mlx5 / mlx5_ethdev.c
index 766fb72..eadf452 100644 (file)
@@ -661,7 +661,7 @@ mlx5_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_DEV_TO_PCI(dev->device);
+       info->pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 
        priv_lock(priv);
        /* FIXME: we should ask the device for these values. */
@@ -701,12 +701,8 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
                                          DEV_TX_OFFLOAD_GRE_TNL_TSO);
        if (priv_get_ifname(priv, &ifname) == 0)
                info->if_index = if_nametoindex(ifname);
-       /* FIXME: RETA update/query API expects the callee to know the size of
-        * the indirection table, for this PMD the size varies depending on
-        * the number of RX queues, it becomes impossible to find the correct
-        * size if it is not fixed.
-        * The API should be updated to solve this problem. */
-       info->reta_size = priv->ind_table_max_size;
+       info->reta_size = priv->reta_idx_n ?
+               priv->reta_idx_n : priv->ind_table_max_size;
        info->hash_key_size = ((*priv->rss_conf) ?
                               (*priv->rss_conf)[0]->rss_key_len :
                               0);
@@ -1278,13 +1274,12 @@ mlx5_dev_link_status_handler(void *arg)
  *   Callback argument.
  */
 void
-mlx5_dev_interrupt_handler(struct rte_intr_handle *intr_handle, void *cb_arg)
+mlx5_dev_interrupt_handler(void *cb_arg)
 {
        struct rte_eth_dev *dev = cb_arg;
        struct priv *priv = dev->data->dev_private;
        int ret;
 
-       (void)intr_handle;
        priv_lock(priv);
        ret = priv_dev_link_status_handler(priv, dev);
        priv_unlock(priv);