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 45E6FA0543 for ; Tue, 21 Jun 2022 10:06:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3CCF540151; Tue, 21 Jun 2022 10:06:58 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2067.outbound.protection.outlook.com [40.107.93.67]) by mails.dpdk.org (Postfix) with ESMTP id 77E4D40151 for ; Tue, 21 Jun 2022 10:06:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KK4PUnsMJE4bWDQDXS+GvZ2zehXQcdsn1HM2D0wT+F2DPSyeOUAKNzcTadd3ON/aP9BF/c0SOV3BgvtGjgfztuCySXCgoZdLJavRG4sgZzsYkZSjS4A/7KevlyAnzaOVDbRDzuWt0xMQCcgLj+aIXB8IMklD9DJVz6YOFebePGMVhk5s1X66Pgrv7EE+HYSeK/f6LzdgSelrZF4XyTBBH4IHwzTbDsIcz/JRPG7iBLCUEzO4k01WoXo0TDw+wht1d0gvNobWKigPoDOBf11TlKreis1OjUGk59V1iE+tMVu+4qEeuNj/GpreToMcesjQgVaJYAx/bfNKaXaXrQvS0Q== 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=FqoIfqjAdx8Kv0jJVS76mjPI1n6aimn3fEhNtRQk6cU=; b=hMyjDVY8l6qfhZ1InNN4DxU0BhXrPsBLRPHCvlu/u13nOhLX2BG0LvfSo9mzRyrAfSWbgfxjBQh8WMkAxr7vvycCMSBqQZgfIcNobTY+/ToWs7FYdRAFaU6YJJRIFurOUB/JGpDGX1UZg8l1I7lKFzmLPTNJDc/UF+8vSRYzz3PhHYOILGypWa6oBNpttLr7YUeuRU45lf7OL1F4HkrjC7Ky9ygzVzDZwzisY75Li7s7h4guuc1SQ6BIvE7brAxNuzc4sVCN8YIE5F6+wNFJxSFFXr0ZvjqmSQ4Qo8qtZtQSN+0eYn38kOxgnRthPAMBp7biFdIZEWQBn1zVcgC8ow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=broadcom.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=FqoIfqjAdx8Kv0jJVS76mjPI1n6aimn3fEhNtRQk6cU=; b=CZoAA7gRvw+TW/R97lVrIm0sXrl/Eqr0/VuJkNXSo3XGfnOX/HmWcWT3irveM5o8VRzTBstUklZeLVePyp8oi54NE8LHW7QDeH8gP1l63EGQiP77RgFuy5Ucxw6eHsQaRZBdy+qWphfEC9KFngBM0RPcBVeR9qKKHrqgyzVIMnxaA3F+nw+Aa6dJOxERyng2mL/pmgPAVHl5E/w1ZVb1VHzWNV94/X6NBC/zg4i+CRAW4VJuUdxknMCeszhIiKm6KVlArdC3sltsHSwdNehtIrwEuL0Lcy1IsGQfWNuR93Zz2O94ZsC4mpX2ujF8qaSiEIGclC3bEYq3oeVoFq4eEQ== Received: from BN1PR14CA0029.namprd14.prod.outlook.com (2603:10b6:408:e3::34) by MW3PR12MB4586.namprd12.prod.outlook.com (2603:10b6:303:53::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Tue, 21 Jun 2022 08:06:54 +0000 Received: from BN8NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e3:cafe::b2) by BN1PR14CA0029.outlook.office365.com (2603:10b6:408:e3::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.17 via Frontend Transport; Tue, 21 Jun 2022 08:06:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT022.mail.protection.outlook.com (10.13.176.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:06:53 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:06:52 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 21 Jun 2022 01:06:50 -0700 From: Xueming Li To: Kalesh AP CC: Ajit Khaparde , Somnath Kotur , dpdk stable Subject: patch 'net/bnxt: fix device capability reporting' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:01:50 +0300 Message-ID: <20220621080301.2315720-45-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 15c8fe77-2638-4cd0-5a0f-08da535d00e7 X-MS-TrafficTypeDiagnostic: MW3PR12MB4586:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yy0iFzCQO628EzsqTfWjA/NH7ohLiT6bD4snm9c8zCC9kQEXi7M2BA59mb7/LV/lJj4WMFo6VxSGuaLq2hb4EHLojzRWijWOTFhnA6WQPAIx2UaSneB0aEsTdbjbA0aKRSHhT6s0I+f6UERR8UZXVnsX1RLlGWkMISaMgSC6lMpeAWZm30hetBMQDpppY/Ux3pM1/IMlX+3waMJK1sxQaiYqt4Y5bB7UM6KtVydYla0IpLKiaYfN5llI89zCw6iBuTQeaxMokXGqm2dpA3wgEvkV3aNbjrHgSAaOlvZGqm1P4nI8ZOmRe7B2AUfnwbImkKreMyvvTCL+ZsOKS2qbeXLFDb3MDEFFuPFjgitqLf2xthin46Th+vfDpGNxaFDY7Uitgr1FJUYh4PdlFLM1oz7dHS91m8ACv3A0RICWjRZD7potJY6gzeX9tHqkrAdhr7boQIurxIZWZYiLm2Swsy/l0s06N0lmspAQTeedO8NvzmVHmODzQSv7FYvK4XpKOvDrm3FN6Gf39D8vj6ktq6Txk40/xYBbROp7n9RxJ8Lw2EWDrzUbD+0l34zGcvk88Yx4AlqwHAbN4BVhIuUdXAXPJaC4/S0M2Rkez5051tl9JdHf3IuyU5DiY+A4Q5PGEyvfWYj1qlu9LKJsghIRn2F+yf/sdnc45egqhXKVro1EcpFRVnCDCK+5WzEzsNFPHhsAJrRq/CXavzhNTQ10uSHrEi22dEw7T3Va5k8vKEJxMCFnaHNj7kDeYNzuMMnYOfY77AVE2cOSgKNrDvIUyUDsS+3gesNInRVYOxxKSDLL4ANu/urhgJHw0uJuBQKXehfKjsys+QOS8/VP8qrRhN+ysKCtvYn64muOd5Dmema8bFq9puAEmDA4FH4PgQumLURdp7JsNYzmFlEcu1QSgo2K5S+rQ5vAfm9JBvq5KnU= X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(346002)(136003)(39860400002)(396003)(376002)(40470700004)(36840700001)(46966006)(70206006)(4326008)(16526019)(2906002)(83380400001)(426003)(7696005)(1076003)(6286002)(336012)(70586007)(186003)(966005)(47076005)(8676002)(26005)(478600001)(41300700001)(40460700003)(53546011)(8936002)(86362001)(5660300002)(2616005)(81166007)(30864003)(82310400005)(82740400003)(36756003)(356005)(40480700001)(316002)(55016003)(6916009)(54906003)(36860700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:06:53.6072 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 15c8fe77-2638-4cd0-5a0f-08da535d00e7 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4586 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 20.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 06/23/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/7ded422e25a5a16c91cce1cdb6e9bbf29165fbc5 Thanks. Xueming Li --- >From 7ded422e25a5a16c91cce1cdb6e9bbf29165fbc5 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Wed, 27 Apr 2022 20:28:06 +0530 Subject: [PATCH] net/bnxt: fix device capability reporting Cc: Xueming Li [ upstream commit 47a956a8fecdc60e935cc9d9b81356cafb2910f0 ] 1. Added two functions bnxt_get_tx_port_offloads() and bnxt_get_rx_port_offloads() to report the device tx/rx offload capabilities to the application. 2. This avoids few duplicate code in the driver and make VF-rep capability the same as VF. 3. This will help in selectively reporting offload capabilities based on FW support. Fixes: 0a6d2a720078 ("net/bnxt: get device infos") Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt.h | 25 ------------------------- drivers/net/bnxt/bnxt_ethdev.c | 10 ++-------- drivers/net/bnxt/bnxt_reps.c | 6 ++---- drivers/net/bnxt/bnxt_rxq.c | 25 +++++++++++++++++++++++++ drivers/net/bnxt/bnxt_rxq.h | 1 + drivers/net/bnxt/bnxt_txq.c | 23 +++++++++++++++++++++++ drivers/net/bnxt/bnxt_txq.h | 1 + 7 files changed, 54 insertions(+), 37 deletions(-) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index c24a9ca92a..61bb59feb6 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -567,31 +567,6 @@ struct bnxt_rep_info { ETH_RSS_NONFRAG_IPV6_UDP | \ ETH_RSS_LEVEL_MASK) -#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 | \ - DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \ - DEV_TX_OFFLOAD_VXLAN_TNL_TSO | \ - DEV_TX_OFFLOAD_GRE_TNL_TSO | \ - DEV_TX_OFFLOAD_IPIP_TNL_TSO | \ - DEV_TX_OFFLOAD_GENEVE_TNL_TSO | \ - DEV_TX_OFFLOAD_QINQ_INSERT | \ - DEV_TX_OFFLOAD_MULTI_SEGS) - -#define BNXT_DEV_RX_OFFLOAD_SUPPORT (DEV_RX_OFFLOAD_VLAN_FILTER | \ - DEV_RX_OFFLOAD_IPV4_CKSUM | \ - DEV_RX_OFFLOAD_UDP_CKSUM | \ - DEV_RX_OFFLOAD_TCP_CKSUM | \ - DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \ - DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | \ - DEV_RX_OFFLOAD_JUMBO_FRAME | \ - DEV_RX_OFFLOAD_KEEP_CRC | \ - DEV_RX_OFFLOAD_VLAN_EXTEND | \ - DEV_RX_OFFLOAD_TCP_LRO | \ - DEV_RX_OFFLOAD_SCATTER | \ - DEV_RX_OFFLOAD_RSS_HASH) - #define BNXT_HWRM_SHORT_REQ_LEN sizeof(struct hwrm_short_input) struct bnxt_flow_stat_info { diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 58198f96be..fdcc73d432 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -987,16 +987,10 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, dev_info->min_rx_bufsize = 1; dev_info->max_rx_pktlen = BNXT_MAX_PKT_LEN; - 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->rx_offload_capa = bnxt_get_rx_port_offloads(bp); 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_offload_capa = bnxt_get_tx_port_offloads(bp) | 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_reps.c b/drivers/net/bnxt/bnxt_reps.c index b35c54fe13..95d99072cd 100644 --- a/drivers/net/bnxt/bnxt_reps.c +++ b/drivers/net/bnxt/bnxt_reps.c @@ -541,10 +541,8 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev, dev_info->min_rx_bufsize = 1; dev_info->max_rx_pktlen = BNXT_MAX_PKT_LEN; - dev_info->rx_offload_capa = BNXT_DEV_RX_OFFLOAD_SUPPORT; - if (parent_bp->flags & BNXT_FLAG_PTP_SUPPORTED) - dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP; - dev_info->tx_offload_capa = BNXT_DEV_TX_OFFLOAD_SUPPORT; + dev_info->rx_offload_capa = bnxt_get_rx_port_offloads(parent_bp); + dev_info->tx_offload_capa = bnxt_get_tx_port_offloads(parent_bp); dev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT; dev_info->switch_info.name = eth_dev->device->name; diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index 73e0ba36f6..828b8e00aa 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -20,6 +20,31 @@ * RX Queues */ +uint64_t bnxt_get_rx_port_offloads(struct bnxt *bp) +{ + uint64_t rx_offload_capa; + + rx_offload_capa = DEV_RX_OFFLOAD_IPV4_CKSUM | + DEV_RX_OFFLOAD_UDP_CKSUM | + DEV_RX_OFFLOAD_TCP_CKSUM | + DEV_RX_OFFLOAD_KEEP_CRC | + DEV_RX_OFFLOAD_VLAN_FILTER | + DEV_RX_OFFLOAD_VLAN_EXTEND | + DEV_RX_OFFLOAD_TCP_LRO | + DEV_RX_OFFLOAD_SCATTER | + DEV_RX_OFFLOAD_RSS_HASH; + + rx_offload_capa |= DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | + DEV_RX_OFFLOAD_OUTER_UDP_CKSUM; + + if (bp->flags & BNXT_FLAG_PTP_SUPPORTED) + rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP; + if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP) + rx_offload_capa |= DEV_RX_OFFLOAD_VLAN_STRIP; + + return rx_offload_capa; +} + void bnxt_free_rxq_stats(struct bnxt_rx_queue *rxq) { if (rxq && rxq->cp_ring && rxq->cp_ring->hw_stats) diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h index 980a16a566..e4d185676f 100644 --- a/drivers/net/bnxt/bnxt_rxq.h +++ b/drivers/net/bnxt/bnxt_rxq.h @@ -63,4 +63,5 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id); void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq); +uint64_t bnxt_get_rx_port_offloads(struct bnxt *bp); #endif diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c index 6c5e6948a7..bc1797095d 100644 --- a/drivers/net/bnxt/bnxt_txq.c +++ b/drivers/net/bnxt/bnxt_txq.c @@ -16,6 +16,29 @@ * TX Queues */ +uint64_t bnxt_get_tx_port_offloads(struct bnxt *bp) +{ + uint64_t tx_offload_capa; + + tx_offload_capa = DEV_TX_OFFLOAD_IPV4_CKSUM | + DEV_TX_OFFLOAD_UDP_CKSUM | + DEV_TX_OFFLOAD_TCP_CKSUM | + DEV_TX_OFFLOAD_TCP_TSO | + DEV_TX_OFFLOAD_QINQ_INSERT | + DEV_TX_OFFLOAD_MULTI_SEGS; + + tx_offload_capa |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | + DEV_TX_OFFLOAD_VXLAN_TNL_TSO | + DEV_TX_OFFLOAD_GRE_TNL_TSO | + DEV_TX_OFFLOAD_IPIP_TNL_TSO | + DEV_TX_OFFLOAD_GENEVE_TNL_TSO; + + if (bp->fw_cap & BNXT_FW_CAP_VLAN_TX_INSERT) + tx_offload_capa |= DEV_TX_OFFLOAD_VLAN_INSERT; + + return tx_offload_capa; +} + void bnxt_free_txq_stats(struct bnxt_tx_queue *txq) { if (txq && txq->cp_ring && txq->cp_ring->hw_stats) diff --git a/drivers/net/bnxt/bnxt_txq.h b/drivers/net/bnxt/bnxt_txq.h index 42d37f7c7f..4416c54fca 100644 --- a/drivers/net/bnxt/bnxt_txq.h +++ b/drivers/net/bnxt/bnxt_txq.h @@ -43,4 +43,5 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, uint16_t nb_desc, unsigned int socket_id, const struct rte_eth_txconf *tx_conf); +uint64_t bnxt_get_tx_port_offloads(struct bnxt *bp); #endif -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:51.323298704 +0800 +++ 0044-net-bnxt-fix-device-capability-reporting.patch 2022-06-21 15:37:49.051117966 +0800 @@ -1 +1 @@ -From 47a956a8fecdc60e935cc9d9b81356cafb2910f0 Mon Sep 17 00:00:00 2001 +From 7ded422e25a5a16c91cce1cdb6e9bbf29165fbc5 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 47a956a8fecdc60e935cc9d9b81356cafb2910f0 ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org @@ -21 +23 @@ - drivers/net/bnxt/bnxt.h | 24 ------------------------ + drivers/net/bnxt/bnxt.h | 25 ------------------------- @@ -28 +30 @@ - 7 files changed, 54 insertions(+), 36 deletions(-) + 7 files changed, 54 insertions(+), 37 deletions(-) @@ -31 +33 @@ -index 44724a9dfe..5eddb4f000 100644 +index c24a9ca92a..61bb59feb6 100644 @@ -34,15 +36,15 @@ -@@ -580,30 +580,6 @@ struct bnxt_rep_info { - RTE_ETH_RSS_NONFRAG_IPV6_UDP | \ - RTE_ETH_RSS_LEVEL_MASK) - --#define BNXT_DEV_TX_OFFLOAD_SUPPORT (RTE_ETH_TX_OFFLOAD_IPV4_CKSUM | \ -- RTE_ETH_TX_OFFLOAD_TCP_CKSUM | \ -- RTE_ETH_TX_OFFLOAD_UDP_CKSUM | \ -- RTE_ETH_TX_OFFLOAD_TCP_TSO | \ -- RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM | \ -- RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO | \ -- RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO | \ -- RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO | \ -- RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO | \ -- RTE_ETH_TX_OFFLOAD_QINQ_INSERT | \ -- RTE_ETH_TX_OFFLOAD_MULTI_SEGS) +@@ -567,31 +567,6 @@ struct bnxt_rep_info { + ETH_RSS_NONFRAG_IPV6_UDP | \ + ETH_RSS_LEVEL_MASK) + +-#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 | \ +- DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \ +- DEV_TX_OFFLOAD_VXLAN_TNL_TSO | \ +- DEV_TX_OFFLOAD_GRE_TNL_TSO | \ +- DEV_TX_OFFLOAD_IPIP_TNL_TSO | \ +- DEV_TX_OFFLOAD_GENEVE_TNL_TSO | \ +- DEV_TX_OFFLOAD_QINQ_INSERT | \ +- DEV_TX_OFFLOAD_MULTI_SEGS) @@ -50,11 +52,12 @@ --#define BNXT_DEV_RX_OFFLOAD_SUPPORT (RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \ -- RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | \ -- RTE_ETH_RX_OFFLOAD_UDP_CKSUM | \ -- RTE_ETH_RX_OFFLOAD_TCP_CKSUM | \ -- RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM | \ -- RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM | \ -- RTE_ETH_RX_OFFLOAD_KEEP_CRC | \ -- RTE_ETH_RX_OFFLOAD_VLAN_EXTEND | \ -- RTE_ETH_RX_OFFLOAD_TCP_LRO | \ -- RTE_ETH_RX_OFFLOAD_SCATTER | \ -- RTE_ETH_RX_OFFLOAD_RSS_HASH) +-#define BNXT_DEV_RX_OFFLOAD_SUPPORT (DEV_RX_OFFLOAD_VLAN_FILTER | \ +- DEV_RX_OFFLOAD_IPV4_CKSUM | \ +- DEV_RX_OFFLOAD_UDP_CKSUM | \ +- DEV_RX_OFFLOAD_TCP_CKSUM | \ +- DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \ +- DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | \ +- DEV_RX_OFFLOAD_JUMBO_FRAME | \ +- DEV_RX_OFFLOAD_KEEP_CRC | \ +- DEV_RX_OFFLOAD_VLAN_EXTEND | \ +- DEV_RX_OFFLOAD_TCP_LRO | \ +- DEV_RX_OFFLOAD_SCATTER | \ +- DEV_RX_OFFLOAD_RSS_HASH) @@ -66 +69 @@ -index 261fe0be56..fac3925469 100644 +index 58198f96be..fdcc73d432 100644 @@ -69 +72 @@ -@@ -971,16 +971,10 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, +@@ -987,16 +987,10 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, @@ -75 +78 @@ -- dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TIMESTAMP; +- dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP; @@ -77 +80 @@ -- dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_VLAN_STRIP; +- dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_VLAN_STRIP; @@ -79 +82 @@ - dev_info->tx_queue_offload_capa = RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE; + dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE; @@ -84 +87 @@ -- dev_info->tx_offload_capa |= RTE_ETH_TX_OFFLOAD_VLAN_INSERT; +- dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_VLAN_INSERT; @@ -89 +92 @@ -index e773932681..8a5b777793 100644 +index b35c54fe13..95d99072cd 100644 @@ -92 +95 @@ -@@ -567,10 +567,8 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev, +@@ -541,10 +541,8 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev, @@ -98 +101 @@ -- dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TIMESTAMP; +- dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP; @@ -106 +109 @@ -index cd3bb1446f..0cfd0e588f 100644 +index 73e0ba36f6..828b8e00aa 100644 @@ -117,9 +120,9 @@ -+ rx_offload_capa = RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | -+ RTE_ETH_RX_OFFLOAD_UDP_CKSUM | -+ RTE_ETH_RX_OFFLOAD_TCP_CKSUM | -+ RTE_ETH_RX_OFFLOAD_KEEP_CRC | -+ RTE_ETH_RX_OFFLOAD_VLAN_FILTER | -+ RTE_ETH_RX_OFFLOAD_VLAN_EXTEND | -+ RTE_ETH_RX_OFFLOAD_TCP_LRO | -+ RTE_ETH_RX_OFFLOAD_SCATTER | -+ RTE_ETH_RX_OFFLOAD_RSS_HASH; ++ rx_offload_capa = DEV_RX_OFFLOAD_IPV4_CKSUM | ++ DEV_RX_OFFLOAD_UDP_CKSUM | ++ DEV_RX_OFFLOAD_TCP_CKSUM | ++ DEV_RX_OFFLOAD_KEEP_CRC | ++ DEV_RX_OFFLOAD_VLAN_FILTER | ++ DEV_RX_OFFLOAD_VLAN_EXTEND | ++ DEV_RX_OFFLOAD_TCP_LRO | ++ DEV_RX_OFFLOAD_SCATTER | ++ DEV_RX_OFFLOAD_RSS_HASH; @@ -127,2 +130,2 @@ -+ rx_offload_capa |= RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM | -+ RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM; ++ rx_offload_capa |= DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | ++ DEV_RX_OFFLOAD_OUTER_UDP_CKSUM; @@ -131 +134 @@ -+ rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TIMESTAMP; ++ rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP; @@ -133 +136 @@ -+ rx_offload_capa |= RTE_ETH_RX_OFFLOAD_VLAN_STRIP; ++ rx_offload_capa |= DEV_RX_OFFLOAD_VLAN_STRIP; @@ -138,2 +141 @@ - /* Determine whether the current configuration needs aggregation ring in HW. */ - int bnxt_need_agg_ring(struct rte_eth_dev *eth_dev) + void bnxt_free_rxq_stats(struct bnxt_rx_queue *rxq) @@ -140,0 +143 @@ + if (rxq && rxq->cp_ring && rxq->cp_ring->hw_stats) @@ -142 +145 @@ -index 0331c23810..287df8dff3 100644 +index 980a16a566..e4d185676f 100644 @@ -145 +148,3 @@ -@@ -65,4 +65,5 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, +@@ -63,4 +63,5 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, + int bnxt_rx_queue_stop(struct rte_eth_dev *dev, + uint16_t rx_queue_id); @@ -147,2 +151,0 @@ - int bnxt_need_agg_ring(struct rte_eth_dev *eth_dev); - void bnxt_free_rxq_mem(struct bnxt_rx_queue *rxq); @@ -152 +155 @@ -index 72a55ea643..86073a505e 100644 +index 6c5e6948a7..bc1797095d 100644 @@ -155 +158 @@ -@@ -17,6 +17,29 @@ +@@ -16,6 +16,29 @@ @@ -163,12 +166,12 @@ -+ tx_offload_capa = RTE_ETH_TX_OFFLOAD_IPV4_CKSUM | -+ RTE_ETH_TX_OFFLOAD_UDP_CKSUM | -+ RTE_ETH_TX_OFFLOAD_TCP_CKSUM | -+ RTE_ETH_TX_OFFLOAD_TCP_TSO | -+ RTE_ETH_TX_OFFLOAD_QINQ_INSERT | -+ RTE_ETH_TX_OFFLOAD_MULTI_SEGS; -+ -+ tx_offload_capa |= RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM | -+ RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO | -+ RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO | -+ RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO | -+ RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO; ++ tx_offload_capa = DEV_TX_OFFLOAD_IPV4_CKSUM | ++ DEV_TX_OFFLOAD_UDP_CKSUM | ++ DEV_TX_OFFLOAD_TCP_CKSUM | ++ DEV_TX_OFFLOAD_TCP_TSO | ++ DEV_TX_OFFLOAD_QINQ_INSERT | ++ DEV_TX_OFFLOAD_MULTI_SEGS; ++ ++ tx_offload_capa |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | ++ DEV_TX_OFFLOAD_VXLAN_TNL_TSO | ++ DEV_TX_OFFLOAD_GRE_TNL_TSO | ++ DEV_TX_OFFLOAD_IPIP_TNL_TSO | ++ DEV_TX_OFFLOAD_GENEVE_TNL_TSO; @@ -177 +180 @@ -+ tx_offload_capa |= RTE_ETH_TX_OFFLOAD_VLAN_INSERT; ++ tx_offload_capa |= DEV_TX_OFFLOAD_VLAN_INSERT; @@ -186 +189 @@ -index 67fd4cbebb..f3a03812ad 100644 +index 42d37f7c7f..4416c54fca 100644