DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ixgbe: fix compilation issue when IXGBE_RX_ALLOW_BULK_ALLOC is disabled
@ 2015-07-22  9:50 Pablo de Lara
  2015-07-22  9:56 ` Thomas Monjalon
  2015-07-22  9:58 ` Thomas Monjalon
  0 siblings, 2 replies; 3+ messages in thread
From: Pablo de Lara @ 2015-07-22  9:50 UTC (permalink / raw)
  To: dev

ixgbe_recv_pkts_lro uses field rx_free_trigger
in structure ixgbe_rx_queue, but that field is only defined
if IXGBE_RX_ALLOW_BULK_ALLOC is enabled, so even though
that field is not used when it is disabled,
compiler complains about it.
Therefore, the lines of code that use that field
have been ifdef.

Fixes: 8eecb329 ("ixgbe: add LRO support")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 9b2d637..af7e222 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1707,7 +1707,9 @@ next_desc:
 							rx_mbuf_alloc_failed++;
 				break;
 			}
-		} else if (nb_hold > rxq->rx_free_thresh) {
+		}
+#ifdef RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC
+		else if (nb_hold > rxq->rx_free_thresh) {
 			uint16_t next_rdt = rxq->rx_free_trigger;
 
 			if (!ixgbe_rx_alloc_bufs(rxq, false)) {
@@ -1725,6 +1727,7 @@ next_desc:
 				break;
 			}
 		}
+#endif
 
 		nb_hold++;
 		rxe = &sw_ring[rx_id];
-- 
2.4.2

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

* Re: [dpdk-dev] [PATCH] ixgbe: fix compilation issue when IXGBE_RX_ALLOW_BULK_ALLOC is disabled
  2015-07-22  9:50 [dpdk-dev] [PATCH] ixgbe: fix compilation issue when IXGBE_RX_ALLOW_BULK_ALLOC is disabled Pablo de Lara
@ 2015-07-22  9:56 ` Thomas Monjalon
  2015-07-22  9:58 ` Thomas Monjalon
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2015-07-22  9:56 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dev

2015-07-22 10:50, Pablo de Lara:
> ixgbe_recv_pkts_lro uses field rx_free_trigger
> in structure ixgbe_rx_queue, but that field is only defined
> if IXGBE_RX_ALLOW_BULK_ALLOC is enabled, so even though
> that field is not used when it is disabled,
> compiler complains about it.

Why this option is still needed?

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

* Re: [dpdk-dev] [PATCH] ixgbe: fix compilation issue when IXGBE_RX_ALLOW_BULK_ALLOC is disabled
  2015-07-22  9:50 [dpdk-dev] [PATCH] ixgbe: fix compilation issue when IXGBE_RX_ALLOW_BULK_ALLOC is disabled Pablo de Lara
  2015-07-22  9:56 ` Thomas Monjalon
@ 2015-07-22  9:58 ` Thomas Monjalon
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2015-07-22  9:58 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dev

2015-07-22 10:50, Pablo de Lara:
> ixgbe_recv_pkts_lro uses field rx_free_trigger
> in structure ixgbe_rx_queue, but that field is only defined
> if IXGBE_RX_ALLOW_BULK_ALLOC is enabled, so even though
> that field is not used when it is disabled,
> compiler complains about it.
> Therefore, the lines of code that use that field
> have been ifdef.
> 
> Fixes: 8eecb329 ("ixgbe: add LRO support")
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied, thanks

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

end of thread, other threads:[~2015-07-22  9:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-22  9:50 [dpdk-dev] [PATCH] ixgbe: fix compilation issue when IXGBE_RX_ALLOW_BULK_ALLOC is disabled Pablo de Lara
2015-07-22  9:56 ` Thomas Monjalon
2015-07-22  9:58 ` Thomas Monjalon

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).