Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Imported Upstream version 16.11.2
[deb_dpdk.git]
/
drivers
/
net
/
mlx4
/
mlx4.c
diff --git
a/drivers/net/mlx4/mlx4.c
b/drivers/net/mlx4/mlx4.c
index
6d43a97
..
83f9143
100644
(file)
--- a/
drivers/net/mlx4/mlx4.c
+++ b/
drivers/net/mlx4/mlx4.c
@@
-3340,6
+3340,8
@@
mlx4_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
/* Increase out of memory counters. */
++rxq->stats.rx_nombuf;
++rxq->priv->dev->data->rx_mbuf_alloc_failed;
/* Increase out of memory counters. */
++rxq->stats.rx_nombuf;
++rxq->priv->dev->data->rx_mbuf_alloc_failed;
+ /* Add SGE to array for repost. */
+ sges[i] = elt->sge;
goto repost;
}
goto repost;
}
@@
-5571,10
+5573,8
@@
mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
list = ibv_get_device_list(&i);
if (list == NULL) {
assert(errno);
list = ibv_get_device_list(&i);
if (list == NULL) {
assert(errno);
- if (errno == ENOSYS) {
- WARN("cannot list devices, is ib_uverbs loaded?");
- return 0;
- }
+ if (errno == ENOSYS)
+ ERROR("cannot list devices, is ib_uverbs loaded?");
return -errno;
}
assert(i >= 0);
return -errno;
}
assert(i >= 0);
@@
-5606,11
+5606,11
@@
mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
ibv_free_device_list(list);
switch (err) {
case 0:
ibv_free_device_list(list);
switch (err) {
case 0:
-
WARN
("cannot access device, is mlx4_ib loaded?");
- return
0
;
+
ERROR
("cannot access device, is mlx4_ib loaded?");
+ return
-ENODEV
;
case EINVAL:
case EINVAL:
-
WARN
("cannot use device, are drivers up to date?");
- return
0
;
+
ERROR
("cannot use device, are drivers up to date?");
+ return
-EINVAL
;
}
assert(err > 0);
return -err;
}
assert(err > 0);
return -err;
@@
-5857,6
+5857,9
@@
mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
/* Bring Ethernet device up. */
DEBUG("forcing Ethernet interface up");
priv_set_flags(priv, ~IFF_UP, IFF_UP);
/* Bring Ethernet device up. */
DEBUG("forcing Ethernet interface up");
priv_set_flags(priv, ~IFF_UP, IFF_UP);
+ /* Update link status once if waiting for LSC. */
+ if (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
+ mlx4_link_update(eth_dev, 0);
continue;
port_error:
continue;
port_error: