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 500E44626E; Thu, 20 Feb 2025 03:02:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88AFE402DB; Thu, 20 Feb 2025 03:01:53 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 39C0E402C3 for ; Thu, 20 Feb 2025 03:01:48 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 6268F204E5B4; Wed, 19 Feb 2025 18:01:47 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6268F204E5B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1740016907; bh=y5ifBxhMrH+NarBFHQGrShME0aGG5oPAK43G/aqgz7E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yb+JG1E3Xew7cdwxSixancnJuIz9mzVI6/Kjtb2mDK2EGKSGs1oiMw6lkthfMNldI E8CLzz9a4MWdU4osYfjvX3HBa8exdGbyU1dpuWM+d67WLhEjVGBtARbXP8xbNjeccn 39j6+NDCPGMdxE8NsuVrx3xYc82hZgmu2KbH78hI= From: Andre Muezerie To: andremue@linux.microsoft.com Cc: dev@dpdk.org, Chengwen Feng Subject: [PATCH v3 04/10] test-pmd: do explicit 64-bit shift to avoid implicit conversion Date: Wed, 19 Feb 2025 18:01:33 -0800 Message-Id: <1740016899-2817-5-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1740016899-2817-1-git-send-email-andremue@linux.microsoft.com> References: <1739311325-14425-1-git-send-email-andremue@linux.microsoft.com> <1740016899-2817-1-git-send-email-andremue@linux.microsoft.com> 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 Compiling with MSVC results in warnings like the one below: app/test-pmd/util.c(201): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) Signed-off-by: Andre Muezerie Signed-off-by: Chengwen Feng Acked-by: Bruce Richardson --- app/test-pmd/cmdline.c | 4 ++-- app/test-pmd/testpmd.c | 2 +- app/test-pmd/util.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 86d763b66a..2afcf916c0 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -12632,11 +12632,11 @@ cmd_config_dynf_specific_parsed(void *parsed_result, } old_port_flags = ports[res->port_id].mbuf_dynf; if (!strcmp(res->value, "set")) { - ports[res->port_id].mbuf_dynf |= 1UL << flag; + ports[res->port_id].mbuf_dynf |= RTE_BIT64(flag); if (old_port_flags == 0) add_tx_dynf_callback(res->port_id); } else { - ports[res->port_id].mbuf_dynf &= ~(1UL << flag); + ports[res->port_id].mbuf_dynf &= ~RTE_BIT64(flag); if (ports[res->port_id].mbuf_dynf == 0) remove_tx_dynf_callback(res->port_id); } diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 0520aba0db..0a5b999c3a 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -4152,7 +4152,7 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf, enum dcb_mode_enable dcb_mode, for (i = 0; i < vmdq_rx_conf->nb_pool_maps; i++) { vmdq_rx_conf->pool_map[i].vlan_id = vlan_tags[i]; vmdq_rx_conf->pool_map[i].pools = - 1 << (i % vmdq_rx_conf->nb_queue_pools); + RTE_BIT64(i % vmdq_rx_conf->nb_queue_pools); } for (i = 0; i < RTE_ETH_DCB_NUM_USER_PRIORITIES; i++) { vmdq_rx_conf->dcb_tc[i] = i % num_tcs; diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c index 5fa05fad16..3934831b19 100644 --- a/app/test-pmd/util.c +++ b/app/test-pmd/util.c @@ -201,7 +201,7 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[], MKDUMPSTR(print_buf, buf_size, cur_len, " - dynf %s: %d", dynf_names[dynf_index], - !!(ol_flags & (1UL << dynf_index))); + !!(ol_flags & RTE_BIT64(dynf_index))); } if (mb->packet_type) { rte_get_ptype_name(mb->packet_type, buf, sizeof(buf)); -- 2.48.1.vfs.0.0