From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88F0CC07E9E for ; Mon, 5 Jul 2021 18:26:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 73F6861979 for ; Mon, 5 Jul 2021 18:26:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229951AbhGES3S (ORCPT ); Mon, 5 Jul 2021 14:29:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:48038 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229770AbhGES3R (ORCPT ); Mon, 5 Jul 2021 14:29:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625509599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oRRrtMgruURgChxNxWwRZrL7plq4LfVLAvPpmCv92RU=; b=XK91vIPuiVFWkedjaL15FkF9kQ0Lf63CoDdb5obdvVFh2eGhoPW1yPCYAKvSGuDryQ+hT/ GK/IuCui3kaWp+n8HJtjoc8rzSvJKVOhNMFptQVSMLLg8q275u3ZSROij6kfBLW8I43gQP iN0DSt9gGyWn6236d84/Ceb7vdps9aA= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-170-IxRkIFwyPF2KJ4EMOJb4Hw-1; Mon, 05 Jul 2021 14:26:38 -0400 X-MC-Unique: IxRkIFwyPF2KJ4EMOJb4Hw-1 Received: by mail-wr1-f71.google.com with SMTP id p6-20020a5d45860000b02901258b6ae8a5so6471408wrq.15 for ; Mon, 05 Jul 2021 11:26:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=oRRrtMgruURgChxNxWwRZrL7plq4LfVLAvPpmCv92RU=; b=q95FKyaaX0IIM+/gelIhjLldB8JRnL57zoVpNXEGdgWOhRH4Iv8hdAD4hjGtyMfrKf dvmJHe1Hiambjvyc3ACPM0Xk8xvEcUu4MBJphRAh9vdX6v3P7j9dYovHrE8nfs4JFKUH wsXFhfYfu8GiPvFhDdh/fd30RxPfma6s5QkXJmBFzxTfutpPKmMN2YOCkav8i/TxL+gu MaOC643v9F2LQHMUh2W9qTTTJq5esuV+4WDkNL/4aQrHeRn5JEb30nT9Smisw1QwX2ts 2M3JV7KmYXo/HOZqdqC2KT/QEShTB4l/v402+8M1KPE9bbs+nuj4eKYGJzG5dMKEOEX8 805g== X-Gm-Message-State: AOAM532Yqff2PsODHQ+z7bHGYP8QkAubU/K8Yjbt8cj1/F/uW0TO/Pcb pcc4Y8hqpbt31HaJ81hsj+z3RvqIXnEDMxnCePVYFxjj8+UJHbgGvRJ+LJfypIEOmf+w4Fab27A JZy5JkJ04KUpPXh3ak/4EbqTc X-Received: by 2002:a1c:2142:: with SMTP id h63mr16343502wmh.84.1625509597503; Mon, 05 Jul 2021 11:26:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxg6lV2mV2E4Ksstg1b9UaYYm1/na0HeVq/bH0oy4JNEBKaSdID8JncYLnj87O5OZ1B8dHdg== X-Received: by 2002:a1c:2142:: with SMTP id h63mr16343485wmh.84.1625509597375; Mon, 05 Jul 2021 11:26:37 -0700 (PDT) Received: from redhat.com ([2.55.8.91]) by smtp.gmail.com with ESMTPSA id n8sm13899936wrt.95.2021.07.05.11.26.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 11:26:36 -0700 (PDT) Date: Mon, 5 Jul 2021 14:26:32 -0400 From: "Michael S. Tsirkin" To: Yunsheng Lin Cc: Andy Shevchenko , davem@davemloft.net, kuba@kernel.org, jasowang@redhat.com, nickhu@andestech.com, green.hu@gmail.com, deanbo422@gmail.com, akpm@linux-foundation.org, yury.norov@gmail.com, ojeda@kernel.org, ndesaulniers@gooogle.com, joe@perches.com, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next 0/2] refactor the ringtest testing for ptr_ring Message-ID: <20210705142555-mutt-send-email-mst@kernel.org> References: <1625457455-4667-1-git-send-email-linyunsheng@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 05, 2021 at 08:06:50PM +0800, Yunsheng Lin wrote: > On 2021/7/5 17:56, Andy Shevchenko wrote: > > On Mon, Jul 05, 2021 at 11:57:33AM +0800, Yunsheng Lin wrote: > >> tools/include/* have a lot of abstract layer for building > >> kernel code from userspace, so reuse or add the abstract > >> layer in tools/include/ to build the ptr_ring for ringtest > >> testing. > > > > ... > > > >> create mode 100644 tools/include/asm/cache.h > >> create mode 100644 tools/include/asm/processor.h > >> create mode 100644 tools/include/generated/autoconf.h > >> create mode 100644 tools/include/linux/align.h > >> create mode 100644 tools/include/linux/cache.h > >> create mode 100644 tools/include/linux/slab.h > > > > Maybe somebody can change this to be able to include in-tree headers directly? > > If the above works, maybe the files in tools/include/* is not > necessary any more, just use the in-tree headers to compile > the user space app? > > Or I missed something here? why would it work? kernel headers outside of uapi are not intended to be consumed by userspace. > > > > Besides above, had you tested this with `make O=...`? > > You are right, the generated/autoconf.h is in another directory > with `make O=...`. > > Any nice idea to fix the above problem? > > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 329EAC07E99 for ; Mon, 5 Jul 2021 18:26:46 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D220E6196C for ; Mon, 5 Jul 2021 18:26:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D220E6196C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A0E824049D; Mon, 5 Jul 2021 18:26:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vNNUNRJVqaGC; Mon, 5 Jul 2021 18:26:44 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 248324048B; Mon, 5 Jul 2021 18:26:44 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id F120BC0010; Mon, 5 Jul 2021 18:26:43 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3261EC000E for ; Mon, 5 Jul 2021 18:26:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 20EB04018D for ; Mon, 5 Jul 2021 18:26:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zu-l2Ki5Ss01 for ; Mon, 5 Jul 2021 18:26:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id C7F80400D2 for ; Mon, 5 Jul 2021 18:26:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625509599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oRRrtMgruURgChxNxWwRZrL7plq4LfVLAvPpmCv92RU=; b=XK91vIPuiVFWkedjaL15FkF9kQ0Lf63CoDdb5obdvVFh2eGhoPW1yPCYAKvSGuDryQ+hT/ GK/IuCui3kaWp+n8HJtjoc8rzSvJKVOhNMFptQVSMLLg8q275u3ZSROij6kfBLW8I43gQP iN0DSt9gGyWn6236d84/Ceb7vdps9aA= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-455-B--b1_X5PC--M2hNKBBY-w-1; Mon, 05 Jul 2021 14:26:38 -0400 X-MC-Unique: B--b1_X5PC--M2hNKBBY-w-1 Received: by mail-wr1-f71.google.com with SMTP id a4-20020adffb840000b02901304c660e75so3288929wrr.19 for ; Mon, 05 Jul 2021 11:26:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=oRRrtMgruURgChxNxWwRZrL7plq4LfVLAvPpmCv92RU=; b=JAzCU7geutO8ZKcOThZawm8zJAEWZWsvNYA4GNckZKOw/8zNAPBEGVBa79lpjBQY4K 9lU0qs/cTZ9TdBr7TMT8pZIwYTDcgs9x0B5TByL3yoF/a4arBUPBhr8nQdzp7xk0Ky/p EEig4fMlALMnTN/tqI0ZT27y14YW7Ymeyfg421Q1Mh88Dg8/B2FNv6O1OhhRvOUz2BnR 3umfHsVsZjpRucBCV13iUKYKQnwMUC8aDqY9O9BisiUUzP18BEMSTu0Rrds/d8lj4c8j wh5i2eesn97TCr95O2As/RemjLQP/+GYjxt/+eSHlnk4aJZEImNrG1HbGJKtFedp28UF YnFg== X-Gm-Message-State: AOAM532o5THIiYKbRt0SzNAc35YrL0IjzaHQfrCcqqGcrIQBNNJdptxJ 5USpwpcOFXyaKVg2E7vqp6Ngj309xWNkhSM0jky3fEkb5nCL95A3xg2Le0iuGEllsVjQID6SAHR 7FFJRut52yXKIcinrsx1pucHU0bAd0aB0MGueGB6n7A== X-Received: by 2002:a1c:2142:: with SMTP id h63mr16343503wmh.84.1625509597503; Mon, 05 Jul 2021 11:26:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxg6lV2mV2E4Ksstg1b9UaYYm1/na0HeVq/bH0oy4JNEBKaSdID8JncYLnj87O5OZ1B8dHdg== X-Received: by 2002:a1c:2142:: with SMTP id h63mr16343485wmh.84.1625509597375; Mon, 05 Jul 2021 11:26:37 -0700 (PDT) Received: from redhat.com ([2.55.8.91]) by smtp.gmail.com with ESMTPSA id n8sm13899936wrt.95.2021.07.05.11.26.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 11:26:36 -0700 (PDT) Date: Mon, 5 Jul 2021 14:26:32 -0400 From: "Michael S. Tsirkin" To: Yunsheng Lin Subject: Re: [PATCH net-next 0/2] refactor the ringtest testing for ptr_ring Message-ID: <20210705142555-mutt-send-email-mst@kernel.org> References: <1625457455-4667-1-git-send-email-linyunsheng@huawei.com> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: deanbo422@gmail.com, yury.norov@gmail.com, nickhu@andestech.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, joe@perches.com, ndesaulniers@gooogle.com, green.hu@gmail.com, ojeda@kernel.org, kuba@kernel.org, akpm@linux-foundation.org, Andy Shevchenko , davem@davemloft.net X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Mon, Jul 05, 2021 at 08:06:50PM +0800, Yunsheng Lin wrote: > On 2021/7/5 17:56, Andy Shevchenko wrote: > > On Mon, Jul 05, 2021 at 11:57:33AM +0800, Yunsheng Lin wrote: > >> tools/include/* have a lot of abstract layer for building > >> kernel code from userspace, so reuse or add the abstract > >> layer in tools/include/ to build the ptr_ring for ringtest > >> testing. > > > > ... > > > >> create mode 100644 tools/include/asm/cache.h > >> create mode 100644 tools/include/asm/processor.h > >> create mode 100644 tools/include/generated/autoconf.h > >> create mode 100644 tools/include/linux/align.h > >> create mode 100644 tools/include/linux/cache.h > >> create mode 100644 tools/include/linux/slab.h > > > > Maybe somebody can change this to be able to include in-tree headers directly? > > If the above works, maybe the files in tools/include/* is not > necessary any more, just use the in-tree headers to compile > the user space app? > > Or I missed something here? why would it work? kernel headers outside of uapi are not intended to be consumed by userspace. > > > > Besides above, had you tested this with `make O=...`? > > You are right, the generated/autoconf.h is in another directory > with `make O=...`. > > Any nice idea to fix the above problem? > > > _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization