* [PATCH] ixgbe: Fix offloading bits when RX bulk alloc is used.
@ 2013-11-08 19:47 Bryan Benson
[not found] ` <1383940042-31770-1-git-send-email-bmbenson-vV1OtcyAfmbQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Bryan Benson @ 2013-11-08 19:47 UTC (permalink / raw)
To: dev-VfR2kkLFssw
This is a fix for the ixgbe hardware offload flags not being set when bulk alloc RX is used. The issue was caused by masking off the bits that store the hardware offload values in the status_error field to retrieve the done bit for the descriptor.
Commit 7431041062b9fd0555bac7ca4abebc99e3379fa5 in DPDK-1.3.0 introduced bulk dequeue, which included the bug.
---
lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index 07830b7..a183c11 100755
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -1035,7 +1035,8 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)
struct igb_rx_entry *rxep;
struct rte_mbuf *mb;
uint16_t pkt_len;
- int s[LOOK_AHEAD], nb_dd;
+ uint32_t s[LOOK_AHEAD];
+ int nb_dd;
int i, j, nb_rx = 0;
@@ -1058,12 +1059,12 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)
for (j = LOOK_AHEAD-1; j >= 0; --j)
s[j] = rxdp[j].wb.upper.status_error;
- /* Clear everything but the status bits (LSB) */
- for (j = 0; j < LOOK_AHEAD; ++j)
- s[j] &= IXGBE_RXDADV_STAT_DD;
+ nb_dd = 0;
+ /* add to nd_dd when the status bit is set (LSB) */
+ for (j = 0; j < LOOK_AHEAD; ++j) {
+ nb_dd += s[j] & IXGBE_RXDADV_STAT_DD;
+ }
- /* Compute how many status bits were set */
- nb_dd = s[0]+s[1]+s[2]+s[3]+s[4]+s[5]+s[6]+s[7];
nb_rx += nb_dd;
/* Translate descriptor info to mbuf format */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ixgbe: Fix offloading bits when RX bulk alloc is used.
[not found] ` <1383940042-31770-1-git-send-email-bmbenson-vV1OtcyAfmbQT0dZR+AlfA@public.gmane.org>
@ 2013-11-12 15:49 ` Ivan Boule
[not found] ` <52824E21.20405-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Ivan Boule @ 2013-11-12 15:49 UTC (permalink / raw)
To: Bryan Benson; +Cc: dev-VfR2kkLFssw
On 11/08/2013 08:47 PM, Bryan Benson wrote:
> This is a fix for the ixgbe hardware offload flags not being set when bulk alloc RX is used. The issue was caused by masking off the bits that store the hardware offload values in the status_error field to retrieve the done bit for the descriptor.
>
> Commit 7431041062b9fd0555bac7ca4abebc99e3379fa5 in DPDK-1.3.0 introduced bulk dequeue, which included the bug.
> ---
> lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> index 07830b7..a183c11 100755
> --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> @@ -1035,7 +1035,8 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)
> struct igb_rx_entry *rxep;
> struct rte_mbuf *mb;
> uint16_t pkt_len;
> - int s[LOOK_AHEAD], nb_dd;
> + uint32_t s[LOOK_AHEAD];
> + int nb_dd;
> int i, j, nb_rx = 0;
>
>
> @@ -1058,12 +1059,12 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)
> for (j = LOOK_AHEAD-1; j >= 0; --j)
> s[j] = rxdp[j].wb.upper.status_error;
>
> - /* Clear everything but the status bits (LSB) */
> - for (j = 0; j < LOOK_AHEAD; ++j)
> - s[j] &= IXGBE_RXDADV_STAT_DD;
> + nb_dd = 0;
> + /* add to nd_dd when the status bit is set (LSB) */
> + for (j = 0; j < LOOK_AHEAD; ++j) {
> + nb_dd += s[j] & IXGBE_RXDADV_STAT_DD;
> + }
>
> - /* Compute how many status bits were set */
> - nb_dd = s[0]+s[1]+s[2]+s[3]+s[4]+s[5]+s[6]+s[7];
> nb_rx += nb_dd;
>
> /* Translate descriptor info to mbuf format */
Acked.
--
Ivan Boule
6WIND Development Engineer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ixgbe: Fix offloading bits when RX bulk alloc is used.
[not found] ` <52824E21.20405-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
@ 2013-11-12 17:21 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2013-11-12 17:21 UTC (permalink / raw)
To: Bryan Benson; +Cc: dev-VfR2kkLFssw
12/11/2013 16:49, Ivan Boule :
> On 11/08/2013 08:47 PM, Bryan Benson wrote:
> > This is a fix for the ixgbe hardware offload flags not being set when
> > bulk alloc RX is used. The issue was caused by masking off the bits that
> > store the hardware offload values in the status_error field to retrieve
> > the done bit for the descriptor.
> >
> > Commit 7431041062b9fd0555bac7ca4abebc99e3379fa5 in DPDK-1.3.0 introduced
> > bulk dequeue, which included the bug. ---
> >
> > lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 13 +++++++------
> > 1 file changed, 7 insertions(+), 6 deletions(-)
>
> Acked.
Applied.
Good catch. Thanks
--
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-12 17:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-08 19:47 [PATCH] ixgbe: Fix offloading bits when RX bulk alloc is used Bryan Benson
[not found] ` <1383940042-31770-1-git-send-email-bmbenson-vV1OtcyAfmbQT0dZR+AlfA@public.gmane.org>
2013-11-12 15:49 ` Ivan Boule
[not found] ` <52824E21.20405-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-11-12 17:21 ` 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).