Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1100696ybm; Tue, 21 May 2019 08:38:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbSw3341Y+j2Lkb0OXVJBRI/y8pjgazpO1ZQ7C2V18GlvLK0mIP1MEahEvQoRCBW+1MT76 X-Received: by 2002:a62:ed09:: with SMTP id u9mr89665076pfh.23.1558453099811; Tue, 21 May 2019 08:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558453099; cv=none; d=google.com; s=arc-20160816; b=u3bU+9B5doKMZvmhPEn16hO8StJMxcI6mucj3Vu2RHP294Cto4YShnHmxM4MJvXptZ W+k/XytuSDC+Z5jSdcwtDp+nIUeHe7VmNNPFTticQRSCNwDXun46NslR7dC8qdineqU1 n3i/5B8DlNgd4/ZltIQvVRtZrVb46NIcOTtOzFCXzHYq+NWueL22BcZMZ8LfWphfS3VA l/I3IL+Hy5ucBqesAHT+ZlLLSUDOJCYjJO72v87whJ0iDGdGZM1Z1AqnE/JayOW55hPz yaujRUlZgSP/uB9OkrXjZAYtaPOz7AoJbt8tJfrcz6KB/XfRNDcyGzOMXhpEzF2dvjVJ 8mbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=x4kG9E/ynUMwJspO3A/290eIqtP4Hz25e9iDGF8T69M=; b=xRNE48MZG1WM3sJEPbfDrGN+XNjkYLCUWwni5lpWPrxR5RRWQXodohhRMN+OaERvD1 6yoly/c0m5+PuxdpYDhFDOfMqpk0vhfaGlwX0+j9rpowppFCoyzBralewl9n4rqLtrnv Q/7Vg+WNK6Uu8rhRULvyDHb3SfvQCGwuzo8W2iaW8+DfFonGH4BNuqd53W6TmSfAduga 8cPvNmu1esrepteXjveeFTfcCAKvsCD8bOuiBO1f3+k3U897cf9rDIIKac+Iran707ui FSCwd/sG0mPWEjQXuh5dbqauDkw2uuyi9WhsNbckwYMJ9SWo2Ct24b7Rpj5MxlyJY8YM Mtbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4si10664083pgf.28.2019.05.21.08.38.03; Tue, 21 May 2019 08:38:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728542AbfEUPg4 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 21 May 2019 11:36:56 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:34991 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728137AbfEUPgz (ORCPT ); Tue, 21 May 2019 11:36:55 -0400 Received: by mail-lj1-f193.google.com with SMTP id h11so14936266ljb.2 for ; Tue, 21 May 2019 08:36:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=xHcmjVDAiLTnPECUNX89YGAM+as77xb3JfSt8ueMttg=; b=BRYbxNjakJRU1sa6tMS+fP86Iu2ML+V2vkSjYFsx+vxaB4r871diaXxQFyEHfrP/fV 6wavYxWnYCqmMtJuA0ZkdXfPeH64r6X48zbBjwZgGlHrLdEr+ydjOwgLOnZMlJe9W6uv b3yxscJcdHZ165uaNmSNY3HIOCscR/TY8n00aTvOKmcopRaRoqV/I8fnu1S5H6bfRx8u cd1zEHfrdSZ7FCM4fce59COmxgM6ylde9q44ktGxCPAIglCIHQHNZHxLT4YiK9GgvxYG bKm4Oa7EphU3LnGJjeM1wFvfYDhMAgFViC8eprKwn0T+VM+NxAy/k5eEh4ug36bwr9aN rFvw== X-Gm-Message-State: APjAAAWxTMOHDFOi5Fw9yyJMevEp4PVn9CKMlqd/m3M0ZMe6lex3vjEe 3Nn0E9YT/otb5ueJ8SmZr4sw3z5BFZoe9AcLaAEyVw== X-Received: by 2002:a2e:8741:: with SMTP id q1mr19418098ljj.97.1558453013827; Tue, 21 May 2019 08:36:53 -0700 (PDT) MIME-Version: 1.0 References: <20190518004639.20648-1-mcroce@redhat.com> <20190520133830.1ac11fc8@cakuba.netronome.com> In-Reply-To: From: Matteo Croce Date: Tue, 21 May 2019 17:36:17 +0200 Message-ID: Subject: Re: [PATCH 1/5] samples/bpf: fix test_lru_dist build To: Daniel Borkmann Cc: Jakub Kicinski , xdp-newbies@vger.kernel.org, bpf@vger.kernel.org, LKML , netdev , Alexei Starovoitov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 21, 2019 at 5:21 PM Daniel Borkmann wrote: > > On 05/20/2019 10:38 PM, Jakub Kicinski wrote: > > On Mon, 20 May 2019 19:46:27 +0200, Matteo Croce wrote: > >> On Sat, May 18, 2019 at 2:46 AM Matteo Croce wrote: > >>> > >>> Fix the following error by removing a duplicate struct definition: > >> > >> Hi all, > >> > >> I forget to send a cover letter for this series, but basically what I > >> wanted to say is that while patches 1-3 are very straightforward, > >> patches 4-5 are a bit rough and I accept suggstions to make a cleaner > >> work. > > > > samples depend on headers being locally installed: > > > > make headers_install > > > > Are you intending to change that? > > +1, Matteo, could you elaborate? > > On latest bpf tree, everything compiles just fine: > > [root@linux bpf]# make headers_install > [root@linux bpf]# make -C samples/bpf/ > make: Entering directory '/home/darkstar/trees/bpf/samples/bpf' > make -C ../../ /home/darkstar/trees/bpf/samples/bpf/ BPF_SAMPLES_PATH=/home/darkstar/trees/bpf/samples/bpf > make[1]: Entering directory '/home/darkstar/trees/bpf' > CALL scripts/checksyscalls.sh > CALL scripts/atomic/check-atomics.sh > DESCEND objtool > make -C /home/darkstar/trees/bpf/samples/bpf/../../tools/lib/bpf/ RM='rm -rf' LDFLAGS= srctree=/home/darkstar/trees/bpf/samples/bpf/../../ O= > HOSTCC /home/darkstar/trees/bpf/samples/bpf/test_lru_dist > HOSTCC /home/darkstar/trees/bpf/samples/bpf/sock_example > Hi all, I have kernel-headers installed from master, but yet the samples fail to build: matteo@turbo:~/src/linux/samples/bpf$ rpm -q kernel-headers kernel-headers-5.2.0_rc1-38.x86_64 matteo@turbo:~/src/linux/samples/bpf$ git describe HEAD v5.2-rc1-97-g5bdd9ad875b6 matteo@turbo:~/src/linux/samples/bpf$ make make -C ../../ /home/matteo/src/linux/samples/bpf/ BPF_SAMPLES_PATH=/home/matteo/src/linux/samples/bpf make[1]: Entering directory '/home/matteo/src/linux' CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh DESCEND objtool make -C /home/matteo/src/linux/samples/bpf/../../tools/lib/bpf/ RM='rm -rf' LDFLAGS= srctree=/home/matteo/src/linux/samples/bpf/../../ O= HOSTCC /home/matteo/src/linux/samples/bpf/test_lru_dist /home/matteo/src/linux/samples/bpf/test_lru_dist.c:39:8: error: redefinition of ‘struct list_head’ 39 | struct list_head { | ^~~~~~~~~ In file included from /home/matteo/src/linux/samples/bpf/test_lru_dist.c:9: ./tools/include/linux/types.h:69:8: note: originally defined here 69 | struct list_head { | ^~~~~~~~~ make[2]: *** [scripts/Makefile.host:90: /home/matteo/src/linux/samples/bpf/test_lru_dist] Error 1 make[1]: *** [Makefile:1762: /home/matteo/src/linux/samples/bpf/] Error 2 make[1]: Leaving directory '/home/matteo/src/linux' make: *** [Makefile:231: all] Error 2 Am I missing something obvious? Regards, -- Matteo Croce per aspera ad upstream