X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmlx5%2Fmlx5.c;h=821ee0f0c3ece9134a95bced2c924ab3a92ed8d7;hb=6069d815bc4dd73e82396a607882fe8395e592ed;hp=5a9526069c24b0b1664ea3ce452c60167d60a624;hpb=634efbc2c8c05213696c36e103becc48cdbe534c;p=dpdk.git diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 5a9526069c..821ee0f0c3 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -65,6 +65,7 @@ #include "mlx5_utils.h" #include "mlx5_rxtx.h" #include "mlx5_autoconf.h" +#include "mlx5_defs.h" /** * DPDK callback to close the device. @@ -377,9 +378,11 @@ mlx5_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) DEBUG("L2 tunnel checksum offloads are %ssupported", (priv->hw_csum_l2tun ? "" : "not ")); - priv->ind_table_max_size = - RTE_MIN((unsigned int)RSS_INDIRECTION_TABLE_SIZE, - exp_device_attr.rx_hash_caps.max_rwq_indirection_table_size); + priv->ind_table_max_size = exp_device_attr.rx_hash_caps.max_rwq_indirection_table_size; + /* Remove this check once DPDK supports larger/variable + * indirection tables. */ + if (priv->ind_table_max_size > (unsigned int)RSS_INDIRECTION_TABLE_SIZE) + priv->ind_table_max_size = RSS_INDIRECTION_TABLE_SIZE; DEBUG("maximum RX indirection table size is %u", priv->ind_table_max_size); @@ -450,6 +453,9 @@ mlx5_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) eth_dev->data->dev_private = priv; eth_dev->pci_dev = pci_dev; + + rte_eth_copy_pci_info(eth_dev, pci_dev); + eth_dev->driver = &mlx5_driver; eth_dev->data->rx_mbuf_alloc_failed = 0; eth_dev->data->mtu = ETHER_MTU;