lkml.org 
[lkml]   [2022]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH bpf-next v1] bpftool: Add support for querying cgroup_iter link
On Tue, Aug 30, 2022 at 02:33:47PM +0100, Quentin Monnet wrote:
> > +static const char *cgroup_order_string(__u32 order)
> > +{
> > + switch (order) {
> > + case BPF_CGROUP_ITER_ORDER_UNSPEC:
> > + return "order_unspec";
> > + case BPF_CGROUP_ITER_SELF_ONLY:
> > + return "self_only";
> > + case BPF_CGROUP_ITER_DESCENDANTS_PRE:
> > + return "descendants_pre";
> > + case BPF_CGROUP_ITER_DESCENDANTS_POST:
> > + return "descendants_post";
> > + case BPF_CGROUP_ITER_ANCESTORS_UP:
> > + return "ancestors_up";
> > + default: /* won't happen */
> > + return "";
>
> I wonder if that one should be "unknown", in case another option is
> added in the future, so we can spot it and address it?
I added "unknown" and applied.

\
 
 \ /
  Last update: 2022-08-30 20:07    [W:0.151 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site