[dpdk-dev] [PATCH] net/enic: refill only the address of the RQ descriptor
John Daley
johndale at cisco.com
Wed Jan 10 10:17:08 CET 2018
From: Hyong Youb Kim <hyonkim at cisco.com>
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 <hyonkim at cisco.com>
Reviewed-by: John Daley <johndale at cisco.com>
---
drivers/net/enic/enic_rxtx.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
index a28834ea7..f27f3d443 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);
--
2.12.0
More information about the dev
mailing list