Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08e50a20 authored by Jacob Keller's avatar Jacob Keller Committed by Jeff Kirsher
Browse files

ixgbevf: have clean_rx_irq return total_rx_packets cleaned



Rather than return true/false indicating whether there was budget left, return
the total packets cleaned. This currently has no use, but will be used in a
following patch which enables CONFIG_NET_RX_BUSY_POLL support in order to track
how many packets were cleaned during the busy poll as part of the extended
statistics.

Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 08681618
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -410,7 +410,7 @@ static inline void ixgbevf_irq_enable_queues(struct ixgbevf_adapter *adapter,
	IXGBE_WRITE_REG(hw, IXGBE_VTEIMS, qmask);
}

static bool ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector,
static int ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector,
				struct ixgbevf_ring *rx_ring,
				int budget)
{
@@ -540,7 +540,7 @@ next_desc:
	q_vector->rx.total_packets += total_rx_packets;
	q_vector->rx.total_bytes += total_rx_bytes;

	return !!budget;
	return total_rx_packets;
}

/**
@@ -572,8 +572,9 @@ static int ixgbevf_poll(struct napi_struct *napi, int 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);
		clean_complete &= (ixgbevf_clean_rx_irq(q_vector, ring,
							per_ring_budget)
				   < per_ring_budget);
	adapter->flags &= ~IXGBE_FLAG_IN_NETPOLL;

	/* If all work not completed, return budget and keep polling */