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 A455BA0A02; Tue, 27 Apr 2021 17:38:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27E0B41266; Tue, 27 Apr 2021 17:38:47 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2061.outbound.protection.outlook.com [40.107.223.61]) by mails.dpdk.org (Postfix) with ESMTP id E6F7E41266 for ; Tue, 27 Apr 2021 17:38:45 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KZRp+ftW86GAoqafFvtFTeV8HD2kNmV3fknqKwtK/YwJpvMaZ05OX+yqMyOqFQYCTCB9QEwoNb5Cp2XJHOl0tCfMsWPH6kFcJ/WAymGMfOLpk1oezFUtcuE2/SW3DL32U07kSZ7Y+nMukuojK5QINi8yPOx10JaI385jXEchCzhBoHlrWw6/qU3ctYSbfYoRq6AGkq/h8aqUNC1jzLspD99OVXhuuThx8yMRyV0Hkmpe5oZ901XoEYLZ+g6nS3WwTUthmCGbApJOgoYFhnuvABnn8JIysDKHZzOty0cUIPldxm9lS29gTPFclqJdgEk7J0FinYOxf82CQh51iRwwmA== 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=0AlCSWvsdwlFM3/CJNWcBVg7oNBrQYT21GId0xTNQ88=; b=Aheox/UcKQBWKDjYTyHIIx0k2ERpUGuYug79yjmRDpKGFeAPLXU79SKhKFnoEG1atYrBEfINlpB3NqY+F2U5Pwapz/S+/kP0YBa7Kplh0G/npkgHuakM5WS3us8mJilQpDXf50oFBc5meRnmJK67M2eSUL8hH/ikjAaMz7iAjFKrhceRxgNI1OlQ4/jQ5RMnxsQT1bGTk3XFdIErq+ZkXi1fq/032hZUp2bkhiho39WJKxckY75MvtMoTN6l01pOvu9FVjSiy7BvSP0J52ToJ+lPsVz0gYxAz55PBiY4EeRQ4dIXZXx6AVmx30bgxmRY9qYXf1EY8iYW+RHAjZDGsg== 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=0AlCSWvsdwlFM3/CJNWcBVg7oNBrQYT21GId0xTNQ88=; b=lEhYd9jtC5kv8c1MwwdP3CCk70lbDTfnhpAw25wPxy3aQfyp9R05r85Vg2msoJt1z2D+smotKmCC/4zBQR0TvfAFsKNy5/GAgqiESEUNJ2HvSTAJ0KhkcD3clXY9z9pfq9EVCOf/VM3+fEW4Hdx7xfYfsvsZRbYmxFtxqke/EBcPmyWDPvWJO2oS72pkxqQzOKwfj4ATu+hWEYkoMm1u8t4DPVz6Bj8ma1ygAJnEd7sKfL1AcSn+Q0eSuo6rHgoXlSkeSAn+zLuSvOyB9ONdzIq8ldp/IOp/tUKvqRiA3W6SgOjhp1GPDEiHkJ41l4k36xifmjXB9rUSPeYjT0WnoQ== Received: from CO2PR05CA0091.namprd05.prod.outlook.com (2603:10b6:104:1::17) by MWHPR12MB1502.namprd12.prod.outlook.com (2603:10b6:301:10::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Tue, 27 Apr 2021 15:38:44 +0000 Received: from CO1NAM11FT046.eop-nam11.prod.protection.outlook.com (2603:10b6:104:1:cafe::a) by CO2PR05CA0091.outlook.office365.com (2603:10b6:104:1::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.17 via Frontend Transport; Tue, 27 Apr 2021 15:38:44 +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 CO1NAM11FT046.mail.protection.outlook.com (10.13.174.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4065.21 via Frontend Transport; Tue, 27 Apr 2021 15:38:44 +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; Tue, 27 Apr 2021 15:38:42 +0000 From: Bing Zhao To: , CC: , , Date: Tue, 27 Apr 2021 18:37:57 +0300 Message-ID: <20210427153811.11554-4-bingz@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210427153811.11554-1-bingz@nvidia.com> References: <20210427153811.11554-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: 607582fc-3768-4746-e222-08d909928a95 X-MS-TrafficTypeDiagnostic: MWHPR12MB1502: 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: R44NXHojVZGhSIVyYIdHwE0MPInFX/ROjNzRt3zlBaCg7RDFd6TWTLYGn1vHWuhwrvMaeCdrP8sUkl4C9s898i0zTwwbvcsUe6dxaiTnc35+DK0dxDa16uC1k1JT5tDaLE1b4nqEsAVU13G5aWZZHlhjAEGDC6rMGCSFPtPTyVBT16qabm87wIOwnF58wDgcaNcP1Zie4Lr6LJ/H8hSz57yuQngVt3nrPKNcwzlYnv9FmRjQgt/RoYonyz3cmnPUKTu1U1z3hJZX2BA5+cTxQFj4VUzs2hRnDu+TdAqEa05xmPhxjqZcj3wHBH5rK9MAtcN0OV3Ne0Uoth+yQEwsaNRXa4RBA5LztzxWwExgHel3m33y1GCc3mfpsU9EWOJFdVQl33tkvx195xCtZYvqFztxuLivvyaXyVwi+6RrhLvDiNGTuH4c0h2cAJBDykiYu7tH2fMEeDitGWKxJtEEb3VwGd3A3b+k7LopjKKWUsGVrkOvR6eGjZ7l9F+o1UKNsPZghYOnayxkuB8n/bZe5F4CTcVHDO5CGxfzZ+j1TlQNXJ56lzESe1YXvpP4SR2tnGjFoCl5k+5PEyYomaCUn6glLhQNnY/tTmehj8hGxM2YLW9h2P6/Tf6lYrw7lM/o2xjazS4a7Znu+UWLNf2yt9GRX9vrdtCJXsS6z/7QNCE= 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)(346002)(39860400002)(376002)(396003)(136003)(46966006)(36840700001)(47076005)(2906002)(5660300002)(6666004)(356005)(86362001)(6636002)(26005)(2616005)(83380400001)(8936002)(7696005)(36860700001)(426003)(8676002)(4326008)(6286002)(16526019)(82310400003)(36906005)(54906003)(36756003)(7636003)(336012)(1076003)(55016002)(316002)(186003)(70586007)(110136005)(478600001)(107886003)(70206006)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2021 15:38:44.3860 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 607582fc-3768-4746-e222-08d909928a95 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: CO1NAM11FT046.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1502 Subject: [dpdk-dev] [PATCH 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 15ed5ec..1c28b63 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -759,7 +759,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 56908ae..59769e9 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.5.5