Skip to contentSkip to conversation

ixgbe: Add missing rx_mbuf_alloc_failed statistics for vector PMD

PATCH Applied Balazs Nemeth 3 participants 3 messages Nov 28, 2014 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ixgbe: Add missing rx_mbuf_alloc_failed statistics for vector PMD

The statistics that is reported through the rx_nombuf fields in struct rte_eth_stats was not set when the vector PMD was used. The statistics should report the number of mbufs that could _not_ be allocated during rearm of the RX queue. The non-vector PMD reports it correctly. The use of either vector PMD or non-vector PMD depends on runtime configuration. Hence it is possible that a change in configuration would disable this statistics. To prevent this from happening, the statistics should be reported by both implementations.

---
 lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 2 ++
 1 file changed, 2 insertions(+)
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c +2 -0
index 42c0f60..579bc46 100644
@@ -71,6 +71,8 @@ ixgbe_rxq_rearm(struct igb_rx_queue *rxq)
 						dma_addr0);
 			}
 		}
+		rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed +=
+			RTE_IXGBE_RXQ_REARM_THRESH;
 		return;
 	}
 
Signature · 1 line
2.1.2
#2 lore raw
In reply to a message not in the archive
Quoted 10 lines · Balazs Nemeth

The statistics that is reported through the rx_nombuf fields in struct rte_eth_stats was not set when the vector PMD was used. The statistics should report the number of mbufs that could _not_ be allocated during rearm of the RX queue. The non-vector PMD reports it correctly. The use of either vector PMD or non-vector PMD depends on runtime configuration. Hence it is possible that a change in configuration would disable this statistics. To prevent this from happening, the statistics should be reported by both implementations.

Quoted 20 lines
---
 lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 2 ++
 1 file changed, 2 insertions(+)
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c +2 -0
index 42c0f60..579bc46 100644
@@ -71,6 +71,8 @@ ixgbe_rxq_rearm(struct igb_rx_queue *rxq)
 						dma_addr0);
 			}
 		}
+		rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed +=
+			RTE_IXGBE_RXQ_REARM_THRESH;
 		return;
 	}
 
Signature · 1 line
2.1.2
#3 lore raw
Quoted 9 lines
Quoted 9 lines

The statistics that is reported through the rx_nombuf fields in struct rte_eth_stats was not set when the vector PMD was used. The statistics should report the number of mbufs that could _not_ be allocated during rearm of the RX queue. The non-vector PMD reports it correctly. The use of either vector PMD or non-vector PMD depends on runtime configuration. Hence it is possible that a change in configuration would disable this statistics. To prevent this from happening, the statistics should be reported by both implementations.

Quoted 3 lines
Quoted 1 line

Applied

Thanks

Signature · 1 line
Thomas