redhat 7 full support it
1 | 5.5.1. Bridge Zero Copy Transmit |
related source
set flags
1 | handle_tx |
related source
set flags
callback
1 | __kfree_skb |
1 | 291 /* Expects to be always run from workqueue - which acts as |
1 | 1502 static int tun_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len) |
1 | 1080 /* Get packet from user space buffer */ |
1 | 671 void __kfree_skb(struct sk_buff *skb) |
1 | 654 /* Free everything but the sk_buff shell. */ |
1 | 572 static void skb_release_data(struct sk_buff *skb) |
why it only affect performance for guest-to-nic? why guest-to-guest(host) not?
skb_orphan_frags
The reason is network stack entry function will force clear SKBTX_DEV_ZEROCOPY
clear the flag and copy data from userspace.
1 | 2119 static inline int skb_orphan_frags(struct sk_buff *skb, gfp_t gfp_mask) |
where skb_orphan_frags
is used?
call trace
1 | __netif_receive_skb_core |
As it is known: __netif_receive_skb_core
is the entry of network stack.
1 | 3755 static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc) |
1 | 1772 static inline void deliver_ptype_list_skb(struct sk_buff *skb, |
1 | 1762 static inline int deliver_skb(struct sk_buff *skb, |