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 C9BF4A0562; Fri, 19 Mar 2021 15:59:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 376F5140FC2; Fri, 19 Mar 2021 15:58:12 +0100 (CET) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id EAA9D140FB9; Fri, 19 Mar 2021 15:58:10 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 788F5B47; Fri, 19 Mar 2021 10:58:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 19 Mar 2021 10:58:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm3; bh= aK90hWW2RsvFouoFeTOfx9bOPd8cNW6mFeOtM4myCuc=; b=WAiDqCfzG+i5FLyS bJhQpUzKXP21JvKjNDfLvvKR3OQ3tYiFvOot3nRYst2eJcHRCzObzrXEn8xvVgPZ 93Q43UaultNW/xMzgkMql6evRLjOtmK/EpVGTKznh/iVuRCOF53hQt8FxV1Ghynn qPL6jv1Dfe2CeEVtLNbIr4abTi+jHRWr+n/StkHTO8rBjpqOxlSMsApoteaeKg68 QyqDU9AZYpEVBKgLJF3xA5vSJx5tcXpA1NgmL4FWINQOM4yAGuaRb/rZKXEjukZa M0O7EdxVjkquaGe6N1r1rfg7ZUrhjFDV6sqcQtACHChie9t9AXmiCOsfzU7GyM8B BGPwkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=aK90hWW2RsvFouoFeTOfx9bOPd8cNW6mFeOtM4myC uc=; b=rch+PtVbAaNrBz9H/sWmnlonfYJvfPhziTHljUhibO7NFuzHNCaXGh+3T L7MK/J986SXZaQHdLrnwfWYbRf5EKcxPDwju1lNhzbGc4AiIZZuBQcXb/hO0dVqg NBNlRGcf4psbakpFU1l+Dw+bFERbCeBFUB8SYHHVyNkedox4kWeRVZghi4MxMt1J HWCWZ0VuhBP+7tGdSuRU7kbar66g5SIdyOeg8ZsFvN1Bk6UjtuYqZwhpl9wnwUhz iGPnIcw20iKvOG5O1WpZUGQRW6io+vP+Eqy/f4WL4dkh9jAmJZBlfi/Bn1GEsQkF DmuuIkXzpYzf05yZU4yo6t/oeTbjg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudefkedgjedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeevuddtveeuveejkeevheehveffueegjedukeffledtleekieef geduhedvgeejhfenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 0FD02240066; Fri, 19 Mar 2021 10:58:07 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: ncopa@alpinelinux.org, stable@dpdk.org, =?UTF-8?q?Morten=20Br=C3=B8rup?= , Andrew Rybchenko , David Marchand , Xiaoyun Li , =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= , Konstantin Ananyev , Ferruh Yigit Date: Fri, 19 Mar 2021 15:57:29 +0100 Message-Id: <20210319145730.3555384-17-thomas@monjalon.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210319145730.3555384-1-thomas@monjalon.net> References: <20190313170657.16688-1-ncopa@alpinelinux.org> <20210319145730.3555384-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v7 16/17] app/testpmd: fix build with musl 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" From: Natanael Copa 1/ Improve portability by avoiding use of non-standard 'uint'. Use uint8_t for hash_key_len as rss_key_len is a uint8_t type. This solves following build error when building with musl libc: app/test-pmd/testpmd.h:813:29: error: unknown type name 'uint' 2/ In musl libc, stdout is of type (FILE * const). Because of the const qualifier, a dark magic cast must be achieved through uintptr_t. Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands") Fixes: e977e4199a8d ("app/testpmd: add commands to load/unload BPF filters") Cc: stable@dpdk.org Signed-off-by: Natanael Copa Reviewed-by: Morten Brørup Signed-off-by: Thomas Monjalon Acked-by: Andrew Rybchenko Acked-by: David Marchand --- app/test-pmd/bpf_cmd.c | 2 +- app/test-pmd/config.c | 2 +- app/test-pmd/testpmd.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c index 066619e115..6980291f07 100644 --- a/app/test-pmd/bpf_cmd.c +++ b/app/test-pmd/bpf_cmd.c @@ -20,7 +20,7 @@ static const struct rte_bpf_xsym bpf_xsym[] = { .name = RTE_STR(stdout), .type = RTE_BPF_XTYPE_VAR, .var = { - .val = &stdout, + .val = (void *)(uintptr_t)&stdout, .desc = { .type = RTE_BPF_ARG_PTR, .size = sizeof(stdout), diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 576d5acab5..e865de10a4 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -2674,7 +2674,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key) void port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key, - uint hash_key_len) + uint8_t hash_key_len) { struct rte_eth_rss_conf rss_conf; int diag; diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index af40859170..a87ccb0f0f 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -936,7 +936,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate, void port_rss_hash_conf_show(portid_t port_id, int show_rss_key); void port_rss_hash_key_update(portid_t port_id, char rss_type[], - uint8_t *hash_key, uint hash_key_len); + uint8_t *hash_key, uint8_t hash_key_len); int rx_queue_id_is_invalid(queueid_t rxq_id); int tx_queue_id_is_invalid(queueid_t txq_id); void setup_gro(const char *onoff, portid_t port_id); -- 2.30.1