git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08c1920
)
mlx4: save bound interface
author
Francesco Santoro
<francesco.santoro@6wind.com>
Mon, 5 Oct 2015 17:50:07 +0000
(19:50 +0200)
committer
Thomas Monjalon
<thomas.monjalon@6wind.com>
Tue, 20 Oct 2015 19:50:29 +0000
(21:50 +0200)
Allows applications to retrieve the name of the related netdevice.
Signed-off-by: Francesco Santoro <francesco.santoro@6wind.com>
drivers/net/mlx4/mlx4.c
patch
|
blob
|
history
diff --git
a/drivers/net/mlx4/mlx4.c
b/drivers/net/mlx4/mlx4.c
index
e1ca577
..
9614471
100644
(file)
--- a/
drivers/net/mlx4/mlx4.c
+++ b/
drivers/net/mlx4/mlx4.c
@@
-3819,6
+3819,7
@@
mlx4_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
{
struct priv *priv = dev->data->dev_private;
unsigned int max;
+ char ifname[IF_NAMESIZE];
priv_lock(priv);
/* FIXME: we should ask the device for these values. */
@@
-3848,6
+3849,8
@@
mlx4_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
DEV_TX_OFFLOAD_UDP_CKSUM |
DEV_TX_OFFLOAD_TCP_CKSUM) :
0);
+ if (priv_get_ifname(priv, &ifname) == 0)
+ info->if_index = if_nametoindex(ifname);
priv_unlock(priv);
}