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=-11.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=no 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 C703EC73C53 for ; Tue, 9 Jul 2019 18:00:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A131020651 for ; Tue, 9 Jul 2019 18:00:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="nfhZ4cPC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726133AbfGISAK (ORCPT ); Tue, 9 Jul 2019 14:00:10 -0400 Received: from mail-vk1-f202.google.com ([209.85.221.202]:44806 "EHLO mail-vk1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726851AbfGISAK (ORCPT ); Tue, 9 Jul 2019 14:00:10 -0400 Received: by mail-vk1-f202.google.com with SMTP id m1so8116691vkl.11 for ; Tue, 09 Jul 2019 11:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=eE901hT8R2cec0a/P3JUXxUcLDbh/ozDY5skKWvugSY=; b=nfhZ4cPCMV1EB/Em4l3UIu7WdNtfaMDsQNa1eXsjN6HNOV0/LVFnQDG71OvEOI1Afk x1WQsMApWjCgtcZ+2ZT6ixhYFaHFQNJcVAj5azIi6y4uJuToHNu4FuH3C+/D5oRyXi8L 7HexPUYxRehA0KioBHIwVtRkajvhHmliEdQNdHoZu1ns7ub2phR8kLRcd3mvGewz1G7t +hJaz4Y2ZZh1JPIEfpvIwa1wgNJ/EJOzNfzDzfyp40seliHcR8lOT+LEp6AxJEFuvMVO csEHlZhQDbo95wG7zyk1oN6fF6meXytaoc2gEvxGODq4Lm6vQTdaiWmqriYuA3eIKoDj 7W3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=eE901hT8R2cec0a/P3JUXxUcLDbh/ozDY5skKWvugSY=; b=tbD0Vd3IWhrKntrIQyifT3Il7qo5ZG4xU+0GwoukPDusjMy5Jut8gMJQ4RSpbx8+R6 RsR/3Vl7TuggT6bo9a1lGtQqAHzQ/ZJQFu1nLJ6VzBABveKSWo8qgS4T8MDENdZqhpnA RRArAmpTc0cUeKxaBGZ65AX4z1ol/exnw0zMKA5QhNTONMbu+cLOGIsYqk53q3d/rqJS OxIX6Cq8fvAnYel2zxW/NWWFuBMvBqgqQy8Gnh+QxVyj22Bul+hg7Wr3lpK4/igs5S4B 3qGQnn6rytH9ImpGTCCzxTn2I4yKNoVlTUJ5eUQWS4PdFn1b/EaCzVTFGkXpw49BtNW0 yRKg== X-Gm-Message-State: APjAAAXdGm7WYa2AMKE3eQLVrB8502aJZk5XPMASfER5Nw/CSWjEXWIS WC0M++BU7RMPjx54Mye4p4HsFMVIR0nFenW4HtIHiBPLHsVkCYrA8ebZ500Y7SzRKE+TZEEuULS s+n/GSqEHYVTsWFfURiD2AffALVrXvhamKHjtvvmMqe1dgRQUsu1B5qNGY+FkAyw6641Y9YEq X-Google-Smtp-Source: APXvYqwD2WvwohQV90HUaS7J0WOgV9bCvpzuCOqvMRhI/HyBwQfswTU8DPrKF49s2asjwZPHHUfBWkv4jLuoF7I0 X-Received: by 2002:ab0:7442:: with SMTP id p2mr14401363uaq.92.1562695209169; Tue, 09 Jul 2019 11:00:09 -0700 (PDT) Date: Tue, 9 Jul 2019 11:00:03 -0700 Message-Id: <20190709180005.33406-1-allanzhang@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog Subject: [PATCH bpf-next v8 0/2] bpf: Allow bpf_skb_event_output for more prog types From: Allan Zhang To: netdev@vger.kernel.org, bpf@vger.kernel.org, songliubraving@fb.com, daniel@iogearbox.net Cc: ast@kernel.org, Allan Zhang Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Software event output is only enabled by a few prog types right now (TC, LWT out, XDP, sockops). Many other skb based prog types need bpf_skb_event_output to produce software event. More prog types are enabled to access bpf_skb_event_output in this patch. v8 changes: No actual change, just cc to netdev@vger.kernel.org and bpf@vger.kernel.org. v7 patches are acked by Song Liu. v7 changes: Reformat from hints by scripts/checkpatch.pl, including Song's comment on signed-off-by name to captical case in cover letter. 3 of hints are ignored: 1. new file mode. 2. SPDX-License-Identifier for event_output.c since all files under this dir have no such line. 3. "Macros ... enclosed in parentheses" for macro in event_output.c due to code's nature. Change patch 02 subject "bpf:..." to "selftests/bpf:..." v6 changes: Fix Signed-off-by, fix fixup map creation. v5 changes: Fix typos, reformat comments in event_output.c, move revision history to cover letter. v4 changes: Reformating log message. v3 changes: Reformating log message. v2 changes: Reformating log message. Allan Zhang (2): bpf: Allow bpf_skb_event_output for a few prog types selftests/bpf: Add selftests for bpf_perf_event_output net/core/filter.c | 6 ++ tools/testing/selftests/bpf/test_verifier.c | 12 ++- .../selftests/bpf/verifier/event_output.c | 94 +++++++++++++++++++ 3 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/bpf/verifier/event_output.c -- 2.22.0.410.gd8fdbe21b5-goog