entry= macb_rx_ring_wrap(bp, queue->rx_prepared_head);/*Make hw descriptor updates visible to CPU*/rmb(); queue->rx_prepared_head++; desc=macb_rx_desc(queue, entry);if(!queue->rx_skbuff[entry]) {/*allocate sk_buff for this free entry in ring*/skb= netdev_alloc_skb(bp->dev...
struct__sk_buff{ __u32 len; __u32 pkt_type; __u32 mark; __u32 queue_mapping; __u32 protocol; __u32 vlan_present; __u32 vlan_tci; __u32 vlan_proto; __u32 priority; __u32 ingress_ifindex; __u32 ifindex; __u32 tc_index; __u32 cb[5]; __u32 hash; __u32 tc...
But as soon as this skb is added to socket receive queue, another thread can consume it. This means that llc must use regular skb_unlink() and kfree_skb() so that both producer and consumer can safely work on the same skb. [1] BUG: KASAN: use-after-free in atomic_read include/...
* @ooo_okay: allow the mapping of a socket to a queue to be changed @@ -791,10 +794,12 @@ struct sk_buff { 791794 fclone:2, 792795 peeked:1, 793796 head_frag:1, 794- pfmemalloc:1; 797+ pfmemalloc:1, 798+ pp_recycle:1;/* page_pool recycle indicator */ ...
skb_set_queue_mapping(skb,queue_index); returnnetdev_get_tx_queue(dev,queue_index); } 如上所示,如果网络设备仅支持单个 TX 队列,则会跳过复杂的代码,直接返回单个 TX 队列。大多高端服务器上使用的设备都有多个 TX 队列。具有多个 TX 队列的设备有两种情况: ...