From patchwork Fri Jun 3 17:19:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 9153787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 655F96082E for ; Fri, 3 Jun 2016 17:19:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51BF426E82 for ; Fri, 3 Jun 2016 17:19:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4669428304; Fri, 3 Jun 2016 17:19:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF7AD26E82 for ; Fri, 3 Jun 2016 17:19:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752164AbcFCRTi (ORCPT ); Fri, 3 Jun 2016 13:19:38 -0400 Received: from mout.gmx.net ([212.227.17.21]:53207 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751579AbcFCRTh (ORCPT ); Fri, 3 Jun 2016 13:19:37 -0400 Received: from ls3530.box ([92.203.38.178]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MOSNd-1b5Hqa4AfV-005m8T; Fri, 03 Jun 2016 19:19:26 +0200 Date: Fri, 3 Jun 2016 19:19:20 +0200 From: Helge Deller To: Craig Gallek , Alexei Starovoitov , "David S. Miller" , netdev@vger.kernel.org Cc: linux-parisc@vger.kernel.org Subject: [PATCH] soreuseport: Fix reuseport_bpf testcase on 32bit architectures Message-ID: <20160603171920.GB3664@ls3530.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:CbYcBuqaalOxH0YjxnY+3pUBdO2lLgbqF47n5EX4Y4q+1AQ6rNY eIuT5OCN+/3KcEbU/N2/+/+DDZrGGnMtMVbrCp1WULF534Ckw2+haGiitb4gab46n5CZyxA iNj/tIhgAWOmL7UtJD0eH8XxBANs44O6YAkVylMjQED3JGPjmG93yAv9ieUUOt/yK6J6KPW cDc7EDXytdXOlAuTKM2HA== X-UI-Out-Filterresults: notjunk:1; V01:K0:CHkkU5OpLmE=:K7ctlo+PMw7+uRCgNA3ROJ BpGoqEzL4YeRt+oRy0bgpPR58lwQTcpRwNegnaJ/fF6/kWH+56qnGKOb7qF0cVKhAYPu+6yoI 02ptJOpU2mphOgobKAu7kUGW1qW9wMmmBQfqvEtmt4iJZJaD04QqWMTwFF9fcx0TioPGqWgm7 KTijaXIop+JRkjDEyVpcKKGtlR48YMKSodOFbZwOjuMogEIcSJ/y178sDvzzq8jVZO+EG97Kz suG2hc7M8X8sNZgZKKT/+Qz1lj3D8tDigByL0UKS+Vm/lm/5OF/IW0Q3JpzV3PC3dMOcBbknc V1nLJpIGU74ueMHB99/t10UQXBtlPvu6omcypMl8NZTJ9VEexPssG1Tdkg2chTUYDoY6LYuzg rwtZPHh4fIyGs+v56Jy8c9KIPTxVPx/FuPK7TZl7ubSGRDK1VR5KKUXDKfOFIseJBO8lIQLm+ KhvaWPey6JDipxtZjG3kkFDBMKRI7u8A/EU6tcELU4locGIV/PXYuVgh1mhOWIJEgNmJs1Cxt CB15p4WHy7cgLAthn6BxKH22OXjvF8W0uaP2uQkMhRiSY4K4J08VDIDLhkQ90jq4DD6aHS3NW P3nCfng0Z8Zezw9mz0ycGnQNsT3JBNjMjaISrRL2a7yWO5+D3CPc3xUBMa81ad8bvekW7cPRP y0mxR3zc7fJDfqNPMAHw44au0GfcksMKybs/6Nhux/5Csba1QFVxzfSQgyzcIyEitnU5l0Qwa UdkSIm99spvAGU8eADxX7S5MN1FMPEct9MyyuOThSyH1RHoKsHzyRSh8lFM= Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This fixes the following compiler warnings when compiling the reuseport_bpf testcase on a 32 bit platform: reuseport_bpf.c: In function ‘attach_ebpf’: reuseport_bpf.c:114:15: warning: cast from pointer to integer of ifferent size [-Wpointer-to-int-cast] Signed-off-by: Helge Deller --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/tools/testing/selftests/net/reuseport_bpf.c b/tools/testing/selftests/net/reuseport_bpf.c index 96ba386..4a82174 100644 --- a/tools/testing/selftests/net/reuseport_bpf.c +++ b/tools/testing/selftests/net/reuseport_bpf.c @@ -111,9 +111,9 @@ static void attach_ebpf(int fd, uint16_t mod) memset(&attr, 0, sizeof(attr)); attr.prog_type = BPF_PROG_TYPE_SOCKET_FILTER; attr.insn_cnt = ARRAY_SIZE(prog); - attr.insns = (uint64_t)prog; - attr.license = (uint64_t)bpf_license; - attr.log_buf = (uint64_t)bpf_log_buf; + attr.insns = (unsigned long) &prog; + attr.license = (unsigned long) &bpf_license; + attr.log_buf = (unsigned long) &bpf_log_buf; attr.log_size = sizeof(bpf_log_buf); attr.log_level = 1; attr.kern_version = 0; @@ -351,8 +351,8 @@ static void test_filter_no_reuseport(const struct test_params p) memset(&eprog, 0, sizeof(eprog)); eprog.prog_type = BPF_PROG_TYPE_SOCKET_FILTER; eprog.insn_cnt = ARRAY_SIZE(ecode); - eprog.insns = (uint64_t)ecode; - eprog.license = (uint64_t)bpf_license; + eprog.insns = (unsigned long) &ecode; + eprog.license = (unsigned long) &bpf_license; eprog.kern_version = 0; memset(&cprog, 0, sizeof(cprog));