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 6D41FA0524; Wed, 5 May 2021 11:50:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5202C410FF; Wed, 5 May 2021 11:50:38 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-eopbgr770049.outbound.protection.outlook.com [40.107.77.49]) by mails.dpdk.org (Postfix) with ESMTP id 59EC44003C for ; Wed, 5 May 2021 11:50:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mZZxoTH6YPmBQ1phKYmQURoD8c4oWofqUAc21e8oGFI+lRYZVEfZkvMdq6z7lSz1+wkgk35Jlk6vSapyJTx00XEGgExCynKiNh3varykBlhLgeOo1ZO5IOw8IIALP+5FC0tTfSQNEmxYMIq7O15hzHXaiIS0DeTQ5QQOIrQ6ArCxi4Sz0iGBdSylWbQLGHn/3pGBFb0r1TF1pBiEM85nXgDq5sVeYDU8t+FxQeaXpmWKYKI6H93D6yupKdHe+WGy7TSpD2iFLOoRVLNCAU/gh5LdLMCeqv1FohZjtt+ZhJco8VwhDJinpNhaExL6YNdsgVKXABxkoiI60X2pl+p+pw== 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-SenderADCheck; bh=idphQhy28gZFaSp/UDm5N+k3PiPXKMAD0Ccib0FXbJ0=; b=n8hBNukgJAlx8IqKJGop5QN26xJhZXrat5nVOoBqS5zAuB/rpIuAF1eA7GSSYdAcVNwe5tYB/4FhpEHza3cyUXz0ygXm3QPuzuVZssjBb3yO6C0ftlmbUVwKxabADuSejvR1Y6QfTzSE85k88hhoIS9TTrvdglDbufiOMcqreoDmmiDqJV6bYE8JLFTynLyfmDy1DWOWkbm067z6tH30jOgtJsHx7dii4bXClwtPlGaE6HZ3VW7WVr0FaqJqaIHnQg3UlmDRlcRCQrkYHMvuFJMff6HTRPWp4F5pAbKcVwDnuHjfmDf7SQC3wDwsS376kwTqQdMG4r8m3j5FkPzCAw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none 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=idphQhy28gZFaSp/UDm5N+k3PiPXKMAD0Ccib0FXbJ0=; b=kJxwFEppbCnj3ElvHxy7vJd4aUcI8KTng74GbetJRCfmpVvBIdMo2XP2dvencfYix4FvVUfNSbDzF13WuTE0ZTvYE0A5Qw+GVkVgISMXvTx4hyjp0hZfh9tS+70mh9cyDcUv+GWx02drffN5egj4Kl1rXifJP4nj3AH9bvyXwLshBD7qEeHzX9YS4IiSqSZ4Wpbd7g+TCidD5UIa0HrfAfjeANzqNPee9Jbf9wP0dchWHill+N8MVIXqI+Va2oRyydqM4aHH99BUdiJlyTOacfUAawYwCWtEpxa7C11GghJt1Cr3YGZNyhAccTk72x5SaoKX+vZgdySH52mN/dBRMA== Received: from BN9PR03CA0946.namprd03.prod.outlook.com (2603:10b6:408:108::21) by MN2PR12MB4336.namprd12.prod.outlook.com (2603:10b6:208:1df::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Wed, 5 May 2021 09:50:33 +0000 Received: from BN8NAM11FT047.eop-nam11.prod.protection.outlook.com (2603:10b6:408:108:cafe::5e) by BN9PR03CA0946.outlook.office365.com (2603:10b6:408:108::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Wed, 5 May 2021 09:50:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; 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 BN8NAM11FT047.mail.protection.outlook.com (10.13.177.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Wed, 5 May 2021 09:50:32 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 5 May 2021 09:50:30 +0000 From: Bing Zhao To: , , CC: , , Date: Wed, 5 May 2021 12:49:55 +0300 Message-ID: <20210505095009.40250-4-bingz@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210505095009.40250-1-bingz@nvidia.com> References: <20210427153811.11554-1-bingz@nvidia.com> <20210505095009.40250-1-bingz@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3ae9bc31-30ce-4fa9-b7e8-08d90fab39a1 X-MS-TrafficTypeDiagnostic: MN2PR12MB4336: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: olbFcqm4YPvhut2kHVAxN2zQUB5sN/jbRZaceF4Z9LBlM6wq56hepvaMXCP+8YVJuuv57Vq+SRjBQ8EckhiDRfG6dAI4896Z+gdKo1jACaaPNho9ZBG3i8wFCEfkfmmWaj3f/U+cTKMXgbLDPjKcppB11J919iELbmLtYDih0IIQ5cYeTawQIRn8k1bSAOkMMbZDfJBKD+ijWdCYLB+OGoBKQVsHSdl2BspEh+RNdeb5aWmbIRwur8tBNN7nD2y8Zb1L4nm9veU/7n/riy0dcdMNRiNiiPxWD4x5YDlIpdwcoDCJRWIp4BVcgXg7QnVoEwMGTOeLzoUON1Qid5Re8YxiheXy+goTI4yFPikqf1a/RBKsUxaKjQnWT0NRARTOhPFFPGikHxBNMaKqLzsCrAwk+xxfw7HQqCiAkNBxtxRCGkRuNMSmTgVIJG6s27+zeBr6+yftBmW+rQOPJPK/NVCQJM3jCF92uSQj3tjDzyxhsWG/M2h/J5PBP4WqDVdq0p85imJ3wi0/6kbMIvjLi3NOfi0nvULamiWisfqAM2AE73Pt1SBDXJLwgHB+Gp9LUOHU/TMrHPj6i29+FyNQ7VAr/xHJORH5rNlvCyFzMYqgSI4sk6TwKc5GQNFUrcUcrfukwbsWKZUONyhAoJnoapYQnTQeyOrzV7FEyFnI6eM= 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)(396003)(346002)(376002)(39860400002)(136003)(36840700001)(46966006)(8936002)(70586007)(47076005)(356005)(426003)(16526019)(4326008)(186003)(86362001)(1076003)(2906002)(478600001)(8676002)(6666004)(36756003)(7636003)(36860700001)(26005)(82310400003)(107886003)(7696005)(316002)(2616005)(55016002)(6286002)(83380400001)(336012)(110136005)(54906003)(5660300002)(82740400003)(70206006)(36906005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2021 09:50:32.8630 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3ae9bc31-30ce-4fa9-b7e8-08d90fab39a1 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: BN8NAM11FT047.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4336 Subject: [dpdk-dev] [PATCH v6 03/17] net/mlx5: use meter color reg for CT 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" Based on the capacity, 3 registers could be used. Due to the register allocation, only the one REG_C_3 for meter color could be reused right now. Then in the same flow, no more than one ASO action can be supported. Signed-off-by: Bing Zhao --- drivers/net/mlx5/mlx5_flow.c | 4 +++- drivers/net/mlx5/mlx5_flow.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index a9c0108ee3..65399cd452 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -760,7 +760,9 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev, return priv->mtr_color_reg != REG_C_2 ? REG_C_2 : REG_C_3; case MLX5_MTR_COLOR: - case MLX5_ASO_FLOW_HIT: /* Both features use the same REG_C. */ + case MLX5_ASO_FLOW_HIT: + case MLX5_ASO_CONNTRACK: + /* All features use the same REG_C. */ MLX5_ASSERT(priv->mtr_color_reg != REG_NON); return priv->mtr_color_reg; case MLX5_COPY_MARK: diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 0fb8f64474..402c829843 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -85,6 +85,7 @@ enum mlx5_feature_name { MLX5_MTR_COLOR, MLX5_MTR_ID, MLX5_ASO_FLOW_HIT, + MLX5_ASO_CONNTRACK, }; /* Default queue number. */ -- 2.27.0