diff options
author | John Lo <loj@cisco.com> | 2016-03-29 16:14:35 -0400 |
---|---|---|
committer | John Lo <loj@cisco.com> | 2016-03-29 16:14:35 -0400 |
commit | 23650e6cada50246ba211cec168ddd6738a26f67 (patch) | |
tree | 0d3e05b84f1ded554d1bf70a60534092aaf63725 /dpdk/dpdk-2.2.0_patches/0018-enic-remove-packet-error-conditional.patch | |
parent | 13f3c450ccd03ed00a6a114061faedd1fc553ddd (diff) |
Update ENIC driver patches for DPDK 2.2.0
This includes all patches in ENIC driver which are up-streamed to DPDK
to improve RX performance, fix buffer/error handling and interoperation
with link bonding PMD library.
Change-Id: Id4c71a350d5234834951f9261c69db5476ba396b
Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'dpdk/dpdk-2.2.0_patches/0018-enic-remove-packet-error-conditional.patch')
-rw-r--r-- | dpdk/dpdk-2.2.0_patches/0018-enic-remove-packet-error-conditional.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/dpdk/dpdk-2.2.0_patches/0018-enic-remove-packet-error-conditional.patch b/dpdk/dpdk-2.2.0_patches/0018-enic-remove-packet-error-conditional.patch new file mode 100644 index 00000000000..d3084c84c9e --- /dev/null +++ b/dpdk/dpdk-2.2.0_patches/0018-enic-remove-packet-error-conditional.patch @@ -0,0 +1,53 @@ +commit 50765c820e98a4434efbc0a58df4b9d78afb7a5f +Author: John Daley <johndale@cisco.com> +Date: Thu Mar 17 15:57:07 2016 -0700 + + enic: remove packet error conditional + + small cleanup to remove conditional. + + Signed-off-by: John Daley <johndale@cisco.com> + +diff --git a/drivers/net/enic/enic_rx.c b/drivers/net/enic/enic_rx.c +index 817a891..232987a 100644 +--- a/drivers/net/enic/enic_rx.c ++++ b/drivers/net/enic/enic_rx.c +@@ -266,7 +266,6 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, + nb_hold = rq->rx_nb_hold; /* mbufs held by software */ + + while (nb_rx < nb_pkts) { +- uint16_t rx_pkt_len; + volatile struct rq_enet_desc *rqd_ptr; + dma_addr_t dma_addr; + struct cq_desc cqd; +@@ -295,10 +294,6 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, + + /* A packet error means descriptor and data are untrusted */ + packet_error = enic_cq_rx_to_pkt_err_flags(&cqd, &ol_err_flags); +- if (!packet_error) +- rx_pkt_len = enic_cq_rx_desc_n_bytes(&cqd); +- else +- rx_pkt_len = 0; + + /* Get the mbuf to return and replace with one just allocated */ + rxmb = rq->mbuf_ring[rx_id]; +@@ -327,16 +322,17 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, + rxmb->data_off = RTE_PKTMBUF_HEADROOM; + rxmb->nb_segs = 1; + rxmb->next = NULL; +- rxmb->pkt_len = rx_pkt_len; +- rxmb->data_len = rx_pkt_len; + rxmb->port = enic->port_id; + if (!packet_error) { ++ rxmb->pkt_len = enic_cq_rx_desc_n_bytes(&cqd); + rxmb->packet_type = enic_cq_rx_flags_to_pkt_type(&cqd); + enic_cq_rx_to_pkt_flags(&cqd, rxmb); + } else { ++ rxmb->pkt_len = 0; + rxmb->packet_type = 0; + rxmb->ol_flags = 0; + } ++ rxmb->data_len = rxmb->pkt_len; + + /* prefetch mbuf data for caller */ + rte_packet_prefetch(RTE_PTR_ADD(rxmb->buf_addr, |