Commit 742fe54c authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller

netvsc: enable GRO

Use GRO when receiving packets.
Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 15a863bf
...@@ -642,11 +642,11 @@ int netvsc_recv_callback(struct net_device *net, ...@@ -642,11 +642,11 @@ int netvsc_recv_callback(struct net_device *net,
{ {
struct net_device_context *net_device_ctx = netdev_priv(net); struct net_device_context *net_device_ctx = netdev_priv(net);
struct netvsc_device *net_device = net_device_ctx->nvdev; struct netvsc_device *net_device = net_device_ctx->nvdev;
u16 q_idx = channel->offermsg.offer.sub_channel_index;
struct netvsc_channel *nvchan = &net_device->chan_table[q_idx];
struct net_device *vf_netdev; struct net_device *vf_netdev;
struct sk_buff *skb; struct sk_buff *skb;
struct netvsc_stats *rx_stats; struct netvsc_stats *rx_stats;
u16 q_idx = channel->offermsg.offer.sub_channel_index;
if (net->reg_state != NETREG_REGISTERED) if (net->reg_state != NETREG_REGISTERED)
return NVSP_STAT_FAIL; return NVSP_STAT_FAIL;
...@@ -679,7 +679,7 @@ int netvsc_recv_callback(struct net_device *net, ...@@ -679,7 +679,7 @@ int netvsc_recv_callback(struct net_device *net,
* on the synthetic device because modifying the VF device * on the synthetic device because modifying the VF device
* statistics will not work correctly. * statistics will not work correctly.
*/ */
rx_stats = &net_device->chan_table[q_idx].rx_stats; rx_stats = &nvchan->rx_stats;
u64_stats_update_begin(&rx_stats->syncp); u64_stats_update_begin(&rx_stats->syncp);
rx_stats->packets++; rx_stats->packets++;
rx_stats->bytes += len; rx_stats->bytes += len;
...@@ -690,7 +690,7 @@ int netvsc_recv_callback(struct net_device *net, ...@@ -690,7 +690,7 @@ int netvsc_recv_callback(struct net_device *net,
++rx_stats->multicast; ++rx_stats->multicast;
u64_stats_update_end(&rx_stats->syncp); u64_stats_update_end(&rx_stats->syncp);
netif_receive_skb(skb); napi_gro_receive(&nvchan->napi, skb);
rcu_read_unlock(); rcu_read_unlock();
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment