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 D76DBA034F for ; Wed, 10 Nov 2021 07:35:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D132240142; Wed, 10 Nov 2021 07:35:31 +0100 (CET) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam08on2057.outbound.protection.outlook.com [40.107.100.57]) by mails.dpdk.org (Postfix) with ESMTP id C375040142 for ; Wed, 10 Nov 2021 07:35:30 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HQMcaJrSnbx5yzP2huZFTimVu9DRr2FdExMNDgDDT92MHwe56FOZaoXBmKDNBzA7jaWPqKRakO3sE+1JnBaZ5mnrKm6F+VCLghgPS/g6Wgxj9KKGfRvFQy0crrzvfsNYUSvRjv+/sdDBT1xwdk/emkpfQ0eE25eaxgs6AqJFNtdif1mF3GYQAgyr0PPz/Y7vHBg4Fg6bEciTcBY0BlFiJBHcshx0qF42oy1bPyWBVGF5ZoRnO+JW0cURZkt1vd0p1967JOnIvnUBupBWVoN3ORlg2v/8VEn3jYWAVxXw4Ersdssa3jk075fa4w+cBmAB60Z8dfJxwj0FBXn/B6qwzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1CG7jLkHUy1M0JWGYO4ISkscs9H9/KfZ/h7FOjIjkFM=; b=g60n6l0ozJ9/wiiU4eFkTGnEwSZ0qtHhv7qIVw9gQekA4/VfvzeM+T1XG0j/OEm+9DqWY4j070kjgh484R9msbTXUY9o1xFyq+xH7kkGFblSP7ac5Bus7+5mo5Ofp0t419VFCdk9O3WlQ7WmrEMilihbUlb52fJf0eCINnVNS9WDxUTt47S77CJf3brl+GS5xF9BZhF4GL79e9m3wl1r9uMamYTBXIp1f0nArFFVpN+jTwcANx1rFvG1xlLFPKMWkkKd4znx04AcBUET0DU5Ik7RgIkC7SUdGgF4yPGB+i0oFKCFIzPs6zPVpJAqjCOcyd8JktP1cPs/YBIWXNbFJA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=broadcom.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1CG7jLkHUy1M0JWGYO4ISkscs9H9/KfZ/h7FOjIjkFM=; b=Nd5zBWdKvuCfaUWsr4ENURgrjRlIm7KuO6nyXvttajZ526L8U+mLCH1o+qqnk2uZ3uTdFM0RqYLRcjYRzBrDNaeOG1vWbRFROvd0ManN+rCz6fpbdE4vGtXuNRkElJMS76SFstQXEJgxahuDwx5XCYbHRaij5GwCIejFfZL09zOroLqNGKG9uw5N7/jkrj/OJMGlEVB3DfRpI0YGrcvawpAi7ATKr6HTpGI2CqF9s36yHstq0y6BltF+FfjTZGfJzCGAt62fwR4wI1soOfEptVfnFJXen8TsOK0Caqs8O67JlWG5lENoSPItZi7d6m5thbaSiYCYFAeMbHKF70x65Q== Received: from DS7PR03CA0256.namprd03.prod.outlook.com (2603:10b6:5:3b3::21) by DM5PR12MB2423.namprd12.prod.outlook.com (2603:10b6:4:b3::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Wed, 10 Nov 2021 06:35:27 +0000 Received: from DM6NAM11FT054.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b3:cafe::59) by DS7PR03CA0256.outlook.office365.com (2603:10b6:5:3b3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.16 via Frontend Transport; Wed, 10 Nov 2021 06:35:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; broadcom.com; dkim=none (message not signed) header.d=none;broadcom.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT054.mail.protection.outlook.com (10.13.173.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:35:26 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:35:23 +0000 From: Xueming Li To: Kalesh AP CC: Luca Boccassi , Somnath Kotur , Lance Richardson , Ajit Khaparde , dpdk stable Date: Wed, 10 Nov 2021 14:28:32 +0800 Message-ID: <20211110063216.2744012-29-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ead4cdc4-5cc0-4977-33a7-08d9a4144826 X-MS-TrafficTypeDiagnostic: DM5PR12MB2423: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CxoGD9gvDDy3mj+z3tMDK5R4fh9CAL66Q+1vjiUskesjqvqF9MWujhW6148tdiyP1WKMOMGTiZ2YpgeqQfaAmLgHAe4ttp3dg984n6Khw7g792BTMhtZOeIeu4xniLPmq2CTGktSXTyf8qyPlyMnodr1uRGy7UPk5oHqP7N+tTub8KnKQEMIX/D5aIRvK8LwCNT4DUtEO6NlTxqPqC3TKa2pSSSvy0h5lrlluIelhYCelFbsn+HNWxLsYSJXEo4B1+LbK6Cdk7PZ4+scat7HIwmt5SVsUWHtrN2qCuIGzOWWutZ0H5vGzRB19obBTD2U6fSwNuoAIsf9fm917t+BIkbAyo9h7gJAGgrW6RU9U9zHxJQZPSJj4eXezYewPFOKibxQ65cLWL4ASeDX0UDWhSQcaJ4SiBFng5mV3PqdjI5ZiKoIvkpFwIvQoIppAwi9nAfZNzXY2Vvq6uQahkH1kq/tHsrl7XiUxwopChUF9wEpheH4aF5DbcDE83u9HRkRL+/MmHhYPrFkpBSd8zMx0hr9dzZud2M8UZOoB8Yv0IE3b/wJQ2Iea7U7OSo23M8ieoFNDBjELhlu4anmUcdf3wK6EPGXjQ5m9V+H2wE7uXPNZTtZWvDYPwoNjOg9thzQk166QjF8iLtoNa+G5/b0Px/iLbQjRIuN89mfau5bMbkposjIKW+5FO3YmzHDYny9HArsN01uM3PI+WfI93bUuuJBICSs758PjInyJCMaRCmtM/Y72plnRUi3ylSs4zfxWiFiMhpx2M+run3kXQl8VX4t8pvKsSMg62kL6QA29n8= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(356005)(508600001)(6916009)(426003)(7696005)(966005)(36860700001)(2906002)(83380400001)(53546011)(55016002)(86362001)(2616005)(8936002)(6666004)(47076005)(4001150100001)(1076003)(70206006)(336012)(26005)(8676002)(36756003)(186003)(54906003)(4326008)(82310400003)(70586007)(5660300002)(7636003)(6286002)(316002)(16526019); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:35:26.5250 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ead4cdc4-5cc0-4977-33a7-08d9a4144826 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT054.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB2423 Subject: [dpdk-stable] patch 'net/bnxt: check FW capability for VLAN offloads' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/ddc5464088dc5090935ecbde16cdede63867b418 Thanks. Xueming Li --- >From ddc5464088dc5090935ecbde16cdede63867b418 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Mon, 23 Aug 2021 13:42:13 +0530 Subject: [PATCH] net/bnxt: check FW capability for VLAN offloads Cc: Xueming Li [ upstream commit baedf29794aa7cf8527d6362af17dce5046b1f51 ] VLAN offload capability may be disabled in the FW. The driver should not attempt to override or utilize this feature in such scenarios since it will not work as expected. Fixes: 0a6d2a720078 ("net/bnxt: get device infos") Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Lance Richardson Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt.h | 6 +++--- drivers/net/bnxt/bnxt_ethdev.c | 4 ++++ drivers/net/bnxt/bnxt_hwrm.c | 9 +++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index f85409878c..c8c6dc4e83 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -567,8 +567,7 @@ struct bnxt_rep_info { ETH_RSS_NONFRAG_IPV6_UDP | \ ETH_RSS_LEVEL_MASK) -#define BNXT_DEV_TX_OFFLOAD_SUPPORT (DEV_TX_OFFLOAD_VLAN_INSERT | \ - DEV_TX_OFFLOAD_IPV4_CKSUM | \ +#define BNXT_DEV_TX_OFFLOAD_SUPPORT (DEV_TX_OFFLOAD_IPV4_CKSUM | \ DEV_TX_OFFLOAD_TCP_CKSUM | \ DEV_TX_OFFLOAD_UDP_CKSUM | \ DEV_TX_OFFLOAD_TCP_TSO | \ @@ -581,7 +580,6 @@ struct bnxt_rep_info { DEV_TX_OFFLOAD_MULTI_SEGS) #define BNXT_DEV_RX_OFFLOAD_SUPPORT (DEV_RX_OFFLOAD_VLAN_FILTER | \ - DEV_RX_OFFLOAD_VLAN_STRIP | \ DEV_RX_OFFLOAD_IPV4_CKSUM | \ DEV_RX_OFFLOAD_UDP_CKSUM | \ DEV_RX_OFFLOAD_TCP_CKSUM | \ @@ -715,12 +713,14 @@ struct bnxt { #define BNXT_FW_CAP_ADV_FLOW_MGMT BIT(5) #define BNXT_FW_CAP_ADV_FLOW_COUNTERS BIT(6) #define BNXT_FW_CAP_LINK_ADMIN BIT(7) +#define BNXT_FW_CAP_VLAN_TX_INSERT BIT(9) pthread_mutex_t flow_lock; uint32_t vnic_cap_flags; #define BNXT_VNIC_CAP_COS_CLASSIFY BIT(0) #define BNXT_VNIC_CAP_OUTER_RSS BIT(1) +#define BNXT_VNIC_CAP_VLAN_RX_STRIP BIT(3) unsigned int rx_nr_rings; unsigned int rx_cp_nr_rings; unsigned int rx_num_qs_per_vnic; diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 8afe72bd96..a563c2275f 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -980,9 +980,13 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, dev_info->rx_offload_capa = BNXT_DEV_RX_OFFLOAD_SUPPORT; if (bp->flags & BNXT_FLAG_PTP_SUPPORTED) dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP; + if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP) + dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_VLAN_STRIP; dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE; dev_info->tx_offload_capa = BNXT_DEV_TX_OFFLOAD_SUPPORT | dev_info->tx_queue_offload_capa; + if (bp->fw_cap & BNXT_FW_CAP_VLAN_TX_INSERT) + dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_VLAN_INSERT; dev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT; dev_info->speed_capa = bnxt_get_speed_capabilities(bp); diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index d8b46f932a..7d9939d1af 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -826,6 +826,10 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp) if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_LINK_ADMIN_STATUS_SUPPORTED) bp->fw_cap |= BNXT_FW_CAP_LINK_ADMIN; + if (!(flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_VLAN_ACCELERATION_TX_DISABLED)) { + bp->fw_cap |= BNXT_FW_CAP_VLAN_TX_INSERT; + PMD_DRV_LOG(DEBUG, "VLAN acceleration for TX is enabled\n"); + } unlock: HWRM_UNLOCK(); @@ -883,6 +887,11 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp) if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP) bp->vnic_cap_flags |= BNXT_VNIC_CAP_OUTER_RSS; + + if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_VLAN_STRIP_CAP) { + bp->vnic_cap_flags |= BNXT_VNIC_CAP_VLAN_RX_STRIP; + PMD_DRV_LOG(DEBUG, "Rx VLAN strip capability enabled\n"); + } bp->max_tpa_v2 = rte_le_to_cpu_16(resp->max_aggs_supported); HWRM_UNLOCK(); -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:03.369223940 +0800 +++ 0028-net-bnxt-check-FW-capability-for-VLAN-offloads.patch 2021-11-10 14:17:01.774080215 +0800 @@ -1 +1 @@ -From baedf29794aa7cf8527d6362af17dce5046b1f51 Mon Sep 17 00:00:00 2001 +From ddc5464088dc5090935ecbde16cdede63867b418 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit baedf29794aa7cf8527d6362af17dce5046b1f51 ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index 494a1eff37..3ccc06c37c 100644 +index f85409878c..c8c6dc4e83 100644 @@ -27 +29 @@ -@@ -577,8 +577,7 @@ struct bnxt_rep_info { +@@ -567,8 +567,7 @@ struct bnxt_rep_info { @@ -37 +39 @@ -@@ -591,7 +590,6 @@ struct bnxt_rep_info { +@@ -581,7 +580,6 @@ struct bnxt_rep_info { @@ -45 +47,2 @@ -@@ -737,6 +735,7 @@ struct bnxt { +@@ -715,12 +713,14 @@ struct bnxt { + #define BNXT_FW_CAP_ADV_FLOW_MGMT BIT(5) @@ -48 +50,0 @@ - #define BNXT_FW_CAP_TRUFLOW_EN BIT(8) @@ -50 +51,0 @@ - #define BNXT_TRUFLOW_EN(bp) ((bp)->fw_cap & BNXT_FW_CAP_TRUFLOW_EN) @@ -53 +54,2 @@ -@@ -745,6 +744,7 @@ struct bnxt { + + uint32_t vnic_cap_flags; @@ -56 +57,0 @@ - #define BNXT_VNIC_CAP_RX_CMPL_V2 BIT(2) @@ -62 +63 @@ -index de34a2f0bb..e072771d14 100644 +index 8afe72bd96..a563c2275f 100644 @@ -65 +66 @@ -@@ -981,9 +981,13 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, +@@ -980,9 +980,13 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, @@ -80 +81 @@ -index f29d574235..02613bd00b 100644 +index d8b46f932a..7d9939d1af 100644 @@ -83 +84 @@ -@@ -941,6 +941,10 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp) +@@ -826,6 +826,10 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp) @@ -94,3 +95,3 @@ -@@ -1001,6 +1005,11 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp) - if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RX_CMPL_V2_CAP) - bp->vnic_cap_flags |= BNXT_VNIC_CAP_RX_CMPL_V2; +@@ -883,6 +887,11 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp) + if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP) + bp->vnic_cap_flags |= BNXT_VNIC_CAP_OUTER_RSS; @@ -97,0 +99 @@ ++ @@ -102 +103,0 @@ -+