* [dpdk-dev] [PATCH v2] net/i40e: fix testpmd setup error when bulk is disabled
@ 2017-04-20 8:51 Beilei Xing
2017-04-20 8:57 ` Zhang, Qi Z
0 siblings, 1 reply; 2+ messages in thread
From: Beilei Xing @ 2017-04-20 8:51 UTC (permalink / raw)
To: jingjing.wu, qi.z.zhang; +Cc: dev
Testpmd failed to start when CONFIG_RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC
is disabled, the root cause is the length of sw_ring and queue are
incorrect with the above configuration.
Fixes: 0be295312966 ("net/i40e: fix compile error")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
v2 change:
Correct the length of queue when BULK is disabled.
drivers/net/i40e/i40e_rxtx.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index e5471b1..9f697d7 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1791,13 +1791,11 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev,
/* Allocate the maximun number of RX ring hardware descriptor. */
len = I40E_MAX_RING_DESC;
-#ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC
/**
* Allocating a little more memory because vectorized/bulk_alloc Rx
* functions doesn't check boundaries each time.
*/
len += RTE_PMD_I40E_RX_MAX_BURST;
-#endif
ring_size = RTE_ALIGN(len * sizeof(union i40e_rx_desc),
I40E_DMA_MEM_ALIGN);
@@ -1816,11 +1814,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev,
rxq->rx_ring_phys_addr = rte_mem_phy2mch(rz->memseg_id, rz->phys_addr);
rxq->rx_ring = (union i40e_rx_desc *)rz->addr;
-#ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC
len = (uint16_t)(nb_desc + RTE_PMD_I40E_RX_MAX_BURST);
-#else
- len = nb_desc;
-#endif
/* Allocate the software ring. */
rxq->sw_ring =
--
2.5.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/i40e: fix testpmd setup error when bulk is disabled
2017-04-20 8:51 [dpdk-dev] [PATCH v2] net/i40e: fix testpmd setup error when bulk is disabled Beilei Xing
@ 2017-04-20 8:57 ` Zhang, Qi Z
0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2017-04-20 8:57 UTC (permalink / raw)
To: Xing, Beilei, Wu, Jingjing; +Cc: dev
> -----Original Message-----
> From: Xing, Beilei
> Sent: Thursday, April 20, 2017 4:52 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: [PATCH v2] net/i40e: fix testpmd setup error when bulk is disabled
>
> Testpmd failed to start when
> CONFIG_RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC
> is disabled, the root cause is the length of sw_ring and queue are incorrect
> with the above configuration.
>
> Fixes: 0be295312966 ("net/i40e: fix compile error")
>
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> ---
> v2 change:
> Correct the length of queue when BULK is disabled.
>
> drivers/net/i40e/i40e_rxtx.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index
> e5471b1..9f697d7 100644
> --- a/drivers/net/i40e/i40e_rxtx.c
> +++ b/drivers/net/i40e/i40e_rxtx.c
> @@ -1791,13 +1791,11 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev
> *dev,
> /* Allocate the maximun number of RX ring hardware descriptor. */
> len = I40E_MAX_RING_DESC;
>
> -#ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC
> /**
> * Allocating a little more memory because vectorized/bulk_alloc Rx
> * functions doesn't check boundaries each time.
> */
> len += RTE_PMD_I40E_RX_MAX_BURST;
> -#endif
>
> ring_size = RTE_ALIGN(len * sizeof(union i40e_rx_desc),
> I40E_DMA_MEM_ALIGN);
> @@ -1816,11 +1814,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev
> *dev,
> rxq->rx_ring_phys_addr = rte_mem_phy2mch(rz->memseg_id,
> rz->phys_addr);
> rxq->rx_ring = (union i40e_rx_desc *)rz->addr;
>
> -#ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC
> len = (uint16_t)(nb_desc + RTE_PMD_I40E_RX_MAX_BURST); -#else
> - len = nb_desc;
> -#endif
>
> /* Allocate the software ring. */
> rxq->sw_ring =
> --
> 2.5.5
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-20 8:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-20 8:51 [dpdk-dev] [PATCH v2] net/i40e: fix testpmd setup error when bulk is disabled Beilei Xing
2017-04-20 8:57 ` Zhang, Qi Z
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).