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 16588A0548; Sun, 28 Feb 2021 13:56:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74E6322A2F1; Sun, 28 Feb 2021 13:54:30 +0100 (CET) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id 2A68D22A2EC; Sun, 28 Feb 2021 13:54:29 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id D5AAD5D4; Sun, 28 Feb 2021 07:54:27 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 28 Feb 2021 07:54:28 -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=zQVbP9m+42ff17TV t8Of10ttZsawIjzEVcXEnNTj0scjNztb3rZ+SRo9J2jiYsKg9QyGXvlWkHr2PkqK t005Ah9sGnFyb9L2Skyb08qBDIUTfahAdW5m7DQTiW6jilqrSWCVolJDiQNcV2wr iyTsF/x3uWZGU4rjitLF2Qqs56nM4ifLFbPRMisYrk5U0e67MUFGvYUJrX8L5BG7 yIOqO4MMRcrz6h2Xmk5BybL633dJ5kUxtFH6waokc/qE/D9kEbqXLyW/CN7j4y2t vwgRu3F+sum2fAvtCLfYiX3W9cp90t/q1MmUwOKQ1U/sH71gB+rMZe6Vg28iRirU /xH+VA== 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=DMPMmeqxM/zPsGuhA91OhYqurej+vgkZU7MFpKMaF1+YHKxvCqMoHjTlu Fs1uwVQ5pTh9/81e7WsFeGCanD/Pc3J1ka/9pRWmrc9vJ9tbu2nRv9cMpdOdwFHW WIYvNdzm8QwSIXGsoFlLH+/SvxKGaYDP/NIX4CKn7FSoho5ZOVpNpqdBlVtfK39/ qvmVVCjLNhcEwo5gIsWsZuZ5HCYHPd+ud8QwliuJoTfpwyxvVfBE0bpMRoeCt04m 2Ehl7gRymWN2q5rgTZkkvva7PDDwQGAioiw0ILWSGbi59orrnImOdirvi9wQ3O4s g9/nEMIwUmizqmRQaSZvl1HvPKQng== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrleeigdegkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvedutdevueevjeekveehheevffeugeejudekffeltdelkeeifeeg udehvdegjefhnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght 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 9056C1080057; Sun, 28 Feb 2021 07:54:26 -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: Sun, 28 Feb 2021 13:53:51 +0100 Message-Id: <20210228125353.2436562-17-thomas@monjalon.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210228125353.2436562-1-thomas@monjalon.net> References: <20190313170657.16688-1-ncopa@alpinelinux.org> <20210228125353.2436562-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 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 --- 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