From patchwork Mon Dec 10 22:14:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonghong Song X-Patchwork-Id: 1010733 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@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; dmarc=pass (p=none dis=none) header.from=fb.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=fb.com header.i=@fb.com header.b="k1Q0hVL9"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43DHRh3gPVz9s3q for ; Tue, 11 Dec 2018 09:14:24 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729755AbeLJWOW (ORCPT ); Mon, 10 Dec 2018 17:14:22 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:36726 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727146AbeLJWOW (ORCPT ); Mon, 10 Dec 2018 17:14:22 -0500 Received: from pps.filterd (m0001255.ppops.net [127.0.0.1]) by mx0b-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id wBAMC7rY004154 for ; Mon, 10 Dec 2018 14:14:21 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=facebook; bh=na5LW5Q+xbyNLCwW3h6GK90jF+IK0CIYlZ0C0vyO7sY=; b=k1Q0hVL96gyLNcitB2Jn+5j6wi0X11ZHJz9A67llhiM9f+48kAtDmzc79xqFygKJnYmh 6Rxp4ihgrcDNp2pjq78ulWadoqEk33lVreyArdXI2q1GxRINHBoDu/jNCKD3jS1MU7N6 8fFg4z5DCYFPPIfoh+Rqo6Jd6yFXpwGaYiw= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0b-00082601.pphosted.com with ESMTP id 2p9wbygv9n-9 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 10 Dec 2018 14:14:21 -0800 Received: from mx-out.facebook.com (2620:10d:c0a1:3::13) by mail.thefacebook.com (2620:10d:c021:18::171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1531.3; Mon, 10 Dec 2018 14:14:13 -0800 Received: by devbig003.ftw2.facebook.com (Postfix, from userid 128203) id 62C553701AFE; Mon, 10 Dec 2018 14:14:10 -0800 (PST) Smtp-Origin-Hostprefix: devbig From: Yonghong Song Smtp-Origin-Hostname: devbig003.ftw2.facebook.com To: , , CC: Smtp-Origin-Cluster: ftw2c04 Subject: [PATCH bpf-next 0/3] rename *_info_cnt to nr_*_info in bpf_prog_info Date: Mon, 10 Dec 2018 14:14:07 -0800 Message-ID: <20181210221410.2983805-1-yhs@fb.com> X-Mailer: git-send-email 2.17.1 X-FB-Internal: Safe MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-12-10_08:, , signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Before func_info and line_info are added to the kernel, there are several fields in structure bpf_prog_info specifying the "count" of a user buffer, e.g., __u32 nr_jited_ksyms; __u32 nr_jited_func_lens; The naming convention has the prefix "nr_". The func_info and line_info support added several fields __u32 func_info_cnt; __u32 line_info_cnt; __u32 jited_line_info_cnt; to indicate the "count" of buffers func_info, line_info and jited_line_info. The original intention is to keep the field names the same as those in structure bpf_attr, so it will be clear that the "count" returned to user space will be the same as the one passed to the kernel during prog load. Unfortunately, the field names *_info_cnt are not consistent with other existing fields in bpf_prog_info. This patch set renamed the fields *_info_cnt to nr_*_info to keep naming convention consistent. Yonghong Song (3): bpf: rename *_info_cnt to nr_*_info in bpf_prog_info tools/bpf: sync kernel uapi bpf.h to tools directory tools/bpf: rename *_info_cnt to nr_*_info include/uapi/linux/bpf.h | 6 +-- kernel/bpf/syscall.c | 38 ++++++++-------- tools/bpf/bpftool/prog.c | 48 ++++++++++----------- tools/include/uapi/linux/bpf.h | 6 +-- tools/lib/bpf/bpf_prog_linfo.c | 4 +- tools/testing/selftests/bpf/test_btf.c | 60 +++++++++++++------------- 6 files changed, 81 insertions(+), 81 deletions(-)