Bläddra i källkod

ixgbe: napi_poll must return the work done

Currently the function ixgbe_poll() returns 0 when it clean completely
the rx rings, but this foul budget accounting in core code.
Fix this returning the actual work done, capped to weight - 1, since
the core doesn't allow to return the full budget when the driver modifies
the napi status

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Venkatesh Srinivas <venkateshs@google.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Paolo Abeni 9 år sedan
förälder
incheckning
4b732cd4bb
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

+ 1 - 1
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

@@ -2887,7 +2887,7 @@ int ixgbe_poll(struct napi_struct *napi, int budget)
 	if (!test_bit(__IXGBE_DOWN, &adapter->state))
 	if (!test_bit(__IXGBE_DOWN, &adapter->state))
 		ixgbe_irq_enable_queues(adapter, BIT_ULL(q_vector->v_idx));
 		ixgbe_irq_enable_queues(adapter, BIT_ULL(q_vector->v_idx));
 
 
-	return 0;
+	return min(work_done, budget - 1);
 }
 }
 
 
 /**
 /**