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