]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/ethernet/intel/ixgbe/ixgbe.h
ixgbe: add extra stats for ndo_ll_poll
[karo-tx-linux.git] / drivers / net / ethernet / intel / ixgbe / ixgbe.h
index e9d98629b583fe512b3259084bd84b72b7f88118..fb098b46c6a634e9a1a401d055b0af9ba154bb61 100644 (file)
@@ -54,6 +54,9 @@
 
 #include <net/ll_poll.h>
 
+#ifdef CONFIG_NET_LL_RX_POLL
+#define LL_EXTENDED_STATS
+#endif
 /* common prefix used by pr_<> macros */
 #undef pr_fmt
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -184,6 +187,11 @@ struct ixgbe_rx_buffer {
 struct ixgbe_queue_stats {
        u64 packets;
        u64 bytes;
+#ifdef LL_EXTENDED_STATS
+       u64 yields;
+       u64 misses;
+       u64 cleaned;
+#endif  /* LL_EXTENDED_STATS */
 };
 
 struct ixgbe_tx_queue_stats {
@@ -391,6 +399,9 @@ static inline bool ixgbe_qv_lock_napi(struct ixgbe_q_vector *q_vector)
                WARN_ON(q_vector->state & IXGBE_QV_STATE_NAPI);
                q_vector->state |= IXGBE_QV_STATE_NAPI_YIELD;
                rc = false;
+#ifdef LL_EXTENDED_STATS
+               q_vector->tx.ring->stats.yields++;
+#endif
        } else
                /* we don't care if someone yielded */
                q_vector->state = IXGBE_QV_STATE_NAPI;
@@ -421,6 +432,9 @@ static inline bool ixgbe_qv_lock_poll(struct ixgbe_q_vector *q_vector)
        if ((q_vector->state & IXGBE_QV_LOCKED)) {
                q_vector->state |= IXGBE_QV_STATE_POLL_YIELD;
                rc = false;
+#ifdef LL_EXTENDED_STATS
+               q_vector->rx.ring->stats.yields++;
+#endif
        } else
                /* preserve yield marks */
                q_vector->state |= IXGBE_QV_STATE_POLL;