Todd Foggoa | a292c8c | 2016-04-06 09:57:01 -0400 | [diff] [blame^] | 1 | From 3ffb9431d6ba34dbcffab5cff4c060d5dca167e1 Mon Sep 17 00:00:00 2001 |
| 2 | From: John Daley <johndale@cisco.com> |
| 3 | Date: Thu, 17 Mar 2016 15:57:05 -0700 |
| 4 | Subject: [PATCH 16/22] enic: fix mbuf flags on Rx |
John Lo | 23650e6 | 2016-03-29 16:14:35 -0400 | [diff] [blame] | 5 | |
John Lo | 23650e6 | 2016-03-29 16:14:35 -0400 | [diff] [blame] | 6 | In the receive path, the function to set mbuf ol_flags used the |
| 7 | mbuf packet_type before it was set. |
Todd Foggoa | a292c8c | 2016-04-06 09:57:01 -0400 | [diff] [blame^] | 8 | |
John Lo | 23650e6 | 2016-03-29 16:14:35 -0400 | [diff] [blame] | 9 | Fixes: 947d860c821f ("enic: improve Rx performance") |
Todd Foggoa | a292c8c | 2016-04-06 09:57:01 -0400 | [diff] [blame^] | 10 | |
John Lo | 23650e6 | 2016-03-29 16:14:35 -0400 | [diff] [blame] | 11 | Signed-off-by: John Daley <johndale@cisco.com> |
Todd Foggoa | a292c8c | 2016-04-06 09:57:01 -0400 | [diff] [blame^] | 12 | --- |
| 13 | drivers/net/enic/enic_rx.c | 4 ++-- |
| 14 | 1 file changed, 2 insertions(+), 2 deletions(-) |
John Lo | 23650e6 | 2016-03-29 16:14:35 -0400 | [diff] [blame] | 15 | |
| 16 | diff --git a/drivers/net/enic/enic_rx.c b/drivers/net/enic/enic_rx.c |
| 17 | index 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 Foggoa | a292c8c | 2016-04-06 09:57:01 -0400 | [diff] [blame^] | 41 | -- |
| 42 | 1.9.1 |
| 43 | |