From: Hyong Youb Kim Date: Wed, 10 Jan 2018 09:17:08 +0000 (-0800) Subject: net/enic: refill only the address of the RQ descriptor X-Git-Tag: spdx-start~348 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b5df2f7ac53cee378ddbcf8b1a423361a8743b77;p=dpdk.git net/enic: refill only the address of the RQ descriptor Once the RQ descriptors are initialized (enic_alloc_rx_queue_mbufs), their length_type does not change during normal RX operations. rx_pkt_burst only needs to reset their address field for newly allocated mbufs. Signed-off-by: Hyong Youb Kim Reviewed-by: John Daley --- diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c index a28834ea72..f27f3d4439 100644 --- a/drivers/net/enic/enic_rxtx.c +++ b/drivers/net/enic/enic_rxtx.c @@ -327,7 +327,6 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, while (nb_rx < nb_pkts) { volatile struct rq_enet_desc *rqd_ptr; - dma_addr_t dma_addr; struct cq_desc cqd; uint8_t packet_error; uint16_t ciflags; @@ -376,12 +375,13 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, /* Push descriptor for newly allocated mbuf */ nmb->data_off = RTE_PKTMBUF_HEADROOM; - dma_addr = (dma_addr_t)(nmb->buf_iova + - RTE_PKTMBUF_HEADROOM); - rq_enet_desc_enc(rqd_ptr, dma_addr, - (rq->is_sop ? RQ_ENET_TYPE_ONLY_SOP - : RQ_ENET_TYPE_NOT_SOP), - nmb->buf_len - RTE_PKTMBUF_HEADROOM); + /* + * Only the address needs to be refilled. length_type of the + * descriptor it set during initialization + * (enic_alloc_rx_queue_mbufs) and does not change. + */ + rqd_ptr->address = rte_cpu_to_le_64(nmb->buf_iova + + RTE_PKTMBUF_HEADROOM); /* Fill in the rest of the mbuf */ seg_length = enic_cq_rx_desc_n_bytes(&cqd);