blob: 895d571549016d6bebcb77cb5ad93d1f6bcb9108 [file] [log] [blame]
Todd Foggoaa292c8c2016-04-06 09:57:01 -04001From 3ffb9431d6ba34dbcffab5cff4c060d5dca167e1 Mon Sep 17 00:00:00 2001
2From: John Daley <johndale@cisco.com>
3Date: Thu, 17 Mar 2016 15:57:05 -0700
4Subject: [PATCH 16/22] enic: fix mbuf flags on Rx
John Lo23650e62016-03-29 16:14:35 -04005
John Lo23650e62016-03-29 16:14:35 -04006 In the receive path, the function to set mbuf ol_flags used the
7 mbuf packet_type before it was set.
Todd Foggoaa292c8c2016-04-06 09:57:01 -04008
John Lo23650e62016-03-29 16:14:35 -04009 Fixes: 947d860c821f ("enic: improve Rx performance")
Todd Foggoaa292c8c2016-04-06 09:57:01 -040010
John Lo23650e62016-03-29 16:14:35 -040011 Signed-off-by: John Daley <johndale@cisco.com>
Todd Foggoaa292c8c2016-04-06 09:57:01 -040012---
13 drivers/net/enic/enic_rx.c | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
John Lo23650e62016-03-29 16:14:35 -040015
16diff --git a/drivers/net/enic/enic_rx.c b/drivers/net/enic/enic_rx.c
17index 945a60f..59ebaa4 100644
18--- a/drivers/net/enic/enic_rx.c
19+++ b/drivers/net/enic/enic_rx.c
20@@ -210,7 +210,7 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf)
21 ciflags = enic_cq_rx_desc_ciflags(cqrd);
22 bwflags = enic_cq_rx_desc_bwflags(cqrd);
23
24- ASSERT(mbuf->ol_flags == 0);
25+ mbuf->ol_flags = 0;
26
27 /* flags are meaningless if !EOP */
28 if (unlikely(!enic_cq_rx_desc_eop(ciflags)))
29@@ -340,10 +340,10 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
30 rxmb->pkt_len = rx_pkt_len;
31 rxmb->data_len = rx_pkt_len;
32 rxmb->port = enic->port_id;
33+ rxmb->packet_type = enic_cq_rx_flags_to_pkt_type(&cqd);
34 rxmb->ol_flags = ol_err_flags;
35 if (!ol_err_flags)
36 enic_cq_rx_to_pkt_flags(&cqd, rxmb);
37- rxmb->packet_type = enic_cq_rx_flags_to_pkt_type(&cqd);
38
39 /* prefetch mbuf data for caller */
40 rte_packet_prefetch(RTE_PTR_ADD(rxmb->buf_addr,
Todd Foggoaa292c8c2016-04-06 09:57:01 -040041--
421.9.1
43