Netdev List
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: Martin KaFai Lau <kafai@fb.com>, <netdev@vger.kernel.org>
Cc: Alexei Starovoitov <ast@fb.com>,
	Daniel Borkmann <daniel@iogearbox.net>, <kernel-team@fb.com>
Subject: Re: [PATCH bpf-next 4/7] bpf: btf: Remove unused bits from uapi/linux/btf.h
Date: Mon, 21 May 2018 14:17:23 -0700	[thread overview]
Message-ID: <c19e5c4f-1060-514d-c8ba-9c7dafb50af7@fb.com> (raw)
In-Reply-To: <20180519001650.4043980-5-kafai@fb.com>



On 5/18/18 5:16 PM, Martin KaFai Lau wrote:
> This patch does the followings:
> 1. Limit BTF_MAX_TYPES and BTF_MAX_NAME_OFFSET to 64k.  We can
>     raise it later.
> 
> 2. Remove the BTF_TYPE_PARENT and BTF_STR_TBL_ELF_ID.  They are
>     currently encoded at the highest bit of a u32.
>     It is because the current use case does not require supporting
>     parent type (i.e type_id referring to a type in another BTF file).
>     It also does not support referring to a string in ELF.
> 
>     The BTF_TYPE_PARENT and BTF_STR_TBL_ELF_ID checks are replaced
>     by BTF_TYPE_ID_CHECK and BTF_STR_OFFSET_CHECK which are
>     defined in btf.c instead of uapi/linux/btf.h.
> 
> 3. Limit the BTF_INFO_KIND from 5 bits to 4 bits which is enough.
>     There is unused bits headroom if we ever needed it later.
> 
> 4. The root bit in BTF_INFO is also removed because it is not
>     used in the current use case.
> 
> The above can be added back later because the verifier
> ensures the unused bits are zeros.
> 
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>

Acked-by: Yonghong Song <yhs@fb.com>

  reply	other threads:[~2018-05-21 21:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-19  0:16 [PATCH bpf-next 0/7] BTF uapi cleanup Martin KaFai Lau
2018-05-19  0:16 ` [PATCH bpf-next 1/7] bpf: Expose check_uarg_tail_zero() Martin KaFai Lau
2018-05-21 20:00   ` Yonghong Song
2018-05-19  0:16 ` [PATCH bpf-next 2/7] bpf: btf: Change how section is supported in btf_header Martin KaFai Lau
2018-05-21 20:15   ` Yonghong Song
2018-05-21 21:47     ` Martin KaFai Lau
2018-05-19  0:16 ` [PATCH bpf-next 3/7] bpf: btf: Check array->index_type Martin KaFai Lau
2018-05-21 21:04   ` Yonghong Song
2018-05-22 16:20     ` Martin KaFai Lau
2018-05-22  4:41   ` Yonghong Song
2018-05-22 16:04     ` Martin KaFai Lau
2018-05-19  0:16 ` [PATCH bpf-next 4/7] bpf: btf: Remove unused bits from uapi/linux/btf.h Martin KaFai Lau
2018-05-21 21:17   ` Yonghong Song [this message]
2018-05-19  0:16 ` [PATCH bpf-next 5/7] bpf: btf: Rename btf_key_id and btf_value_id in bpf_map_info Martin KaFai Lau
2018-05-21 21:18   ` Yonghong Song
2018-05-19  0:16 ` [PATCH bpf-next 7/7] bpf: btf: Add tests for the btf uapi changes Martin KaFai Lau
2018-05-21 16:57 ` [PATCH bpf-next 6/7] bpf: btf: Sync bpf.h and btf.h to tools/include/uapi/linux/ Martin KaFai Lau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c19e5c4f-1060-514d-c8ba-9c7dafb50af7@fb.com \
    --to=yhs@fb.com \
    --cc=ast@fb.com \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.com \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox