git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mpipe: fix link initialization ordering
[dpdk.git]
/
drivers
/
net
/
mlx5
/
mlx5.c
diff --git
a/drivers/net/mlx5/mlx5.c
b/drivers/net/mlx5/mlx5.c
index
9636588
..
821ee0f
100644
(file)
--- 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_utils.h"
#include "mlx5_rxtx.h"
#include "mlx5_autoconf.h"
+#include "mlx5_defs.h"
/**
* DPDK callback to close the device.
/**
* DPDK callback to close the device.
@@
-133,6
+134,8
@@
mlx5_dev_close(struct rte_eth_dev *dev)
rte_free((*priv->rss_conf)[i]);
rte_free(priv->rss_conf);
}
rte_free((*priv->rss_conf)[i]);
rte_free(priv->rss_conf);
}
+ if (priv->reta_idx != NULL)
+ rte_free(priv->reta_idx);
priv_unlock(priv);
memset(priv, 0, sizeof(*priv));
}
priv_unlock(priv);
memset(priv, 0, sizeof(*priv));
}
@@
-160,6
+163,8
@@
static const struct eth_dev_ops mlx5_dev_ops = {
.mac_addr_remove = mlx5_mac_addr_remove,
.mac_addr_add = mlx5_mac_addr_add,
.mtu_set = mlx5_dev_set_mtu,
.mac_addr_remove = mlx5_mac_addr_remove,
.mac_addr_add = mlx5_mac_addr_add,
.mtu_set = mlx5_dev_set_mtu,
+ .reta_update = mlx5_dev_rss_reta_update,
+ .reta_query = mlx5_dev_rss_reta_query,
.rss_hash_update = mlx5_rss_hash_update,
.rss_hash_conf_get = mlx5_rss_hash_conf_get,
};
.rss_hash_update = mlx5_rss_hash_update,
.rss_hash_conf_get = mlx5_rss_hash_conf_get,
};
@@
-374,6
+379,10
@@
mlx5_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
(priv->hw_csum_l2tun ? "" : "not "));
priv->ind_table_max_size = exp_device_attr.rx_hash_caps.max_rwq_indirection_table_size;
(priv->hw_csum_l2tun ? "" : "not "));
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);
DEBUG("maximum RX indirection table size is %u",
priv->ind_table_max_size);
@@
-444,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;
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;
eth_dev->driver = &mlx5_driver;
eth_dev->data->rx_mbuf_alloc_failed = 0;
eth_dev->data->mtu = ETHER_MTU;