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 BF6B5A0542; Wed, 26 Oct 2022 04:10:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B25CD40E28; Wed, 26 Oct 2022 04:10:40 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2053.outbound.protection.outlook.com [40.107.220.53]) by mails.dpdk.org (Postfix) with ESMTP id 59FF440A7F for ; Wed, 26 Oct 2022 04:10:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iRSY5l2qWnVLi0AYujgsOFgziV62we9nV7ROsRieCyhSZINSjNEmKrNUdsuQ/wNZbi87nHNkHDjSU7PQ+s62njoootGyh0cctemGC212R8rNSlIO3hpWorAJnuoeVqXwj/8rnQvn0bhAd3UEVAreGWs6hLKahQlpMKPEDJwUo3ZCw8RU+pksjk9wPh413rRscyH3UT37bNwDsi0vlfRr2l/yO4nNGUKEmX+3fbTvDO9XrYoMr2HZ5oAZc10J9cvQpMm/0A72b90DqQt61j4YtSKL9apUh8ulaUFStUQixpwLinVRboKxiGQGxzXvHVwr/tCr8Odoy0NMVS1+648NmQ== 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=BUtjDKruV6zYt8vjAGNlYDAWYUoR3pZbxgmdcb93cJM=; b=ZBt4W++QtZ1MCsboDT5uabAb9Lp2vaRPXxXl/Bj+eOpxuqLBAsGWbhd2IvJ8Jmbvjn9xF8A6pbd3KdTpQSAE06i2PjBrcvPKunugf3GYTsrORboG15QyDIiKypWZsduRSpMLX0/C7s5vWG4EdL5EE2cU8o0zoyWnE2a4NQViMqNRiTkogsf6gQ4kFfgJPh5M2jWSc6crnjCVLz4iVveVB628WmVOC/NEuK+KNSirsBXvjnoWOWdGkGjqJV2kzgQJ9dLfMCWO0I9FGpGAam9l8n+7ZbrQSHuKjCR+61nWdGC4zmIG5d2hLudGUpXmegHtQYcvQw7rq5OmrURdNhpaYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org 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=BUtjDKruV6zYt8vjAGNlYDAWYUoR3pZbxgmdcb93cJM=; b=G6R0x1Kd341i3psaEQvkftaBCBxP21PYBK1q0RUjjGeW7dBneMxoA0aPlzybsa57RHIEFsAOAhthvvmtxIuo3SXbgPxxujsvU2G84OLL5Vc5bl4g962fn/wM8ufGQLSDJ2liz9E/EixvTgXN1qOI15aDg8BD2EcerJid1og/cEgfumsukz+5aDWqQ18qGM9N/vlumV6Smc1MJBQAUU33O8dmdDCty7tUJayMLQRm+x58JkMQWW3KbIHrWf0Eonpfv+Skh0+dSrHYpJ/wAzU5Gto47FKjO4liutbCDHqAjq+uysYuxXGsvxh+Si1zZrJ30Or5/RdZy1AboBbexM0KBQ== Received: from DS7PR03CA0033.namprd03.prod.outlook.com (2603:10b6:5:3b5::8) by DM6PR12MB4043.namprd12.prod.outlook.com (2603:10b6:5:216::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23; Wed, 26 Oct 2022 02:10:36 +0000 Received: from DM6NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b5:cafe::d6) by DS7PR03CA0033.outlook.office365.com (2603:10b6:5:3b5::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Wed, 26 Oct 2022 02:10:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DM6NAM11FT050.mail.protection.outlook.com (10.13.173.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Wed, 26 Oct 2022 02:10:35 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Tue, 25 Oct 2022 19:10:19 -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, 25 Oct 2022 19:10:17 -0700 From: Suanming Mou To: Matan Azrad , Viacheslav Ovsiienko CC: , , Alex Vesker Subject: [PATCH] net/mlx5/hws: set ft_type on root matcher creation Date: Wed, 26 Oct 2022 05:09:43 +0300 Message-ID: <20221026020943.4643-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: 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: DM6NAM11FT050:EE_|DM6PR12MB4043:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b843488-0d4a-46d1-49cc-08dab6f74536 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TT70dE1d3D5CmD9gqx2Sms2Dhw4/hX71crM34InRMJqZLAhl23rm6lIiIg25U1cCTB2MboOb6sVkG8Qw9IFlonsS8jrHEJoJeojtawYIK7VnExiU/kXnJYf5zOVkvb745sqpd4uIAOXZxC54mjPW8M7/5E128ctg7U1LVmkJSZSUtO28+eb+ZyDX0bH2Ph5c9qFUOqvWhGr3OtymrGZoZZ6pzI6MGVKVibisZt8K9gSA8tMEupgq7QWu10vzSVUAsXW1Drw2z+E7LChsyRH3UWtJ+Rie3XmgGq68VyGSeyp560qJuarERbd4kzpPENGbpCb4/7pBQR2CMXtYxMdE+U/NxTHBDvEupX1XzpQn5cWmjTpO9GrMF5ddmQWWRe7qkt62TI3UQXXcCjUulPHDs4Lu8CnNq9BQpvXcriWgYWO4oNMHJJrMAQ4wVH1SQRlHxNrDO3VpIyL88nXhsa82jya0BN1JFEEaM3gCPJ3jg99dIQ/JEHwcEByQNFZlhQh2oc8x3InlgrZMJSH0+Ogl3y27WvR4Zbi0kNYHQbBTCKlmnNZGUOoXWy1IGiYLclsiNDIZeWzCg9KM/b+ZG/IxnFC47CBRw1E7vwu0EeNv2JTl5gX1uLyF3AbJXkG+mapIfWywF3fAL84u/fkr2IBkQWHt4mXQzRCKLWq96dZveQLkLfKFnnpPjttCWE+NwQj8zpO+upfY+Qx8+LdRmeSiPk3mTBKE72S7EUMa8BWBsM2hiem35yQrH6A6ybXt2xo5JujKmb94ktddzmDyEhYpTA== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(376002)(346002)(39860400002)(136003)(396003)(451199015)(46966006)(40470700004)(36840700001)(36756003)(7636003)(356005)(5660300002)(70586007)(36860700001)(8936002)(83380400001)(47076005)(426003)(70206006)(86362001)(16526019)(6636002)(54906003)(110136005)(40480700001)(40460700003)(2616005)(1076003)(336012)(6286002)(41300700001)(186003)(316002)(55016003)(2906002)(478600001)(82740400003)(82310400005)(107886003)(8676002)(4326008)(7696005)(26005)(6666004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2022 02:10:35.8990 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1b843488-0d4a-46d1-49cc-08dab6f74536 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4043 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 The ft_type should be provided to mlx5dv_create_flow_matcher if the matcher attributes exist, not only for FDB but for NIC as well. If the ft_type is not provided, matcher/rule creation might fail. Fixes: ac7931dd1908 ("net/mlx5/hws: add HWS matcher object") Signed-off-by: Alex Vesker Signed-off-by: Suanming Mou Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/hws/mlx5dr_matcher.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c index d1205c42fa..67adfeec6c 100644 --- a/drivers/net/mlx5/hws/mlx5dr_matcher.c +++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c @@ -679,20 +679,24 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher) uint8_t match_criteria; int ret; +#ifdef HAVE_MLX5DV_FLOW_MATCHER_FT_TYPE + attr.comp_mask = MLX5DV_FLOW_MATCHER_MASK_FT_TYPE; + switch (type) { case MLX5DR_TABLE_TYPE_NIC_RX: + attr.ft_type = MLX5DV_FLOW_TABLE_TYPE_NIC_RX; + break; case MLX5DR_TABLE_TYPE_NIC_TX: + attr.ft_type = MLX5DV_FLOW_TABLE_TYPE_NIC_TX; break; -#ifdef HAVE_MLX5DV_FLOW_MATCHER_FT_TYPE case MLX5DR_TABLE_TYPE_FDB: - attr.comp_mask = MLX5DV_FLOW_MATCHER_MASK_FT_TYPE; attr.ft_type = MLX5DV_FLOW_TABLE_TYPE_FDB; break; -#endif default: assert(0); break; } +#endif if (matcher->attr.priority > UINT16_MAX) { DR_LOG(ERR, "Root matcher priority exceeds allowed limit"); -- 2.25.1