From fb5d1c5d7d0b914a90aaeecf406c7092d9d55aeb Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 19 Oct 2022 11:43:51 +1100 Subject: 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 Signed-off-by: Stefano Brivio --- ndp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ndp.c') diff --git a/ndp.c b/ndp.c index 03f1d06..79be0cf 100644 --- a/ndp.c +++ b/ndp.c @@ -200,7 +200,7 @@ dns_done: memcpy(ehr->h_source, c->mac, ETH_ALEN); ehr->h_proto = htons(ETH_P_IPV6); - if (tap_send(c, ehr, len, 0) < 0) + if (tap_send(c, ehr, len) < 0) perror("NDP: send"); return 1; -- cgit v1.2.3