DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ixgbe: fix buffer overrun bug in non-bulk alloc mode setup
@ 2015-03-19 16:09 Pawel Wodkowski
  2015-03-19 17:02 ` De Lara Guarch, Pablo
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Pawel Wodkowski @ 2015-03-19 16:09 UTC (permalink / raw)
  To: dev; +Cc: Pawel Wodkowski

From: Pawel Wodkowski <pawelx.wdkowski@intel.com>

When bulk alloc is enabled at compile time but preconditions for
it are not met at runtime the ixgbe_reset_rx_queue() function
overrides rxq->sw_ring not allocated elements.

Fixes: 01fa1d6 ("ixgbe: unify Rx setup")
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
---
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index 42f0aa5..dddc12f 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -2111,8 +2111,8 @@ ixgbe_reset_rx_queue(struct ixgbe_hw *hw, struct ixgbe_rx_queue *rxq)
 	 * entries is always allocated
 	 */
 	memset(&rxq->fake_mbuf, 0x0, sizeof(rxq->fake_mbuf));
-	for (i = 0; i < RTE_PMD_IXGBE_RX_MAX_BURST; ++i) {
-		rxq->sw_ring[rxq->nb_rx_desc + i].mbuf = &rxq->fake_mbuf;
+	for (i = rxq->nb_rx_desc; i < len; ++i) {
+		rxq->sw_ring[i].mbuf = &rxq->fake_mbuf;
 	}
 
 	rxq->rx_nb_avail = 0;
-- 
1.9.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-23  2:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-19 16:09 [dpdk-dev] [PATCH] ixgbe: fix buffer overrun bug in non-bulk alloc mode setup Pawel Wodkowski
2015-03-19 17:02 ` De Lara Guarch, Pablo
2015-03-19 19:42 ` Ananyev, Konstantin
2015-03-20 21:46   ` Thomas Monjalon
2015-03-20  6:50 ` Jiajia, SunX
2015-03-20 21:45   ` Thomas Monjalon
2015-03-23  2:10     ` Jiajia, SunX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).