From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BBF9CA034E for ; Mon, 21 Feb 2022 16:38:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B4A6A410F0; Mon, 21 Feb 2022 16:38:40 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 7FB7E4013F for ; Mon, 21 Feb 2022 16:38:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645457919; 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=3GYHo6PxJ6HP4eKyClpoWUeqSC1uNeNG6t0C3FmH5Us=; b=Ql4nyg/S3lNWABz/UagadWc5kdPYab5x/XK276pXXzRGK/ASAs1aNgPsAmeVr/TJJ+iAVU 2TtK5v9hLNiMMBPv13aMRrS2ezjxQn0OUJz+SZSsYZ+s+yxZKDChXFRVmCy/D1tyuEBXet SIgyJfFKswdLEzzb3sIXH+SCdassQZo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-647-HVOSABlXOqOCxIfl2fXLRA-1; Mon, 21 Feb 2022 10:38:33 -0500 X-MC-Unique: HVOSABlXOqOCxIfl2fXLRA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 715DF1091DA1; Mon, 21 Feb 2022 15:38:32 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F36C7B9D9; Mon, 21 Feb 2022 15:38:31 +0000 (UTC) From: Kevin Traynor To: Kalesh AP Cc: Ajit Khaparde , Somnath Kotur , dpdk stable Subject: patch 'net/bnxt: fix flow create when RSS is disabled' has been queued to stable release 21.11.1 Date: Mon, 21 Feb 2022 15:34:07 +0000 Message-Id: <20220221153625.152324-58-ktraynor@redhat.com> In-Reply-To: <20220221153625.152324-1-ktraynor@redhat.com> References: <20220221153625.152324-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 21.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 02/26/22. 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. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/b0fe5e2fa9a0515c78532b097212497d61c5cc7e Thanks. Kevin --- >From b0fe5e2fa9a0515c78532b097212497d61c5cc7e Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Tue, 4 Jan 2022 14:08:16 +0530 Subject: [PATCH] net/bnxt: fix flow create when RSS is disabled [ upstream commit 59119d49529e9e940297296167e0490f56b4bb66 ] This patch reverts the commit "5d47d06b2c83". Revert this commit as it caused a regression on legacy chips. On newer chips we use TruFlow based flow creation instead of HWRM based flow creation. Fixes: 5d47d06b2c83 ("net/bnxt: modify VNIC accounting") Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt.h | 3 --- drivers/net/bnxt/bnxt_ethdev.c | 18 ++++-------------- drivers/net/bnxt/bnxt_flow.c | 14 ++------------ drivers/net/bnxt/bnxt_hwrm.c | 32 -------------------------------- drivers/net/bnxt/bnxt_hwrm.h | 4 ---- 5 files changed, 6 insertions(+), 65 deletions(-) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index 614ea57d87..3df80f50db 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -696,7 +696,4 @@ struct bnxt { #define BNXT_FLAG_DFLT_MAC_SET BIT(26) #define BNXT_FLAG_GFID_ENABLE BIT(27) -#define BNXT_FLAG_RFS_NEEDS_VNIC BIT(28) -#define BNXT_FLAG_FLOW_CFA_RFS_RING_TBL_IDX_V2 BIT(29) -#define BNXT_RFS_NEEDS_VNIC(bp) ((bp)->flags & BNXT_FLAG_RFS_NEEDS_VNIC) #define BNXT_PF(bp) (!((bp)->flags & BNXT_FLAG_VF)) #define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 80de320970..83fb3861c3 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -787,15 +787,9 @@ skip_cosq_cfg: } - /* default vnic 0 */ - rc = bnxt_setup_one_vnic(bp, 0); - if (rc) - goto err_out; /* VNIC configuration */ - if (BNXT_RFS_NEEDS_VNIC(bp)) { - for (i = 1; i < bp->nr_vnics; i++) { - rc = bnxt_setup_one_vnic(bp, i); - if (rc) - goto err_out; - } + for (i = 0; i < bp->nr_vnics; i++) { + rc = bnxt_setup_one_vnic(bp, i); + if (rc) + goto err_out; } @@ -5231,8 +5225,4 @@ static int bnxt_get_config(struct bnxt *bp) return rc; - rc = bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(bp); - if (rc) - return rc; - bnxt_hwrm_port_mac_qcfg(bp); diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index d062be5525..f7c90c442f 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -1294,11 +1294,4 @@ start: PMD_DRV_LOG(DEBUG, "Queue index %d\n", act_q->index); - if (use_ntuple && !BNXT_RFS_NEEDS_VNIC(bp)) { - filter->flags = - HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_DEST_RFS_RING_IDX; - filter->dst_id = act_q->index; - goto skip_vnic_alloc; - } - vnic_id = attr->group; if (!vnic_id) { @@ -1365,5 +1358,5 @@ use_vnic: "Setting vnic ff_idx %d\n", vnic->ff_pool_idx); filter->dst_id = vnic->fw_vnic_id; -skip_vnic_alloc: + /* For ntuple filter, create the L2 filter with default VNIC. * The user specified redirect queue will be set while creating @@ -2064,8 +2057,5 @@ bnxt_flow_create(struct rte_eth_dev *dev, } - if (BNXT_RFS_NEEDS_VNIC(bp)) - vnic = find_matching_vnic(bp, filter); - else - vnic = BNXT_GET_DEFAULT_VNIC(bp); + vnic = find_matching_vnic(bp, filter); done: if (!ret || update_flow) { diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 6093407986..f90c22a9f7 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -6107,36 +6107,4 @@ int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep_bp) } -int bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(struct bnxt *bp) -{ - struct hwrm_cfa_adv_flow_mgnt_qcaps_output *resp = - bp->hwrm_cmd_resp_addr; - struct hwrm_cfa_adv_flow_mgnt_qcaps_input req = {0}; - uint32_t flags = 0; - int rc = 0; - - if (!(bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_MGMT)) - return 0; - - if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) { - PMD_DRV_LOG(DEBUG, - "Not a PF or trusted VF. Command not supported\n"); - return 0; - } - - HWRM_PREP(&req, HWRM_CFA_ADV_FLOW_MGNT_QCAPS, BNXT_USE_CHIMP_MB); - rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB); - - HWRM_CHECK_RESULT(); - flags = rte_le_to_cpu_32(resp->flags); - HWRM_UNLOCK(); - - if (flags & HWRM_CFA_ADV_FLOW_MGNT_QCAPS_RFS_RING_TBL_IDX_V2_SUPPORTED) - bp->flags |= BNXT_FLAG_FLOW_CFA_RFS_RING_TBL_IDX_V2; - else - bp->flags |= BNXT_FLAG_RFS_NEEDS_VNIC; - - return rc; -} - int bnxt_hwrm_fw_echo_reply(struct bnxt *bp, uint32_t echo_req_data1, uint32_t echo_req_data2) diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h index 8202455bf0..21e1b7a499 100644 --- a/drivers/net/bnxt/bnxt_hwrm.h +++ b/drivers/net/bnxt/bnxt_hwrm.h @@ -59,7 +59,4 @@ struct hwrm_func_qstats_output; HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEED_MASK -#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_RFS_RING_TBL_IDX_V2_SUPPORTED \ - HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_RFS_RING_TBL_IDX_V2_SUPPORTED - #define HWRM_SPEC_CODE_1_8_4 0x10804 #define HWRM_SPEC_CODE_1_9_0 0x10900 @@ -297,5 +294,4 @@ int bnxt_hwrm_cfa_pair_exists(struct bnxt *bp, struct bnxt_representor *rep_bp); int bnxt_hwrm_cfa_pair_alloc(struct bnxt *bp, struct bnxt_representor *rep); int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep); -int bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(struct bnxt *bp); int bnxt_hwrm_fw_echo_reply(struct bnxt *bp, uint32_t echo_req_data1, uint32_t echo_req_data2); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-21 15:22:45.915712426 +0000 +++ 0058-net-bnxt-fix-flow-create-when-RSS-is-disabled.patch 2022-02-21 15:22:44.133704220 +0000 @@ -1 +1 @@ -From 59119d49529e9e940297296167e0490f56b4bb66 Mon Sep 17 00:00:00 2001 +From b0fe5e2fa9a0515c78532b097212497d61c5cc7e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 59119d49529e9e940297296167e0490f56b4bb66 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -38 +39 @@ -index a5b960c246..00acdb7be6 100644 +index 80de320970..83fb3861c3 100644 @@ -61 +62 @@ -@@ -5233,8 +5227,4 @@ static int bnxt_get_config(struct bnxt *bp) +@@ -5231,8 +5225,4 @@ static int bnxt_get_config(struct bnxt *bp)