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 E130BA04F0 for ; Tue, 10 Dec 2019 16:00:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D51DC1B9B7; Tue, 10 Dec 2019 16:00:43 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 038581BEDE for ; Tue, 10 Dec 2019 16:00:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575990041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jqm1lSD+zpIxYq03oYxinzyuvOECKx+ir6Kam1qbgG8=; b=N+Pd3fTO5BUT8okIQfE/uWWuT4/5Mypk/21KYlQxfFirpHZEPhv0EqeLOAqo9SS5jTtUy0 RvC98h++l6ecekJ02gg2UsalAs72w/cXBPDzgNHdDT52Iqp23uUhAoWUjhFRa+/cisvZhx axe9mr/ZEh40boakD6uYzX+UP9sg8l0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-161-yCHAEu0vOOe3fOIWzt4g5g-1; Tue, 10 Dec 2019 10:00:38 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F092B100551C; Tue, 10 Dec 2019 15:00:36 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id E1E465D9C5; Tue, 10 Dec 2019 15:00:35 +0000 (UTC) From: Kevin Traynor To: Alvin Zhang Cc: Xiaolong Ye , dpdk stable Date: Tue, 10 Dec 2019 14:58:58 +0000 Message-Id: <20191210145937.32755-24-ktraynor@redhat.com> In-Reply-To: <20191210145937.32755-1-ktraynor@redhat.com> References: <20191210145937.32755-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: yCHAEu0vOOe3fOIWzt4g5g-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/i40e: fix exception with multi-driver' has been queued to LTS release 18.11.6 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 18.11.6 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/16/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 rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/33c64c29449cb19efa= f38e05231281d78355c7d5 Thanks. Kevin. --- >From 33c64c29449cb19efaf38e05231281d78355c7d5 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 4208d8306..642532ba9 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -2351,4 +2351,35 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, =09=09return -EINVAL; =20 +=09if (pf->support_multi_driver) { +=09=09for (i =3D 0; i < num; i++) +=09=09=09if (i40e_read_rx_ctl(hw, +=09=09=09=09=09I40E_GLQF_FD_MSK(i, pctype)) !=3D +=09=09=09=09=09mask_reg[i]) { +=09=09=09=09PMD_DRV_LOG(ERR, "Input set setting is not" +=09=09=09=09=09=09" supported with" +=09=09=09=09=09=09" `support-multi-driver`" +=09=09=09=09=09=09" enabled!"); +=09=09=09=09return -EPERM; +=09=09=09} +=09=09for (i =3D num; i < I40E_INSET_MASK_NUM_REG; i++) +=09=09=09if (i40e_read_rx_ctl(hw, +=09=09=09=09=09I40E_GLQF_FD_MSK(i, pctype)) !=3D 0) { +=09=09=09=09PMD_DRV_LOG(ERR, "Input set setting is not" +=09=09=09=09=09=09" supported with" +=09=09=09=09=09=09" `support-multi-driver`" +=09=09=09=09=09=09" enabled!"); +=09=09=09=09return -EPERM; +=09=09=09} + +=09} else { +=09=09for (i =3D 0; i < num; i++) +=09=09=09i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype), +=09=09=09=09mask_reg[i]); +=09=09/*clear unused mask registers of the pctype */ +=09=09for (i =3D num; i < I40E_INSET_MASK_NUM_REG; i++) +=09=09=09i40e_check_write_reg(hw, +=09=09=09=09=09I40E_GLQF_FD_MSK(i, pctype), 0); +=09} + =09inset_reg |=3D i40e_translate_input_set_reg(hw->mac.type, input_set); =20 @@ -2359,11 +2390,4 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, =09=09=09=09=09 I40E_32_BIT_WIDTH) & UINT32_MAX)); =20 -=09for (i =3D 0; i < num; i++) -=09=09i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype), -=09=09=09=09 mask_reg[i]); - -=09/*clear unused mask registers of the pctype */ -=09for (i =3D num; i < I40E_INSET_MASK_NUM_REG; i++) -=09=09i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype), 0); =09I40E_WRITE_FLUSH(hw); =20 --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-10 14:49:40.712975636 +0000 +++ 0024-net-i40e-fix-exception-with-multi-driver.patch=092019-12-10 14:49:= 39.029458196 +0000 @@ -1 +1 @@ -From 39de80b267e05d6f3322044e5851306acc84f892 Mon Sep 17 00:00:00 2001 +From 33c64c29449cb19efaf38e05231281d78355c7d5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 39de80b267e05d6f3322044e5851306acc84f892 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 9e038fa48..61021037c 100644 +index 4208d8306..642532ba9 100644 @@ -23 +24 @@ -@@ -2350,4 +2350,35 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, +@@ -2351,4 +2351,35 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, @@ -59 +60 @@ -@@ -2358,11 +2389,4 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, +@@ -2359,11 +2390,4 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,