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 B29DFA0032; Sun, 10 Jul 2022 18:03:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5102B4021F; Sun, 10 Jul 2022 18:03:06 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2056.outbound.protection.outlook.com [40.107.94.56]) by mails.dpdk.org (Postfix) with ESMTP id DD6934021E for ; Sun, 10 Jul 2022 18:03:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=axpM9GF0pVbhsN3BrAekdn4afE8nzEEIbeaf+lACFWoJwcURPmJXfTY1R6zrWXSIAfyRcnLmo1i4Do/Waq/oIItvZPd+03sHQMV4b4W1eDBJSreboc3dYqJ3XkJW/eHdzFS/QQnhWsV8gUr65+YqzAT/t+y67tSq0r4oEIIfjixU/o69S9Gukn+/onRc6CpgceR2i5TMHD8wgZ48+fNH8T5aNiTc/SQdiCwLTAIHR0TuoSkVrncuMqWaZzF9BEiSHD9EAczZrm9ZWHlO2RFXiwsDe6Vmiw+BhUMYGlYJxmZZ9+LalhiuI1b/+cgMxiIZOQmGdvfNbM6L7oEdkm8j9A== 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=wQL2M6tV2xXwHiwZRh6hKikFG4kXuCQtJTWRTRKhvg4=; b=Sf1v22B5w/tAhvYWHXddw67QTAyee0AJnDbIpQdmS3d53elmDBrAR/oemnKG2kKi4y7bxOsh8um0ZMQbK6OD/4CU9Horqa26s/SfTPiLGJSy63YIbirAchVRgCpT2NaZgtGntVzNYtMmHorQ6kBC9OiJoHXbb3cAL9q/ngQwMag0/bGYCAf38YSBl2zdMiEX4gWahYONFpnQ/8eEPo7Iw7xYEFdEFgrsoYcQT0HI5f2klglQMFUyc5tgMC9cvWGYtLf3KBHLw7Fvdy1hhGhIPd2D7yjzdzpigG6AKO+yqhInE3rQF1J65LouzDqlHKrWKqh5QIfEYNRJK/DpHWMTFg== 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=wQL2M6tV2xXwHiwZRh6hKikFG4kXuCQtJTWRTRKhvg4=; b=CGpf2sAsnqFu1VkQtnrtTA9XwtN5Om9HhoiABCmn6Ka4p72WafvXQn7N5pTzvah1aGBsrNjAsO7GuxcC0WIv8+0Ef58zilqnjY/85PEJwHY+rxpOHfNmUTQzmiSkSUJutPziKqwmkxxx55pqiYyaOcnHeyVjBch+gsMOJzX8nDB6kUpCUkLNpCLfeTXxx67MITGHD5NLeZUsZUYnRYfPJY74uDdIRY62fn5FVss24nQkbgcYqetC7oEByDr4r2DaDf6FeuygsZHW33RTXE65gayNuvSSK1YD8XzqCFQltlkfwNhg8Fi1cr/F9HtuuXOFUZtTD2Dz7hX3kypX/VdkVQ== Received: from CO1PR15CA0079.namprd15.prod.outlook.com (2603:10b6:101:20::23) by CH2PR12MB4939.namprd12.prod.outlook.com (2603:10b6:610:61::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.20; Sun, 10 Jul 2022 16:03:02 +0000 Received: from CO1NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:101:20:cafe::19) by CO1PR15CA0079.outlook.office365.com (2603:10b6:101:20::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.26 via Frontend Transport; Sun, 10 Jul 2022 16:03:02 +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 CO1NAM11FT060.mail.protection.outlook.com (10.13.175.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5417.15 via Frontend Transport; Sun, 10 Jul 2022 16:03:02 +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; Sun, 10 Jul 2022 16:03:02 +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; Sun, 10 Jul 2022 09:02:59 -0700 From: Gregory Etelson To: CC: , , , , Viacheslav Ovsiienko Subject: [PATCH v3] common/mlx5: update DevX error logging Date: Sun, 10 Jul 2022 19:02:44 +0300 Message-ID: <20220710160244.2934-1-getelson@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220705144831.27945-1-getelson@nvidia.com> References: <20220705144831.27945-1-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: e856a644-13b0-4b08-04d0-08da628daafd X-MS-TrafficTypeDiagnostic: CH2PR12MB4939: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: i5/fxeAWx+MFcI+jq3G/uxP+2srRkPkonNVQAYW1oQ5ijddhk5s/U2Sj/Ihxdy5anaJUS+5wE/k0S9Di0+WplwGVuYLMtL4g7p3XioilVZt0e34dTqiinlXPcB7qHETsEYCUiDBy/irtjFaoeg0zsslXcjbRV0I0U1YPkjG2w5swdUYP2Q68KMfxB8jN6G5Cw7lYFW5H43bFuqprktkkKdZZVhevObznl/dkZQs8ZNZhhWozch26H61v2lzYv8YYYxAdq2dD85gLh6W418gWjcoa9CAtpziOSxfTpHgi6uQbOS3ZEkfPljHCZ0yHjpPXSm5JKKAxiPySbEwbIUPqQAWJOt/xqRmGwpD7+ghk5a604RsUzfol5Ckgjr4uYcXQ1QAO2ktcyv3Q1anStPdRB4pqnIZXEWPRugLB52pC3YJDW+thXa448KOhe03Yc4WxxmeTtn6vO0dTKa13A6XMm9rSyE5Ni59ioh1OcRaxXDv7/oJ0Biv+iBSJIj0zueP70L98SE8F3g/fg8DddMI5f5m24ZG+rgPU0Xi0ISAiiG50SAYKF/vhdCIM5OhZvUBb2XiTuncko/hZf2V4A9cuImgXnrQIcgKF+tjwfy3UIDw4BqrnQUb+pObEbrf8HVwLO4xWy1fNEZUGMBcf5Rldxi7yFBbj1BjR4jDgMQbztnVubw6IC26sr/kD+RSsfvUU90G4jjO5cN0QCa93V8V+fTQF1t4tDUutqFrupfBOoOm4ayVTB0hryggNriaBRz89tKWNRvF336jKUG8FiQp+JaqAuT5IzhfucYiOXWpROyVlJN2Ds3IL7YJ4UNpYMqGScktbeuUoNQd5Bt25ZkwtZYUjztwyJa1VZ3l7UwhmpT8= 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)(396003)(39860400002)(136003)(376002)(346002)(40470700004)(36840700001)(46966006)(81166007)(82310400005)(55016003)(40480700001)(316002)(6286002)(54906003)(82740400003)(6916009)(83380400001)(70206006)(356005)(36756003)(4326008)(186003)(16526019)(336012)(426003)(47076005)(36860700001)(8676002)(70586007)(1076003)(2616005)(107886003)(6666004)(30864003)(41300700001)(7696005)(40460700003)(26005)(5660300002)(2906002)(8936002)(478600001)(86362001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2022 16:03:02.3715 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e856a644-13b0-4b08-04d0-08da628daafd 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: CO1NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4939 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 Current PMD logs all DevX errors at error level. DevX interface can fail queue counters allocation on some hardware types. That is a known issue. PMD fallback to VERB API to allocate queue counters when it detects the fault. That DevX failure should not be logged as PMD error. The patch provides DevX with flexible API that selects log level. Signed-off-by: Gregory Etelson Acked-by: Matan Azrad --- v2: fix warnings in old gcc versions v3: remove cc stable --- drivers/common/mlx5/mlx5_devx_cmds.c | 98 +++++++++++++++------------- 1 file changed, 53 insertions(+), 45 deletions(-) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index 8880a9f3b5..fb33023138 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -20,20 +20,29 @@ #define MLX5_DEVX_ERR_RC(x) ((x) > 0 ? -(x) : ((x) < 0 ? (x) : -1)) -static void -mlx5_devx_err_log(void *out, const char *reason, - const char *param, uint32_t value) -{ - rte_errno = errno; - if (!param) - DRV_LOG(ERR, "DevX %s failed errno=%d status=%#x syndrome=%#x", - reason, errno, MLX5_FW_STATUS(out), - MLX5_FW_SYNDROME(out)); - else - DRV_LOG(ERR, "DevX %s %s=%#X failed errno=%d status=%#x syndrome=%#x", - reason, param, value, errno, MLX5_FW_STATUS(out), - MLX5_FW_SYNDROME(out)); -} +#define DEVX_DRV_LOG(level, out, reason, param, value) \ +do { \ + /* \ + * Some (old) GCC compilers like 7.5.0 and aarch64 GCC 7.1-2017.08 \ + * do not expand correctly when the macro invoked when the `param` \ + * is `NULL`. \ + * Use `local_param` to avoid direct `NULL` expansion. \ + */ \ + const char *local_param = (const char *)param; \ + \ + rte_errno = errno; \ + if (!local_param) { \ + DRV_LOG(level, \ + "DevX %s failed errno=%d status=%#x syndrome=%#x", \ + (reason), errno, MLX5_FW_STATUS((out)), \ + MLX5_FW_SYNDROME((out))); \ + } else { \ + DRV_LOG(level, \ + "DevX %s %s=%#X failed errno=%d status=%#x syndrome=%#x",\ + (reason), local_param, (value), errno, \ + MLX5_FW_STATUS((out)), MLX5_FW_SYNDROME((out))); \ + } \ +} while (0) static void * mlx5_devx_get_hca_cap(void *ctx, uint32_t *in, uint32_t *out, @@ -49,7 +58,7 @@ mlx5_devx_get_hca_cap(void *ctx, uint32_t *in, uint32_t *out, MLX5_SET(query_hca_cap_in, in, op_mod, flags); rc = mlx5_glue->devx_general_cmd(ctx, in, size_in, out, size_out); if (rc || MLX5_FW_STATUS(out)) { - mlx5_devx_err_log(out, "HCA capabilities", "func", flags >> 1); + DEVX_DRV_LOG(ERR, out, "HCA capabilities", "func", flags >> 1); if (err) *err = MLX5_DEVX_ERR_RC(rc); return NULL; @@ -102,7 +111,7 @@ mlx5_devx_cmd_register_read(void *ctx, uint16_t reg_id, uint32_t arg, MLX5_ST_SZ_BYTES(access_register_out) + sizeof(uint32_t) * dw_cnt); if (rc || MLX5_FW_STATUS(out)) { - mlx5_devx_err_log(out, "read access", "NIC register", reg_id); + DEVX_DRV_LOG(ERR, out, "read access", "NIC register", reg_id); return MLX5_DEVX_ERR_RC(rc); } memcpy(data, &out[MLX5_ST_SZ_DW(access_register_out)], @@ -153,7 +162,7 @@ mlx5_devx_cmd_register_write(void *ctx, uint16_t reg_id, uint32_t arg, memcpy(ptr, data, dw_cnt * sizeof(uint32_t)); rc = mlx5_glue->devx_general_cmd(ctx, in, sizeof(in), out, sizeof(out)); if (rc || MLX5_FW_STATUS(out)) { - mlx5_devx_err_log(out, "write access", "NIC register", reg_id); + DEVX_DRV_LOG(ERR, out, "write access", "NIC register", reg_id); return MLX5_DEVX_ERR_RC(rc); } rc = mlx5_glue->devx_general_cmd(ctx, in, @@ -161,7 +170,7 @@ mlx5_devx_cmd_register_write(void *ctx, uint16_t reg_id, uint32_t arg, dw_cnt * sizeof(uint32_t), out, sizeof(out)); if (rc || MLX5_FW_STATUS(out)) { - mlx5_devx_err_log(out, "write access", "NIC register", reg_id); + DEVX_DRV_LOG(ERR, out, "write access", "NIC register", reg_id); return MLX5_DEVX_ERR_RC(rc); } return 0; @@ -199,7 +208,7 @@ mlx5_devx_cmd_flow_counter_alloc(void *ctx, uint32_t bulk_n_128) dcs->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!dcs->obj) { - mlx5_devx_err_log(out, "allocate counters", NULL, 0); + DEVX_DRV_LOG(ERR, out, "allocate counters", NULL, 0); mlx5_free(dcs); return NULL; } @@ -377,9 +386,8 @@ mlx5_devx_cmd_mkey_create(void *ctx, mkey->obj = mlx5_glue->devx_obj_create(ctx, in, in_size_dw * 4, out, sizeof(out)); if (!mkey->obj) { - mlx5_devx_err_log(out, - klm_num ? "create indirect mkey" : "create direct key", - NULL, 0); + DEVX_DRV_LOG(ERR, out, klm_num ? "create indirect mkey" + : "create direct key", NULL, 0); mlx5_free(mkey); return NULL; } @@ -470,7 +478,7 @@ mlx5_devx_cmd_query_nic_vport_context(void *ctx, in, sizeof(in), out, sizeof(out)); if (rc || MLX5_FW_STATUS(out)) { - mlx5_devx_err_log(out, "query NIC vport context", NULL, 0); + DEVX_DRV_LOG(ERR, out, "query NIC vport context", NULL, 0); return MLX5_DEVX_ERR_RC(rc); } vctx = MLX5_ADDR_OF(query_nic_vport_context_out, out, @@ -717,7 +725,7 @@ mlx5_devx_cmd_create_flex_parser(void *ctx, parse_flex_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!parse_flex_obj->obj) { - mlx5_devx_err_log(out, "create FLEX PARSE GRAPH", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create FLEX PARSE GRAPH", NULL, 0); mlx5_free(parse_flex_obj); return NULL; } @@ -1292,7 +1300,7 @@ mlx5_devx_cmd_create_rq(void *ctx, rq->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!rq->obj) { - mlx5_devx_err_log(out, "create RQ", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create RQ", NULL, 0); mlx5_free(rq); return NULL; } @@ -1391,7 +1399,7 @@ mlx5_devx_cmd_create_rmp(void *ctx, rmp->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!rmp->obj) { - mlx5_devx_err_log(out, "create RMP", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create RMP", NULL, 0); mlx5_free(rmp); return NULL; } @@ -1459,7 +1467,7 @@ mlx5_devx_cmd_create_tir(void *ctx, tir->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!tir->obj) { - mlx5_devx_err_log(out, "create TIR", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create TIR", NULL, 0); mlx5_free(tir); return NULL; } @@ -1597,7 +1605,7 @@ mlx5_devx_cmd_create_rqt(void *ctx, rqt->obj = mlx5_glue->devx_obj_create(ctx, in, inlen, out, sizeof(out)); mlx5_free(in); if (!rqt->obj) { - mlx5_devx_err_log(out, "create RQT", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create RQT", NULL, 0); mlx5_free(rqt); return NULL; } @@ -1711,7 +1719,7 @@ mlx5_devx_cmd_create_sq(void *ctx, sq->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!sq->obj) { - mlx5_devx_err_log(out, "create SQ", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create SQ", NULL, 0); mlx5_free(sq); return NULL; } @@ -1794,7 +1802,7 @@ mlx5_devx_cmd_create_tis(void *ctx, tis->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!tis->obj) { - mlx5_devx_err_log(out, "create TIS", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create TIS", NULL, 0); mlx5_free(tis); return NULL; } @@ -1828,7 +1836,7 @@ mlx5_devx_cmd_create_td(void *ctx) td->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!td->obj) { - mlx5_devx_err_log(out, "create TIS", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create TIS", NULL, 0); mlx5_free(td); return NULL; } @@ -1948,7 +1956,7 @@ mlx5_devx_cmd_create_cq(void *ctx, struct mlx5_devx_cq_attr *attr) cq_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!cq_obj->obj) { - mlx5_devx_err_log(out, "create CQ", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create CQ", NULL, 0); mlx5_free(cq_obj); return NULL; } @@ -2024,7 +2032,7 @@ mlx5_devx_cmd_create_virtq(void *ctx, virtq_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!virtq_obj->obj) { - mlx5_devx_err_log(out, "create VIRTQ", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create VIRTQ", NULL, 0); mlx5_free(virtq_obj); return NULL; } @@ -2257,7 +2265,7 @@ mlx5_devx_cmd_create_qp(void *ctx, qp_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!qp_obj->obj) { - mlx5_devx_err_log(out, "create QP", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create QP", NULL, 0); mlx5_free(qp_obj); return NULL; } @@ -2378,8 +2386,8 @@ mlx5_devx_cmd_create_virtio_q_counters(void *ctx) couners_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!couners_obj->obj) { - mlx5_devx_err_log(out, "create virtio queue counters Obj", - NULL, 0); + DEVX_DRV_LOG(ERR, out, "create virtio queue counters Obj", NULL, + 0); mlx5_free(couners_obj); return NULL; } @@ -2461,7 +2469,7 @@ mlx5_devx_cmd_create_flow_hit_aso_obj(void *ctx, uint32_t pd) flow_hit_aso_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!flow_hit_aso_obj->obj) { - mlx5_devx_err_log(out, "create FLOW_HIT_ASO", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create FLOW_HIT_ASO", NULL, 0); mlx5_free(flow_hit_aso_obj); return NULL; } @@ -2548,7 +2556,7 @@ mlx5_devx_cmd_create_flow_meter_aso_obj(void *ctx, uint32_t pd, ctx, in, sizeof(in), out, sizeof(out)); if (!flow_meter_aso_obj->obj) { - mlx5_devx_err_log(out, "create FLOW_METTER_ASO", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create FLOW_METTER_ASO", NULL, 0); mlx5_free(flow_meter_aso_obj); return NULL; } @@ -2598,7 +2606,7 @@ mlx5_devx_cmd_create_conn_track_offload_obj(void *ctx, uint32_t pd, ct_aso_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!ct_aso_obj->obj) { - mlx5_devx_err_log(out, "create CONN_TRACK_OFFLOAD", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create CONN_TRACK_OFFLOAD", NULL, 0); mlx5_free(ct_aso_obj); return NULL; } @@ -2650,7 +2658,7 @@ mlx5_devx_cmd_create_geneve_tlv_option(void *ctx, geneve_tlv_opt_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!geneve_tlv_opt_obj->obj) { - mlx5_devx_err_log(out, "create GENEVE TLV", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create GENEVE TLV", NULL, 0); mlx5_free(geneve_tlv_opt_obj); return NULL; } @@ -2712,7 +2720,7 @@ mlx5_devx_cmd_queue_counter_alloc(void *ctx) dcs->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (!dcs->obj) { - mlx5_devx_err_log(out, "create q counter set", NULL, 0); + DEVX_DRV_LOG(DEBUG, out, "create q counter set", NULL, 0); mlx5_free(dcs); return NULL; } @@ -2799,7 +2807,7 @@ mlx5_devx_cmd_create_dek_obj(void *ctx, struct mlx5_devx_dek_attr *attr) dek_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (dek_obj->obj == NULL) { - mlx5_devx_err_log(out, "create DEK", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create DEK", NULL, 0); mlx5_free(dek_obj); return NULL; } @@ -2846,7 +2854,7 @@ mlx5_devx_cmd_create_import_kek_obj(void *ctx, import_kek_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (import_kek_obj->obj == NULL) { - mlx5_devx_err_log(out, "create IMPORT_KEK", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create IMPORT_KEK", NULL, 0); mlx5_free(import_kek_obj); return NULL; } @@ -2894,7 +2902,7 @@ mlx5_devx_cmd_create_credential_obj(void *ctx, credential_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (credential_obj->obj == NULL) { - mlx5_devx_err_log(out, "create CREDENTIAL", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create CREDENTIAL", NULL, 0); mlx5_free(credential_obj); return NULL; } @@ -2945,7 +2953,7 @@ mlx5_devx_cmd_create_crypto_login_obj(void *ctx, crypto_login_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out, sizeof(out)); if (crypto_login_obj->obj == NULL) { - mlx5_devx_err_log(out, "create CRYPTO_LOGIN", NULL, 0); + DEVX_DRV_LOG(ERR, out, "create CRYPTO_LOGIN", NULL, 0); mlx5_free(crypto_login_obj); return NULL; } -- 2.34.1