From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1E04FA04F3 for ; Thu, 19 Dec 2019 15:38:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 143BB1BF7B; Thu, 19 Dec 2019 15:38:28 +0100 (CET) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 431231BF7B for ; Thu, 19 Dec 2019 15:38:27 +0100 (CET) Received: by mail-wm1-f66.google.com with SMTP id u2so5856152wmc.3 for ; Thu, 19 Dec 2019 06:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JrC/gL3NXbtD7OGPM9MWuAiUh7HKFIJsum49i/upf34=; b=iI0/9Uk8mFHB/RAPXHHr52OmNaBQXxxxXFo2CkYoQyVk9mToGSRY//UxpIvVyNS9nE +Aq4Vn/bM1dO2I0jZNJVNTBKMtrgSyMAbxr6SxXywdwm5G0t40X8nHPf62VhiI+gv6TT T9KCuc7nRh9vVe04IVRZrGd7PDCWzSms3JSHExEL64iyy6+Zd2ZQlZsoTmjIFGDdLt1r jDerfc2gmblZG5HloUqiDraHADEQmmCaMVt5rFzZG66gGwDwEk8FmnWw2tgfIwqair+w dgoKwAmZyEREld4mrWUaMv0VKyMO6IpWEWLfFSq51i5jAFGITb7VmUogeLsTyApvK6dD KLfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JrC/gL3NXbtD7OGPM9MWuAiUh7HKFIJsum49i/upf34=; b=chjsMljDQ5ZdTBELOc84Rk8ewenB1b0X83RMvDBq2MYR5u8Bpp430hYey3GdT/y6k+ POmaKI6zqZtdIRLYX8a6jDsfdXLDiZ8TBBUgyoQXn70fBWq3c/CuqISvfRsIiCLfIS+2 R46f8xXNG3CobGa9Ui5gigOUEgGdG3CZjHJ9SxOAfmzNZ7BEKcCPNruld0dcriN1nrTG H+RHAHlvkIE+SiKy6Mr8vgIY1yQdadLfsOv7AyysRssH3PC1rIVc1OJhuuuAB0nHr+eE A5A6f2vPaUhdIrc2Q4/8ETIuyRTfJjEL80TnEjNlp4boZwfCRRrW42VqE55OqG/NWP0h cgNA== X-Gm-Message-State: APjAAAXdJJ7BtydeDPJdXzF8lYPkGuk5IzAuE77aqYlg6TtRWG+9hpgh U8akRNknm/d02eDq9EDI2ADKfvTHC/0= X-Google-Smtp-Source: APXvYqxqh9xyhKFBYmWm/xodpFlD6yWEixGv+oPQ7CQgdApDJsGdAdRL0oO2AjY7k1YwPV31sNRsmg== X-Received: by 2002:a7b:cf2d:: with SMTP id m13mr10486240wmg.163.1576766307002; Thu, 19 Dec 2019 06:38:27 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id y139sm6827487wmd.24.2019.12.19.06.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:38:26 -0800 (PST) From: luca.boccassi@gmail.com To: Alvin Zhang Cc: Xiaolong Ye , dpdk stable Date: Thu, 19 Dec 2019 14:33:50 +0000 Message-Id: <20191219143447.21506-83-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/i40e: fix exception with multi-driver' has been queued to LTS release 17.11.10 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 17.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/21/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 97d3af2037014e15165aaf5fafe5c24ab61d7805 Mon Sep 17 00:00:00 2001 From: Alvin Zhang Date: Tue, 8 Oct 2019 18:52:31 +0800 Subject: [PATCH] net/i40e: fix exception with multi-driver [ upstream commit 39de80b267e05d6f3322044e5851306acc84f892 ] If support-multi-driver is enabled, the global registers should not be configured. But with the current code base, if creating a flow with rte_flow API, the global register GLQF_FD_MSK may be changed. Fixes: cfdfca493cae ("net/i40e: fix multiple driver support") Signed-off-by: Alvin Zhang Reviewed-by: Xiaolong Ye --- drivers/net/i40e/i40e_flow.c | 38 +++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 4ebf925a68..4fa099481a 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -2366,6 +2366,37 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, if (num < 0) return -EINVAL; + if (pf->support_multi_driver) { + for (i = 0; i < num; i++) + if (i40e_read_rx_ctl(hw, + I40E_GLQF_FD_MSK(i, pctype)) != + mask_reg[i]) { + PMD_DRV_LOG(ERR, "Input set setting is not" + " supported with" + " `support-multi-driver`" + " enabled!"); + return -EPERM; + } + for (i = num; i < I40E_INSET_MASK_NUM_REG; i++) + if (i40e_read_rx_ctl(hw, + I40E_GLQF_FD_MSK(i, pctype)) != 0) { + PMD_DRV_LOG(ERR, "Input set setting is not" + " supported with" + " `support-multi-driver`" + " enabled!"); + return -EPERM; + } + + } else { + for (i = 0; i < num; i++) + i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype), + mask_reg[i]); + /*clear unused mask registers of the pctype */ + for (i = num; i < I40E_INSET_MASK_NUM_REG; i++) + i40e_check_write_reg(hw, + I40E_GLQF_FD_MSK(i, pctype), 0); + } + inset_reg |= i40e_translate_input_set_reg(hw->mac.type, input_set); i40e_check_write_reg(hw, I40E_PRTQF_FD_INSET(pctype, 0), @@ -2374,13 +2405,6 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, (uint32_t)((inset_reg >> I40E_32_BIT_WIDTH) & UINT32_MAX)); - for (i = 0; i < num; i++) - i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype), - mask_reg[i]); - - /*clear unused mask registers of the pctype */ - for (i = num; i < I40E_INSET_MASK_NUM_REG; i++) - i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype), 0); I40E_WRITE_FLUSH(hw); pf->fdir.input_set[pctype] = input_set; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:29.667640280 +0000 +++ 0083-net-i40e-fix-exception-with-multi-driver.patch 2019-12-19 14:32:26.201299729 +0000 @@ -1,14 +1,15 @@ -From 39de80b267e05d6f3322044e5851306acc84f892 Mon Sep 17 00:00:00 2001 +From 97d3af2037014e15165aaf5fafe5c24ab61d7805 Mon Sep 17 00:00:00 2001 From: Alvin Zhang Date: Tue, 8 Oct 2019 18:52:31 +0800 Subject: [PATCH] net/i40e: fix exception with multi-driver +[ upstream commit 39de80b267e05d6f3322044e5851306acc84f892 ] + If support-multi-driver is enabled, the global registers should not be configured. But with the current code base, if creating a flow with rte_flow API, the global register GLQF_FD_MSK may be changed. Fixes: cfdfca493cae ("net/i40e: fix multiple driver support") -Cc: stable@dpdk.org Signed-off-by: Alvin Zhang Reviewed-by: Xiaolong Ye @@ -17,10 +18,10 @@ 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c -index 9e038fa48f..61021037c8 100644 +index 4ebf925a68..4fa099481a 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c -@@ -2349,6 +2349,37 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, +@@ -2366,6 +2366,37 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, if (num < 0) return -EINVAL; @@ -58,7 +59,7 @@ inset_reg |= i40e_translate_input_set_reg(hw->mac.type, input_set); i40e_check_write_reg(hw, I40E_PRTQF_FD_INSET(pctype, 0), -@@ -2357,13 +2388,6 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, +@@ -2374,13 +2405,6 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, (uint32_t)((inset_reg >> I40E_32_BIT_WIDTH) & UINT32_MAX));