From patchwork Mon Oct 23 20:23:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John Daley (johndale)" X-Patchwork-Id: 30737 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 258D71B6BC; Mon, 23 Oct 2017 22:25:02 +0200 (CEST) Received: from rcdn-iport-2.cisco.com (rcdn-iport-2.cisco.com [173.37.86.73]) by dpdk.org (Postfix) with ESMTP id 679DB2B92; Mon, 23 Oct 2017 22:25:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1216; q=dns/txt; s=iport; t=1508790300; x=1509999900; h=from:to:cc:subject:date:message-id; bh=03KW6O6nH3ensnVchphGd90WIfFsRWxRUdx56qOfGTs=; b=P/G/4Dh8Qh4xOFhxOq9L9P2vBcgqH9sRuD3ac2Qzf6reDhbuiG3LbHXg E52Qh3V0FjW7rOIAUAMCI+VvHwjRZb7jTg43LlVkRqW9of+eEQD6kaWeH ASwlL+maYMFay2ULnk9ZtVlxULvcmE6mSdPCpZVoFMILOr83LsYaGLGv4 0=; X-IronPort-AV: E=Sophos;i="5.43,424,1503360000"; d="scan'208";a="314348813" Received: from rcdn-core-11.cisco.com ([173.37.93.147]) by rcdn-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2017 20:24:59 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-core-11.cisco.com (8.14.5/8.14.5) with ESMTP id v9NKOxfg008047; Mon, 23 Oct 2017 20:24:59 GMT Received: by cisco.com (Postfix, from userid 392789) id 287D13FAAFB0; Mon, 23 Oct 2017 13:24:59 -0700 (PDT) From: John Daley To: ferruh.yigit@intel.com Cc: dev@dpdk.org, John Daley , stable@dpdk.org Date: Mon, 23 Oct 2017 13:23:00 -0700 Message-Id: <20171023202300.4944-1-johndale@cisco.com> X-Mailer: git-send-email 2.12.0 Subject: [dpdk-dev] [PATCH] net/enic: fix packet loss after MTU change 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" If multiple Rx queues and Rx Scatter are used and the MTU is modified so that the number of mbufs per packet changes, packet loss is possible. The enic completion queue index was miscalculated leaving the upper half of the queues uninitialized after an MTU change, possibly leading to completions on those queues not getting processed. Fixes: c3e09182bcd6 ("net/enic: support scatter Rx in MTU update") Cc: stable@dpdk.org Signed-off-by: John Daley --- drivers/net/enic/enic_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 521167063..793260504 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -1119,11 +1119,12 @@ static int enic_reinit_rq(struct enic *enic, unsigned int rq_idx) { struct vnic_rq *sop_rq, *data_rq; - unsigned int cq_idx = enic_cq_rq(enic, rq_idx); + unsigned int cq_idx; int rc = 0; sop_rq = &enic->rq[enic_rte_rq_idx_to_sop_idx(rq_idx)]; data_rq = &enic->rq[enic_rte_rq_idx_to_data_idx(rq_idx)]; + cq_idx = rq_idx; vnic_cq_clean(&enic->cq[cq_idx]); vnic_cq_init(&enic->cq[cq_idx],