mirror of
https://passt.top/passt
synced 2025-06-18 05:05:33 +02:00
tap: Remove unhelpeful vnet_pre optimization from tap_send()
Callers of tap_send() can optionally use a small optimization by adding extra space for the 4 byte length header used on the qemu socket interface. tap_ip_send() is currently the only user of this, but this is used only for "slow path" ICMP and DHCP packets, so there's not a lot of value to the optimization. Worse, having the two paths here complicates the interface and makes future cleanups difficult, so just remove it. I have some plans to bring back the optimization in a more general way in future, but for now it's just in the way. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
f72b63e92f
commit
fb5d1c5d7d
5 changed files with 13 additions and 24 deletions
2
arp.c
2
arp.c
|
@ -81,7 +81,7 @@ int arp(const struct ctx *c, const struct pool *p)
|
|||
memcpy(eh->h_dest, eh->h_source, sizeof(eh->h_dest));
|
||||
memcpy(eh->h_source, c->mac, sizeof(eh->h_source));
|
||||
|
||||
if (tap_send(c, eh, len, 0) < 0)
|
||||
if (tap_send(c, eh, len) < 0)
|
||||
perror("ARP: send");
|
||||
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue