Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2928675rwd; Fri, 19 May 2023 12:10:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7JLmtgoO9hfKUD3lerAIeWlY9dLfq16gbkl/J5YF/t108seqE/HOC9NqO87v9tnk0o7JT9 X-Received: by 2002:a05:6a20:728e:b0:100:bae5:acf3 with SMTP id o14-20020a056a20728e00b00100bae5acf3mr3614542pzk.37.1684523409163; Fri, 19 May 2023 12:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684523409; cv=none; d=google.com; s=arc-20160816; b=iWDRhJtgJUEWNSMMVe2z23yuSEERTL7CLoEpHwiW5lbr3+jTJQw0hWUXHCtGMkX89k VNig7ru2NltbnUOvs9Do4Ap9ip6LZerfiFVM/mWJZHMnsRkxfvrnwJe7qDSKKEBpSiWU fZevE8qQr+NSIwD9ZW7OatF1B5N9OaXFmWVlbUJEhpVxrudPnp7JR8an06K9qmEyYQWi 3WnopbJDglhvIT//ZR8+/Tbo84A3zr8lV+B3Ra5UDEujF0fTUgIVXHlsonKl2bNE3KCh m5K+iCQna8Cz+T2kKJVi0yc3PzeCgcbTuKzPCxQ30izt0urKJFRn571tNQLDDEwPVDdx ftfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=nmyd7ev1kC4N1SPCSUefexlvGt6H+78x/hkY+aW/KbQ=; b=r4st5tHAyUzmOa06JFP1zLOBiSm4IiNDQ6vnM6VfvHK2OQMHFAE3nAETINx/p5PKtK NEcvo0+DmaTyaDvHLMfm/sQd/I4T9H7DVM4Am96zTMgPw744AeV+mNXUct6hpg4mzwKz pHcALUasoLHPBsTYzbePoCqZZ6AvGpmFZS7VvysVQ6N1waDnUVy+rquMyELniKeqfmAH 7KcLevOn1BmctNgUTpz9IGm46kk1h8ovLPm50ExJKPVZOMLVyxdCUTHDFKKzKW4VlknD lKpknUwQf95c8a2g4sbu8PMsP6UELUZezfqFrmpeI1oCTUaOqj60586+d09gu3pEPhWt jC4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=nMrIGWBU; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x24-20020a63db58000000b0053007fe33aesi80531pgi.409.2023.05.19.12.09.56; Fri, 19 May 2023 12:10:09 -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=@linux.dev header.s=key1 header.b=nMrIGWBU; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229789AbjESTBS (ORCPT + 99 others); Fri, 19 May 2023 15:01:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjESTBR (ORCPT ); Fri, 19 May 2023 15:01:17 -0400 Received: from out-55.mta0.migadu.com (out-55.mta0.migadu.com [IPv6:2001:41d0:1004:224b::37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C32DFA for ; Fri, 19 May 2023 12:01:16 -0700 (PDT) Message-ID: <073cf884-e191-e323-1445-b79c86759557@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1684522872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nmyd7ev1kC4N1SPCSUefexlvGt6H+78x/hkY+aW/KbQ=; b=nMrIGWBUuBrYwb8WMXJDdRGeymsJlSPg+G2FjG+pCNRkP3gFcTl6dkgvY0saj70bprml22 h7wyNaZRx0c8Vi5MQT7IkI4ZVLdDAni2uaNGgdWMuo3/DKIgM6I1gfXyZKFue5MeP8RPTL uML/nDfyMhAyBPSGzuncxyJqGPKUnDM= Date: Fri, 19 May 2023 12:01:09 -0700 MIME-Version: 1.0 Subject: Re: a small question about bpftool struct_ops Content-Language: en-US To: Zhouyi Zhou , bpf@vger.kernel.org, linux-kernel References: X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 5/19/23 5:07 AM, Zhouyi Zhou wrote: > Dear developers: > I compiled bpftool and bpf tests in mainline (2d1bcbc6cd70), > but when I invoke: > bpftool struct_ops register bpf_cubic.bpf.o > > the command line fail with: > libbpf: struct_ops init_kern: struct tcp_congestion_ops data is not > found in struct bpf_struct_ops_tcp_congestion_ops At the machine trying to register the bpf_cubic, please dump the vmlinux btf and search for bpf_struct_ops_tcp_congestion_ops and paste it here: For example: #> bpftool btf dump file /sys/kernel/btf/vmlinux ... [74578] STRUCT 'bpf_struct_ops_tcp_congestion_ops' size=256 vlen=3 'refcnt' type_id=145 bits_offset=0 'state' type_id=74569 bits_offset=32 'data' type_id=6241 bits_offset=512