DPDK patches and discussions
 help / color / mirror / Atom feed
From: John Daley <johndale@cisco.com>
To: ferruh.yigit@intel.com
Cc: dev@dpdk.org, Hyong Youb Kim <hyonkim@cisco.com>
Subject: [dpdk-dev] [PATCH] net/enic: refill only the address of the RQ descriptor
Date: Wed, 10 Jan 2018 01:17:08 -0800	[thread overview]
Message-ID: <20180110091712.32198-8-johndale@cisco.com> (raw)
In-Reply-To: <20180110091712.32198-1-johndale@cisco.com>

From: Hyong Youb Kim <hyonkim@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@cisco.com>
Reviewed-by: John Daley <johndale@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

  parent reply	other threads:[~2018-01-10  9:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10  9:17 [dpdk-dev] [PATCH] maintainers: update for enic John Daley
2018-01-10  9:17 ` [dpdk-dev] [PATCH] doc: minor updates to the enic guide John Daley
2018-01-10  9:17 ` [dpdk-dev] [PATCH] net/enic: use the new ethdev offloads API John Daley
2018-01-10  9:17 ` [dpdk-dev] [PATCH] net/enic: fix L4 Rx ptype comparison John Daley
2018-01-10  9:17 ` [dpdk-dev] [PATCH] net/enic: do not set checksum unkonwn offload flag John Daley
2018-01-10  9:17 ` [dpdk-dev] [PATCH] net/enic: remove remaining header-split code John Daley
2018-01-10  9:17 ` [dpdk-dev] [PATCH] net/enic: remove a couple unnecessary statements John Daley
2018-01-10  9:17 ` John Daley [this message]
2018-01-10  9:17 ` [dpdk-dev] [PATCH] net/enic: use dynamic log types John Daley
2018-01-10  9:17 ` [dpdk-dev] [PATCH] net/enic: use BSD-3-Clause John Daley
2018-01-10  9:17 ` [dpdk-dev] [PATCH] net/enic: use TSO flags John Daley
2018-01-10  9:17 ` [dpdk-dev] [PATCH] net/enic: remove a conditional from the Tx path John Daley
2018-01-11 13:32 ` [dpdk-dev] [PATCH] maintainers: update for enic Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180110091712.32198-8-johndale@cisco.com \
    --to=johndale@cisco.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hyonkim@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).