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 7F6FFA034F for ; Wed, 10 Nov 2021 07:50:47 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F38640142; Wed, 10 Nov 2021 07:50:47 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2074.outbound.protection.outlook.com [40.107.243.74]) by mails.dpdk.org (Postfix) with ESMTP id 2F72940142 for ; Wed, 10 Nov 2021 07:50:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HIDpVp9tIW2AVgKM0YttiTyMRJKygUVdde/Pf4EFvg4wKGm2mF+9P1NimTIeREd/fG5cKgvIwPIYUgggs7+T0WVTAdcMZB3B7f1enSSQNpZVdU4d4sj3CT4wRO6+gNRtI3MYDeeKOKfFG4HtLhB8KyWOHNH3hHI0VZHcVszafMHYCfXxEhU7c0L1CJ34amssG8DfT4fcRECLm2fVicpuDEEAdpQFRC5fD6rEfxVAYh5rmjL3pzvoozIggYqtC8ct72xmHdPFyae6qCdCBW+jL8NXTtk6qANEBIbQ5sikSAz2Iu1tx4MFZPq4cU7zYNI8qjFh2K5GwMlNmNllQd8M7A== 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=Pj/p8yiaw+Tt+Z1Yut+8jHXqM3q/VZYH1Wts7ztszt0=; b=iqpml4HQtnelfNKqlWQOxFuvtqNf7VGtGPTiHdJTf0Vg5XNuDRMf5qcdXoP+px2nOMY0EIzxKGmdDZkmnZm9xy+7uzU4+uRD/nKlFYuPIfQCsK+nSFXUjlYKjcH1kgjGw5XNd7dq3i2JlMgs/zCWbiMp3bTqREDWhXZ2EI8pQEsmdU5sXl9NKqsmDdJsnHO9IZTCT18Sm/2f0SupQB8pl2zMTjpU4VGDhWRBGOQ+0MhZvt51c1guGjcjklvl5BMo8kbo9BumT01kzwHFm5nwWnNjEoamuNzPhl+uEpA8Xqr43vg6RKcRVWc4P/FENShe8iQB2E7qsAz7GKZYIoDMCQ== 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=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=Pj/p8yiaw+Tt+Z1Yut+8jHXqM3q/VZYH1Wts7ztszt0=; b=L+sy9K77gPtETrkYuLjwwXYnCNM1mTW1osWj2LrTND/YUAEkPCEyRHS0517/r+2R4ZVXwxOd9G2hVcPFSGOkSCRFUO58kabKIRodlwjk0n7zIGI4zV5PKftDscQXL1iU6NKKKQDNOuqomu/3bt3lqtxV1a9BuXaDwLx6hkYGpkwA+IWW7ZQfGzmgdlj8CdVGm50fhOjUmUqacpnSrAQLQyzYlAJlaFJSHSeGBfJoWZvW7gcKZiiFRU2W56WtMDdfUhlTOMuZEUcWNtrpgg68zIsELIvAkNaoXMPumRaOkJarpoaXZVHtajx69XwpBoNr9vBbtckARcOA9oGi7+ERFQ== Received: from BN8PR04CA0040.namprd04.prod.outlook.com (2603:10b6:408:d4::14) by MN2PR12MB4048.namprd12.prod.outlook.com (2603:10b6:208:1d5::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.16; Wed, 10 Nov 2021 06:50:44 +0000 Received: from BN8NAM11FT052.eop-nam11.prod.protection.outlook.com (2603:10b6:408:d4:cafe::1) by BN8PR04CA0040.outlook.office365.com (2603:10b6:408:d4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Wed, 10 Nov 2021 06:50:44 +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 BN8NAM11FT052.mail.protection.outlook.com (10.13.177.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:50:43 +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:50:28 +0000 From: Xueming Li To: Michal Krawczyk CC: Luca Boccassi , Igor Chauskin , Shai Brandes , dpdk stable Date: Wed, 10 Nov 2021 14:30:45 +0800 Message-ID: <20211110063216.2744012-162-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: 112108c8-eb69-4b1c-a559-08d9a4166ae4 X-MS-TrafficTypeDiagnostic: MN2PR12MB4048: 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: PyhJQ1iiqN4F40OqffrxcMUoD8vBpifqKV2K8zTNY5ELY1u01Txloh3zf62AC5UkXalw0LLMjOERql4VBbbNgerq2sxeC91fcOFi5lAiaD4WN7L2hqvWIKM7SI3XDtPBb2Ud9EjPXcx8ZvhAYydYTMbo6RvUeXSBsJTEeqHd/DXI5UjzXEtpDyMUB7S3Vnx+jRe77rDCsfkphfScf1Hq3mWpjveQN9OhVAOYUCn3rQDwccPq2dWzWuX5lKx9t8Wjc+1as43LFf+iJ7/RiPWrpTAEfJdD3/LDPJodEVeGbB5ORoXS9ps9QZ6CaFYAu96/hyU7EdWNAUrzViTiCNHPEG1+ogxtKaCVgivA0bWLWm9lgwCAoR6Vwc2i2/zYIWQtCE60SkRkILcsljSZI9D60+A6RCILTCtm7TN7eOD0f7vHAqNDpvUg2uQC8f2fuDdeeLTVHbz5fNXhpoOgMBSRFbXbg9q7q1yd9nRvRGZTYcnsVcnqYM0QpoIJG9F6mR+wquv6pKQgPLAvheBA8NjPUEZOdPmpQCwJdBvSKYqmt655bkVtDqLLPPbCbpPTUgZO2M1jSIa08QUsTeQC2C7/KxPx1q9+xkhI+Us1+kR8e7WQ+VHm3CnQZ3g0oEYjpTtNMBeN8aNbpY+7yT1vj1yl4QJZ9TJHN6oH7OndZxl0DMgRUdWO2x9LIvTzDhhwC4w8y6XNRRnTXIMHml2TCdR6u+hZ1DsD2A5Of9RZ/Gpl2CoHux+lPUCvgtYK0timoC0vENzBHMQldn/23ggIFNIXP/mlq9WY+iD16Y+xNapa0mUTL10nQydbyS80lT+wDO+iNT8uvT288bGKazt85Imd+A== 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)(36906005)(336012)(1076003)(426003)(4001150100001)(70206006)(53546011)(36860700001)(54906003)(8936002)(55016002)(26005)(82310400003)(316002)(8676002)(966005)(70586007)(6286002)(356005)(7636003)(508600001)(6666004)(2616005)(6916009)(4326008)(2906002)(186003)(16526019)(36756003)(47076005)(7696005)(5660300002)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:50:43.7631 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 112108c8-eb69-4b1c-a559-08d9a4166ae4 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: BN8NAM11FT052.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4048 Subject: [dpdk-stable] patch 'net/ena: advertise scattered Rx capability' 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/62a0570fb5f3e3efbe60269a374585b99172345f Thanks. Xueming Li --- >From 62a0570fb5f3e3efbe60269a374585b99172345f Mon Sep 17 00:00:00 2001 From: Michal Krawczyk Date: Tue, 19 Oct 2021 12:56:26 +0200 Subject: [PATCH] net/ena: advertise scattered Rx capability Cc: Xueming Li [ upstream commit e2a6d08bef489215ebb77b1d3033875ada757cfa ] ENA can't be forced to always pass single descriptor for the Rx packet. Even if the passed buffer size is big enough to hold the data, we can't make assumption that the HW won't use extra descriptor because of internal optimizations. This assumption may be true, but only for some of the FW revisions, which may differ depending on the used AWS instance type. As the scattered Rx support on the Rx path already exists, the driver just needs to announce DEV_RX_OFFLOAD_SCATTER capability by turning on the rte_eth_dev_data::scattered_rx option. Fixes: 1173fca25af9 ("ena: add polling-mode driver") Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Shai Brandes --- drivers/net/ena/ena_ethdev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index f4e26927a4..6d42846092 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -2023,8 +2023,14 @@ static int ena_dev_configure(struct rte_eth_dev *dev) dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; dev->data->dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_MULTI_SEGS; + /* Scattered Rx cannot be turned off in the HW, so this capability must + * be forced. + */ + dev->data->scattered_rx = 1; + adapter->tx_selected_offloads = dev->data->dev_conf.txmode.offloads; adapter->rx_selected_offloads = dev->data->dev_conf.rxmode.offloads; + return 0; } @@ -2072,6 +2078,8 @@ static uint64_t ena_get_rx_port_offloads(struct ena_adapter *adapter) if (adapter->offloads.rx_offloads & ENA_RX_RSS_HASH) port_offloads |= DEV_RX_OFFLOAD_RSS_HASH; + port_offloads |= DEV_RX_OFFLOAD_SCATTER; + return port_offloads; } -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:09.092642538 +0800 +++ 0161-net-ena-advertise-scattered-Rx-capability.patch 2021-11-10 14:17:01.970745273 +0800 @@ -1 +1 @@ -From e2a6d08bef489215ebb77b1d3033875ada757cfa Mon Sep 17 00:00:00 2001 +From 62a0570fb5f3e3efbe60269a374585b99172345f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit e2a6d08bef489215ebb77b1d3033875ada757cfa ] @@ -18 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +30 @@ -index 655c53b525..94dbb3164e 100644 +index f4e26927a4..6d42846092 100644 @@ -31 +33 @@ -@@ -1917,8 +1917,14 @@ static int ena_dev_configure(struct rte_eth_dev *dev) +@@ -2023,8 +2023,14 @@ static int ena_dev_configure(struct rte_eth_dev *dev) @@ -46 +48 @@ -@@ -1966,6 +1972,8 @@ static uint64_t ena_get_rx_port_offloads(struct ena_adapter *adapter) +@@ -2072,6 +2078,8 @@ static uint64_t ena_get_rx_port_offloads(struct ena_adapter *adapter)