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 1EEB545AF0; Wed, 9 Oct 2024 11:19:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0875740ED0; Wed, 9 Oct 2024 11:19:06 +0200 (CEST) Received: from fhigh-a5-smtp.messagingengine.com (fhigh-a5-smtp.messagingengine.com [103.168.172.156]) by mails.dpdk.org (Postfix) with ESMTP id 94AA840E32 for ; Wed, 9 Oct 2024 11:19:04 +0200 (CEST) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.phl.internal (Postfix) with ESMTP id 1A87D11402DB; Wed, 9 Oct 2024 05:19:04 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-10.internal (MEProxy); Wed, 09 Oct 2024 05:19:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm2; t=1728465544; x=1728551944; bh=8HIIVKjvxwRTNErZM18cU 4O/l6FybQNOJlX3zX6jMKU=; b=ewYJ+D3wMVnCWl4/BhZsxXn9dlyNWtiDDVmG4 QuYp9ghnYJTy+sMGrZBbyaq90XiQGebrvr65UwywdsoOu0Tl5uw4dgVmRGbscXXc NfiiTIS0RZKFDCp0QredIpuoWy1yzEgan/9zrYSrgO2RDbGbDJrdCN2NJZYu7B6q 6iYbdPUMbo7itnFQ0heX3z2Qp2tmEKPbFbLHZW+OnOgTTjF/piqpCrYfqggT8ZTJ SE1vw0SFF98vslMWzZxTuMFu+T4cXJjQPoPditeMcWi/7HXr29Y7s8AF6xpLWCb+ DPcMoCEKjDxNpbHnkLA/USnXeWs6zxFE9f9h+T35Q1biLKLXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1728465544; x=1728551944; bh=8HIIVKjvxwRTNErZM18cU4O/l6Fy bQNOJlX3zX6jMKU=; b=mAlCki1qXxa97yFjbiHLJJffY1Qj/JBuiCTAlfots26n cDL8cs2+08SAJJ2zlayZdT+QxrFrXKN3Uz0E3FQT6gpzuGZJ8ZPKixaSQEeuYNnE FAExW2WBRxfhwyjHS5HyFxBJYYkVgQzu+D5eEfk2Z4tqarFN646MW1rv5VUJIY5O 5gnmo+d90HsNkr2jUVt6vTaMu2cZnGWwWvfKGbPqUMdihwq9M2bEp3OePXFZmFWo CilMU1Y+wtziEIs1rMIjF+DRUsXjPTSIVRvKblfG6iH3dG3zH96ldstkRkOc4P3n f/PgYxBfFvkQ/CqNqYjtQkZYC0GdZ9ZkKjFCek4VNQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdeffedgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkofgggfestdekredtredttdenucfh rhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghloh hnrdhnvghtqeenucggtffrrghtthgvrhhnpeevveefveeiiefhtedukeegkeelieegffeu keevudetueffieduveetiedukeefleenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtpdhnsggp rhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeguvghvseguph gukhdrohhrghdprhgtphhtthhopehlihhrohhnhhesmhgrrhhvvghllhdrtghomhdprhgt phhtthhopehfvghnghgthhgvnhhgfigvnheshhhurgifvghirdgtohhmpdhrtghpthhtoh epuggrvhhiugdrmhgrrhgthhgrnhgusehrvgguhhgrthdrtghomhdprhgtphhtthhopegr nhgurhgvfidrrhihsggthhgvnhhkohesohhkthgvthhlrggsshdrrhhu X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Oct 2024 05:19:02 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: Liron Himi , Chengwen Feng , David Marchand , Andrew Rybchenko Subject: [PATCH] net/mvpp2: fix build by removing newlines in logs Date: Wed, 9 Oct 2024 11:18:52 +0200 Message-ID: <20241009091853.763626-1-thomas@monjalon.net> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 After using RTE_LOG_LINE_PREFIX in MRVL_LOG macro, an assert was detecting some newlines in logs. After removing these superfluous newlines, the compilation passes. Fixes: 2b843cac232e ("drivers: use per line logging in helpers") Signed-off-by: Thomas Monjalon --- drivers/net/mvpp2/mrvl_ethdev.c | 14 ++++----- drivers/net/mvpp2/mrvl_qos.c | 56 ++++++++++++++++----------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index 36be79b9a5..4200c11d46 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -215,7 +215,7 @@ mrvl_pp2_fixup_init(void) dummy_pool_id[i] = mrvl_reserve_bit(&used_bpools[i], PP2_BPOOL_NUM_POOLS); if (dummy_pool_id[i] < 0) { - MRVL_LOG(ERR, "Can't find free pool\n"); + MRVL_LOG(ERR, "Can't find free pool"); return -1; } @@ -227,7 +227,7 @@ mrvl_pp2_fixup_init(void) bpool_params.dummy_short_pool = 1; err = pp2_bpool_init(&bpool_params, &dummy_pool[i]); if (err != 0 || !dummy_pool[i]) { - MRVL_LOG(ERR, "BPool init failed!\n"); + MRVL_LOG(ERR, "BPool init failed!"); used_bpools[i] &= ~(1 << dummy_pool_id[i]); return -1; } @@ -491,7 +491,7 @@ mrvl_dev_configure(struct rte_eth_dev *dev) } if (dev->data->dev_conf.rxmode.mtu > priv->max_mtu) { - MRVL_LOG(ERR, "MTU %u is larger than max_mtu %u\n", + MRVL_LOG(ERR, "MTU %u is larger than max_mtu %u", dev->data->dev_conf.rxmode.mtu, priv->max_mtu); return -EINVAL; @@ -770,7 +770,7 @@ static int mrvl_populate_vlan_table(struct rte_eth_dev *dev, int on) vbit >>= 1; ret = mrvl_vlan_filter_set(dev, vlan, on); if (ret) { - MRVL_LOG(ERR, "Failed to setup VLAN filter\n"); + MRVL_LOG(ERR, "Failed to setup VLAN filter"); return ret; } } @@ -1875,7 +1875,7 @@ static int mrvl_vlan_offload_set(struct rte_eth_dev *dev, int mask) int ret; if (mask & RTE_ETH_VLAN_STRIP_MASK) { - MRVL_LOG(ERR, "VLAN stripping is not supported\n"); + MRVL_LOG(ERR, "VLAN stripping is not supported"); return -ENOTSUP; } @@ -1890,7 +1890,7 @@ static int mrvl_vlan_offload_set(struct rte_eth_dev *dev, int mask) } if (mask & RTE_ETH_VLAN_EXTEND_MASK) { - MRVL_LOG(ERR, "Extend VLAN not supported\n"); + MRVL_LOG(ERR, "Extend VLAN not supported"); return -ENOTSUP; } @@ -1941,7 +1941,7 @@ mrvl_fill_bpool(struct mrvl_rxq *rxq, int num) != cookie_addr_high) { MRVL_LOG(ERR, "mbuf virtual addr high is out of range " - "0x%x instead of 0x%x\n", + "0x%x instead of 0x%x", (uint32_t)((uint64_t)mbufs[i] >> 32), (uint32_t)(cookie_addr_high >> 32)); goto out; diff --git a/drivers/net/mvpp2/mrvl_qos.c b/drivers/net/mvpp2/mrvl_qos.c index f43217bc58..e298da2724 100644 --- a/drivers/net/mvpp2/mrvl_qos.c +++ b/drivers/net/mvpp2/mrvl_qos.c @@ -500,7 +500,7 @@ parse_udf(struct rte_cfgfile *file, const char *sec_name, int udf, entry = rte_cfgfile_get_entry(file, sec_name, MRVL_TOK_PARSER_UDF_PROTO); if (!entry) { - MRVL_LOG(ERR, "UDF[%d]: '%s' field must be set\n", udf, + MRVL_LOG(ERR, "UDF[%d]: '%s' field must be set", udf, MRVL_TOK_PARSER_UDF_PROTO); return -1; } @@ -509,7 +509,7 @@ parse_udf(struct rte_cfgfile *file, const char *sec_name, int udf, entry_field = rte_cfgfile_get_entry(file, sec_name, MRVL_TOK_PARSER_UDF_FIELD); if (!entry_field) { - MRVL_LOG(ERR, "UDF[%d]: '%s' field must be set\n", udf, + MRVL_LOG(ERR, "UDF[%d]: '%s' field must be set", udf, MRVL_TOK_PARSER_UDF_FIELD); return -1; } @@ -523,7 +523,7 @@ parse_udf(struct rte_cfgfile *file, const char *sec_name, int udf, field_size = 2; } else { MRVL_LOG(ERR, "UDF[%d]: mismatch between '%s' proto " - "and '%s' field\n", udf, + "and '%s' field", udf, MRVL_TOK_PARSER_UDF_PROTO_ETH, entry_field); return -1; @@ -537,45 +537,45 @@ parse_udf(struct rte_cfgfile *file, const char *sec_name, int udf, field_size = 2; } else { MRVL_LOG(ERR, "UDF[%d]: mismatch between '%s' proto " - "and '%s' field\n", udf, + "and '%s' field", udf, MRVL_TOK_PARSER_UDF_PROTO_UDP, entry_field); return -1; } } else { - MRVL_LOG(ERR, "UDF[%d]: Unsupported '%s' proto\n", udf, entry); + MRVL_LOG(ERR, "UDF[%d]: Unsupported '%s' proto", udf, entry); return -1; } snprintf(malloc_name, sizeof(malloc_name), "mrvl_udf_%d_key", udf); udf_params->match_key = rte_zmalloc(malloc_name, field_size, 0); if (udf_params->match_key == NULL) { - MRVL_LOG(ERR, "Cannot allocate udf %d key\n", udf); + MRVL_LOG(ERR, "Cannot allocate udf %d key", udf); return -1; } snprintf(malloc_name, sizeof(malloc_name), "mrvl_udf_%d_mask", udf); udf_params->match_mask = rte_zmalloc(malloc_name, field_size, 0); if (udf_params->match_mask == NULL) { - MRVL_LOG(ERR, "Cannot allocate udf %d mask\n", udf); + MRVL_LOG(ERR, "Cannot allocate udf %d mask", udf); return -1; } /* Read 'key' field */ entry = rte_cfgfile_get_entry(file, sec_name, MRVL_TOK_PARSER_UDF_KEY); if (!entry) { - MRVL_LOG(ERR, "UDF[%d]: '%s' field must be set\n", udf, + MRVL_LOG(ERR, "UDF[%d]: '%s' field must be set", udf, MRVL_TOK_PARSER_UDF_KEY); return -1; } if (strncmp(entry, "0x", 2) != 0) { - MRVL_LOG(ERR, "UDF[%d]: '%s' field must start with '0x'\n", + MRVL_LOG(ERR, "UDF[%d]: '%s' field must start with '0x'", udf, MRVL_TOK_PARSER_UDF_KEY); return -EINVAL; } if (strlen(entry) != FIELD_LEN_IN_CHARS(field_size)) { - MRVL_LOG(ERR, "UDF[%d]: '%s' field's len must be %d\n", udf, + MRVL_LOG(ERR, "UDF[%d]: '%s' field's len must be %d", udf, MRVL_TOK_PARSER_UDF_KEY, FIELD_LEN_IN_CHARS(field_size)); return -EINVAL; @@ -588,7 +588,7 @@ parse_udf(struct rte_cfgfile *file, const char *sec_name, int udf, if (get_val_securely8(tmp_arr, 16, &udf_params->match_key[i]) < 0) { MRVL_LOG(ERR, "UDF[%d]: '%s' field's value is not in " - "hex format\n", udf, MRVL_TOK_PARSER_UDF_KEY); + "hex format", udf, MRVL_TOK_PARSER_UDF_KEY); return -EINVAL; } entry += 2; @@ -597,18 +597,18 @@ parse_udf(struct rte_cfgfile *file, const char *sec_name, int udf, /* Read 'mask' field */ entry = rte_cfgfile_get_entry(file, sec_name, MRVL_TOK_PARSER_UDF_MASK); if (!entry) { - MRVL_LOG(ERR, "UDF[%d]: '%s' field must be set\n", udf, + MRVL_LOG(ERR, "UDF[%d]: '%s' field must be set", udf, MRVL_TOK_PARSER_UDF_MASK); return -1; } if (strncmp(entry, "0x", 2) != 0) { - MRVL_LOG(ERR, "UDF[%d]: '%s' field must start with '0x'\n", + MRVL_LOG(ERR, "UDF[%d]: '%s' field must start with '0x'", udf, MRVL_TOK_PARSER_UDF_MASK); return -EINVAL; } if (strlen(entry) != FIELD_LEN_IN_CHARS(field_size)) { - MRVL_LOG(ERR, "UDF[%d]: '%s' field's len must be %d\n", udf, + MRVL_LOG(ERR, "UDF[%d]: '%s' field's len must be %d", udf, MRVL_TOK_PARSER_UDF_MASK, FIELD_LEN_IN_CHARS(field_size)); return -EINVAL; @@ -621,7 +621,7 @@ parse_udf(struct rte_cfgfile *file, const char *sec_name, int udf, if (get_val_securely8(tmp_arr, 16, &udf_params->match_mask[i]) < 0) { MRVL_LOG(ERR, "UDF[%d]: '%s' field's value is not in " - "hex format\n", udf, MRVL_TOK_PARSER_UDF_MASK); + "hex format", udf, MRVL_TOK_PARSER_UDF_MASK); return -EINVAL; } entry += 2; @@ -631,7 +631,7 @@ parse_udf(struct rte_cfgfile *file, const char *sec_name, int udf, entry = rte_cfgfile_get_entry(file, sec_name, MRVL_TOK_PARSER_UDF_OFFSET); if (!entry) { - MRVL_LOG(ERR, "UDF[%d]: '%s' field must be set\n", udf, + MRVL_LOG(ERR, "UDF[%d]: '%s' field must be set", udf, MRVL_TOK_PARSER_UDF_OFFSET); return -1; } @@ -663,7 +663,7 @@ mrvl_get_cfg(const char *key __rte_unused, const char *path, void *extra_args) char sec_name[32]; if (file == NULL) { - MRVL_LOG(ERR, "Cannot load configuration %s\n", path); + MRVL_LOG(ERR, "Cannot load configuration %s", path); return -1; } @@ -672,7 +672,7 @@ mrvl_get_cfg(const char *key __rte_unused, const char *path, void *extra_args) */ *cfg = rte_zmalloc("mrvl_cfg", sizeof(struct mrvl_cfg), 0); if (*cfg == NULL) { - MRVL_LOG(ERR, "Cannot allocate configuration %s\n", path); + MRVL_LOG(ERR, "Cannot allocate configuration %s", path); return -1; } @@ -681,7 +681,7 @@ mrvl_get_cfg(const char *key __rte_unused, const char *path, void *extra_args) sizeof(MRVL_TOK_PARSER_UDF) - 1); if (n && n > PP2_MAX_UDFS_SUPPORTED) { - MRVL_LOG(ERR, "found %d udf sections, but only %d are supported\n", + MRVL_LOG(ERR, "found %d udf sections, but only %d are supported", n, PP2_MAX_UDFS_SUPPORTED); return -1; } @@ -693,14 +693,14 @@ mrvl_get_cfg(const char *key __rte_unused, const char *path, void *extra_args) /* udf sections must be sequential. */ if (rte_cfgfile_num_sections(file, sec_name, strlen(sec_name)) <= 0) { - MRVL_LOG(ERR, "udf sections must be sequential (0 - %d)\n", + MRVL_LOG(ERR, "udf sections must be sequential (0 - %d)", PP2_MAX_UDFS_SUPPORTED - 1); return -1; } ret = parse_udf(file, sec_name, i, *cfg); if (ret) { - MRVL_LOG(ERR, "Error in parsing %s!\n", sec_name); + MRVL_LOG(ERR, "Error in parsing %s!", sec_name); return -1; } } @@ -763,7 +763,7 @@ mrvl_get_cfg(const char *key __rte_unused, const char *path, void *extra_args) PP2_PPIO_HDR_ETH_EXT_DSA; } else { MRVL_LOG(ERR, - "Error in parsing %s value (%s)!\n", + "Error in parsing %s value (%s)!", MRVL_TOK_START_HDR, entry); return -1; } @@ -823,7 +823,7 @@ mrvl_get_cfg(const char *key __rte_unused, const char *path, void *extra_args) PP2_CLS_QOS_TBL_VLAN_PRI; } else { MRVL_LOG(ERR, - "Error in parsing %s value (%s)!\n", + "Error in parsing %s value (%s)!", MRVL_TOK_MAPPING_PRIORITY, entry); return -1; } @@ -851,7 +851,7 @@ mrvl_get_cfg(const char *key __rte_unused, const char *path, void *extra_args) ret = get_outq_cfg(file, n, i, *cfg); if (ret < 0) { MRVL_LOG(ERR, - "Error %d parsing port %d outq %d!\n", + "Error %d parsing port %d outq %d!", ret, n, i); return -1; } @@ -861,7 +861,7 @@ mrvl_get_cfg(const char *key __rte_unused, const char *path, void *extra_args) ret = parse_tc_cfg(file, n, i, *cfg); if (ret < 0) { MRVL_LOG(ERR, - "Error %d parsing port %d tc %d!\n", + "Error %d parsing port %d tc %d!", ret, n, i); return -1; } @@ -889,7 +889,7 @@ mrvl_get_cfg(const char *key __rte_unused, const char *path, void *extra_args) if (entry) { if (get_val_securely(entry, &val) < 0) { MRVL_LOG(ERR, - "Error in parsing %s value (%s)!\n", + "Error in parsing %s value (%s)!", MRVL_TOK_FWD_BAD_FRAMES, entry); return -1; } @@ -904,7 +904,7 @@ mrvl_get_cfg(const char *key __rte_unused, const char *path, void *extra_args) if (entry) { if (get_val_securely(entry, &val) < 0) { MRVL_LOG(ERR, - "Error in parsing %s value (%s)!\n", + "Error in parsing %s value (%s)!", MRVL_TOK_FILL_BPOOL_BUFFS, entry); return -1; } @@ -972,7 +972,7 @@ setup_policer(struct mrvl_priv *priv, struct pp2_cls_plcr_params *params) * * Lets use 0th then. */ - sprintf(match, "policer-%d:%d\n", priv->pp_id, 0); + sprintf(match, "policer-%d:%d", priv->pp_id, 0); params->match = match; ret = pp2_cls_plcr_init(params, &priv->default_policer); -- 2.46.0