* [PATCH] ixgbe_rx_scan_hw_ring: Fix initializing id and hash fields in flow director mode.
@ 2014-08-20 7:46 Pawel Wodkowski
[not found] ` <1408520788-20380-1-git-send-email-pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Pawel Wodkowski @ 2014-08-20 7:46 UTC (permalink / raw)
To: dev-VfR2kkLFssw
When Flow Director was used together with bulk alloc, id and hash was swapped
when packet matches flow director filter due to improper fdir field initialization.
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index aaf46d4..796e5a4 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -902,6 +902,7 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)
struct igb_rx_entry *rxep;
struct rte_mbuf *mb;
uint16_t pkt_len;
+ uint16_t pkt_flags;
int s[LOOK_AHEAD], nb_dd;
int i, j, nb_rx = 0;
@@ -935,21 +936,30 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)
/* Translate descriptor info to mbuf format */
for (j = 0; j < nb_dd; ++j) {
mb = rxep[j].mbuf;
- pkt_len = (uint16_t)(rxdp[j].wb.upper.length -
- rxq->crc_len);
+ pkt_len = (uint16_t)(rxdp[j].wb.upper.length - rxq->crc_len);
mb->pkt.data_len = pkt_len;
mb->pkt.pkt_len = pkt_len;
- mb->pkt.vlan_macip.f.vlan_tci = rxdp[j].wb.upper.vlan;
- mb->pkt.hash.rss = rxdp[j].wb.lower.hi_dword.rss;
+ mb->pkt.vlan_macip.f.vlan_tci =
+ rte_le_to_cpu_16(rxdp[j].wb.upper.vlan);
/* convert descriptor fields to rte mbuf flags */
- mb->ol_flags = rx_desc_hlen_type_rss_to_pkt_flags(
+ pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(
rxdp[j].wb.lower.lo_dword.data);
/* reuse status field from scan list */
- mb->ol_flags = (uint16_t)(mb->ol_flags |
+ pkt_flags = (uint16_t)(pkt_flags |
rx_desc_status_to_pkt_flags(s[j]));
- mb->ol_flags = (uint16_t)(mb->ol_flags |
+ pkt_flags = (uint16_t)(pkt_flags |
rx_desc_error_to_pkt_flags(s[j]));
+ mb->ol_flags = pkt_flags;
+
+ if (likely(pkt_flags & PKT_RX_RSS_HASH))
+ mb->pkt.hash.rss = rxdp[j].wb.lower.hi_dword.rss;
+ else if (pkt_flags & PKT_RX_FDIR) {
+ mb->pkt.hash.fdir.hash =
+ (uint16_t)((rxdp[j].wb.lower.hi_dword.csum_ip.csum)
+ & IXGBE_ATR_HASH_MASK);
+ mb->pkt.hash.fdir.id = rxdp[j].wb.lower.hi_dword.csum_ip.ip_id;
+ }
}
/* Move mbuf pointers from the S/W ring to the stage */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread[parent not found: <1408520788-20380-1-git-send-email-pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] ixgbe_rx_scan_hw_ring: Fix initializing id and hash fields in flow director mode. [not found] ` <1408520788-20380-1-git-send-email-pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> @ 2014-08-29 15:41 ` Thomas Monjalon 2014-09-08 7:18 ` Wodkowski, PawelX 0 siblings, 1 reply; 5+ messages in thread From: Thomas Monjalon @ 2014-08-29 15:41 UTC (permalink / raw) To: dev-VfR2kkLFssw Hi, 2014-08-20 08:46, Pawel Wodkowski: > When Flow Director was used together with bulk alloc, id and hash was swapped > when packet matches flow director filter due to improper fdir field initialization. > > Signed-off-by: Pawel Wodkowski <pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> I'd really like someone else review this touchy patch for integration in 1.7.1. Thanks -- Thomas ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ixgbe_rx_scan_hw_ring: Fix initializing id and hash fields in flow director mode. 2014-08-29 15:41 ` Thomas Monjalon @ 2014-09-08 7:18 ` Wodkowski, PawelX [not found] ` <F6F2A6264E145F47A18AB6DF8E87425D12B233AE-kPTMFJFq+rFP9JyJpTNKArfspsVTdybXVpNB7YpNyf8@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Wodkowski, PawelX @ 2014-09-08 7:18 UTC (permalink / raw) To: Thomas Monjalon, dev-VfR2kkLFssw@public.gmane.org > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org] > Sent: Friday, August 29, 2014 17:41 > To: dev-VfR2kkLFssw@public.gmane.org > Cc: Wodkowski, PawelX > Subject: Re: [dpdk-dev] [PATCH] ixgbe_rx_scan_hw_ring: Fix initializing id and > hash fields in flow director mode. > > Hi, > > 2014-08-20 08:46, Pawel Wodkowski: > > When Flow Director was used together with bulk alloc, id and hash was > swapped > > when packet matches flow director filter due to improper fdir field > initialization. > > > > Signed-off-by: Pawel Wodkowski <pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > > I'd really like someone else review this touchy patch for integration > in 1.7.1. > > Thanks > -- > Thomas Reviewed-by: Helin Zhang <helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Reviewed-by: Jingjing Wu <jingjing.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <F6F2A6264E145F47A18AB6DF8E87425D12B233AE-kPTMFJFq+rFP9JyJpTNKArfspsVTdybXVpNB7YpNyf8@public.gmane.org>]
* Re: [PATCH] ixgbe_rx_scan_hw_ring: Fix initializing id and hash fields in flow director mode. [not found] ` <F6F2A6264E145F47A18AB6DF8E87425D12B233AE-kPTMFJFq+rFP9JyJpTNKArfspsVTdybXVpNB7YpNyf8@public.gmane.org> @ 2014-09-25 16:07 ` Bruce Richardson 2014-09-25 20:57 ` Thomas Monjalon 0 siblings, 1 reply; 5+ messages in thread From: Bruce Richardson @ 2014-09-25 16:07 UTC (permalink / raw) To: Wodkowski, PawelX; +Cc: dev-VfR2kkLFssw@public.gmane.org On Mon, Sep 08, 2014 at 07:18:10AM +0000, Wodkowski, PawelX wrote: > > -----Original Message----- > > From: Thomas Monjalon [mailto:thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org] > > Sent: Friday, August 29, 2014 17:41 > > To: dev-VfR2kkLFssw@public.gmane.org > > Cc: Wodkowski, PawelX > > Subject: Re: [dpdk-dev] [PATCH] ixgbe_rx_scan_hw_ring: Fix initializing id and > > hash fields in flow director mode. > > > > Hi, > > > > 2014-08-20 08:46, Pawel Wodkowski: > > > When Flow Director was used together with bulk alloc, id and hash was > > swapped > > > when packet matches flow director filter due to improper fdir field > > initialization. > > > > > > Signed-off-by: Pawel Wodkowski <pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > > > > I'd really like someone else review this touchy patch for integration > > in 1.7.1. > > > > Thanks > > -- > > Thomas > > Reviewed-by: Helin Zhang <helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Reviewed-by: Jingjing Wu <jingjing.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Acked-by: Bruce Richardson <bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ixgbe_rx_scan_hw_ring: Fix initializing id and hash fields in flow director mode. 2014-09-25 16:07 ` Bruce Richardson @ 2014-09-25 20:57 ` Thomas Monjalon 0 siblings, 0 replies; 5+ messages in thread From: Thomas Monjalon @ 2014-09-25 20:57 UTC (permalink / raw) To: Wodkowski, PawelX; +Cc: dev-VfR2kkLFssw > > > > When Flow Director was used together with bulk alloc, id and hash was > > > > swapped when packet matches flow director filter due to improper fdir > > > > field initialization. > > > > > > > > Signed-off-by: Pawel Wodkowski <pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > > > > Reviewed-by: Helin Zhang <helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > > Reviewed-by: Jingjing Wu <jingjing.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > > Acked-by: Bruce Richardson <bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Applied with some changes to fit with recent mbug refactoring. Thanks -- Thomas ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-25 20:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-20 7:46 [PATCH] ixgbe_rx_scan_hw_ring: Fix initializing id and hash fields in flow director mode Pawel Wodkowski
[not found] ` <1408520788-20380-1-git-send-email-pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-08-29 15:41 ` Thomas Monjalon
2014-09-08 7:18 ` Wodkowski, PawelX
[not found] ` <F6F2A6264E145F47A18AB6DF8E87425D12B233AE-kPTMFJFq+rFP9JyJpTNKArfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-09-25 16:07 ` Bruce Richardson
2014-09-25 20:57 ` 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).