Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4517341rwe; Tue, 30 Aug 2022 11:31:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR5m7UhfaqzPHIXUw7JyY0zqz9D1GXzJ5Kc8bHVL4HpxWMmA9FSRNmrG7iIlHTa+J5x7suJp X-Received: by 2002:aa7:d90e:0:b0:447:986d:b71e with SMTP id a14-20020aa7d90e000000b00447986db71emr21089096edr.235.1661884309360; Tue, 30 Aug 2022 11:31:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661884309; cv=pass; d=google.com; s=arc-20160816; b=uBoBLjJ8h35YepZ44snLXMU0r/mmMQxVnprsZoTzW2JtZq4lADx05kzh2Vo9vf4siT L91TwQ4zOdmBq49edib/A6i9DHaCncpSVZSroak3FNXZhZFvzHoCmBgKCkNoiRp6H7QD n230EHHYDnqdiDScZ/8FwQO/UyL/1z90FGFqG3A2IZCWs30x1ILaLu+rwsdmtW9zVQyd UevkpF+WlCI9madLeY1bCCyE5Ptd25aFs5Uw9iy/Ryi0WnIisZNub2hAdEvMg/H8KPhM 3GCaYpGE+khuGnYK9Kg29v/XdzGdjzxv0E2IEoRjnez6WeYDSZ0+yfkR1eVa//6PK/wM FDDw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OPpkmUXn2/cHKRCRQ7UYmzLZevUYAERLAk5ElvMyIIU=; b=z3dYI/n7nahZ1DOsicnyXvL+zaVc+Xsc/IvVpr01YG4kM/hWvZCJqtg4q/rzLm+AAp pddPiZ4DC1sL2/LrP0Y9fHmRZEbwuMmmP/pLGutkCEU/CwXGZ/Du2ceKKTJZWwTOxt5W e9u+0cJ9XpvFRekQUoBungBB74Kwt558XZ01fQ8wFiYJRyTUZnrvwpUb+I3PEo6w+eG8 0HOsIz/qCdrjtw7LwnHuMhekKfunaBnHfC5hDyA9ZRPQwLlsiTZviTYMzlOTBtdyBJ2y J6nkwc2mhVZXLh/E34k/r+Et0mUBb88A6NUJBsV7KBOjPcaAAefzAsrQd4g877yUW7jd fCvw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=JPhPBndg; arc=pass (i=1 spf=pass spfdomain=fb.com dkim=pass dkdomain=fb.com dmarc=pass fromdomain=fb.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fb.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t34-20020a056402242200b00448b72ca21esi2449256eda.282.2022.08.30.11.31.23; Tue, 30 Aug 2022 11:31:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=JPhPBndg; arc=pass (i=1 spf=pass spfdomain=fb.com dkim=pass dkdomain=fb.com dmarc=pass fromdomain=fb.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231450AbiH3SGy (ORCPT + 99 others); Tue, 30 Aug 2022 14:06:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231164AbiH3SGw (ORCPT ); Tue, 30 Aug 2022 14:06:52 -0400 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DAAB6DF80; Tue, 30 Aug 2022 11:06:52 -0700 (PDT) Received: from pps.filterd (m0109333.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27UFrW3P007713; Tue, 30 Aug 2022 11:06:33 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=facebook; bh=OPpkmUXn2/cHKRCRQ7UYmzLZevUYAERLAk5ElvMyIIU=; b=JPhPBndgqMZZ+hwllMNUTx1QhMP4B+i/xaz0Hfcht8tcfCXew6bLaY1ZonJnnRld/uNZ uo3+RXsuNMYDzWqv6IlLq4yoM7f4qjSkr/BCgXIHcn2rtz8MvIbBsWYk4wVJ9JYXtL4P kKkufV4BIxkD1GydtgC6TrGHY2tXea6meX8= Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2041.outbound.protection.outlook.com [104.47.74.41]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3j9e9ykgjt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Aug 2022 11:06:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QdAOWRHSzuXa8WUjrSn5wNISc383gqODJYU+dJZlgDFMGnF61EIm2TcReD2LikRF7YrE9KoDjp1aCd1Ez+hERvxaQVhalSRsKDDMLxQ/jdD8qxd3yQHpJwlmREKVXf1Jcsyqb8XkibcSCeh3nW1oMmuXRoqwRFblPd8edvq4QeVp6D2OSGgooP2O7Q2R8j+Kn4jZpxqnwM7klUGnsVOKADVNXitSZDfz8ruWc99pIaArlbsaGY+TuAPb9e43jYdowTaE6/DqXWDFLVjlpI0n8rB7TUQnKWfofwcJR12J91tqfiVldqkIn9gCWgV+ErNkYsC1oo7fHR1HCkouVhlnEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OPpkmUXn2/cHKRCRQ7UYmzLZevUYAERLAk5ElvMyIIU=; b=EjuRzs9UWBykCAexVVSVBslgYBSNJYA9dCL3GofInt0/IQw8eHfHdunH9Z5lvipajP+UQXvVUwiTGjRWOsfjIxqihlChdTCvxtyHYbHBTWRZizsGL5CHEIjfLI+t2TqT41FTge6Doa30LyMo8jZxP4dtVzkihtHM2P8UogqyGDdeuwcfDAT24m+mZTObu+z/fYwt0ndp9FlZKop6MapPKL1GUTCtpaDcxJ23b49JJbYLdTaIhe8CPHL8o/xBBgfPWbtVDRE/4ZgzgajhMojgbW6AMXpbMWK1n3SWpdFHRhQdmXSv6OQwb3DPcwRP8lq9gK1jiPLFpvo89i8ELrMHEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fb.com; dmarc=pass action=none header.from=fb.com; dkim=pass header.d=fb.com; arc=none Received: from MW4PR15MB4475.namprd15.prod.outlook.com (2603:10b6:303:104::16) by BYAPR15MB3319.namprd15.prod.outlook.com (2603:10b6:a03:10b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.21; Tue, 30 Aug 2022 18:06:29 +0000 Received: from MW4PR15MB4475.namprd15.prod.outlook.com ([fe80::1858:f420:93d2:4b5e]) by MW4PR15MB4475.namprd15.prod.outlook.com ([fe80::1858:f420:93d2:4b5e%3]) with mapi id 15.20.5588.010; Tue, 30 Aug 2022 18:06:29 +0000 Date: Tue, 30 Aug 2022 11:06:23 -0700 From: Martin KaFai Lau To: Quentin Monnet , Hao Luo Cc: linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , John Fastabend , Stanislav Fomichev , Jiri Olsa , Yosry Ahmed Subject: Re: [PATCH bpf-next v1] bpftool: Add support for querying cgroup_iter link Message-ID: <20220830180623.hi6ma6nql4by23sr@kafai-mbp.dhcp.thefacebook.com> References: <20220829231828.1016835-1-haoluo@google.com> <016bdefd-ff75-35ca-52a5-0e058e0a5d04@isovalent.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <016bdefd-ff75-35ca-52a5-0e058e0a5d04@isovalent.com> X-ClientProxiedBy: SJ0PR03CA0245.namprd03.prod.outlook.com (2603:10b6:a03:3a0::10) To MW4PR15MB4475.namprd15.prod.outlook.com (2603:10b6:303:104::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f61475bb-b5ec-4f9c-296d-08da8ab25b12 X-MS-TrafficTypeDiagnostic: BYAPR15MB3319:EE_ X-FB-Source: Internal X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vLFKMsaIDcCYz7rmYlF9dpwkbC4blwgvTlcc/7QyjkpMSJILIVMas3I4z5odkLSNzDvsrFLgQYi/pjWCe9uIkt6uTkL3GMUYV2paT1XlgFmGGCbCNGfZuMQmJY2Rc7ON6yJjhtgrRIhw4o1I3UKIRAuoRazyI5bR35URqISY87sxel0P9b6Km55MgF8XWglu7clBeKmBocjE0kVzsUMYKswWztH3NMxykvMi66FaS8LZpbrR1B03em8PBFtRXpVuYOCC7k6ptXxJ6WRYtoa15Ut9DUVggyiTyt/ZH0a6UbaQ/7WQqhoORBauOsiWfEB6c9eeK7xGHQneBTOKH1ebXAc/bdLIbcrH2oCblScoTrs0vk6ruKAyH9LY7I8l4hpIY+ds8Tqej4GV0WUUg+xb7MOeoU7Fz91mh1LBG9x0d7vUaBuHBzIiFP50HL2LhUIXbZjdnrYtripaqCNJSYwFVVBKrvXxtGykyFzucTPClYFPxRsihvOdoetFJhOK2TaSDbWgHdCqAryXK3/dpmfZ0/k7VsUkImY28j3mq/SMizUFU1setJYLkQeS3e1cte6PVTtf60VID8RpnXIAkjANDM95nNdmiJSYbw1soznE3wH1FAvky/CbiOEW4BVKVCKZlYUnt/9hc6Rd9MMgwzyiq/1Rybqa9yhfNP1x/J/luJEAkuJsqYvlW/6xai4E6PcGk570d3dGhF5Ex+C/U08WAw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR15MB4475.namprd15.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(136003)(39860400002)(346002)(376002)(396003)(366004)(38100700002)(1076003)(2906002)(52116002)(6506007)(4744005)(6666004)(83380400001)(9686003)(6512007)(86362001)(66946007)(6486002)(66556008)(4326008)(66476007)(316002)(8676002)(186003)(110136005)(5660300002)(54906003)(478600001)(41300700001)(7416002)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?mKpIbAbRFtCmEphYi2VZ9nWOQI7R2bykNKQvkC3lLktndilLf4zt+Uy/5DxF?= =?us-ascii?Q?+f9jkOcQ3sRHOljduMkZOn61Hy+8XafuKxaE9qVsd582u6O9C75LRNGsUdEK?= =?us-ascii?Q?h4o/n8n6k9xm9WEbLTt7AutY73rNksQDdJoe6CDR28jkEnmVnTtQ+SfNxNFX?= =?us-ascii?Q?eISN/c3TP/Wlge03sEY8sft0XZkBVFEx7rtnI4Ut3HBE5KFmjBgJy6lon+Gr?= =?us-ascii?Q?h+K/UjEmoNKvPg+cEsq3g7BVSBV9O17I9jP+eUnp6HBIsVADBwWDJx4mFz1Y?= =?us-ascii?Q?h0Y7mAxhP52KgtNh9FTKxVJf3t++uXUpjT79UJYxVV+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EYG9LLJdF99HQxkWfvmB10dXViuHvTowA1185Ull4uD4yAhgMdiYZzox?= =?us-ascii?Q?OIALMKz/djL2Kd/nHqeY3GsI2rxi9fJfVNXgqsE8XeVumKbjXedhXIHwN/dF?= =?us-ascii?Q?Z5VMn3b8jsUe+XFZb+GQZRJrGTo8t7kewYdHQuTDELvGfFfZj4WGjVS22cZT?= =?us-ascii?Q?zENAowoUgiPpkD8vSoh0fppu4i2rJ5WM3EHQYfFYciXo3jU5UsF1gMua6fFi?= =?us-ascii?Q?O/jE8p8oi0RcjmikxmJwm2K5twrnC3UTbMiD1ZLU1ve20dTq89YQbm4DhkFy?= =?us-ascii?Q?5dIYIlU5gdn2jEdbSY2ORpiHFCQ5vAFGdg82FR5iV6hTM/L60II8rWsxzXSB?= =?us-ascii?Q?xP73e0gJIbPvlnRRmwvb9rXflX9TeCIjimfMR2WskLxmhu7l0BqWeZYjsI7R?= =?us-ascii?Q?eA=3D=3D?= X-OriginatorOrg: fb.com X-MS-Exchange-CrossTenant-Network-Message-Id: f61475bb-b5ec-4f9c-296d-08da8ab25b12 X-MS-Exchange-CrossTenant-AuthSource: MW4PR15MB4475.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2022 18:06:28.9957 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4d9uRx7rNnqETulj6DdOrocFleFFWpPC2QCC+hO2Z3vC9WknrQICgnFPYeqfrHLZ X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR15MB3319 X-Proofpoint-ORIG-GUID: pt-5oBfS3hb4CUsac3OT7Zf9Ei_nRF-Y X-Proofpoint-GUID: pt-5oBfS3hb4CUsac3OT7Zf9Ei_nRF-Y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-30_10,2022-08-30_01,2022-06-22_01 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.