From patchwork Thu Dec 7 14:00:11 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: 120981 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8400453qgn; Thu, 7 Dec 2017 06:07:22 -0800 (PST) X-Google-Smtp-Source: AGs4zMaIip6Q/7ISqRxaO8PJ8sIcxXAFcuMXmtCXyG5puVUL+XOmJhmbkuvbUeMzzynrjcVSkjC3 X-Received: by 10.200.45.150 with SMTP id p22mr9253167qta.130.1512655642111; Thu, 07 Dec 2017 06:07:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512655642; cv=none; d=google.com; s=arc-20160816; b=WL+PHTreqpsjLcG6rDMI6V7bkpno8XpvhEMdQcOz6ua6V9VKT6TC1eQhqJe65SvzpE GeTLdLuVqC9e7WxA2Sq6cMn7sRBnAq/GzEXU8fUe/BfePjFS7yxbdKqJ0nEjmIuqDGam 8LrheZG4OrT41k84nBXAi0COaHbFA5arC3r+BxD07I/uyqXbWbxUfSVTL/DxOZOZqpC/ qErr8ZqrcA3v5BrtWgwI/IgRXuSSpmi2nNCii1XSfV2BIBPh24rAP8xNQSWhmVXoSLtl hs20qmie7L1iRl5ZLWUDJGfQBCCo7Uagk0QxdHIQ5Yd1dL48JInX5OfJAeHI7KBxlBWh 6opA== 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=vNOEhjSoXfVRcZ7lcAQEpQLPRhO6dIR1Xfz4QezWYMA=; b=tOVfzFVSKho3H+2ot0aYUqhN5bhti36v+1emBnr9gNIwDsX7n+QTJ8mUz9KP+tIrHN 7JZsDgoTtqBYL9JHHD1IeUzNUht+t80vcPSyftTrzszcMscN5m7zmmGRqVJtaEOJUrzN aoVBm6cSRatBOySB0u/9skKZmfTOm4b1lWXGr2ns+LcKTiFjF2ZOI7C09SxhlDDQYJ8D aC8PukwuVlVLHff2O/cK7kFkN2Jjcm9Kh1NtEbqWrLLCJr7o4V8cPN9Vm/rq75CGNETL X9ZcGAsIv+swLyR2T9Nv8Rc9/TYad6CL4OmxtXdbsOlgNJFjCtwrBJWjC7I4NijIFKcZ P4eg== 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 q32si2934155qkq.242.2017.12.07.06.07.19; Thu, 07 Dec 2017 06:07:22 -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 E7474609C0; Thu, 7 Dec 2017 14:07:18 +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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 20EED6096D; Thu, 7 Dec 2017 14:01:13 +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 D97616064A; Thu, 7 Dec 2017 14:00:28 +0000 (UTC) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by lists.linaro.org (Postfix) with ESMTPS id 3907260926 for ; Thu, 7 Dec 2017 14:00:22 +0000 (UTC) Received: from mxback11j.mail.yandex.net (mxback11j.mail.yandex.net [IPv6:2a02:6b8:0:1619::84]) by forward106o.mail.yandex.net (Yandex) with ESMTP id E19077848F1 for ; Thu, 7 Dec 2017 17:00:15 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback11j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id rKSxW0i85Q-0FcCCMV7; Thu, 07 Dec 2017 17:00:15 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id N0uwl7gRuJ-0FhOr2gT; Thu, 07 Dec 2017 17:00:15 +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: Thu, 7 Dec 2017 17:00:11 +0300 Message-Id: <1512655212-29682-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512655212-29682-1-git-send-email-odpbot@yandex.ru> References: <1512655212-29682-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 321 MIME-Version: 1.0 Subject: [lng-odp] [PATCH v3 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: 811281a22b6274b7f41b926a9cfbe09e48a366bd ** Merge commit sha: 7aed25e962c1322b020ff261d9e5ee0ab3dda1a1 **/ 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; } /**