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 AC825A034F for ; Wed, 10 Nov 2021 07:47:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DA1740683; Wed, 10 Nov 2021 07:47:43 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2085.outbound.protection.outlook.com [40.107.244.85]) by mails.dpdk.org (Postfix) with ESMTP id 6A94340683 for ; Wed, 10 Nov 2021 07:47:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RcLDi6U/Gb7NNShV1Ft4LmrC/Sc/j2h9sAznYIMtoU6OouCPGuyuicoe6JGYITUHQrHQds/faZ4mUJfUZKTlVF4Zhry0zLsar3xg5ydfXVm4WBTr2rx9ZZDo9I4t6d2FlKE604nTgaqFH4/4Rl+p7S3HwrHf7q+doQ1G1yuSrzyvjvahgD0pjUASajGW/mlqRG2QT9v9E5rPAWy0Rqtu6/QPTDsEMIcO0zExj2BNZPAj5xAN7k8mZcq01rsJU6hQruDmoHnTiCPWRLTOiTLqlR16e8LFWRxG6VTvWJqdcEIbRLQHWfnGC/XeA5i4QVPnAqTaqayEV306lQ5pHiLmyA== 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=4GnMbr6/CM8+CxQTmHP6xXnIrzF84/EDtQEMnu95NXE=; b=VKaGwtNkVE8ehJfSZYkZREXwYpLEk9kaSsKL2SnOqAPvMZoCf+w6hjg1GQWw+2e6LR+YH5kJtK7OC3FoPcuCbwl29eQM28neAZ33ntl9ARhpJtE1Y0CvAHEJzpF3AlYjbXFikxx3zbkuviVdedhKqHJHRCTBMvi/mp9/Va6LvefjQf624u+MJhylk79ab3LruZGxz1nbCLyBR36gE5VGVhHg1KeVM8J6ccOveSFeDRZKaOWfoksdLsBhEJu7pEPSOdkuIlRiZrglIwisl+7TldNhZMe6hcIkQd6Ew4/N7v4wXKZJAJvpdiVbILFCJSxJZnqOOZNkLxLbrbeG1sBmoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=huawei.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=4GnMbr6/CM8+CxQTmHP6xXnIrzF84/EDtQEMnu95NXE=; b=JO5NzxN2Hk/e0xIfElQ3Oc/fORKZpoz4xdQwxVKV1LB+UNXbsHr1w7Sh3UAmAy/pXeaXYz6oZd9oX0mvYgiV9up+73Gsb2Mt8gZcOPuEs9lYvCrU11O7jC1Yo39UvmiH+8f/FN4KI+Umxya53NZXzNJJyVwiy/6wnE8RqL1VckSX1EOUAO/symm9kj6qY5YRrUF3GlnJzC2VPGsEMumyw2+cCD2SjVd0Zdm1X3MiWiHB7TAVz74LifLCBbYc0Qe6Y9Kf1aK5R4CqAPy24Q3+GGGSBw2vyrK3J/ojPpiDQnL8oZHzH+jDzolmDM1idGylqY4GLhKXeTzU10cJwRXyQQ== Received: from BN9PR03CA0392.namprd03.prod.outlook.com (2603:10b6:408:111::7) by BYAPR12MB3384.namprd12.prod.outlook.com (2603:10b6:a03:d8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Wed, 10 Nov 2021 06:47:38 +0000 Received: from BN8NAM11FT017.eop-nam11.prod.protection.outlook.com (2603:10b6:408:111:cafe::55) by BN9PR03CA0392.outlook.office365.com (2603:10b6:408:111::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13 via Frontend Transport; Wed, 10 Nov 2021 06:47:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; huawei.com; dkim=none (message not signed) header.d=none;huawei.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 BN8NAM11FT017.mail.protection.outlook.com (10.13.177.93) 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:47:37 +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:47:35 +0000 From: Xueming Li To: Chengchang Tang CC: Luca Boccassi , Min Hu , dpdk stable Date: Wed, 10 Nov 2021 14:30:19 +0800 Message-ID: <20211110063216.2744012-136-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: 96c8a1ad-bd8c-41e5-1b4a-08d9a415fbb6 X-MS-TrafficTypeDiagnostic: BYAPR12MB3384: 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: mmtuwKgWNAQ77yVdKzDmH1wv0gGjK4vq5qM2ctXSqcz3CcIumgo2cdUMOzAjRf4XTZ3gj/NtVN7QsLDpyAIObI+RPexPyfHyaL1e9iLtFbftez3P3P22I5dsFlhO+/sDR8MyC/KxQ+7EvTcjSsGSuPU7AWlX74a9gdwjaLJUkJADG98VWISrUjZA8ZUED/ixY4XQRwkB3w2npPtGMZtXRnrDw8m6IsRzpzEzYxwVT3jUZxhmuJ5bqFqRQhkyMpaTHfXFDYg+EFxKO4MLIY1KnOhbFCudkZxa0ecbaCzs73NZeFgk/hqkT6p2kiKsorImwJWxSUSr+cH0Y5Yl/+gEzqm5ge0uSc4vthkiL2K9VEjY3abepuOxgbcxQrV+EFyvjAMHlI+bltiuX4ELzeAtUU9R6XJB0NrvAg6d6yo9DTxnRPjXqjr49BunQZNdLROG7udKfnOOZoWM3ChE3iPJBpUMSlZYpp9Il043rEOyNSLZcSy9Oq+GPNqc6PKGlvpFTV3G9YnMewkVg0c4wyO5GXBQf3GHf7GwNSZySUwsn9VvFSLHKOvjfeGm+t0CP3FxpQulzZmv6I4am91PjkzDxd9HsLMUcthSZbPwFT67WSnKPt1FZjdn7cuO2/ABEMKcUyufWm1ZrsJiStaIW2Ayd7HeC6+DZwn4YPo2CYH7wCIZkOUlFywlqZF4mLtTPiYgi8DX1bVh94z7JseptYieQDJQ988ydPCJXgesJNsk8PK1/tB9jVdzhDlNskwZz6VQkoRKnNsLJVPvWYNXsbBFgg2z/FyJ8s8xppVSZQGUtGJTOHx+H6gO98Qp5bcJ0S+w38rYpXiuIny1/c9ncYO54w== 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)(4326008)(2906002)(47076005)(53546011)(7636003)(2616005)(8936002)(36756003)(55016002)(54906003)(966005)(508600001)(83380400001)(36860700001)(5660300002)(7696005)(356005)(36906005)(8676002)(70586007)(316002)(86362001)(6916009)(70206006)(6666004)(82310400003)(26005)(186003)(16526019)(426003)(336012)(6286002)(4001150100001)(1076003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:47:37.2400 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 96c8a1ad-bd8c-41e5-1b4a-08d9a415fbb6 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: BN8NAM11FT017.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3384 Subject: [dpdk-stable] patch 'net/bonding: fix dedicated queue mode in vector burst' 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/59556c7e7a6ed3021349a88a6758fec07190e73b Thanks. Xueming Li --- >From 59556c7e7a6ed3021349a88a6758fec07190e73b Mon Sep 17 00:00:00 2001 From: Chengchang Tang Date: Wed, 22 Sep 2021 15:09:12 +0800 Subject: [PATCH] net/bonding: fix dedicated queue mode in vector burst Cc: Xueming Li [ upstream commit b8cfca26aed14354a6594d416a37881f494e2cfc ] If the vector burst mode is selected, the dedicated queue mode will not take effect on some PMDs because these PMDs may have some limitations in vector burst mode. For example, the limit on burst size. Currently, both hns3 and intel I40E require four alignments when receiving packets in vector mode. As a result, they can't accept packets if burst size below four. However, in dedicated queue mode, the burst size of periodic packets processing is one. This patch fixes the above problem by modifying the burst size to 32. This approach also makes the packet processing of the dedicated queue mode more reasonable. Currently, if multiple LACP protocol packets are received in the hardware queue in a cycle, only one LACP packet will be processed in this cycle, and the left packets will be processed in the following cycle. After the modification, all the LACP packets will be processed at one time, which seems more reasonable and closer to the behavior of the bonding driver when the dedicated queue is not turned on. Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control") Signed-off-by: Chengchang Tang Signed-off-by: Min Hu (Connor) --- drivers/net/bonding/rte_eth_bond_8023ad.c | 32 ++++++++++++++++------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index 128754f459..478c28afee 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -838,6 +838,27 @@ rx_machine_update(struct bond_dev_private *internals, uint16_t slave_id, rx_machine(internals, slave_id, NULL); } +static void +bond_mode_8023ad_dedicated_rxq_process(struct bond_dev_private *internals, + uint16_t slave_id) +{ +#define DEDICATED_QUEUE_BURST_SIZE 32 + struct rte_mbuf *lacp_pkt[DEDICATED_QUEUE_BURST_SIZE]; + uint16_t rx_count = rte_eth_rx_burst(slave_id, + internals->mode4.dedicated_queues.rx_qid, + lacp_pkt, DEDICATED_QUEUE_BURST_SIZE); + + if (rx_count) { + uint16_t i; + + for (i = 0; i < rx_count; i++) + bond_mode_8023ad_handle_slow_pkt(internals, slave_id, + lacp_pkt[i]); + } else { + rx_machine_update(internals, slave_id, NULL); + } +} + static void bond_mode_8023ad_periodic_cb(void *arg) { @@ -926,15 +947,8 @@ bond_mode_8023ad_periodic_cb(void *arg) rx_machine_update(internals, slave_id, lacp_pkt); } else { - uint16_t rx_count = rte_eth_rx_burst(slave_id, - internals->mode4.dedicated_queues.rx_qid, - &lacp_pkt, 1); - - if (rx_count == 1) - bond_mode_8023ad_handle_slow_pkt(internals, - slave_id, lacp_pkt); - else - rx_machine_update(internals, slave_id, NULL); + bond_mode_8023ad_dedicated_rxq_process(internals, + slave_id); } periodic_machine(internals, slave_id); -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:07.940208311 +0800 +++ 0135-net-bonding-fix-dedicated-queue-mode-in-vector-burst.patch 2021-11-10 14:17:01.897412539 +0800 @@ -1 +1 @@ -From b8cfca26aed14354a6594d416a37881f494e2cfc Mon Sep 17 00:00:00 2001 +From 59556c7e7a6ed3021349a88a6758fec07190e73b Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit b8cfca26aed14354a6594d416a37881f494e2cfc ] @@ -24 +26,0 @@ -Cc: stable@dpdk.org @@ -33 +35 @@ -index 3558644232..2029955c10 100644 +index 128754f459..478c28afee 100644