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 1F018A034F; Wed, 5 May 2021 06:21:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3720F410FE; Wed, 5 May 2021 06:20:50 +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 00231410F6 for ; Wed, 5 May 2021 06:20:48 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dtq/YRGEdxAth6D+sI//5qAWjejU1rxp+eK1v9DZo+pL1SwD/VUGj3vHHNk56u+WqYs22WFk1RyzlBAgDy/1J+/Xi82F9mkWVtAM/TDg3cFeUTS2JLPPGAtp4NApxx/8T2WBo5HEna3m3aOAfZg3XgSYzHk4YoZaIbAhAupS837PDaKtIPGCLsEKOR+kefpjnpspX7eilpar9bDRh3bZi4vk1RDlH31eCIAaWHHyvLtDg8mCTqRNP0y+mzypyp6tkGyJc02H9RhTfL8zaeIf0FGjPA26ECdtLXMikilnfrAq0zF5FxR7YdjVKEd7bgCqaZf+L4gkp0wHCeqxL3Z4Rg== 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=2FK0/1KxerV6cw/RCgHB3vba0k9gbpGt1R7p3VOsSr8=; b=SB/FZbAuB5TxSXyLXyrqBUNftXY9dmkDzYCFYsvUypgnQ2FWN+kQJJdHae4i42xd+t0TIBhhvJcHzq/URSC/3BFifF9Y9FLAWTYu3wylacoFYqmDYBc+cyI0HUUAKBs7KR9zTKlF7PSVKf0doGuKZnTweizF0ywaLYPxi3IsjSVb7GdnS26/uATk3nGte7dMedt2JDNkS9cZ4jnZI4ozzT605afy6TUuRXfQSH20HzvVEDhZtd/JZuaD9iwnT9r53+8NzvfM7u+o7exAzDR0Ewoldx9C/ifGDeA2XZlDjxOeZXsQU2j4XaJ5BLdr6khddMuVR/eL4AMpI/WjD168aw== 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=2FK0/1KxerV6cw/RCgHB3vba0k9gbpGt1R7p3VOsSr8=; b=lbWjbCHnQtk6Rw42bB8rqwxooi5mJeIPX58RiniCOR3IvGKhBjDfTVEa+Q009RxiqlBaUcEmHUyQabfyh6ZB+24t9de4SK9o8WDxXPayklV2egVzbfnRvWL6dH7R0xpoBCQr1/xNODusLaa/DvAyYR0qpZxqm84oX3sgcrfKOakZLESfIfVCK3f2n6dL1+tzUFTYcf/ARCr5+N5dmpltW0yiL/+JsTljhV1RkO9GAXVoNwilgZfM/MfNOjj0JCSqcKCtCBrZDuPqgx13gB5rbkoh3IYJ97a4J5q8AxqcNktsRRUzPi/3dTbN/RdfS6DizEKM3AE8PBYrczZYEh5ffw== Received: from BN6PR11CA0016.namprd11.prod.outlook.com (2603:10b6:405:2::26) by MWHPR1201MB0062.namprd12.prod.outlook.com (2603:10b6:301:54::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.26; Wed, 5 May 2021 04:20:47 +0000 Received: from BN8NAM11FT058.eop-nam11.prod.protection.outlook.com (2603:10b6:405:2:cafe::21) by BN6PR11CA0016.outlook.office365.com (2603:10b6:405:2::26) 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 04:20:46 +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 BN8NAM11FT058.mail.protection.outlook.com (10.13.177.58) 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 04:20:46 +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 04:20:44 +0000 From: Bing Zhao To: , , CC: , , Date: Wed, 5 May 2021 07:19:50 +0300 Message-ID: <20210505042004.25280-4-bingz@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210505042004.25280-1-bingz@nvidia.com> References: <20210427153811.11554-1-bingz@nvidia.com> <20210505042004.25280-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: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 527e229c-56ea-4036-99d0-08d90f7d27f3 X-MS-TrafficTypeDiagnostic: MWHPR1201MB0062: 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: cqK15+1tHmghckfBsba5JrucSVMm0XuORzkWFn4++p5Wo6kwzFFE0XjPWpyZa7NlTVmyYR1YQpAwEW25DroW1ZdGdEAcbZuArO2wZhfxOsD5CcdJI38XaDQC5GBgpdoy8N/SsLrlbuxUR8ZEB8F+SXK4TIlEpmQROsFqlK8uphJ70C0XKsQcKjL2x6WQke8jZp6ITH2XKVTWZIevnW94J1ww4/led08BQ/gDqubmrlrttTGyXCD1Cz/dmnNTRPUWU95wKtdhcgmJQyR/QjWPF3p97sccFp6Xw8/qwwC4/7XBV4/wdfoSckBJqIwA1L+6YxO8khuqdJQzXnbFA/jYXe09Gv+/V+JI0RuU5q2P5+thBq/n+wX6rMtkNvIlr6tAm7/A9OktPGvuJErgSP4MT8DrbKpvKvZNahaNVw9Lqtr5So7pf80GOKBo/2ZSmJsb8VGxAfB799b7mBuZNsltB1RLI2fghCOV5Q0lAq+hxNK0SRtifnEEHUmR1mBRbkXe84sJ0+lnCi4I3NyltFMN94+by0kDycNezRPOcIerGYzSAltde6RSDf3MfAuocpBPSvl7eLdn51JHwGZ71aGEGQMRzYD8AGnPmdCqn4JESq2QxlkP8e4RqADAkYLe4QQT9YD+DkNWN+aR8qK1M+Mp57xYVbbhYL7J1odrh3N4Hws= 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)(39860400002)(376002)(346002)(396003)(136003)(36840700001)(46966006)(83380400001)(107886003)(5660300002)(336012)(7696005)(54906003)(8676002)(70586007)(4326008)(110136005)(2616005)(82310400003)(2906002)(36906005)(186003)(478600001)(55016002)(6286002)(316002)(1076003)(26005)(36756003)(426003)(70206006)(86362001)(16526019)(7636003)(47076005)(356005)(82740400003)(6666004)(8936002)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2021 04:20:46.3451 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 527e229c-56ea-4036-99d0-08d90f7d27f3 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: BN8NAM11FT058.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0062 Subject: [dpdk-dev] [PATCH v2 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 a7ceafe221..edad6007a8 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 cc3e79d088..964e13a869 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -84,6 +84,7 @@ enum mlx5_feature_name { MLX5_MTR_COLOR, MLX5_MTR_ID, MLX5_ASO_FLOW_HIT, + MLX5_ASO_CONNTRACK, }; /* Default queue number. */ -- 2.27.0