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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1E0AC282C3 for ; Thu, 24 Jan 2019 08:55:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E08021872 for ; Thu, 24 Jan 2019 08:55:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="0q3JCU6k" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727390AbfAXIzq (ORCPT ); Thu, 24 Jan 2019 03:55:46 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:51372 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726025AbfAXIzq (ORCPT ); Thu, 24 Jan 2019 03:55:46 -0500 Received: by mail-wm1-f65.google.com with SMTP id b11so2227932wmj.1 for ; Thu, 24 Jan 2019 00:55:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=UrGa4/MrNtQr3cyYqrw4F9C2kRFLbS1mD9n+HLuNzug=; b=0q3JCU6kavOl3GeMS+3qCOTUe6IlFrMQXmg/2TwzumFKD5M3WUbM0u2U0g0fUGX2Up JMsBJqwL27Q2NStHcn5suuAoxURubCsRQOsQSU+OHFuTnq4UFmIOhfLuS8N8riQwxn3t vjjITcmDnmf3JlB4QZIX6MxTVSCAu+lP1U+RWbvCC9BW7PuZ1s0g6JJzI+A+sH6Cocfi 6aIH3PZ7AGIoZ07t5oDl1MPrzkELC/6Xb+gzEGTL0+KjNzvt3v/JvNrMTyGQVbVjjfJb XCN3mZkq6e+3pqbYxT6EwaoiPQ1QnFNtfZRwPZHWRLhumcUQWOta5LTOaRJaeOMlxTMC QcsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UrGa4/MrNtQr3cyYqrw4F9C2kRFLbS1mD9n+HLuNzug=; b=i6O7lIhSyiMIxDfv4FNyHE6YPPOh02qU42y2P7I8bIMxOQwSlzyX6WmCA+9h4LMV1t 34pfzLFC3HqFh+ojfvjyZA30kR/AHuPFFydXL2kt9l9Hnig+MWc/tjiRxiuOYm7F8O7S ElxREGQ7Jaj8eZx7BD54pyeygzAQPQJb/yEojVFLU+HMuPWaxZEW4YyejHOiy3vK5wHD xtTaAtcIaHtmUz7jx1IJRYLzG6s2BAcrK92f9gWnHo4IzVjFZiqNDmxV6lcjmIpVJhqc ufyCIRZEt7SISaCBxjTQDXVbzZPsfOLUBqpm5EYT/916vvyr49BWDXY2TCIm1L6i1sQO 68xA== X-Gm-Message-State: AJcUukfhR+7hpwRWL9qrB0CLiEBE9aMfu02xzBS+8XFw02MRhPufs/oE UWmO9E/9QZUn/RFluczlosiS8A== X-Google-Smtp-Source: ALg8bN44DkFZxULszVzeWOJnz5rkdcNaJupGkfWO+PXudlH6aertl3uK2WxnkgX7RihJj2mqAb1geQ== X-Received: by 2002:a1c:cc2:: with SMTP id 185mr1721901wmm.1.1548320143575; Thu, 24 Jan 2019 00:55:43 -0800 (PST) Received: from [192.168.1.2] ([194.53.187.240]) by smtp.gmail.com with ESMTPSA id u204sm97573824wmu.30.2019.01.24.00.55.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 00:55:42 -0800 (PST) Subject: Re: [PATCH bpf-next v5 4/9] tools: bpftool: add probes for eBPF program types To: Andrey Ignatov Cc: Alexei Starovoitov , Daniel Borkmann , "netdev@vger.kernel.org" , "oss-drivers@netronome.com" , Arnaldo Carvalho de Melo , Jesper Dangaard Brouer , Stanislav Fomichev References: <20190117152758.14883-1-quentin.monnet@netronome.com> <20190117152758.14883-5-quentin.monnet@netronome.com> <20190123234429.GA8297@rdna-mbp.dhcp.thefacebook.com> From: Quentin Monnet Message-ID: Date: Thu, 24 Jan 2019 08:55:41 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190123234429.GA8297@rdna-mbp.dhcp.thefacebook.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 2019-01-23 23:44 UTC+0000 ~ Andrey Ignatov > Quentin Monnet [Thu, 2019-01-17 07:28 -0800]: >> Introduce probes for supported BPF program types in libbpf, and call it >> from bpftool to test what types are available on the system. The probe >> simply consists in loading a very basic program of that type and see if >> the verifier complains or not. >> >> Sample output: >> >> # bpftool feature probe kernel >> ... >> Scanning eBPF program types... >> eBPF program_type socket_filter is available >> eBPF program_type kprobe is available >> eBPF program_type sched_cls is available >> ... >> >> # bpftool --json --pretty feature probe kernel >> { >> ... >> "program_types": { >> "have_socket_filter_prog_type": true, >> "have_kprobe_prog_type": true, >> "have_sched_cls_prog_type": true, >> ... >> } >> } > > Hi Quentin, > > Awesome work! I wondef if you have plan to add similar functionality for > attach types? > > For example BPF_CGROUP_INET{4,6}_CONNECT were added in 4.17 but > BPF_CGROUP_UDP{4,6}_SENDMSG later in 4.18 even though they correspond to > same prog type (BPF_PROG_TYPE_CGROUP_SOCK_ADDR). Hi Andrey, thanks! And yeah adding probes for the attach types would be one of the next logical steps, although to be honest it is not at the top of my to-do list right now. I'll probably add them eventually, but if you have a need for such probes today feel free to give it a go! Best regards, Quentin