Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1748570pxy; Fri, 23 Apr 2021 16:22:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGO9goZ9cB+jOAY2r0ENs8veSXY/1/4/XDDrIqLhr2vxmB+SCtnOLp0m8Kf6biAXdp5Sn4 X-Received: by 2002:aa7:cd83:: with SMTP id x3mr7113092edv.373.1619220126411; Fri, 23 Apr 2021 16:22:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619220126; cv=none; d=google.com; s=arc-20160816; b=VuhSATD3BeJhvhpW1/4o4xxydJKT9yKT2SJU/rBL2cweU8rS52VBc8mBaQFVmCCMjh 5+wM/U7ilUSdJl8qYwWASyujRsW18RVbCwpkYxJUDR0NeqvYznvL3INhXrDr3LeWplYV VGZ5R5ewq5dPAxLqYXjn3gnrCdNMyOGsnTb71UE22CKQCWEDPHB0zSqQoFI89rl/OYQE BwEaxG661ekgadttYYRqsXFmeaq/0QWzsDjLGOg7hOMvuzAGFsKesiCKFka7GYknx5vR bsV+pbRp3O5CLAZCVfuZ89qg4NmrNkrqmobKWa8W3TCU+KcqkRq24sOfMVHVBNTglQ0W ubXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=UN8lYvlKUzpGJek5kJqkHzoy2ZYGZ4aTnHDgEtVTayM=; b=GW4zRC3BqInf9Kj633jt5zBlxDxD58RZSa9q0XfApbSNv3veRXTFzjqDNC+K36phUp oX49owK/cy1oKxgXTVdcx4ndPrwmtKDRzTUxib7s1MhfBY5XZs1GQETvCR2j9HrTyWA3 emUlxHCZ07DjEzaOKnBwcwFQh+gvHk6Bc+t8E241Zm5kSVs+0cY98Qr8wREw9cj2zP/v F58e9Ag4JKeN9ERY0LNjcnVG6+J+5+7JLj97zgQoXwkgqTUixOd/Xn1Ntct8AGfOqCPs 1yVdD5wXIaTEtRZmbhp4ffw4aHq9F36luJ6sTYpXsVENZejprdtLC/uK6VGKo0yatjTF RqMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rXLBPSZR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x9si6652769ejv.362.2021.04.23.16.21.41; Fri, 23 Apr 2021 16:22:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rXLBPSZR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232614AbhDWXVS (ORCPT + 99 others); Fri, 23 Apr 2021 19:21:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbhDWXVR (ORCPT ); Fri, 23 Apr 2021 19:21:17 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE6DCC061574; Fri, 23 Apr 2021 16:20:39 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id j18so79852545lfg.5; Fri, 23 Apr 2021 16:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UN8lYvlKUzpGJek5kJqkHzoy2ZYGZ4aTnHDgEtVTayM=; b=rXLBPSZRXvl9Kk1/3AHQhPGnzostRWdh7HABhjmDlzUjX5udG44hCk4MbfdqX6uPo2 PYscHCDO/+sKSfGbM3avr5mRCZ8WFBtc0Z0ATCPn8G5TEh4064n8BMNFA0jqdzRh13ZW MSrd2sQqufJEjs+TDdMZp0JEmf22YhON4qfyM1bdBERhMfSG2nohLxSfiA/FhRGoGgpI Y2gNuaoWFKlfrN2qWez9hVRTkkq6VSvAJsTC/CClt5C5RJ5oBZLrpzVhQHI+C5Du3zFy OjlmKnvvorzJxwvCQPL3NMzAHCr3Zwn9qBRtpQ0x23aIZpGutKqDVO6Mj2LNl12cTc6P aF3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UN8lYvlKUzpGJek5kJqkHzoy2ZYGZ4aTnHDgEtVTayM=; b=dbfrpZREn/OmbB1PknOVapvU8938Ec+if4H54e/FOmkJflhDPw+tQfTAwvfoylCcLK wXOVcNbAOHrlJiGNFG6W0GnV7J+JMU5NGwgR/X9DBwp8xclDgkXGGBK/YhikTWxs0QqC TshrBJteas81/uwDNoTe6/vtqzHIcPMkLqgMga2sGasTSS5dQMvQtpSHAbTW0QfRHbpO EHjdkkEIcbROJD5MJWbESw5rsoero+0Sj9pwJsPvTW6j6yY6lhUiF3BcyrY2CynjqCLE U3loZg9K3drksgwDorjzRYg9EYZOq7mcQFp3wlUBHOXxcwJucoTMuajr4InUnJsf+E/2 fhHg== X-Gm-Message-State: AOAM530XTSLAe3qqL/Z5NOU6aFfgdJr4JStspTI7mAZZQAUZqwPz6rpw guKxBlN2qYCEiijQAANHYZAOulrT9XK/di6GnUtdH/YX X-Received: by 2002:a19:f615:: with SMTP id x21mr4550232lfe.540.1619220037606; Fri, 23 Apr 2021 16:20:37 -0700 (PDT) MIME-Version: 1.0 References: <20210423230609.13519-1-alx.manpages@gmail.com> In-Reply-To: <20210423230609.13519-1-alx.manpages@gmail.com> From: Alexei Starovoitov Date: Fri, 23 Apr 2021 16:20:26 -0700 Message-ID: Subject: Re: [RFC] bpf.2: Use standard types and attributes To: Alejandro Colomar , bpf Cc: "Michael Kerrisk (man-pages)" , linux-man , LKML , libc-alpha@sourceware.org, gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 23, 2021 at 4:15 PM Alejandro Colomar wrote: > > Some manual pages are already using C99 syntax for integral > types 'uint32_t', but some aren't. There are some using kernel > syntax '__u32'. Fix those. > > Some pages also document attributes, using GNU syntax > '__attribute__((xxx))'. Update those to use the shorter and more > portable C2x syntax, which hasn't been standardized yet, but is > already implemented in GCC, and available through either --std=c2x > or any of the --std=gnu... options. > > Signed-off-by: Alejandro Colomar > --- > man2/bpf.2 | 47 +++++++++++++++++++++++------------------------ > 1 file changed, 23 insertions(+), 24 deletions(-) > > diff --git a/man2/bpf.2 b/man2/bpf.2 > index 6e1ffa198..204f01bfc 100644 > --- a/man2/bpf.2 > +++ b/man2/bpf.2 > @@ -188,39 +188,38 @@ commands: > .EX > union bpf_attr { > struct { /* Used by BPF_MAP_CREATE */ > - __u32 map_type; > - __u32 key_size; /* size of key in bytes */ > - __u32 value_size; /* size of value in bytes */ > - __u32 max_entries; /* maximum number of entries > - in a map */ > + uint32_t map_type; > + uint32_t key_size; /* size of key in bytes */ > + uint32_t value_size; /* size of value in bytes */ > + uint32_t max_entries; /* maximum number of entries > + in a map */ Nack. The man page should describe the kernel api the way it is in .h file.