From patchwork Mon Feb 22 01:06:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John Daley (johndale)" X-Patchwork-Id: 10719 X-Patchwork-Delegate: bruce.richardson@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id C60142BA2; Mon, 22 Feb 2016 14:10:10 +0100 (CET) Received: from rcdn-iport-5.cisco.com (rcdn-iport-5.cisco.com [173.37.86.76]) by dpdk.org (Postfix) with ESMTP id 7F9715690 for ; Mon, 22 Feb 2016 02:06:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=971; q=dns/txt; s=iport; t=1456103195; x=1457312795; h=from:to:cc:subject:date:message-id; bh=i7cJucDtYY0wb7ryH/Ko3Di/Mqn+Ld9Ksb12HwwW4Zk=; b=AWhh6mYdkddJiA3S7y+C8too7TZl7dEi/YkI4ju/LYz/5/TYBE0VCkCL XxqK0fymXxjzLbaR81eJBwvbeHEiy2oENhZNnfMdqgTAljd3KHdmgAR++ 2uwE9F2jlu0LFfRD+TqrYEXWriMFyB0qMG0CL9E0RsWu2fqZMVj6Na8hl 8=; X-IronPort-AV: E=Sophos;i="5.22,483,1449532800"; d="scan'208";a="75550520" Received: from rcdn-core-9.cisco.com ([173.37.93.145]) by rcdn-iport-5.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2016 01:06:34 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-core-9.cisco.com (8.14.5/8.14.5) with ESMTP id u1M16YEd028843; Mon, 22 Feb 2016 01:06:34 GMT Received: by cisco.com (Postfix, from userid 392789) id 36A9F3FAAD93; Sun, 21 Feb 2016 17:06:34 -0800 (PST) From: johndale To: dev@dpdk.org Date: Sun, 21 Feb 2016 17:06:30 -0800 Message-Id: <1456103190-1824-1-git-send-email-johndale@cisco.com> X-Mailer: git-send-email 2.7.0 Cc: johndale Subject: [dpdk-dev] [PATCH] enic: fix last packet being not sent bug X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The last packet of the tx burst function array was not being emitted until the subsequent call. The nic descriptor index was being set to the current tx descriptr instead of one past the the descriptor as required by nic. Signed-off-by: johndale --- drivers/net/enic/base/enic_vnic_wq.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/enic/base/enic_vnic_wq.h b/drivers/net/enic/base/enic_vnic_wq.h index e3ea574..b019109 100644 --- a/drivers/net/enic/base/enic_vnic_wq.h +++ b/drivers/net/enic/base/enic_vnic_wq.h @@ -69,11 +69,11 @@ static inline void enic_vnic_post_wq(struct vnic_wq *wq, buf->wr_id = wrid; buf = buf->next; - if (cq_entry) - enic_vnic_post_wq_index(wq); + wq->ring.desc_avail -= desc_skip_cnt; wq->to_use = buf; - wq->ring.desc_avail -= desc_skip_cnt; + if (cq_entry) + enic_vnic_post_wq_index(wq); } #endif /* _ENIC_VNIC_WQ_H_ */