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
test/crypto: rename GCM test code
[dpdk.git]
/
drivers
/
net
/
vmxnet3
/
vmxnet3_ethdev.c
diff --git
a/drivers/net/vmxnet3/vmxnet3_ethdev.c
b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index
3910991
..
58bc4f2
100644
(file)
--- a/
drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/
drivers/net/vmxnet3/vmxnet3_ethdev.c
@@
-87,7
+87,7
@@
static int __vmxnet3_dev_link_update(struct rte_eth_dev *dev,
static int vmxnet3_dev_link_update(struct rte_eth_dev *dev,
int wait_to_complete);
static void vmxnet3_hw_stats_save(struct vmxnet3_hw *hw);
static int vmxnet3_dev_link_update(struct rte_eth_dev *dev,
int wait_to_complete);
static void vmxnet3_hw_stats_save(struct vmxnet3_hw *hw);
-static
void
vmxnet3_dev_stats_get(struct rte_eth_dev *dev,
+static
int
vmxnet3_dev_stats_get(struct rte_eth_dev *dev,
struct rte_eth_stats *stats);
static int vmxnet3_dev_xstats_get_names(struct rte_eth_dev *dev,
struct rte_eth_xstat_name *xstats,
struct rte_eth_stats *stats);
static int vmxnet3_dev_xstats_get_names(struct rte_eth_dev *dev,
struct rte_eth_xstat_name *xstats,
@@
-537,10
+537,10
@@
vmxnet3_write_mac(struct vmxnet3_hw *hw, const uint8_t *addr)
addr[0], addr[1], addr[2],
addr[3], addr[4], addr[5]);
addr[0], addr[1], addr[2],
addr[3], addr[4], addr[5]);
-
val = *(const uint32_t *)addr
;
+
memcpy(&val, addr, 4)
;
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_MACL, val);
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_MACL, val);
-
val = (addr[5] << 8) | addr[4]
;
+
memcpy(&val, addr + 4, 2)
;
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_MACH, val);
}
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_MACH, val);
}
@@
-1034,7
+1034,7
@@
vmxnet3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
return count;
}
return count;
}
-static
void
+static
int
vmxnet3_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
{
unsigned int i;
vmxnet3_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
{
unsigned int i;
@@
-1080,6
+1080,8
@@
vmxnet3_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
stats->ierrors += rxStats.pktsRxError;
stats->rx_nombuf += rxStats.pktsRxOutOfBuf;
}
stats->ierrors += rxStats.pktsRxError;
stats->rx_nombuf += rxStats.pktsRxOutOfBuf;
}
+
+ return 0;
}
static void
}
static void
@@
-1144,6
+1146,8
@@
vmxnet3_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
{
struct vmxnet3_hw *hw = dev->data->dev_private;
{
struct vmxnet3_hw *hw = dev->data->dev_private;
+ ether_addr_copy(mac_addr, (struct ether_addr *)(hw->perm_addr));
+ ether_addr_copy(mac_addr, &dev->data->mac_addrs[0]);
vmxnet3_write_mac(hw, mac_addr->addr_bytes);
}
vmxnet3_write_mac(hw, mac_addr->addr_bytes);
}