From patchwork Mon Nov 20 04:55:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 839428 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="02c4vFCw"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3ygGdm5VMSz9s0g for ; Mon, 20 Nov 2017 15:56:28 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751210AbdKTE4R (ORCPT ); Sun, 19 Nov 2017 23:56:17 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34564 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751198AbdKTE4O (ORCPT ); Sun, 19 Nov 2017 23:56:14 -0500 Received: by mail-pg0-f65.google.com with SMTP id 4so6425031pge.1 for ; Sun, 19 Nov 2017 20:56:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1jfr5tmKIAJ8jyJ4AMYLji8KanggaBi3TP8COFFOvWU=; b=02c4vFCwsN2/Wak1gti2TydSybN4Fb3ffJcreT5pn2ar4k2M0wdlYXJx2p5tifp86B ph8ydl+3tuatM8yzohonoSPNBAtRz3OFjZ6JTJXfC5X4yGFq81wAqMwWa0ja0mkI0T0/ BQ2MA+BNRufTdsSY4BP8dIQAVh0ZcZ/zdEIPosWPjnv2hC0/374uKEWWHcbYrxEiOMFA d/MpZ8XkE3Qkpu29bbyCuHE5NQKHEQ49Qc/aw2iFXqo2ZUvCSfC2G5CxT1joHcK7KCp5 SpRcDs2Ft9nvuA5IYr/eKpRgy1HF6nAXGXhnzZx+J49twj4bV8coP7lA3Yk6sagyqXhs 5oIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1jfr5tmKIAJ8jyJ4AMYLji8KanggaBi3TP8COFFOvWU=; b=W+POeM/UNZ8G8nDFT2LA+oGHocVr+KP7f3P7crrZKu6qJtzZqZE50+8z1Kem9g7yPd WcH9t+RoaakmeH35YTBH4CRUjEJ3GYJ3+wWOAGG2ph+XxbrLDSQytj32T+X0x+F9P7LD /nVQJv7I9xuNY+gc1i2uaDCrxp+D7aabe+tIcEcWKiGV2eIy9CqLqTgpzRHDSPmz8DmI Vii2hxcyigbKhTsRhts0ceevuzRi+ei/0K23+85u9WtbedYljJ/CFpBsh7pAp/+bhuCh MPjDhzSM0p4eZnfylYqilZlIDWLtqSvNZ9OgbpmPfiHnZZ3iMNjNizDTIdgNcvNWLqTd tTxw== X-Gm-Message-State: AJaThX7o1EiHgxpI2QrXdzTj1V1sV0lzaSZ/SlGJ6nxBy7oVQG3AwpVR R6oOStSI/OrUc2K3cv4rOzReYg4k X-Google-Smtp-Source: AGs4zMYmqCDmaSOvkyvzfl9V9oNU1jsb32pjCZtyjxPtn3OenpfbzXppcFPu+eWUeaDKopkC7Fk6Ug== X-Received: by 10.99.95.70 with SMTP id t67mr12365520pgb.49.1511153773634; Sun, 19 Nov 2017 20:56:13 -0800 (PST) Received: from jkicinski-Precision-T1700.netronome.com ([75.53.12.129]) by smtp.gmail.com with ESMTPSA id e8sm17598270pfk.6.2017.11.19.20.56.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 19 Nov 2017 20:56:13 -0800 (PST) From: Jakub Kicinski To: netdev@vger.kernel.org Cc: alexei.starovoitov@gmail.com, daniel@iogearbox.net, Jakub Kicinski Subject: [PATCH net 08/10] bpftool: revert printing program device bound info Date: Sun, 19 Nov 2017 20:55:20 -0800 Message-Id: <20171120045522.2188-9-jakub.kicinski@netronome.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171120045522.2188-1-jakub.kicinski@netronome.com> References: <20171120045522.2188-1-jakub.kicinski@netronome.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This reverts commit 928631e05495 ("bpftool: print program device bound info"). We will remove this API and redo it right in -next. Signed-off-by: Jakub Kicinski --- tools/bpf/bpftool/prog.c | 31 ------------------------------- tools/include/uapi/linux/bpf.h | 6 ------ 2 files changed, 37 deletions(-) diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index f45c44ef9bec..ad619b96c276 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include @@ -230,21 +229,6 @@ static void print_prog_json(struct bpf_prog_info *info, int fd) info->tag[0], info->tag[1], info->tag[2], info->tag[3], info->tag[4], info->tag[5], info->tag[6], info->tag[7]); - if (info->status & BPF_PROG_STATUS_DEV_BOUND) { - jsonw_name(json_wtr, "dev"); - if (info->ifindex) { - char name[IF_NAMESIZE]; - - if (!if_indextoname(info->ifindex, name)) - jsonw_printf(json_wtr, "\"ifindex:%d\"", - info->ifindex); - else - jsonw_printf(json_wtr, "\"%s\"", name); - } else { - jsonw_printf(json_wtr, "\"unknown\""); - } - } - if (info->load_time) { char buf[32]; @@ -302,21 +286,6 @@ static void print_prog_plain(struct bpf_prog_info *info, int fd) printf("tag "); fprint_hex(stdout, info->tag, BPF_TAG_SIZE, ""); - printf(" "); - - if (info->status & BPF_PROG_STATUS_DEV_BOUND) { - printf("dev "); - if (info->ifindex) { - char name[IF_NAMESIZE]; - - if (!if_indextoname(info->ifindex, name)) - printf("ifindex:%d ", info->ifindex); - else - printf("%s ", name); - } else { - printf("unknown "); - } - } printf("\n"); if (info->load_time) { diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 3f626df42516..4c223ab30293 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -897,10 +897,6 @@ enum sk_action { #define BPF_TAG_SIZE 8 -enum bpf_prog_status { - BPF_PROG_STATUS_DEV_BOUND = (1 << 0), -}; - struct bpf_prog_info { __u32 type; __u32 id; @@ -914,8 +910,6 @@ struct bpf_prog_info { __u32 nr_map_ids; __aligned_u64 map_ids; char name[BPF_OBJ_NAME_LEN]; - __u32 ifindex; - __u32 status; } __attribute__((aligned(8))); struct bpf_map_info {