From patchwork Wed Jan 10 09:17:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John Daley (johndale)" X-Patchwork-Id: 33396 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 848551B25E; Wed, 10 Jan 2018 10:18:09 +0100 (CET) Received: from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78]) by dpdk.org (Postfix) with ESMTP id 266E71B235 for ; Wed, 10 Jan 2018 10:18:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1684; q=dns/txt; s=iport; t=1515575884; x=1516785484; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=HcfZyP89f6BJ8deYjXakElfObRvjrhS6vvkxyNORLH8=; b=QSasC55nBtfq2T+pkH7nCJRq+JYuJjyKWmBbiq59DJUTZd9LXizSZHM0 iPZfgIsHPFcVO8bZuTu+aBVQkLSpzbUFWp0KI1YASs4AUdYmPiW9fl2ww 9Iuv/4flXIEcbjse9Pmo9HnpXMbEKZnXdvO+ZDpjl0kKtQY1ONYwrLSHN M=; X-IronPort-AV: E=Sophos;i="5.46,339,1511827200"; d="scan'208";a="339609019" Received: from alln-core-9.cisco.com ([173.36.13.129]) by rcdn-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jan 2018 09:18:03 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-9.cisco.com (8.14.5/8.14.5) with ESMTP id w0A9I3LH019312; Wed, 10 Jan 2018 09:18:03 GMT Received: by cisco.com (Postfix, from userid 392789) id 20CA620F2001; Wed, 10 Jan 2018 01:18:03 -0800 (PST) From: John Daley To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Hyong Youb Kim Date: Wed, 10 Jan 2018 01:17:08 -0800 Message-Id: <20180110091712.32198-8-johndale@cisco.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180110091712.32198-1-johndale@cisco.com> References: <20180110091712.32198-1-johndale@cisco.com> Subject: [dpdk-dev] [PATCH] net/enic: refill only the address of the RQ descriptor X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Hyong Youb Kim 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 --- 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);