src/netvsc_drv.c
/* Called when VF is injecting data into network stack.
 * Change the associated network device from VF to netvsc.
 * note: already called with rcu_read_lock
 */
Called when VF is injecting data into network stack.
Change the associated network device from VF to netvsc.
note: already called with rcu_read_lock
Called when VF is injecting data into network stack . Change the associated network device from VF to netvsc . note : already called with rcu_read_lock
static rx_handler_result_t netvsc_vf_handle_frame(struct sk_buff **pskb)
{
	struct sk_buff *skb = *pskb;
	struct net_device *ndev = rcu_dereference(skb->dev->rx_handler_data);
	struct net_device_context *ndev_ctx = netdev_priv(ndev);
	struct netvsc_vf_pcpu_stats *pcpu_stats
		 = this_cpu_ptr(ndev_ctx->vf_stats);
	skb = skb_share_check(skb, GFP_ATOMIC);
	if (unlikely(!skb))
		return RX_HANDLER_CONSUMED;
	*pskb = skb;
	skb->dev = ndev;
	u64_stats_update_begin(&pcpu_stats->syncp);
	pcpu_stats->rx_packets++;
	pcpu_stats->rx_bytes += skb->len;
	u64_stats_update_end(&pcpu_stats->syncp);
	return RX_HANDLER_ANOTHER;
}
static rx_handler_result_t netvsc_vf_handle_frame ( struct sk_buff * * pskb ) { struct sk_buff * skb = * pskb ; struct net_device * ndev = rcu_dereference ( skb -> dev -> rx_handler_data ) ; struct net_device_context * ndev_ctx = netdev_priv ( ndev ) ; struct netvsc_vf_pcpu_stats * pcpu_stats = this_cpu_ptr ( ndev_ctx -> vf_stats ) ; skb = skb_share_check ( skb , GFP_ATOMIC ) ; if ( unlikely ( ! skb ) ) return RX_HANDLER_CONSUMED ; * pskb = skb ; skb -> dev = ndev ; u64_stats_update_begin ( & pcpu_stats -> syncp ) ; pcpu_stats -> rx_packets ++ ; pcpu_stats -> rx_bytes += skb -> len ; u64_stats_update_end ( & pcpu_stats -> syncp ) ; return RX_HANDLER_ANOTHER ; }
Called when VF is injecting data into network stack.
Called when VF is injecting data into network stack .