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 70AE9A04F0 for ; Tue, 10 Dec 2019 16:01:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 65FE61B13C; Tue, 10 Dec 2019 16:01:15 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 459691B13C for ; Tue, 10 Dec 2019 16:01:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575990072; 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=j56XZAu9hlJoEN+Ogdj5pJRBm8CqJHS3Pbo/kk9O1qk=; b=gk9/FiKsqy2CNUmirS7z69idmSTpEptM+hNi3Q+nFLNmgHkYhzf5sZtu7fnR8M4MiNHpEo vEO94CiokKisrv747UPmuzLS9/tabKc8baAyE7O1a8sNuo5tFJprRU7CTjWEBPxsF+edvL 0MK7he3R5dgIFq9NGQ7zmX+Zh9pfZEc= 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-6-tLaWaK_ANeKoW9oY3L4jNA-1; Tue, 10 Dec 2019 10:00:57 -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 E14F6188352F; Tue, 10 Dec 2019 15:00:55 +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 D46DD5D9C5; Tue, 10 Dec 2019 15:00:54 +0000 (UTC) From: Kevin Traynor To: Ajit Khaparde Cc: Somnath Kotur , dpdk stable Date: Tue, 10 Dec 2019 14:59:09 +0000 Message-Id: <20191210145937.32755-35-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: tLaWaK_ANeKoW9oY3L4jNA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/bnxt: fix setting max RSS contexts' 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/044ad35701140f6b06= e893a3da4a34d6ecd5d353 Thanks. Kevin. --- >From 044ad35701140f6b06e893a3da4a34d6ecd5d353 Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Thu, 24 Oct 2019 13:14:18 +0530 Subject: [PATCH] net/bnxt: fix setting max RSS contexts [ upstream commit 32e970c1668ddfb892a5fda35ab962f27ba62d9f ] Configure max RSS contexts in case the firmware indicates a maximal resource reservation strategy. Fixes: 6d8109bcb398 ("net/bnxt: check VF resources if resource manager is e= nabled") Signed-off-by: Ajit Khaparde Reviewed-by: Somnath Kotur Signed-off-by: Somnath Kotur --- drivers/net/bnxt/bnxt_hwrm.c | 8 ++++++-- drivers/net/bnxt/bnxt_hwrm.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 596ab3658..1f8996b7c 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -702,5 +702,5 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, boo= l test) =09HWRM_PREP(req, FUNC_VF_CFG, BNXT_USE_CHIMP_MB); =20 -=09req.enables =3D rte_cpu_to_le_32 +=09enables =3D rte_cpu_to_le_32 =09=09=09(HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RX_RINGS | =09=09=09HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_TX_RINGS | @@ -723,8 +723,11 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bo= ol test) =09=09=09=09HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_L2_CTXS | =09=09=09=09HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RSSCOS_CTXS; -=09=09req.enables |=3D rte_cpu_to_le_32(enables); =09=09req.num_rsscos_ctxs =3D rte_cpu_to_le_16(BNXT_VF_RSV_NUM_RSS_CTX); =09=09req.num_l2_ctxs =3D rte_cpu_to_le_16(BNXT_VF_RSV_NUM_L2_CTX); =09=09req.num_vnics =3D rte_cpu_to_le_16(BNXT_VF_RSV_NUM_VNIC); +=09} else if (bp->vf_resv_strategy =3D=3D +=09=09 HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MAXIMAL) { +=09=09enables |=3D HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RSSCOS_CTXS; +=09=09req.num_rsscos_ctxs =3D rte_cpu_to_le_16(bp->max_rsscos_ctx); =09} =20 @@ -738,4 +741,5 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, boo= l test) =20 =09req.flags =3D rte_cpu_to_le_32(flags); +=09req.enables |=3D rte_cpu_to_le_32(enables); =20 =09rc =3D bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB)= ; diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h index ec9b3e007..a3a481b2b 100644 --- a/drivers/net/bnxt/bnxt_hwrm.h +++ b/drivers/net/bnxt/bnxt_hwrm.h @@ -32,4 +32,6 @@ struct bnxt_cp_ring_info; #define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MINIMAL_STATIC \ =09HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MINIMAL_STATIC +#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MAXIMAL \ +=09HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MAXIMAL =20 #define HWRM_SPEC_CODE_1_8_4=09=090x10804 --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-10 14:49:41.468886653 +0000 +++ 0035-net-bnxt-fix-setting-max-RSS-contexts.patch=092019-12-10 14:49:39.= 062457581 +0000 @@ -1 +1 @@ -From 32e970c1668ddfb892a5fda35ab962f27ba62d9f Mon Sep 17 00:00:00 2001 +From 044ad35701140f6b06e893a3da4a34d6ecd5d353 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 32e970c1668ddfb892a5fda35ab962f27ba62d9f ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -16 +17 @@ - drivers/net/bnxt/bnxt_hwrm.c | 4 ++++ + drivers/net/bnxt/bnxt_hwrm.c | 8 ++++++-- @@ -18 +19 @@ - 2 files changed, 6 insertions(+) + 2 files changed, 8 insertions(+), 2 deletions(-) @@ -21 +22 @@ -index 018113c4c..3eedd08ee 100644 +index 596ab3658..1f8996b7c 100644 @@ -24 +25,12 @@ -@@ -860,4 +860,8 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bo= ol test) +@@ -702,5 +702,5 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bo= ol test) + =09HWRM_PREP(req, FUNC_VF_CFG, BNXT_USE_CHIMP_MB); +=20 +-=09req.enables =3D rte_cpu_to_le_32 ++=09enables =3D rte_cpu_to_le_32 + =09=09=09(HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RX_RINGS | + =09=09=09HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_TX_RINGS | +@@ -723,8 +723,11 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, b= ool test) + =09=09=09=09HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_L2_CTXS | + =09=09=09=09HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RSSCOS_CTXS; +-=09=09req.enables |=3D rte_cpu_to_le_32(enables); + =09=09req.num_rsscos_ctxs =3D rte_cpu_to_le_16(BNXT_VF_RSV_NUM_RSS_CTX); @@ -32,0 +45,6 @@ +@@ -738,4 +741,5 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bo= ol test) +=20 + =09req.flags =3D rte_cpu_to_le_32(flags); ++=09req.enables |=3D rte_cpu_to_le_32(enables); +=20 + =09rc =3D bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB= ); @@ -34 +52 @@ -index fcbce6058..abe5de9db 100644 +index ec9b3e007..a3a481b2b 100644 @@ -37 +55 @@ -@@ -38,4 +38,6 @@ struct bnxt_cp_ring_info; +@@ -32,4 +32,6 @@ struct bnxt_cp_ring_info; @@ -43 +61 @@ - #define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_L2_HDR_SRC_FILTER_EN \ + #define HWRM_SPEC_CODE_1_8_4=09=090x10804