From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4458CC77B75 for ; Fri, 19 May 2023 19:01:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229807AbjESTBT (ORCPT ); Fri, 19 May 2023 15:01:19 -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 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