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 B8D98A034F for ; Thu, 25 Feb 2021 19:24:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0260F1608E7; Thu, 25 Feb 2021 19:24:08 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 98E3916080A; Thu, 25 Feb 2021 19:24:07 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 40CE75C00C5; Thu, 25 Feb 2021 13:24:07 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 25 Feb 2021 13:24:07 -0500 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= uuctzikRObxp0/hu4uvMy6utWUI8ejyogHL8LYIO85g=; b=tdbO4XBR3hkSx5uR KXcHTynsLmMjV8LAwwziqEyAi8yQ/OdOgsqutBz8BTroiBmWGYbIhFrBbIzOA9H/ 0JUHF/tZgXzRRXbwMgVpMgwT9tWhww0b8Qt9HOSsJf8Mzqx5mC8GlvLoDYSt0zjw yRo26ypkLVFNwzd6igfmnH8VfCE3ShrXeJtojZqLf8zCnqSgYqVfXMjklSUbffc/ vggny9lTGBCehC2TVxtjeRmmufGeggTZ27Jlyqmfurj8L9BS6vgKFBIDKBOljz0T 3nzWGX0GvIiQeV+akGsVOfM+x8QKwglCd6LVAZCMxiH56UnjFTDN5AZZwsaihzmv eXa9eA== 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=uuctzikRObxp0/hu4uvMy6utWUI8ejyogHL8LYIO8 5g=; b=GAFqVXxyEfALvJdqQfGdzczKIlr3kbiQ2pvD61FXhMKW2eqaQKj/GxWtj +P8uRU8kSJIsdA6jbooSbqJWJJogZPKscfOGtIHgDZSBUXW1ESlmc8Ch3qshyxuD MliFwjBF1tpNjWxD173bcF0KlIPpEOMp3siqRZYqU7Oyxf3gk/KT3DnnZuGvzG7c GqbMTGQwd3s1hxy/g+1o9rLcaZMazo0sAFTzwG936lGf684yR7wLfAVc9PluuOFg /gPFQngcs6d99DQiEYR+KPjld0lAkdIUH/CNMBN2drYNlkpzfy9yZgcQ9e0sppvZ ZWLOcJpEByeTJrb+fEoaomr7TJFRg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrkeelgdduudegucetufdoteggodetrfdotf 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 0E419240054; Thu, 25 Feb 2021 13:24:05 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: ncopa@alpinelinux.org, stable@dpdk.org, =?UTF-8?q?Morten=20Br=C3=B8rup?= , Xiaoyun Li , =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= , Konstantin Ananyev , Ferruh Yigit Date: Thu, 25 Feb 2021 19:22:49 +0100 Message-Id: <20210225182250.1149592-17-thomas@monjalon.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210225182250.1149592-1-thomas@monjalon.net> References: <20190313170657.16688-1-ncopa@alpinelinux.org> <20210225182250.1149592-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v5 16/17] app/testpmd: fix build with musl X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 --- 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 dab8afe5dd..9ca03c236e 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -2963,7 +2963,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 4aca522859..5437b6229e 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -935,7 +935,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