From patchwork Mon Dec 4 15:00:07 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: 120565 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4542035qgn; Mon, 4 Dec 2017 07:04:33 -0800 (PST) X-Google-Smtp-Source: AGs4zMYTndBHRSSxBY9exi7cK5gMTar4BXrb9354RA2UoANAC3gN46vAj/nQIQFZELhtlz+gikd0 X-Received: by 10.200.43.24 with SMTP id 24mr20298731qtu.153.1512399873530; Mon, 04 Dec 2017 07:04:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512399873; cv=none; d=google.com; s=arc-20160816; b=TZxq+TRz9egXyBRocQqxVJKohzRpz2XjBtJx3k6xr2ZXfO51NZzGlqG2hBFqz81gKB KDoFEsQ7RK3IDoiqokhUlJ/K3YW11HzGF2RVF1XUucbXBk9aEwmXLOCUie9cN+UBFk4f bLV2qBVLgmRxyCd6JUVHFaZX5MFomL9asjmxa5f3lmzOQFjpij58BU87FUHtehWu66NO ZA7ogASse8YurgSsX3y68J3iDwUl1oMcVdtlWG0uMMMvBV8B4zvu715zXYIc8xFrwOwf O9NufD62f3fkSH97Kg0rNcVtP3rPuu6Mj2hzjeTO+cmctneaSvwzi61Pn3P5wfgAllqG /1yg== 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=KdLARivhtdY237bOEhnC8eEdnK8DHV9Clv85RCohOxg=; b=l2TjDlW6Zft7BaOk8bXdo/O1SQ8Bx2ff9ue9vWP4EwEKbGl0/wkhtOGMhNrXfvrazy 0M/EkfW/PZ5xXJsHChd9eKshDF+yYBbx7sTH1SKAJHZa//CHfGcRGlJm7GPJcxUwLIs8 gJXBwF9ipYJwE9Cltn/ZvV8ALZN0p/sW4ED5vaAcMDPhmv81uCDVLgFEvgQTbRGm7YG0 D4iXwqgqcDp26DTPlk7CokmN6KIHQxVXGqJ/XrAC74IgS3j2OHJuYlKuabEtNcfQngis C3VFTy0HkLQ9pIim/zDVw1EXAyd+F+YuE+kJ90LFx3vRJMVqmRJLPFlB3ou6aJxO0D+H Mc5A== 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 123si705993qki.191.2017.12.04.07.04.21; Mon, 04 Dec 2017 07:04:33 -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 9763F60732; Mon, 4 Dec 2017 15:04:21 +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=-0.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED, URIBL_DBL_ABUSE_SPAM 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 5C7A960923; Mon, 4 Dec 2017 15:00:47 +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 B8008608BA; Mon, 4 Dec 2017 15:00:21 +0000 (UTC) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by lists.linaro.org (Postfix) with ESMTPS id 3DCC2604A1 for ; Mon, 4 Dec 2017 15:00:15 +0000 (UTC) Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 8C71A784F75 for ; Mon, 4 Dec 2017 18:00:13 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback3j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id EkPs51YiBa-0DwG9gSs; Mon, 04 Dec 2017 18:00:13 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Hseuacluka-0CE8m0hA; Mon, 04 Dec 2017 18:00:12 +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: Mon, 4 Dec 2017 18:00:07 +0300 Message-Id: <1512399608-12981-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512399608-12981-1-git-send-email-odpbot@yandex.ru> References: <1512399608-12981-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 321 MIME-Version: 1.0 Subject: [lng-odp] [PATCH v2 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: 5329e5211c447b9b823149baf76112eedfeb07fb ** Merge commit sha: 280c62aa5d2ea89ff05e376a74d7c6bbd29f002f **/ 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 fa73cb93d..705a7968c 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; } /**