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 1ACD2A00C3; Tue, 20 Sep 2022 09:11:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AA9A24069B; Tue, 20 Sep 2022 09:11:15 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2084.outbound.protection.outlook.com [40.107.96.84]) by mails.dpdk.org (Postfix) with ESMTP id 922BA4021D for ; Tue, 20 Sep 2022 09:11:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZsSVEKvQI3LY5nszUYPmS2lmOODjbrny3FHTgZEActMfsocMgWC5RPH++VrHxmkIes6+D1zR/JzwRQNqpLPUPddALGewrJzVcXc6w+OhiZbEWXMyf6VnzF3iexO/kVud5c2Gw/6J64xn/ZK/b6oS7cGw1piZE0NkfaAdM53A/28gbu3n48MpniajLp4cxM6NIOD5NLgm48a/rTY//rhqwYVmtQVuCuWbIMbR675pcVhejwsoc5TLIVSOlW6wy8wN3lOtQZboPvPMcoIdIIvY203KqfxSonQ1HCsZU1GfHcXx18+X5QHI7jTjwsixgbWVBhUdH7AstP1UJ7QeL7EIAQ== 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=T0RfP7U2r5dZ1gwAjIKhDtxsapKrFY+O1IY1DOK+OXk=; b=GZYJz7XPHLxNbHWcOcHTz65mNxg0k0ss9ZjBi1NPdztHKwvl3mfaEhYb77UwksZfxIS3tfHyOeUpxOt7xKlDwElWMTEwVPt45JyROeKePXeVleP1rW1LLzIxf2yJ6Nov5MoVexGRLB/AelA0U57vU94MlxW3sAWJ2+fS9iSqIece5GxsVIRvAPBfXBK3IhWqG685HZQE+CLeAndpN6WZU9Afkl0rwSY5LE1P8Iy3QZ/enu4NzwBQ8I3OtGVipMJFgP6n6qn18bPIr3WVMpcQ59zoCge9C/qrPAQ0VEwa8iKlKrBMknXF1+J+pggt59JKBxAbhkY5acofB+2fCPw31g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=intel.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=T0RfP7U2r5dZ1gwAjIKhDtxsapKrFY+O1IY1DOK+OXk=; b=P84JjmpyuxGwIpnoVzAD8YEHNZDb/UhuPRZNFVW7/uSTduCjRVPQWgoRiwDGfsI+kI7rxvX6AlLWBWBbFBZpMbhY9/wnoaViERLA4hAF5u/pyTVSWrE+d6OhaDVC6xxmlG3kRsbdFQUnageFA1KnYPZ2+boyRpHwWc4IcXtsUsm3iSrZbg5q+H3ue7X6OZB+sNasYFPIYPXj1qNY9DHtr2ocmZD+kJTdU7Yox9rbg6CA1FFSeOuUG7WEiLnSd0MG354G6qqrJY32rkrrvLeECuJRUuSZLLywUjUIgp4Wg9imgTdAMZX9ba1Bt8WxLlrToGeOLhcfkAlIO61Nrdqtsw== Received: from BN9PR03CA0351.namprd03.prod.outlook.com (2603:10b6:408:f6::26) by DM4PR12MB6613.namprd12.prod.outlook.com (2603:10b6:8:b8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.21; Tue, 20 Sep 2022 07:11:13 +0000 Received: from BN8NAM11FT044.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f6:cafe::e6) by BN9PR03CA0351.outlook.office365.com (2603:10b6:408:f6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.21 via Frontend Transport; Tue, 20 Sep 2022 07:11:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BN8NAM11FT044.mail.protection.outlook.com (10.13.177.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.12 via Frontend Transport; Tue, 20 Sep 2022 07:11:12 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Tue, 20 Sep 2022 00:10:53 -0700 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.29; Tue, 20 Sep 2022 00:10:50 -0700 From: Suanming Mou To: Ori Kam , Aman Singh , "Yuying Zhang" , Thomas Monjalon , "Ferruh Yigit" , Andrew Rybchenko CC: Subject: [PATCH v1] ethdev: add async flow connection tracking configuration Date: Tue, 20 Sep 2022 10:10:36 +0300 Message-ID: <20220920071036.20878-1-suanmingm@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20220809132534.24441-1-suanmingm@nvidia.com> References: <20220809132534.24441-1-suanmingm@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT044:EE_|DM4PR12MB6613:EE_ X-MS-Office365-Filtering-Correlation-Id: 90e76dcd-62a0-4513-28da-08da9ad74cec X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GizEm43h9HSmUpmunBq1TcDA4WZ02XJmKnwwkMql2OU0KUif12t4V0dGC6I1U+Wv8jDK/YDHZi3HLMvRI2h9Lf5D07miQiwuw1kiEo44VygKHpBAt3WdpOV8wU1yokiKeUfeMeyp9IGdkfR+BHIH9OR2iB6kdvb29drr9GN5Lx2sloo9UzpgUBMnoZ70ZxVX91EhZ+zifY+u5NMUEgmGPEMtyP7uhjvscinnhovncJy0etORnAd7z0lRxGB2jG9ceUakr6/M04pPfOpRXq4kM5AlASOJN8qIMUWVzqfw4TG6K5p2yo/7wXAcM4V1HFvHxTQlq0KtMrW2mWBksdIMU6azHrXlyqHRfq0/o1a55wtkEmioT8iqr1AIznRwNMO5flt3tggIJAxkDCg5e3NWNGCAq50c36PN+zrYm9l1dlrlcG0SFe9i3IOdXHxlEH3X09qC7u/9LLA3Vdn9svSozZ4+Qd4Az1YWg4ZZg+mJ1tjJFJ2MI8cxoJ/JBTemEaEe00P24TQtEXBF61H1Jx7fR4IR9L0MCyGz/D4THtWaeRaKqSaoxHxEaZmUuQcl8iXpSwbyWrpE5rGrrGYU1mdn2Af38O18d/f1A/FNVtfPNkIUf8tr8MjyRuZtdmEIZmnP44xk6ndMP0QZHp1sghhj6h+1/DGbld2jF4r0cpf2Y/w5DOn/bN7WXOQrXiQE6yKzkM5wqzp4cNqY2I2GcQM03gs6gHCATgtGQ7EgP7ZkO0ZxeZQYyleVkjQT3XeqYx75m/fC0ikKvyA6FxzCOzOShw== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(346002)(376002)(396003)(136003)(451199015)(40470700004)(36840700001)(46966006)(6666004)(2906002)(5660300002)(8936002)(86362001)(40480700001)(7636003)(70206006)(4326008)(55016003)(8676002)(70586007)(110136005)(356005)(316002)(82310400005)(478600001)(336012)(47076005)(41300700001)(40460700003)(7696005)(36756003)(82740400003)(83380400001)(6286002)(26005)(2616005)(16526019)(186003)(36860700001)(1076003)(426003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2022 07:11:12.3506 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 90e76dcd-62a0-4513-28da-08da9ad74cec X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT044.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6613 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 In queue based async flow engine, in order to optimize the flow insertion rate, PMD can use the hints from application to have resources pre-allocate during initialization phase for actions such as count/meter/aging. This commit adds the connection tracking action hints. Signed-off-by: Suanming Mou Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 10 ++++++++++ doc/guides/rel_notes/release_22_11.rst | 6 ++++++ lib/ethdev/rte_flow.h | 10 ++++++++++ 3 files changed, 26 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 7f50028eb7..c9cbf381c4 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -219,6 +219,7 @@ enum index { CONFIG_COUNTERS_NUMBER, CONFIG_AGING_OBJECTS_NUMBER, CONFIG_METERS_NUMBER, + CONFIG_CONN_TRACK_NUMBER, /* Indirect action arguments */ INDIRECT_ACTION_CREATE, @@ -1081,6 +1082,7 @@ static const enum index next_config_attr[] = { CONFIG_COUNTERS_NUMBER, CONFIG_AGING_OBJECTS_NUMBER, CONFIG_METERS_NUMBER, + CONFIG_CONN_TRACK_NUMBER, END, ZERO, }; @@ -2667,6 +2669,14 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY(struct buffer, args.configure.port_attr.nb_meters)), }, + [CONFIG_CONN_TRACK_NUMBER] = { + .name = "conn_tracks_number", + .help = "number of connection trackings", + .next = NEXT(next_config_attr, + NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct buffer, + args.configure.port_attr.nb_conn_tracks)), + }, /* Top-level command. */ [PATTERN_TEMPLATE] = { .name = "pattern_template", diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst index 8c021cf050..d5e64ff9a1 100644 --- a/doc/guides/rel_notes/release_22_11.rst +++ b/doc/guides/rel_notes/release_22_11.rst @@ -55,6 +55,12 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added configuration for asynchronous flow connection tracking.** + + Added connection tracking action number hint to ``rte_flow_configure`` + and ``rte_flow_info_get``. + PMD can prepare the connection tracking resources according to the hint. + Removed Items ------------- diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index a79f1e7ef0..c2747abc55 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -4902,6 +4902,11 @@ struct rte_flow_port_info { * @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t max_nb_meters; + /** + * Maximum number connection trackings. + * @see RTE_FLOW_ACTION_TYPE_CONNTRACK + */ + uint32_t max_nb_conn_tracks; }; /** @@ -4971,6 +4976,11 @@ struct rte_flow_port_attr { * @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t nb_meters; + /** + * Number of connection trackings to configure. + * @see RTE_FLOW_ACTION_TYPE_CONNTRACK + */ + uint32_t nb_conn_tracks; }; /** -- 2.25.1