Add RDMA ibverb driver plugin
RDMA ibverb is a userspace API to efficiently rx/tx packets. This is an
initial, unoptimized driver targeting Mellanox cards.
Next steps should include batching, multiqueue and additional cards.
Change-Id: I0309c7a543f75f2f9317eaf63ca502ac7a093ef9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
diff --git a/src/vnet/devices/tap/tap.c b/src/vnet/devices/tap/tap.c
index 0b2ebd6..2649f68 100644
--- a/src/vnet/devices/tap/tap.c
+++ b/src/vnet/devices/tap/tap.c
@@ -347,16 +347,8 @@
}
if (!args->mac_addr_set)
- {
- f64 now = vlib_time_now (vm);
- u32 rnd;
- rnd = (u32) (now * 1e6);
- rnd = random_u32 (&rnd);
+ ethernet_mac_address_generate (args->mac_addr);
- memcpy (args->mac_addr + 2, &rnd, sizeof (rnd));
- args->mac_addr[0] = 2;
- args->mac_addr[1] = 0xfe;
- }
vif->rx_ring_sz = args->rx_ring_sz != 0 ? args->rx_ring_sz : 256;
vif->tx_ring_sz = args->tx_ring_sz != 0 ? args->tx_ring_sz : 256;
clib_memcpy (vif->mac_addr, args->mac_addr, 6);