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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160225.112638.939367642956951530.davem@davemloft.net>
Date:	Thu, 25 Feb 2016 11:26:38 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	roopa@...ulusnetworks.com
Cc:	netdev@...r.kernel.org, jhs@...atatu.com
Subject: Re: [PATCH net-next RFC] rtnetlink: add new RTM_GETSTATS to dump
 link stats

From: roopa <roopa@...ulusnetworks.com>
Date: Wed, 24 Feb 2016 21:25:50 -0800

> I did go back and forth on the attribute vs mask.
> cosmetic but, i guess i did not feel good about having to redefine every attribute again
> for the bitmap filter ...and i anticipate the list of stat attributes to grow overtime (maybe there is a better way).
> enum {
>        IFLA_LINK_STATS64,
>        IFLA_LINK_INET6_STATS,
>        IFLA_LINK_MPLS_STATS,
>        __IFLA_LINK_STATS_MAX,
> };
> 
> #define IFLA_LINK_STATS64_FILTER  0    
> #define IFLA_LINK_INET6_STATS_FILTER (1 << 0)
> #define IFLA_LINK_MPLS_STATS_FILTER (2 << 0)

The filter for X is always (1 << X), so we could work with something like:

#define IFLA_LINK_FILTER_BIT(ATTR)	(1 << (ATTR))

Which seems to suggest that emitting no stats unless they are explicitly requested in
the bitmask makes sense because:

1) You don't have to special case STATS64 in the filter mask

2) Application are forced to be aware of filtering and thus choose only
   what they want to see

How about this?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ