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 5DCD7A00C2; Tue, 9 Aug 2022 15:26:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36C394069C; Tue, 9 Aug 2022 15:26:03 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2048.outbound.protection.outlook.com [40.107.93.48]) by mails.dpdk.org (Postfix) with ESMTP id D962040143 for ; Tue, 9 Aug 2022 15:26:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mCZwRSxKdbEaGR4+WSIJUD8j/l+LAFNT+hH2ZiPJPBUH/UsEAQ710s7XEFkZUttoSw1Eq98Jx4PM+zKcUjg8y9nHJoAeFYGp08E4hAaq86P1w8tDQ9Xet4Ny2Rs8rRkuI0KUv2ZRW5voFMtIEvuasWnfucXOq6A5UXLlVTr5BQ337t9sdtBjLNzP+qRph0GKkUCh9wek6oialSabxfOHxGi7tCe8XyEByFrv6+H6sjCOB97h9AiXvEdDyBDaKD+i/tcbmxTGDPmsSgNiF4QdkUS4Xb1llB17pWezJpRJAMOZvbvXBBgd/+2yTbdihHhUK423Ass7WkAyI2ixbJKXpw== 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=lNQ8hUgvI4jEdbNxDVpVvG7DHPCK96LqXmedKFFBPTw=; b=kqsjcnuoAQ1LdX2Ectk2vgA7YhbyU0bjhS0iL7dSIj9a6Fd3K7KJdejxu3vluGxUmjDljWu9G2LTpQl2uKr13nyPYVklpYcOUN9o8XkSib7OYjyl/qkEjcrycnBj214/xm5D+RAqZouI0QMfGJ3z98wkSxjgqnP7lrZTNnFVOBMvgOSURrQYFNisTOzV7xIdSFTKmu+L+xvj42D2UyCk5dl5xEpYVzCR8Sqi04R5uQf3pFw4Th1yejqgHCS/kOrAgvGjHHFmh8Cbqf2ZwxxqrJRaS1kHHByC5p0a6bfJQB6XJR1SYffkxFGWqGIn2xdBfM/wE5Ks65553+yL2U5Kwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=monjalon.net 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=lNQ8hUgvI4jEdbNxDVpVvG7DHPCK96LqXmedKFFBPTw=; b=ZIllfxEL/KJCxlpJdqJjSmAxdMkVd4kKHQMsSLce5xAr23hyM8qRnm0REU89Vps5UAwxajmj2vp5VgM3Pztr1P/wQLfDo3tmsnXgPGr2Oz3DjmH9oqSbgzkPs7tj/uKhMBlVi4gUxa8MmColRVm/cltkWhSmUewoMRtap/GwrSg8KDhA+XeJgjpJ8pVd6EnVMd2RQHobD3VlAaKl/nRrz6OSktKqpubGPRGBi0E4ijIq5jk03HsPPfWeMG2Cf7EDcdbAy48vq3qWdMZFpcwjmzIlFA9mY9l62yuwVT+8dNId0gziLmPVix8TxcCuHyypawaLU3xNPDcvnRiE817jkg== Received: from BN0PR07CA0013.namprd07.prod.outlook.com (2603:10b6:408:141::19) by DM6PR12MB3883.namprd12.prod.outlook.com (2603:10b6:5:1c9::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Tue, 9 Aug 2022 13:25:52 +0000 Received: from BN8NAM11FT061.eop-nam11.prod.protection.outlook.com (2603:10b6:408:141:cafe::41) by BN0PR07CA0013.outlook.office365.com (2603:10b6:408:141::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.15 via Frontend Transport; Tue, 9 Aug 2022 13:25:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by BN8NAM11FT061.mail.protection.outlook.com (10.13.177.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5504.14 via Frontend Transport; Tue, 9 Aug 2022 13:25:52 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 9 Aug 2022 13:25:51 +0000 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.26; Tue, 9 Aug 2022 06:25:48 -0700 From: Suanming Mou To: CC: Ori Kam , Xiaoyun Li , Aman Singh , Yuying Zhang , "Thomas Monjalon" , Ferruh Yigit , Andrew Rybchenko Subject: [RFC] ethdev: add async flow connection tracking configuration Date: Tue, 9 Aug 2022 16:25:34 +0300 Message-ID: <20220809132534.24441-1-suanmingm@nvidia.com> X-Mailer: git-send-email 2.18.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e4ba2c48-6682-4e68-3063-08da7a0aaea4 X-MS-TrafficTypeDiagnostic: DM6PR12MB3883:EE_ 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: PE+RZQTz3oCoy0aWk4R/LhnlvsQTAplynCEK5NJNf5iCoIsgMO3un+jusXxAnpy1XD0J5EsbaTB7votDshJqtVo6zyNQh7ql9NNuzOAWi+oX8OO8Fa/ZSzXYs0GHfF/jxkZX21fsjtsb1hO+1WSk4iRQgVk68O/eyP+3TewSniwTkSKkGI3meIjq/DEwjQq5Rm6xTuDuI2wzdRTEBZ/lVWOgA/9GNVzDNXfQYH6QmASgWwxpgHsZ9+o3OxOhBU1QAjl1qSsjtg2MPZjz82Zsu1qb+pTKsmWmg7dkHIhRm+o87r4x2wDxomqPpxuaPXUwvmTmMOZfc7KFVJQRf3i2lrBO237lYMfyS0fi+hdYxEBBybfrbXHeLton1XUBWlsQF82C6tGiqGToRPnBgeGEDg28Y/nHildnIKzakU5LMoVMhxPs/dlnHTJfsFflePzcQ3dIPpUUJOV/njMNglw22+2bWxTLxQm5RlYIpn80J3sS+KWWZt4XUpi+xzmSUXRGt4viN7LDufqvRBtGag0lgVz2IlD5LH5/rjydOkKYCxnIAsyLK2QKl6JJjM/SxmpsGj4gc2DEql1qXC2jQ5TbdSkFnGXAvymrSCV+/V36OfbOKqaGkqmQFSC9abYC9MdicGKw1oYPXAEXpaOEokgSGx5XSznm7Ef+fENofUZEmxw6F/W+4gTQDnprVatEFal9MmBwZBZFmF8karNODnWH7JOiRifp+Avf7fhYp8fAnPfI1lsBuwfI13Vxn7WstLZylYMiWrfk28MN4Be57SyxUMQAhjJmI/ext8W65TtvP/fbqSpfgjNwbQH1nJRft0Xe3WitiLNObeAsB8wRAB6BMg== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(136003)(39860400002)(346002)(396003)(376002)(36840700001)(46966006)(40470700004)(36756003)(86362001)(81166007)(82740400003)(36860700001)(26005)(6286002)(2616005)(83380400001)(6666004)(356005)(7696005)(47076005)(1076003)(186003)(426003)(16526019)(336012)(54906003)(6916009)(478600001)(316002)(41300700001)(8676002)(4326008)(70586007)(5660300002)(8936002)(70206006)(40460700003)(2906002)(40480700001)(55016003)(82310400005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2022 13:25:52.2885 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e4ba2c48-6682-4e68-3063-08da7a0aaea4 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT061.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3883 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 --- 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..c396bfca5f 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 accroding 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