From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-9.cisco.com (rcdn-iport-9.cisco.com [173.37.86.80]) by dpdk.org (Postfix) with ESMTP id 4E6B12B92 for ; Mon, 23 Oct 2017 22:01:34 +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=1508788894; x=1509998494; h=from:to:cc:subject:date:message-id; bh=03KW6O6nH3ensnVchphGd90WIfFsRWxRUdx56qOfGTs=; b=iHIoLHLQc7rt3z9d1JYGrhAtbkLTej8TLWRQiH6OnswPg6Wqd+qXxTYe iBwl/Q9zp9FJ7JCgCgKEW7sMCmvT+jfsqynjS5p4ZTHnaB81kV/UJ+4KW MYf/yT7487MYeAMinDZyA0Myt1XgZsCeE/du08kIg8KVWispy0Evw2GNH o=; X-IronPort-AV: E=Sophos;i="5.43,424,1503360000"; d="scan'208";a="305162990" Received: from alln-core-3.cisco.com ([173.36.13.136]) by rcdn-iport-9.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 23 Oct 2017 20:01:33 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id v9NK1X4N016264; Mon, 23 Oct 2017 20:01:33 GMT Received: by cisco.com (Postfix, from userid 392789) id 24B7520F2001; Mon, 23 Oct 2017 13:01:33 -0700 (PDT) From: John Daley To: johnda888@gmail.com Cc: John Daley , stable@dpdk.org Date: Mon, 23 Oct 2017 13:01:31 -0700 Message-Id: <20171023200131.23865-1-johndale@cisco.com> X-Mailer: git-send-email 2.12.0 Subject: [dpdk-stable] [PATCH] net/enic: fix packet loss after MTU change X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Oct 2017 20:01:34 -0000 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], -- 2.12.0