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 A3D0AA0C46; Fri, 17 Sep 2021 10:01:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28E86406B4; Fri, 17 Sep 2021 10:01:58 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2084.outbound.protection.outlook.com [40.107.223.84]) by mails.dpdk.org (Postfix) with ESMTP id 78CDF40689 for ; Fri, 17 Sep 2021 10:01:57 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dr05VILuMx4s+4vgAjZEB+5xGMCTbX6i0T8tqGyV5SStlSZ060+L2pjPDO0+M62k/85Qf28yeBtEpJ2xaEl4F5gfDDUSwBxenMWwF30iYxwydUFu/L4M08/U0YCGuOjKN+/9Fu+FMpPQzpz2nP0fQ2y6yy9s6UBuslwyIcKXfyosTqBqNzwYRCbArJydxBQtPRq4i6OLzRWReEm5wIrKq65raxQE/t7DZRoXPmnvLqL1wu1tck3+pW9jAuFDhKX7uiSMraa/mD0PujgjlsqQViauuP20EDblE03IUdxcvlVRw/rYs2IAbW/ZzsKSJG1Vpdfw7JTTgyzYGG33BheKGg== 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; bh=BGg2UwYNLNjXLvHGfbDMf2P9bw4KnHAP45Gh6LFycNA=; b=cqclnXjklKWh/AiK7CU36L+fr7Kv+pewPcrnT9zNFmO16m3Zuo88V4Y+RBETYVDggmAkLa9DG11L7GMgkawzOQhkYNL1MZ50JH1K8tZkVSk6n1VFx4OhDwAkezDYztpPWZL7R0TvM7mzgXtG8f3Rf07FijZawaRymT7ameMimmHNDc5kvFW75ZwbqFtPAemAsoe70HsIE0K3qoWXmqTpfh9E/oXHYXsgf0Cwp5lwg1azACZ5XiQ9DQ4Ybn/UnBSxsP/UnMh/9zk7Ej4cf3FgGc5EMqOjUKqC+HMiok+vXms4uKSBPfIVaaiwQvvndDgvH7D5+eN4tQ2cdzxfB5NSIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine 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=BGg2UwYNLNjXLvHGfbDMf2P9bw4KnHAP45Gh6LFycNA=; b=BWW8T19LbDwV3RMiWshKMCbKyTp6spk7SAxXuuSh12IL2Y4L9gkZoDLESwFtkyetk19BcRpIoce4DQViniC2ysJQFU/+D5yGJSIyifjjDLg/IfBVZ3iYBhYBVT7a13jviB7mOXr9Ca3NEtzFDSHgCAmt1A6UY8Vp8LYsUqlf4m4hVrlhFxI/cKUZdyoycrWBwx2TYwOKz+rhmG1gQ+GE8uY4ITt+uONBb+8Zx7GI3oEOQpFZSgIMpUf/jrO0d8EE1T1gIBvi8bxdOHktlzQgKIbc7aaYDZGaOPRNUkeqqL7KoxqZnEAo4b9EYrz1V3sOiN60SoVLHotMGOsvn5DK/Q== Received: from DM5PR07CA0110.namprd07.prod.outlook.com (2603:10b6:4:ae::39) by MWHPR1201MB0173.namprd12.prod.outlook.com (2603:10b6:301:56::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Fri, 17 Sep 2021 08:01:55 +0000 Received: from DM6NAM11FT030.eop-nam11.prod.protection.outlook.com (2603:10b6:4:ae:cafe::67) by DM5PR07CA0110.outlook.office365.com (2603:10b6:4:ae::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Fri, 17 Sep 2021 08:01:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.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 DM6NAM11FT030.mail.protection.outlook.com (10.13.172.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4523.14 via Frontend Transport; Fri, 17 Sep 2021 08:01:55 +0000 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 17 Sep 2021 08:01:54 +0000 Received: from nvidia.com (172.20.187.5) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 17 Sep 2021 08:01:52 +0000 From: Xueming Li To: CC: , Jerin Jacob , Ferruh Yigit , Andrew Rybchenko , Viacheslav Ovsiienko , Thomas Monjalon , Lior Margalit Date: Fri, 17 Sep 2021 16:01:13 +0800 Message-ID: <20210917080121.329373-1-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210727034204.20649-1-xuemingl@nvidia.com> References: <20210727034204.20649-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 DRHQMAIL107.nvidia.com (10.27.9.16) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5bec345e-239a-4df2-21b7-08d979b16a7e X-MS-TrafficTypeDiagnostic: MWHPR1201MB0173: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UyWUhWFSE4vdF81NHCFLTpovlXLMHUK0SohB1LTV7PoKw6Kl1lEZWM1nqThEMb0vpqc14ETiLv8VVChBxVw633zQlVcS9A8UMf2puBeQhqo6DrGEp9YhevmfVlWDkcVwR5FSfRfWmlQtTDqD3Azb+H5Ph7VVsYdsOYLJw+WfASrs5OcMtjLC0fEVz/P8tW4nSBc2K2YTtWin8UqTSpBkxR2KrUTF/9tc40QKtQcr2W2RiYmAW5JkGmDxe3jOj7bhhcHIVmsUMZgnWOJhfixXKf87ZVTzfr006BPWfQs1PxERhlLtl0GTC+7c+6nnM3MT8PMjsUeOyvCZiMISqOjFXu6WknjifhPGTwubZJHK3sotDMsnjqg5UBi3b5CHgkOuIyg80oJQO5aLly2NFWjxQghYaAj9L6aglxdEh9bCcjEMals04f/aH5nJBWNeYVP+GuEIWVetG7qhvW1esdTpK/467LIIWGav4DEXpkeYnGACUttY6CADJx5ZrM3oc2QSy4f2CalLNlupTeEkQMw0uVLV53/QuTaZ4FI/Kw5hOleHRpePLjkNc8v4uyCstFOsPCMya7l37N0uHlZI0zHPc7iEFuhKC0OuoqIPhlUhQHjM9ww535qbgzao4mHVumOZW1DP4AwXp4oHFH1mj5sVVpjyVC7N7nVEZFUqN00VIx97f3xn1EZwFxkpLHt4MQ9ycaQr5hRTSr8W5GUgn+G2WQ== 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)(83380400001)(8936002)(36860700001)(4326008)(16526019)(47076005)(70586007)(36906005)(316002)(54906003)(7696005)(36756003)(55016002)(6666004)(107886003)(1076003)(86362001)(8676002)(356005)(336012)(5660300002)(426003)(2616005)(26005)(7636003)(6916009)(2906002)(82310400003)(186003)(508600001)(6286002)(70206006); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2021 08:01:55.1179 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5bec345e-239a-4df2-21b7-08d979b16a7e 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: DM6NAM11FT030.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0173 Subject: [dpdk-dev] [PATCH v3 0/8] ethdev: introduce shared Rx queue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In current DPDK framework, all RX queues is pre-loaded with mbufs for incoming packets. When number of representors scale out in a switch domain, the memory consumption became significant. Further more, polling all ports leads to high cache miss, high latency and low throughputs. This patch introduces shared RX queue. PF and representors with same configuration in same switch domain could share RX queue set by specifying shared Rx queue offloading flag and sharing group. All ports that Shared Rx queue actually shares One Rx queue and only pre-load mbufs to one Rx queue, memory is saved. Polling any queue using same shared RX queue receives packets from all member ports. Source port is identified by mbuf->port. Multiple groups is supported by group ID. Port queue number in a shared group should be identical. Queue index is 1:1 mapped in shared group. An example of polling two share groups: core group queue 0 0 0 1 0 1 2 0 2 3 0 3 4 1 0 5 1 1 6 1 2 7 1 3 Shared RX queue must be polled on single thread or core. If both PF0 and representor0 joined same share group, can't poll pf0rxq0 on core1 and rep0rxq0 on core2. Actually, polling one port within share group is sufficient since polling any port in group will return packets for any port in group. v1: - initial version v2: - add testpmd patches v3: - change common forwarding api to macro for performance, thanks Jerin. - save global variable accessed in forwarding to flowstream to minimize cache miss - combined patches for each forwarding engine - support multiple groups in testpmd "--share-rxq" parameter - new api to aggerate shared rxq group Xiaoyu Min (1): app/testpmd: add common fwd wrapper Xueming Li (7): ethdev: introduce shared Rx queue ethdev: new API to aggregate shared Rx queue group app/testpmd: dump port and queue info for each packet app/testpmd: new parameter to enable shared Rx queue app/testpmd: force shared Rx queue polled on same core app/testpmd: improve forwarding cache miss app/testpmd: support shared Rx queue forwarding app/test-pmd/5tswap.c | 25 +--- app/test-pmd/config.c | 120 +++++++++++++++++- app/test-pmd/csumonly.c | 25 +--- app/test-pmd/flowgen.c | 26 ++-- app/test-pmd/icmpecho.c | 30 ++--- app/test-pmd/ieee1588fwd.c | 30 +++-- app/test-pmd/iofwd.c | 24 +--- app/test-pmd/macfwd.c | 24 +--- app/test-pmd/macswap.c | 23 +--- app/test-pmd/noisy_vnf.c | 2 +- app/test-pmd/parameters.c | 13 ++ app/test-pmd/rxonly.c | 32 ++--- app/test-pmd/testpmd.c | 91 ++++++++++++- app/test-pmd/testpmd.h | 47 ++++++- app/test-pmd/txonly.c | 8 +- app/test-pmd/util.c | 1 + doc/guides/nics/features.rst | 11 ++ doc/guides/nics/features/default.ini | 1 + .../prog_guide/switch_representation.rst | 10 ++ doc/guides/testpmd_app_ug/run_app.rst | 5 + lib/ethdev/ethdev_driver.h | 23 +++- lib/ethdev/rte_ethdev.c | 23 ++++ lib/ethdev/rte_ethdev.h | 23 ++++ lib/ethdev/version.map | 3 + 24 files changed, 432 insertions(+), 188 deletions(-) -- 2.33.0