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=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 7D27CC433DF for ; Sun, 28 Jun 2020 21:20:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48B18206C3 for ; Sun, 28 Jun 2020 21:20:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OlJSOD3j" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726188AbgF1VUa (ORCPT ); Sun, 28 Jun 2020 17:20:30 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:57250 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726104AbgF1VUa (ORCPT ); Sun, 28 Jun 2020 17:20:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593379229; 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=PRgc2g0Ojg/UFEUY5mUxOQF8F4RTlNOReX7eEYTBsx0=; b=OlJSOD3jwzcOWGlzgQyCVv9ijcl6y9bRLVX/CPFMFN2Gn5MIgTwxZT8sZvDRLk/bujeS9t MksJagxhTsgzxjTNt4gwwLzzl7vaFxtwc7grNvEbMbQNC+zJp57LmA9DjJYRyKhqqfMP7Q OqNQJaBdD6P2JWtS3vToyNU5STssG50= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-199-kKf1MKz5MYKNWyxVqENnPw-1; Sun, 28 Jun 2020 17:20:26 -0400 X-MC-Unique: kKf1MKz5MYKNWyxVqENnPw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B256818C35A0; Sun, 28 Jun 2020 21:20:24 +0000 (UTC) Received: from krava (unknown [10.40.192.56]) by smtp.corp.redhat.com (Postfix) with SMTP id 2ED6C7166A; Sun, 28 Jun 2020 21:20:20 +0000 (UTC) Date: Sun, 28 Jun 2020 23:20:19 +0200 From: Jiri Olsa To: Yonghong Song Cc: Jiri Olsa , Alexei Starovoitov , Daniel Borkmann , netdev@vger.kernel.org, bpf@vger.kernel.org, Song Liu , Martin KaFai Lau , David Miller , John Fastabend , Wenbo Zhang , KP Singh , Andrii Nakryiko , Brendan Gregg , Florent Revest , Al Viro Subject: Re: [PATCH v4 bpf-next 05/14] bpf: Remove btf_id helpers resolving Message-ID: <20200628212019.GH2988321@krava> References: <20200625221304.2817194-1-jolsa@kernel.org> <20200625221304.2817194-6-jolsa@kernel.org> <7480f7b2-01f0-f575-7e4f-cf3bde851c3f@fb.com> <20200628201608.GG2988321@krava> <7c0a5ea0-9425-071d-0f41-b7e5c5ef04f0@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c0a5ea0-9425-071d-0f41-b7e5c5ef04f0@fb.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Sun, Jun 28, 2020 at 01:59:54PM -0700, Yonghong Song wrote: SNIP > > > > > > The corresponding BTF_ID definition here is: > > > BTF_ID_LIST(bpf_skb_output_btf_ids) > > > BTF_ID(struct, sk_buff) > > > > > > The bpf helper writer needs to ensure proper declarations > > > of BTF_IDs like the above matching helpers definition. > > > Support we have arg1 and arg3 as BTF_ID. then the list > > > definition may be > > > > > > BTF_ID_LIST(bpf_skb_output_btf_ids) > > > BTF_ID(struct, sk_buff) > > > BTF_ID(struct, __unused) > > > BTF_ID(struct, task_struct) > > > > > > This probably okay, I guess. > > > > right, AFAIK we don't have such case yet, but would be good > > to be ready and have something like > > > > BTF_ID(struct, __unused) > > > > maybe adding new type for that will be better: > > > > BTF_ID(none, unused) > > Maybe we can have a separate macro BTF_ID_UNUSED macro > which simply adds 4 bytes hole in the .btf_ids* section. right, we don't need symbols for that jirka