From patchwork Fri Sep 21 11:05:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147238 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp672432ljw; Fri, 21 Sep 2018 04:09:26 -0700 (PDT) X-Google-Smtp-Source: ACcGV63YRSUZ2zSy2hNlHCpGNIyhzldEclYpEj2oS2FN4kikNUWW9jvw6DSHOb0UzYuOfbGNXFk+ X-Received: by 2002:a1c:5e08:: with SMTP id s8-v6mr6852073wmb.88.1537528166874; Fri, 21 Sep 2018 04:09:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528166; cv=none; d=google.com; s=arc-20160816; b=pPH3KR0LIu/szV7wlcLdSHGzo3Q9oYeW9wwcHfO5NDOxvlXPJACH21X3BKmfQHsiUE Kgyg9EmJCA1mrWcy5Ya2Xq/ME0STotPhFX/bGQVYPldio0J80l8YDFQ4hZ3EQ2LFgjt6 Hgf1Cv3h4X9XLkHxnb0nm67URiVVY6RbfCLYhLzL3cZq8egwCuNWMIJJfRbdANebWPut mYs5xtpu8XaSLJ+sfcw5aE95luQWuBgcLiUI4cDQcWOxyPyLzJkMv9L08H5X1QRryjpV +02BFR7CAx+YOiX8YsoOM6qfluq5F66Yu/avqqNuJ11YZR64qyjfUVt3IrXGzjk8Bf2L gVbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=gmE/O4lGPeeW+z239619XonovgPdUD2qx3aYChzt9YQ=; b=YRx99KGn6mgUyzIDnKS0ZDWMiClgh79wmVWA/9tRMoy0x92cGcUVoa2fyrXcObEdT7 e6d+PmdYmnM18YN7Or6o0LOmRIzeMRQJhjnb/PEV4GOTiJLRydUaV0li2msi4A0MD8xd KLeEnRP8hvc12XT0chU/d11mugT+0+oyJYcuLlurSLXr4e0sqJdX3IY9fVvEzwHCBq/s tiIkkU8P13BHhHnimS62V35UKePgecOOYUJwj7bzrjxfpvd8hJyc0sV87D5eFj29oJXT R0PSdU3c5vBA7MK0E7RCUhk/MAyk8MasALNwAMiyNofOlIAJOm4gHtHpZAINccJqgk5C tLDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id a11-v6si5384018wmc.186.2018.09.21.04.09.26; Fri, 21 Sep 2018 04:09:26 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A77045F12; Fri, 21 Sep 2018 13:08:29 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 77C515592 for ; Fri, 21 Sep 2018 13:08:13 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 5B5221A02C0; Fri, 21 Sep 2018 13:08:13 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 185621A02BD; Fri, 21 Sep 2018 13:08:11 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 4FC6B40302; Fri, 21 Sep 2018 19:08:07 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Cc: Sunil Kumar Kori Date: Fri, 21 Sep 2018 16:35:58 +0530 Message-Id: <1537527962-25757-10-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 09/13] net/dpaa: rearranging of atomic queue support code 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: Sunil Kumar Kori This is to align the code with dpaa2 to ease out maintaince of both driver code bases. Signed-off-by: Sunil Kumar Kori --- drivers/net/dpaa/dpaa_rxtx.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index 3a3a048..6698c97 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -870,6 +870,19 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs) DPAA_TX_BURST_SIZE : nb_bufs; for (loop = 0; loop < frames_to_send; loop++) { mbuf = *(bufs++); + seqn = mbuf->seqn; + if (seqn != DPAA_INVALID_MBUF_SEQN) { + index = seqn - 1; + if (DPAA_PER_LCORE_DQRR_HELD & (1 << index)) { + flags[loop] = + ((index & QM_EQCR_DCA_IDXMASK) << 8); + flags[loop] |= QMAN_ENQUEUE_FLAG_DCA; + DPAA_PER_LCORE_DQRR_SIZE--; + DPAA_PER_LCORE_DQRR_HELD &= + ~(1 << index); + } + } + if (likely(RTE_MBUF_DIRECT(mbuf))) { mp = mbuf->pool; bp_info = DPAA_MEMPOOL_TO_POOL_INFO(mp); @@ -916,18 +929,6 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs) goto send_pkts; } } - seqn = mbuf->seqn; - if (seqn != DPAA_INVALID_MBUF_SEQN) { - index = seqn - 1; - if (DPAA_PER_LCORE_DQRR_HELD & (1 << index)) { - flags[loop] = - ((index & QM_EQCR_DCA_IDXMASK) << 8); - flags[loop] |= QMAN_ENQUEUE_FLAG_DCA; - DPAA_PER_LCORE_DQRR_SIZE--; - DPAA_PER_LCORE_DQRR_HELD &= - ~(1 << index); - } - } } send_pkts: