summaryrefslogtreecommitdiff
path: root/lib/librte_pmd_e1000
diff options
context:
space:
mode:
authorIntel <intel.com>2013-09-18 12:00:00 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-10-09 16:16:14 +0200
commit7ef007291004de0bb2a5d298cb11d07a9f9d088e (patch)
tree7c7a43fce2d45e6bd905392a23ecede77190c32a /lib/librte_pmd_e1000
parent7bd128eae21fd0583a6c3302ea80070fbe503d60 (diff)
downloaddpdk-7ef007291004de0bb2a5d298cb11d07a9f9d088e.zip
dpdk-7ef007291004de0bb2a5d298cb11d07a9f9d088e.tar.gz
dpdk-7ef007291004de0bb2a5d298cb11d07a9f9d088e.tar.xz
ethdev: random MAC address
Factorize code by moving random_addr() function in only place. It will be reused for virtio. Signed-off-by: Intel
Diffstat (limited to 'lib/librte_pmd_e1000')
-rw-r--r--lib/librte_pmd_e1000/igb_pf.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/librte_pmd_e1000/igb_pf.c b/lib/librte_pmd_e1000/igb_pf.c
index 68f7c69..9c1c9dc 100644
--- a/lib/librte_pmd_e1000/igb_pf.c
+++ b/lib/librte_pmd_e1000/igb_pf.c
@@ -54,17 +54,6 @@
#include "e1000/e1000_hw.h"
#include "e1000_ethdev.h"
-static inline
-void eth_random_addr(uint8_t *addr)
-{
- uint64_t rand = rte_rand();
- uint8_t *p = (uint8_t*)&rand;
-
- rte_memcpy(addr, p, ETHER_ADDR_LEN);
- addr[0] &= 0xfe; /* clear multicast bit */
- addr[0] |= 0x02; /* set local assignment bit (IEEE802) */
-}
-
static inline uint16_t
dev_num_vf(struct rte_eth_dev *eth_dev)
{