tun_get_user() runs the flow dissector on every written packet only to set the transport header. Packets that need it early already get it: skb_partial_csum_set() for NEEDS_CSUM, __virtio_net_hdr_to_skb() for GSO. For the rest, the IPv4/IPv6 receive paths set it, as for packets from NICs. Drop the probe: ~200 fewer instructions per 1400-byte packet, -6.5% when dropped at the raw table, -2.4% through conntrack and NAT (emulated Cortex-A7). Signed-off-by: Antonio Quartulli --- drivers/net/tun.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 8920c797acfd..9fc60a73fb96 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1960,7 +1960,6 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile, net_zcopy_complete(NULL, msg_control, false); skb_reset_network_header(skb); - skb_probe_transport_header(skb); skb_record_rx_queue(skb, tfile->queue_index); if (skb_xdp) { -- 2.56.0