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 E368EA0C3F for ; Sat, 12 Jun 2021 01:17:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC421406A2; Sat, 12 Jun 2021 01:17:30 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2065.outbound.protection.outlook.com [40.107.243.65]) by mails.dpdk.org (Postfix) with ESMTP id D1E46406A2 for ; Sat, 12 Jun 2021 01:17:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bswuq7owhCbf6zXX2RStdxW4UAZQM5vsHQX3arO163vBeIU4n/9Mfwx4mQjorzwLLDUV4HrptxRKx/uC4Ody6YShfmn03I+qwwRezTWcHERQz1V+pKdSB+YFXvB3j/TkA6pG2asb8KGhNb1AIWuR2gKGnaJaCvmDl14ctLRJfWH8OZzGXGac2Ecgfr5n/rvXc7Gfhg5nbh3SwYhQTYv7qm4423B14xZUq+WxQZohEfzB16y8u6HtZIWvMAUx47YL0+L08sSb+qKMoIAZyiKr6z856EDRHt00m/2/3n/NCngRsz4Ebcxf6oFLVw+5O9h9qUMaGyZJPe2FPKli66Z6Ug== 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-SenderADCheck; bh=MikkyJHVLVOV+0NUEzzadlfBkxRCuT3Yfam4lsBNCt8=; b=bg5i0VO5Doc9Y7OGMSBTIuiDYAMWfqEx/yo9PNw0zE99rAeUQH5uKMvFOeZY5yTKxi17+8Vakg8+XnYZdK+ebrTCEq8t/MJK0S58cfE6jM2cZnIvRnF6WWDuxD31ruNVBccKdSE624xF/WksgGtKuSjCZoWNhEfRrfnIssQF7XgqqQuODBge3Nj1bYa7qhWzQDZ1Z2A7kaswp6ttS3GAreoLX4hYpYDuSvFom2S5wxi0SgOHB/Z+b99FfZLJE1osHG6PK7Cp5bGCWo/RASQYe+N2B2NSQZu4IKZykjStHCYp8rYgsmnU0nD6GveXfDUzHow1RLm62rE+iY8aBTw6CA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=amazon.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=MikkyJHVLVOV+0NUEzzadlfBkxRCuT3Yfam4lsBNCt8=; b=QWsrRL+WR1wN05FfZ6WnHIFStm+AvpTZ12CPGHF+PpBsX8kpO4ZS/hqt8PXqzqzntMpqM9W7jxDUvz6KbU5qjsw1YNx3/T1OmfItvAbN29hvbmSqE31ghWWevysgnBGM1nYYD3PxTyZXdjNasNCjvPthJANuhjjMF7DfyZ9xTgcJkRp7Zu6llTA8xJkEvVQom+/OfIZHcwhgDU9p5L7ZwC5UKTwCQbqwoLSdd2op82eZOSObXG5lcXp1j6hLZYMQyz0HFN941bcNVKDjlVWpn8JehXvFkokcsHqpSdjVhceygP53BJ0NYE7WrJ5lror3bV21MKsoMJ9hyZsQmpSc/Q== Received: from BN9PR03CA0457.namprd03.prod.outlook.com (2603:10b6:408:139::12) by MW3PR12MB4556.namprd12.prod.outlook.com (2603:10b6:303:52::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.22; Fri, 11 Jun 2021 23:17:28 +0000 Received: from BN8NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:408:139:cafe::5e) by BN9PR03CA0457.outlook.office365.com (2603:10b6:408:139::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20 via Frontend Transport; Fri, 11 Jun 2021 23:17:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; amazon.com; dkim=none (message not signed) header.d=none;amazon.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 BN8NAM11FT060.mail.protection.outlook.com (10.13.177.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4219.21 via Frontend Transport; Fri, 11 Jun 2021 23:17:28 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 11 Jun 2021 23:17:25 +0000 From: Xueming Li To: Michal Krawczyk CC: Luca Boccassi , Igor Chauskin , Amit Bernstein , dpdk stable Date: Sat, 12 Jun 2021 07:03:47 +0800 Message-ID: <20210611230433.8208-133-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210611230433.8208-1-xuemingl@nvidia.com> References: <20210510160258.30982-229-xuemingl@nvidia.com> <20210611230433.8208-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 29396f7d-ba6e-4dbb-03d0-08d92d2f149a X-MS-TrafficTypeDiagnostic: MW3PR12MB4556: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2l8UmYEdB5Nipb3fsv27kmr1YsaHmrGMG6e1jqcfq96PYNfddxYlgwN7+A5BgSMrHvycRFhHmtt8bntTfYu/qw3OlhYjkddAbcGry60QWLZp5DVva4yN2zIiKtUP6jX1avEczEfmV4nU33vlBbsb1STF/8gaq/YM7oJA15TwMLA8r8D79xJf18KG3ObMHVRnIh978AEYdCIFzNf3evUyLjFcpq1RrxF6Cf4gxGTS8I/JbBM+MCdxrKlAqXe7OaVf/1UsrB0niPlf4Q+yjRJ85DBXsKZY2+CVu3rqBWsTjTAG7oVyACeI+ZC/fMhdrCsOvWsY7BA3lyvC/nfLmPuvmwDF01RHAV0aR+fphNQ5dZOthqUt8xUVWSN4ASXMQGqm68Nqjb/1lDgQZIyRTBFqCg9ZSrHJmsH9Kj0kEpw8NZrYA4Xh7CuG9oinKooTjkN5WF/QGEoU6dSyyMc3BIJNcxw8eUKcT4GOVmommlHd1nO3+CH7VOhiGiavBtBQ+sq7av4INSVwHcLns+bYURZrOieygZQd07Ag75v48H2UiTXs+Y6sTq8sEpaRcXayyMFLwNeGPWoh4Ma3kC+GtHpK13ou2Xhj5X4hhx70KIj9NBoCiDoDjqS8Ph252YmufK0ovjGHb6DTipP3umEWJdZwtzZVve6UAJoW8yRA1uQ+jPh7qvwjzlv3Bm/1afpkN8pDvDWb+LIWebF6YMTziPBRkhKelvUz/DEefBgrMo8q02Sj39eiYNIuxEBCXtDzJxRQ+I3Xy8xDF9Ze5J2jyr3R2MCLrHWS5BBZkoTSHSJZ9j/nV9j4pmeQkqGAilEJprac 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)(136003)(376002)(39860400002)(346002)(396003)(46966006)(36840700001)(1076003)(6286002)(316002)(26005)(54906003)(2906002)(82310400003)(6916009)(36906005)(16526019)(47076005)(356005)(5660300002)(186003)(7636003)(83380400001)(55016002)(86362001)(82740400003)(36860700001)(4326008)(36756003)(70586007)(8676002)(6666004)(7696005)(19627235002)(70206006)(966005)(8936002)(2616005)(53546011)(336012)(478600001)(426003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2021 23:17:28.0237 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 29396f7d-ba6e-4dbb-03d0-08d92d2f149a 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: BN8NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4556 Subject: [dpdk-stable] patch 'net/ena: indicate Rx RSS hash presence' has been queued to stable release 20.11.2 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.2 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/14/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/e5c01fbc22f9cb6551b12e303a27423cd83187b7 Thanks. Xueming Li --- >From e5c01fbc22f9cb6551b12e303a27423cd83187b7 Mon Sep 17 00:00:00 2001 From: Michal Krawczyk Date: Wed, 12 May 2021 12:13:44 +0200 Subject: [PATCH] net/ena: indicate Rx RSS hash presence Cc: Luca Boccassi [ upstream commit b418f0d29977f031e18185d78198f2717bcfb361 ] To make it possible to the app to determine if the hash was calculated for the packet or not, the PKT_RX_RSS_HASH should be set in the mbuf's ol_flags. As the PMD wasn't setting that, the application couldn't check if there is a hash in a proper way. The hash is valid only if it's UDP or TCP and the IP packet wasn't fragmented. Fixes: e5df9f33db00 ("net/ena: fix passing RSS hash to mbuf") Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Amit Bernstein --- drivers/net/ena/ena_ethdev.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index aa497ba985..69198a6435 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -51,6 +51,8 @@ #define ENA_MIN_RING_DESC 128 +#define ENA_PTYPE_HAS_HASH (RTE_PTYPE_L4_TCP | RTE_PTYPE_L4_UDP) + enum ethtool_stringset { ETH_SS_TEST = 0, ETH_SS_STATS, @@ -314,6 +316,11 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf, else ol_flags |= PKT_RX_L4_CKSUM_GOOD; + if (likely((packet_type & ENA_PTYPE_HAS_HASH) && !ena_rx_ctx->frag)) { + ol_flags |= PKT_RX_RSS_HASH; + mbuf->hash.rss = ena_rx_ctx->hash; + } + mbuf->ol_flags = ol_flags; mbuf->packet_type = packet_type; } @@ -1954,6 +1961,9 @@ static int ena_dev_configure(struct rte_eth_dev *dev) adapter->state = ENA_ADAPTER_STATE_CONFIG; + if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) + dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; + adapter->tx_selected_offloads = dev->data->dev_conf.txmode.offloads; adapter->rx_selected_offloads = dev->data->dev_conf.rxmode.offloads; return 0; @@ -2030,6 +2040,7 @@ static int ena_infos_get(struct rte_eth_dev *dev, /* Inform framework about available features */ dev_info->rx_offload_capa = rx_feat; + dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_RSS_HASH; dev_info->rx_queue_offload_capa = rx_feat; dev_info->tx_offload_capa = tx_feat; dev_info->tx_queue_offload_capa = tx_feat; @@ -2242,8 +2253,6 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, ++rx_ring->rx_stats.bad_csum; } - mbuf->hash.rss = ena_rx_ctx.hash; - rx_pkts[completed] = mbuf; rx_ring->rx_stats.bytes += mbuf->pkt_len; } -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-06-12 06:53:59.995437300 +0800 +++ 0133-net-ena-indicate-Rx-RSS-hash-presence.patch 2021-06-12 06:53:56.570000000 +0800 @@ -1 +1 @@ -From b418f0d29977f031e18185d78198f2717bcfb361 Mon Sep 17 00:00:00 2001 +From e5c01fbc22f9cb6551b12e303a27423cd83187b7 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit b418f0d29977f031e18185d78198f2717bcfb361 ] @@ -17 +19,0 @@ -Cc: stable@dpdk.org @@ -23,16 +25,3 @@ - doc/guides/rel_notes/release_21_05.rst | 1 + - drivers/net/ena/ena_ethdev.c | 13 +++++++++++-- - 2 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst -index bb8fe03b0b..98cdc85888 100644 ---- a/doc/guides/rel_notes/release_21_05.rst -+++ b/doc/guides/rel_notes/release_21_05.rst -@@ -118,6 +118,7 @@ New Features - - * Changed memcpy mapping to the dpdk-optimized version. - * Updated ena_com (HAL) to the latest version. -+ * Added indication of the RSS hash presence in the mbuf. - - * **Updated Arkville PMD driver.** - + drivers/net/ena/ena_ethdev.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + @@ -40 +29 @@ -index 54d5e756cb..fb2b19cfdb 100644 +index aa497ba985..69198a6435 100644