From patchwork Fri Dec 8 10:00:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 121141 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp456883qgn; Fri, 8 Dec 2017 02:05:12 -0800 (PST) X-Google-Smtp-Source: ACJfBosxsBq7NnGa8z61pvx1lNY+XHmZmGiI4aJHwlASsSFA5vH8foD4dfjCscNT6JdyTEpBSoXN X-Received: by 10.237.57.233 with SMTP id m96mr3323923qte.192.1512727512123; Fri, 08 Dec 2017 02:05:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512727512; cv=none; d=google.com; s=arc-20160816; b=JIa/yDiBhFlb4tMG+yJTAMQ9hgnTvPl8j9CzL73d7MW21tq8+NF2dnE7m3IwOee8Pf wonJWoVtSbpFtSx3+du3c0A4KtkVBDfXimo0VaS0Rs+MtzKFLrrSWvIc4l6wdwu1yZvZ I9LY7lW54am0ZXCGc/dwxXEuaqH8ZTsS/j44SFhbvdkxJmBfApX25HFp4tEA/BQFKt7C ayIAE1q7qEwLTXQ5Bc8ntngb1zxtAQ61Ch7v1vc28HJ7fdO2YbueZM/FpS3Bl6CPu/KJ S5VRhQk5bLvlTGNwqe7vcP6Whlzo77kw56+AnOn8zPxjHbXnHMxONCmM2OeBejUJ7i3Q i0Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:github-pr-num:references :in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=9iginKoyw1y+YhI0XKInE2OWAJbBcLg1Zh0ExEWHgVg=; b=Ojo6r0vDQ8Lrq8BwBioG9VVUainqt4uUFyqmvNjpe/Hp0wAT1TSWUpxaSzBxnhLmPx pl33LwLqHwKJPke3POEooI1m9WxKDz/uzN4Tf+mg3EtZaZDV0Xykcl0W/HLHfmT/7tnf cMibnI8uYegDhCbHwWtgjRFv+95K4HkcjfCYodrmgt7vCa/Velgpjy1JaMU/jJszB65m dP8cf0ZQ8Bw58IWzeplhaWHWacMaX5kyX1nmTdoEAL3NAQWvNoRHLTxGGmYuh/fcCpMG rwQaWz61wYsDj9zxDhxkb+6jPvOUZmgwe9Ny2ejNWzYWRkuOUtUEBbzxJGyaHsUWmZ4m yMeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id u7si5539257qki.461.2017.12.08.02.05.11; Fri, 08 Dec 2017 02:05:12 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id B019D60A01; Fri, 8 Dec 2017 10:05:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id CDBBD6099C; Fri, 8 Dec 2017 10:01:46 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 8D7656099E; Fri, 8 Dec 2017 10:01:39 +0000 (UTC) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by lists.linaro.org (Postfix) with ESMTPS id 4BDE26094A for ; Fri, 8 Dec 2017 10:00:27 +0000 (UTC) Received: from mxback4j.mail.yandex.net (mxback4j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10d]) by forward105o.mail.yandex.net (Yandex) with ESMTP id AC91444439E6 for ; Fri, 8 Dec 2017 13:00:22 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback4j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id o6ydriy42y-0Mle4nbq; Fri, 08 Dec 2017 13:00:22 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id p6iuZvqqGi-0MdqpBPm; Fri, 08 Dec 2017 13:00:22 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 8 Dec 2017 13:00:17 +0300 Message-Id: <1512727218-7712-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512727218-7712-1-git-send-email-odpbot@yandex.ru> References: <1512727218-7712-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 321 MIME-Version: 1.0 Subject: [lng-odp] [PATCH v4 5/6] linux-gen: dpdk: cast addresses to uintptr_t rather than uint64_t X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov This is to remove the following error: pktio/dpdk.c: In function ‘mbuf_data_off’: pktio/dpdk.c:126:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] return (uint64_t)pkt_hdr->buf_hdr.seg[0].data - ^ pktio/dpdk.c:127:4: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] (uint64_t)mbuf->buf_addr; Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 321 (lumag:dpdk-system-master) ** https://github.com/Linaro/odp/pull/321 ** Patch: https://github.com/Linaro/odp/pull/321.patch ** Base sha: c15a810b7a47f2e07200f83aa534163ca06e2b16 ** Merge commit sha: 540836da19aed3d8c900429f089415c51b77529f **/ platform/linux-generic/pktio/dpdk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c index db2a8b0f2..585ff462a 100644 --- a/platform/linux-generic/pktio/dpdk.c +++ b/platform/linux-generic/pktio/dpdk.c @@ -123,8 +123,8 @@ static unsigned cache_size(uint32_t num) static inline uint16_t mbuf_data_off(struct rte_mbuf *mbuf, odp_packet_hdr_t *pkt_hdr) { - return (uint64_t)pkt_hdr->buf_hdr.seg[0].data - - (uint64_t)mbuf->buf_addr; + return (uintptr_t)pkt_hdr->buf_hdr.seg[0].data - + (uintptr_t)mbuf->buf_addr; } /**