Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp3487496rwb; Sun, 30 Jul 2023 08:38:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlHkelmnXhv2n0hiAulTlBxxan5BZx25hJmNCEKL4TJRFA/fnlt1A8NG8fWHxvUEeU2Tjlj3 X-Received: by 2002:a17:903:2284:b0:1bc:14f0:b76c with SMTP id b4-20020a170903228400b001bc14f0b76cmr16370plh.65.1690731532769; Sun, 30 Jul 2023 08:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690731532; cv=none; d=google.com; s=arc-20160816; b=n5h0mWB+bSLsx5l/0Wn8NPCIg5BlS9hnsPQU9agVGN26nVoM/l0O5xsEbkf3kvrXcf cIY8GBR7kj6NqwB90Gwu65yeLDLCjz9CFKRCvq7UfohntKAa/82kHVu7Es1Jq/+/u9RO xWXU08p0Qi9Fe2lJ2NN7YsRXMma2vMbwgjZF3eDAPnuPbzp/q8NXERBjpR97E/en+KNE KehDR+KHGAy7yn2tV3ZHP+rgebU6K/gn9zpAOZyDd19QS0Ml4Xp2D6qP8y2VxLGvbHSC zxZlx90rH2JyoL8a3BFGfarlzyGu6dCgpniD5/bwz+EL+Q3LAOeNtDoDoNczZNeHClKO R/iA== 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=FlliIXo6uvrh08ojtOL3l75jp+3FAUoZdbrhJ9gY36E=; fh=UKLjsuKGMcrFBOnPvx2KDXu/NaOV4DUeRKFV6W/Kb/4=; b=JMuYvvKZm+I4hxrXlwPmBw53Gk6LZ9OcG6NIfwAX+8VslmanMWduz+8ekpNiDuVTCk S/s+Hb/0Zk9fdBFxqUhx/yv7S/klpZ9IGha+aYdUJDueM+llnIrEX65od5JTZu5F3o6G Y1Zx68pVToCwXn703aoPSLX9hwv532scWa0rETVDU7l8B5udiDKIgOyBepmgYCHNa0WR En3/mnGP+xFtBanGlHEuDj6x4U0T1WQKNKXsEVn785NMYr0ka3DHxn4nMEj33eGC81oW 25zlSAVYmwPZxfmuxLtUBvCQ0xwaewKhZNj9ULVUnHauZrFl3LNnckKPmeD179smrNrp mL3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="qEe/zN7a"; 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 lh16-20020a170903291000b001b9c17240desi5782059plb.466.2023.07.30.08.38.38; Sun, 30 Jul 2023 08:38:52 -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="qEe/zN7a"; 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 S229776AbjG3Nt2 (ORCPT + 99 others); Sun, 30 Jul 2023 09:49:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjG3Nt0 (ORCPT ); Sun, 30 Jul 2023 09:49:26 -0400 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E6BC10C1; Sun, 30 Jul 2023 06:49:25 -0700 (PDT) Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-403b36a4226so16579761cf.0; Sun, 30 Jul 2023 06:49:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690724964; x=1691329764; 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=FlliIXo6uvrh08ojtOL3l75jp+3FAUoZdbrhJ9gY36E=; b=qEe/zN7auL/09nK5d8mKb1+/OjEMFoMxKz8xc6T/ntSdzi8G+npmr55x3t1SxgXuMx +VukRHmefryMS0onazV7SximRLqYA8oa8Rj0dUlD3Z6no2jvnsOc6lF4Cxb2i8up01S1 etk9hJvHq+hOKAlQgVk0Adox4LTETi171kcFiy6IB1l1qZzMrE9dYjIS2uv+TsF4WTcq V+m4NPnuWIg/5OxtWLX5uSQ0qsmtvGx5Xjj+/V74cPcLDhWYEqxDv2RgkO4M6qJPipgw 3zhqkU8eUtO3Phz2it6QzkiunhjTnxtBKH8SWZRSEsLAEoTZs4SK9MC5zN2KOqBkuZZv 9eEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690724964; x=1691329764; 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=FlliIXo6uvrh08ojtOL3l75jp+3FAUoZdbrhJ9gY36E=; b=ijkFFWXswG9d5CBxtKTvNIyGrFJnKATxwpHzdd1+rmRjJ1YXVFx0oXv9JKhj+pjgIf raLISYXt3hn+Tv6rWSaTi1BxVT266qNe/cErqmOgjV02Zr8V1SQ80wFhCtB8dZFGZKag iFpbn2tnmaiqzeD8UYnQUA24FIo/JSC3RsvlYkdnAk7MtanqAuG/8dGL99qkTYlCo6bu TtGth35OoeH6Lx7NSUjvHtNJpCt2vElvTi9aLjw+NDr9lPsa7N+/5OcXUiBZcbgZ4/2m siAtMfrS8Qv+FffB5hd3I1Ma/d4QqCrjM6Yo1Lr4Ao8qcTerQMwIFGy8egc2Ve74ALaZ 892w== X-Gm-Message-State: ABy/qLZiReVMVA+0Ml9JfuLr04T5Ur8/zdQggn0Hesoz5lyFozDUUqxZ l05Oc3JlkzBP8mBocq1LkwyeXQQJvuaE+6B9oiIMHjJZEc+Pbyg9 X-Received: by 2002:a05:622a:1212:b0:403:c2dc:929d with SMTP id y18-20020a05622a121200b00403c2dc929dmr7268810qtx.48.1690724964385; Sun, 30 Jul 2023 06:49:24 -0700 (PDT) MIME-Version: 1.0 References: <20230730114951.74067-1-hffilwlqm@gmail.com> In-Reply-To: <20230730114951.74067-1-hffilwlqm@gmail.com> From: Manjusaka Date: Sun, 30 Jul 2023 21:49:13 +0800 Message-ID: Subject: Re: [PATCH bpf-next v4 0/2] bpf, xdp: Add tracepoint to xdp attaching failure To: Leon Hwang Cc: ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, hawk@kernel.org, rostedt@goodmis.org, mhiramat@kernel.org, mykolal@fb.com, shuah@kernel.org, tangyeechou@gmail.com, kernel-patches-bot@fb.com, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,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 This patch is very important to help us to debug the xdp program. At the same time, we can make some monitoring tools to observe the kernel status by using this trace event =E6=9D=8E=E8=80=85=E7=92=88 & Zheaoli Email: lizheao940510@gmail.com Github: https://github.com/Zheaoli Leon Hwang =E4=BA=8E2023=E5=B9=B47=E6=9C=8830=E6=97= =A5=E5=91=A8=E6=97=A5 19:50=E5=86=99=E9=81=93=EF=BC=9A > > This series introduces a new tracepoint in bpf_xdp_link_attach(). By > this tracepoint, error message will be captured when error happens in > dev_xdp_attach(), e.g. invalid attaching flags. > > v3 -> v4: > * Fix selftest-crashed issue. > > Leon Hwang (2): > bpf, xdp: Add tracepoint to xdp attaching failure > selftests/bpf: Add testcase for xdp attaching failure tracepoint > > include/trace/events/xdp.h | 17 +++++ > net/core/dev.c | 5 +- > .../selftests/bpf/prog_tests/xdp_attach.c | 65 +++++++++++++++++++ > .../bpf/progs/test_xdp_attach_fail.c | 54 +++++++++++++++ > 4 files changed, 140 insertions(+), 1 deletion(-) > create mode 100644 tools/testing/selftests/bpf/progs/test_xdp_attach_fai= l.c > > > base-commit: a33d978500acd8fb67efac9773ba0a8502c1ff06 > -- > 2.41.0 > >