lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210527103745.5005b5df@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Thu, 27 May 2021 10:37:45 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Huazhong Tan <tanhuazhong@...wei.com>
Cc:     <davem@...emloft.net>, <netdev@...r.kernel.org>,
        <salil.mehta@...wei.com>, <yisen.zhuang@...wei.com>,
        <huangdaode@...wei.com>, <linuxarm@...wei.com>,
        <dledford@...hat.com>, <jgg@...pe.ca>, <netanel@...zon.com>,
        <akiyano@...zon.com>, <thomas.lendacky@....com>,
        <irusskikh@...vell.com>, <michael.chan@...adcom.com>,
        <edwin.peer@...adcom.com>, <rohitm@...lsio.com>,
        <jesse.brandeburg@...el.com>, <jacob.e.keller@...el.com>,
        <ioana.ciornei@....com>, <vladimir.oltean@....com>,
        <sgoutham@...vell.com>, <sbhatta@...vell.com>, <saeedm@...dia.com>,
        <ecree.xilinx@...il.com>, <grygorii.strashko@...com>,
        <merez@...eaurora.org>, <kvalo@...eaurora.org>,
        <linux-wireless@...r.kernel.org>
Subject: Re: [RFC net-next 2/4] ethtool: extend coalesce setting uAPI with
 CQE mode

On Thu, 27 May 2021 10:00:44 +0800 Huazhong Tan wrote:
> >> @@ -179,6 +179,8 @@ __ethtool_get_link_ksettings(struct net_device *dev,
> >>   
> >>   struct kernel_ethtool_coalesce {
> >>   	struct ethtool_coalesce	base;
> >> +	__u32	use_cqe_mode_tx;
> >> +	__u32	use_cqe_mode_rx;  
> > No __ in front, this is not a user space structure.
> > Why not bool or a bitfield?  
> 
> bool is enough, __u32 is used here to be consistent with
> 
> fields in struct ethtool_coalesce.
> 
> This seems unnecessary?

Yup, I think the IOCTL made everything a __u32 for uniformity 
of the uAPI and to avoid holes and paddings. This is an internal 
kernel structure so natural types like bool are better.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ