From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 629E01B1BF for ; Wed, 24 Jan 2018 16:42:57 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 148FC226DA; Wed, 24 Jan 2018 10:42:57 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:42:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=t82j6C67I1oxGN6pp HhHmTQBL9+heOS1/JdjcLirNwo=; b=N6BtzBCVgxGkZ8eIfV4cMeF7vAMNl5yOz XeWa034UlMd+G4Z+VzEUjljYBS+f7cyzJ7s6BeFUdZf1PDEaL88RQBSvL3+RTioj yybvH/CXQp8/WIs5azhXTLd/R5OBW2aR3uNJqSGgqoj9xdBVKtU7QysUyg4tgE2R a+FrJ8CPdeLKdLLZg6mglOfht4/JFqx6QFSiOAZ3rmHLGSgpcsihhG0HqmMiR+v+ 7cDJSuz86fPUB6DGlDl/6Yl7ws5b/HOQGgluSfDajAinAHUAnZ4uXVwUTlf5HGK2 Sh7pjptW6n33VDuVY6/Tg/jP2eFLXuMoB1wg+g3e9NOlunzllO9kg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=t82j6C67I1oxGN6ppHhHmTQBL9+heOS1/JdjcLirNwo=; b=Zl2YsQBQ n2IKLMbrgkv3QQoa4YrFLwU6brSjLiJnPoXukop/AT5FxhYaLFionPPg6+/lWzsr ItTMdCsxBGFVTloKZJY/lLC3OPKbJvvi3nZ+c1HjQ6r+pyYnlM5JKsHh7A7ltsci 8DBQr2KPmfp+zS7GkKyxmQ4sBwFLjOhPWTEBYD6qyOrgZMY6mdyO2JWtHNS/EpOQ SiyVZWU2lAaK8783DhiVuTGh1CEZn3x/0R/M+SMh57VzUE9wv58Cb7U7kNelEp0W cbXSKJlqHg5zooNNIwhqsLI9drmPKoR7w4DNGQEmyI0Bk4kkzO7ZDPKOGIXoLVWV 7+shFRapwHHAGQ== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id ECEEA7E3D4; Wed, 24 Jan 2018 10:42:54 -0500 (EST) From: Yuanhan Liu To: Beilei Xing Cc: Jingjing Wu , dpdk stable Date: Wed, 24 Jan 2018 23:33:45 +0800 Message-Id: <1516808026-25523-157-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/i40e: fix flow director Rx resource defect' has been queued to LTS release 17.11.1 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: Wed, 24 Jan 2018 15:42:57 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From d9a3fa774410b9933b351c9c02f1144c0f6ae2cb Mon Sep 17 00:00:00 2001 From: Beilei Xing Date: Fri, 19 Jan 2018 13:23:44 +0800 Subject: [PATCH] net/i40e: fix flow director Rx resource defect [ upstream commit f4c8ad4f97e24af7f6200723ca8d93702f15b1e6 ] FDIR Rx ring isn't initialized and Rx queue HW tail isn't updated when there's error detected during programming FDIR flow. There'll be some potential risk. This patch updates FDIR Rx resource. Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director") Fixes: 05999aab4ca6 ("i40e: add or delete flow director") Signed-off-by: Beilei Xing Acked-by: Jingjing Wu --- drivers/net/i40e/i40e_fdir.c | 8 ++++++-- drivers/net/i40e/i40e_rxtx.c | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index 3d7170d..525611a 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -168,7 +168,6 @@ i40e_fdir_rx_queue_init(struct i40e_rx_queue *rxq) rte_wmb(); /* Init the RX tail regieter. */ - I40E_PCI_REG_WRITE(rxq->qrx_tail, 0); I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1); return err; @@ -1363,13 +1362,18 @@ i40e_check_fdir_programming_status(struct i40e_rx_queue *rxq) PMD_DRV_LOG(ERR, "invalid programming status" " reported, error = %u.", error); } else - PMD_DRV_LOG(ERR, "unknown programming status" + PMD_DRV_LOG(INFO, "unknown programming status" " reported, len = %d, id = %u.", len, id); rxdp->wb.qword1.status_error_len = 0; rxq->rx_tail++; if (unlikely(rxq->rx_tail == rxq->nb_rx_desc)) rxq->rx_tail = 0; + if (rxq->rx_tail == 0) + I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1); + else + I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->rx_tail - 1); } + return ret; } diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index ad06b71..078b405 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -2749,6 +2749,7 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf) rxq->vsi = pf->fdir.fdir_vsi; rxq->rx_ring_phys_addr = rz->iova; + memset(rz->addr, 0, I40E_FDIR_NUM_RX_DESC * sizeof(union i40e_rx_desc)); rxq->rx_ring = (union i40e_rx_desc *)rz->addr; /* -- 2.7.4