aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2012-11-13 04:03:18 +0000
committerDavid S. Miller <davem@davemloft.net>2012-11-13 14:18:14 -0500
commit366c1099123a0084cda581bee632911822748c61 (patch)
tree3bdf3f06afe857ce027e9371fac5d5d9abc3e879 /drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
parentixgbevf: fix possible use of uninitialized variable (diff)
downloadlinux-dev-366c1099123a0084cda581bee632911822748c61.tar.xz
linux-dev-366c1099123a0084cda581bee632911822748c61.zip
ixgbevf: Add flag to indicate when rx is in net poll
napi_gro_receive shouldn't be called from netpoll context. Doing so was causing kernel panics when jumbo frames larger than 2K were set. Add a flag to check if the Rx ring processing is occurring from interrupt context or from netpoll context and call netif_rx() if in the polling context. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index ee5ff0ecfeea..00f9698e86ae 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -288,7 +288,10 @@ static void ixgbevf_receive_skb(struct ixgbevf_q_vector *q_vector,
if (is_vlan && test_bit(tag & VLAN_VID_MASK, adapter->active_vlans))
__vlan_hwaccel_put_tag(skb, tag);
- napi_gro_receive(&q_vector->napi, skb);
+ if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL))
+ napi_gro_receive(&q_vector->napi, skb);
+ else
+ netif_rx(skb);
}
/**
@@ -550,9 +553,11 @@ static int ixgbevf_poll(struct napi_struct *napi, int budget)
else
per_ring_budget = budget;
+ adapter->flags |= IXGBE_FLAG_IN_NETPOLL;
ixgbevf_for_each_ring(ring, q_vector->rx)
clean_complete &= ixgbevf_clean_rx_irq(q_vector, ring,
per_ring_budget);
+ adapter->flags &= ~IXGBE_FLAG_IN_NETPOLL;
/* If all work not completed, return budget and keep polling */
if (!clean_complete)