Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4423255rwe; Tue, 30 Aug 2022 09:49:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR6QYXdvg7EI0qh+gEjduCYvqa9fffdZAqefgl7uamWRglhzsF63bG/Lzn2/JbRibRN9/lTk X-Received: by 2002:a17:907:d94:b0:73e:82a6:d284 with SMTP id go20-20020a1709070d9400b0073e82a6d284mr14205480ejc.392.1661878146665; Tue, 30 Aug 2022 09:49:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661878146; cv=pass; d=google.com; s=arc-20160816; b=R52ulveKgqJwmgC83q+24ISQD8fvS1vjZ+on7M9jd9rvXmK+e1fgdoJ0X7kEUefC2s CVzazZa8v/Q/m1Xd9CZU3XoP7CiE0VOvtN+OQrt4/J1CQE6B+AbB7FR9G0+X5pbN0M6d pGOU8y2BqeOD4PGG2IusnKP3tM49XOwbNDKr0zAx8fOjpkUQnOr6c94EYO+aWKRrY1qt DbB+584y7BmfY5Qv01FRxLqko7oCe32VXP9UmVhd7qxOXrrTkV190cVIx9FkXNkvHjdz eED6CuBlS+8JxkQ0FCByEHxA3PlXCp+9nFTF/oMzifKxLZhoU5gmz2ROTzplKleaLsR5 kJaw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=YQWMvv73ewq94/MYy9Z9O6tZEZ8CWiIFUI7gsQ2259c=; b=SiaVBGsVhjITsuokPiWlCARREuQ1cVFllCcdbdjbxFz7UZjjJW19ffjfjlzBMIPbWq Lc9lhTxsq0jZ8Q95gLKj4i1GRenu02bWTIc8hCJ/9khlZS0FaYNWey1Hd7MOjv6O1v9C BFE9AWUhwQ0DbNmRvJ6LEzZxXqt7V7aq2hlP6DX9kwdz9U+c9dHEk3P7MY+BBQVpItzh 8fBESyIGUP9UsO64EAHkyUT+jJi3nTS2RQx2TaBUDpPfWAx/DEY05BkSJGqR4r2VQ8Wj LXZossTcFaSpaeDaTw5EO6xR3V/ErT9mJW33QP/PSyKDG/msMS1D2Ysmgt8v6E3YxAsG vBZg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b="C/N2ugmP"; 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 xe4-20020a170907318400b0074133918ba1si9528745ejb.331.2022.08.30.09.48.40; Tue, 30 Aug 2022 09:49:06 -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="C/N2ugmP"; 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 S229907AbiH3Qlm (ORCPT + 99 others); Tue, 30 Aug 2022 12:41:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230099AbiH3Qld (ORCPT ); Tue, 30 Aug 2022 12:41:33 -0400 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 668A1AB4CC; Tue, 30 Aug 2022 09:41:30 -0700 (PDT) Received: from pps.filterd (m0109334.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27UFxLf6021056; Tue, 30 Aug 2022 09:41:11 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=facebook; bh=YQWMvv73ewq94/MYy9Z9O6tZEZ8CWiIFUI7gsQ2259c=; b=C/N2ugmPc9uayDn0BD/tIE+EreGCrR5R9NvfPei5DyDuH0zT5nXaoCejeEm4X/0+EIEZ XjT4Y2dPe4fNJ60H9ZBQ/HyMPdfdOUTJdrKtfkUGftwueroTERXNgHRU8Yh9ySFiQ9B6 MJDZNzsLFkZGe/OC8fwbATveVzVppUl3XZ8= Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2104.outbound.protection.outlook.com [104.47.55.104]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3j7jk4shex-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Aug 2022 09:41:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EyMZ1ss/LlD5Sw0sroaUzvC/rKGQYGM+Z8Sz+iDdxzHjbGpIZ5dGlyFDD0HyPDuFyMLVNrqWPH9bWscbF8o949/aRfpkZrQZWU4HU49E2z8BV3ElBl7wqdoYS8MaCaZ8EHeJ/s8cHfwU60qtwbATxAtuLl5dmDAy9B3gLUfq+VqujIXNVWtze4LzHqr7XY3+VAYEhjkyZsZm+dtZOK8xNsPpE4VXucZzTRbBH/hDFyGHbFAacLU2EMkByM/S8L/VDeJmHnYKze44BNwJD/7YFY38Rx9nWxGNAE1FxvS0yyVXa3p4eJaNnerG3xi61ElxQ4bqS7fPnvlttPu86JxbyA== 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=YQWMvv73ewq94/MYy9Z9O6tZEZ8CWiIFUI7gsQ2259c=; b=fY+aJHx0qsbKq8jtW3XcfootFaQGQdi7Oh9v99e1x7a38pwf6bvSOrxRSZimM3HOefVeZs43LchRhaZgTVGLV/d5u58N2Ku3JuAVZ8LuZOz4aaUg5OSVpZzpNb1vePowXM9RTXSZQ5edaU/LxMyPnLrCz4UMwMEm9gt1NGq/BS7DFOGlj7t+i7QOeZ9qmcivhHQqkBgq8IzpFIH58T+8dbD3sJ1j8qi2yNvxTzIpC1jhKBtOOwuaLZQEkQ1lHTVAFc9wfl+asY3TP3XYhce1r6b3GOdtTLwieuMOZPyCVhlO1IOGNjxHQKCvBDWgIlhEl+YcPH1Iz+hif5Eh+obNXQ== 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 SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) by MWHPR15MB1584.namprd15.prod.outlook.com (2603:10b6:300:bd::22) 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 16:41:09 +0000 Received: from SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::dde5:25a3:a125:7bc7]) by SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::dde5:25a3:a125:7bc7%2]) with mapi id 15.20.5566.021; Tue, 30 Aug 2022 16:41:09 +0000 Message-ID: Date: Tue, 30 Aug 2022 09:41:06 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH bpf-next v1] bpftool: Add support for querying cgroup_iter link Content-Language: en-US To: Hao Luo , linux-kernel@vger.kernel.org, bpf@vger.kernel.org Cc: Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Martin KaFai Lau , Song Liu , KP Singh , John Fastabend , Stanislav Fomichev , Jiri Olsa , Yosry Ahmed , Quentin Monnet References: <20220829231828.1016835-1-haoluo@google.com> From: Yonghong Song In-Reply-To: <20220829231828.1016835-1-haoluo@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR03CA0383.namprd03.prod.outlook.com (2603:10b6:a03:3a1::28) To SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 71ad9c88-afb2-4d64-e378-08da8aa670bb X-MS-TrafficTypeDiagnostic: MWHPR15MB1584: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: cSOSvXxIklYtadC2rncQXOf7z/gTVJxw2MTB44eiy6xs97Oe5eI585OAXXgSL6JSo8x4hN+EzWE+RDCbJwOHNHSS2OA4dfaidz+w5yz2+GSYBT0JNNf6CrwK5rojKqIJF1kNdpGxVV4hacM4T1c2X/NFHzJIWNKyLWAuiScQZXVmUz3DgXhhRXU04FlQ34XyVRfiFuwJ9jgZmqWOcRMB4gL8/id2rQUYw4xODhxa5bCc+EVhkdbP2FCbHykr3evVexgHDunzojjs+rY6JYGTTL4F7DEdB5JN/Tkw+7vx3mz+5YO/Rw+zBhn5ZqiG5JGlQ5MefxiimSsvUXIaEPqFWMDF6VZ8NbEYkhes0k3L1wlPFx0v5MC/93ksJqT5lhyDeDlXKBPQpgJa2N+Wxl51tpD7YMQnJby9W3JYTh/tZO3KnhB1Bfp1UAXrrJNlWvBou1U0VYJ4DtEiZnQLGoHHLgxGOv4fuYQtF06JHGrZkbupPC204YTnQmHTRVzNtHjEypODctkXPinyARBSCsMX98wsl0OGikNrP0+P+TGPgWluWU5MgFF4QyLZIIM0SkEGHB0xcH6yYwUgSdYLa/miw7ULZZnzAm2jf67q0cThtOYR2vA1LWSORhCnmlpOuDqWdYSC6EKlD++GL34GCbUI6omqAfnfhdBEVj12oDdyY2LxT2MYSkwEz42w4ZetsKBvkpMgDh7rSzDOy9vw3Af9qVlvXZCn0yrNgWo0AC/wi3u4LqEkD0v2YA0wauX0A2rrD+tIdioezLjoXoa6u+F9eyOl/4W7W65Xc/Jm4o/bZQw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR1501MB2064.namprd15.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(39860400002)(376002)(346002)(366004)(396003)(136003)(6512007)(4744005)(2906002)(38100700002)(6666004)(53546011)(2616005)(6506007)(83380400001)(186003)(31696002)(54906003)(31686004)(8676002)(66476007)(6486002)(66556008)(4326008)(316002)(66946007)(41300700001)(36756003)(86362001)(7416002)(8936002)(5660300002)(478600001)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?amI3Z0FGYVoycTUxV2lIVHBKRUlHdzBvSHRTVHZKdmZCZG9MK01uUnIwNnNJ?= =?utf-8?B?N3RiTkJiREdXUnlhV1YvWU9HVTNJU1Nvb3pEM1NEYXFjdzZiMHFLVURZMXNq?= =?utf-8?B?d2lRT3RlV3AycEVucCtaZVVKdXBuOVBPWG90UURRaGI4b3NUdldKR1hJSTBq?= =?utf-8?B?MzRnZk5vQXc1T1NHd3FkWWVQSlAzWEJBeERT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mJBSitv?= =?utf-8?B?ZVh0aW1EWkZkY1dLYkw2UjhDeS8xbDRUYyt4dFpGSC90Sm11THVKd29KdlZG?= =?utf-8?B?eGRCZXNuZXMzVWtEVVNaRklEK1F4d0VJS2hPRUozbDNJQnRrREFUcHpReGJv?= =?utf-8?B?NUszZlhtY2hpWmhJcXhmU2VkVi92cjNHdEVlMjJTNGdWL2ZGRE5OdXJmV0JU?= =?utf-8?B?U0E9PQ==?= X-OriginatorOrg: fb.com X-MS-Exchange-CrossTenant-Network-Message-Id: 71ad9c88-afb2-4d64-e378-08da8aa670bb X-MS-Exchange-CrossTenant-AuthSource: SN6PR1501MB2064.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2022 16:41:09.3161 (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: 31qv6yrnTTY1u3GLxkC0rxnsIqkZi4EmJNDKJ+fsmIQYFs5iefQ12Ll9HNg5QyCQ X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR15MB1584 X-Proofpoint-ORIG-GUID: Gi3FLUjfe3q6GB1a1ur0kaR5FHe8OvGn X-Proofpoint-GUID: Gi3FLUjfe3q6GB1a1ur0kaR5FHe8OvGn 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,NICE_REPLY_A, 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 8/29/22 4:18 PM, Hao Luo wrote: > Support dumping info of a cgroup_iter link. This includes > showing the cgroup's id and the order for walking the cgroup > hierarchy. Example output is as follows: > >> bpftool link show > 1: iter prog 2 target_name bpf_map > 2: iter prog 3 target_name bpf_prog > 3: iter prog 12 target_name cgroup cgroup_id 72 order self_only > >> bpftool -p link show > [{ > "id": 1, > "type": "iter", > "prog_id": 2, > "target_name": "bpf_map" > },{ > "id": 2, > "type": "iter", > "prog_id": 3, > "target_name": "bpf_prog" > },{ > "id": 3, > "type": "iter", > "prog_id": 12, > "target_name": "cgroup", > "cgroup_id": 72, > "order": "self_only" > } > ] > > Signed-off-by: Hao Luo Acked-by: Yonghong Song