Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp136278rwd; Fri, 19 May 2023 16:54:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4cmTOiQ1yUSnjUmDiDNaXzjkLxotsfELQgXyiWQ97f+SFmESUtPlZNrdUjmOzPjvKN7D8C X-Received: by 2002:a05:6a21:8dca:b0:106:c9b7:c92f with SMTP id ti10-20020a056a218dca00b00106c9b7c92fmr2779575pzb.49.1684540489142; Fri, 19 May 2023 16:54:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684540489; cv=none; d=google.com; s=arc-20160816; b=D/tqGU6tgces64iDmwA9PN5T8jE99s8qBbkHoUkrzl9+iJGCkfAPmDC6aeLjjXVmtR A4CXPlbIjvU0/Gayc5UJEPeDTBH0moqO9d5Vv01/YmMQqXhIHNWGBbzDyrFRur8WWpO5 Lod289++QEZDs2I4fjR0i0tW4MV8W7SZqZJakPWKAqcCdolpc5PUoC1ssafGy0qS181C KAjFJFEeKu70wWG+APQSlYSdtOF5H9E9qXe+XL6VDy024XBuXr1vxIHbOlwyOndED23Z kqaShRfwQlJJqgT2izquysiPxoDE/htvDguxD5E3Lp0BN2zipGqzJFKsr7XLgLr1xudO wDrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=vTSgTvbcd9Uv0YqNm3TopjpN1/V/dzNRUy9h9I2dqAs=; b=a2Owl9PsbI4xOHzVRU8eELaBSblm8XB972cyrXWfYgHk63NDH8fKz1X2sU5JufwTI1 Zc7ct11U+YU3/j2SYd7IewJOENtrEtAmnAu7+tJikxUD2UmWLK0i3DVt/bmp/6qM6VnR GdJgGv8Cf/APu4wq+aE8Xb/JcN3tEeaT6BG7CJqXTlr4zmkSsZbSWbcbmG1VbDljjr5d 4Ucwlg1gP2UubILZ0vrxWxOdoK7X4M7+V+nCgnG+Dor+Jve0glh/4m0UuHgR4cDo7ES6 zhdMtSGAGtDDdRyOh/qsQibY75IWYVsMP8rW65pY+aoSkA/OppZHKuALourrOlIhB//z CuCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=pUqAr6S8; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k191-20020a6384c8000000b005347d6bd7edsi418305pgd.400.2023.05.19.16.54.35; Fri, 19 May 2023 16:54: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=@gmail.com header.s=20221208 header.b=pUqAr6S8; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230174AbjESXh6 (ORCPT + 99 others); Fri, 19 May 2023 19:37:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbjESXh5 (ORCPT ); Fri, 19 May 2023 19:37:57 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B146EA; Fri, 19 May 2023 16:37:55 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-53202149ae2so2632002a12.3; Fri, 19 May 2023 16:37:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684539475; x=1687131475; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vTSgTvbcd9Uv0YqNm3TopjpN1/V/dzNRUy9h9I2dqAs=; b=pUqAr6S8oHzGpF07TWZ48KQ7idSEEq2fB4EOOi638V6mtxDW/DRejoGfETv1qEvU+U UfQbjDAQwMRWzTG7l1pNAYaEcYqaaxQwIJwFogMCXIh97ymfTH7zzmW+qXOGmxo2zNoQ F9Ue6k7NSXhJwdPZ0rf9RIfe1caEC7gpAREFtclNuaczXUre9Vy31IZa/yBaMJZiFaB2 c8kdcjqzKuMX01aA3Qt7PTzmMyi+ry/wsVwyOZc2VZ1CBbxpyu9VBoQ5bplDUPEkM0n2 pzsB4CbvgXkIzNDEsrrXztqw7kJ08CwtauFNIBCFU4I4N4l+oe4QeRVss8FOqfJEjIeF uBVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684539475; x=1687131475; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vTSgTvbcd9Uv0YqNm3TopjpN1/V/dzNRUy9h9I2dqAs=; b=Z27WpMlLKqRCKQt91BttQrU5LQ2PVryOJYxVHk4OmzW8hWZHss292Bq5Aib//nFNNr Vn9x+qcn5xOpPemusuzt/wLVf+QxSUZlZTz93ZLLhDeShsUE3haR++vDHkZ9YRK9wJCT 9fZhiOvAOpI0dcx7mp+MBQlD7iZn6/6ZLehiLJSHjdsEh4kY9BkdfLE7bnoLo2whZzvv fqbzgXwZv3rIa6NpeP847YFMFoNTmXFl4JLgMXTVwgbWKfoisu4OTBnQ+fIIUHUn/RBw u42bpN4ZiahdUjBWTcKTH8wDmligX0rSUkPCz5txwEOrsZBMpuNTYxooVp9Oy/8PQrBM wkeA== X-Gm-Message-State: AC+VfDyhM8dF5JmoQ3MyTz1Zl98egE7Tl0VSZiuWf446ToFne8Vf2LpL dqeNAh3XBxZqieH2RY2P9z9KRspjZrNowE9qm16nyn4Qt2jDDw== X-Received: by 2002:a17:903:26cb:b0:1ae:7421:82b5 with SMTP id jg11-20020a17090326cb00b001ae742182b5mr4243200plb.45.1684539474593; Fri, 19 May 2023 16:37:54 -0700 (PDT) MIME-Version: 1.0 References: <073cf884-e191-e323-1445-b79c86759557@linux.dev> In-Reply-To: <073cf884-e191-e323-1445-b79c86759557@linux.dev> From: Zhouyi Zhou Date: Sat, 20 May 2023 07:37:43 +0800 Message-ID: Subject: Re: a small question about bpftool struct_ops To: Martin KaFai Lau Cc: bpf@vger.kernel.org, linux-kernel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 Thank you for responding so quickly ;-) On Sat, May 20, 2023 at 3:01=E2=80=AFAM Martin KaFai Lau wrote: > > 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=3D256 vlen=3D3 > 'refcnt' type_id=3D145 bits_offset=3D0 > 'state' type_id=3D74569 bits_offset=3D32 > 'data' type_id=3D6241 bits_offset=3D512 OK [214398] STRUCT 'bpf_struct_ops_tcp_congestion_ops' size=3D256 vlen=3D3 'refcnt' type_id=3D298 bits_offset=3D0 'state' type_id=3D214224 bits_offset=3D32 'data' type_id=3D213704 bits_offset=3D512 Please tell me if I could provide any further information. You are of great help Thank you very much Zhouyi >