android_kernel_xiaomi_sm8350/include/net
Eric Dumazet d250a5f90e pkt_sched: gen_estimator: Dont report fake rate estimators
Jarek Poplawski a écrit :
>
>
> Hmm... So you made me to do some "real" work here, and guess what?:
> there is one serious checkpatch warning! ;-) Plus, this new parameter
> should be added to the function description. Otherwise:
> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
>
> Thanks,
> Jarek P.
>
> PS: I guess full "Don't" would show we really mean it...

Okay :) Here is the last round, before the night !

Thanks again

[RFC] pkt_sched: gen_estimator: Don't report fake rate estimators

We currently send TCA_STATS_RATE_EST elements to netlink users, even if no estimator
is running.

# tc -s -d qdisc
qdisc pfifo_fast 0: dev eth0 root bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
 Sent 112833764978 bytes 1495081739 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0

User has no way to tell if the "rate 0bit 0pps" is a real estimation, or a fake
one (because no estimator is active)

After this patch, tc command output is :
$ tc -s -d qdisc
qdisc pfifo_fast 0: dev eth0 root bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
 Sent 561075 bytes 1196 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0

We add a parameter to gnet_stats_copy_rate_est() function so that
it can use gen_estimator_active(bstats, r), as suggested by Jarek.

This parameter can be NULL if check is not necessary, (htb for
example has a mandatory rate estimator)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 01:07:42 -07:00
..
9p 9p: Add fscache support to 9p 2009-09-23 13:03:46 -05:00
bluetooth Bluetooth: Handle L2CAP case when the remote receiver is busy 2009-08-26 00:12:20 -07:00
irda net: mark read-only arrays as const 2009-08-05 10:42:58 -07:00
iucv
netfilter Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6 2009-09-10 18:17:09 -07:00
netns netns: embed ip6_dst_ops directly 2009-09-01 17:40:31 -07:00
phonet Phonet: sockets list through proc_fs 2009-07-23 17:58:19 -07:00
sctp net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
tc_act
tipc
act_api.h net: restore gnet_stats_basic to previous definition 2009-08-17 21:33:49 -07:00
addrconf.h bonding: remap muticast addresses without using dev_close() and dev_open() 2009-09-15 02:37:40 -07:00
af_ieee802154.h af_ieee802154: add support for WANT_ACK socket option 2009-08-12 21:54:50 -07:00
af_rxrpc.h
af_unix.h
ah.h
arp.h net: make neigh_ops constant 2009-09-01 17:40:57 -07:00
atmclip.h
ax25.h
ax88796.h
cfg80211.h cfg80211: fix dangling scan request checking 2009-08-20 11:36:05 -04:00
checksum.h
cipso_ipv4.h
compat.h net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
datalink.h
dcbnl.h dcbnl: Add support for setapp/getapp to netdev dcbnl_rtnl_ops 2009-09-01 01:24:30 -07:00
dn_dev.h
dn_fib.h
dn_neigh.h
dn_nsp.h
dn_route.h
dn.h
dsa.h
dsfield.h
dst_ops.h netns: embed ip6_dst_ops directly 2009-09-01 17:40:31 -07:00
dst.h netns: embed ip6_dst_ops directly 2009-09-01 17:40:31 -07:00
esp.h
ethoc.h
fib_rules.h
flow.h
garp.h
gen_stats.h pkt_sched: gen_estimator: Dont report fake rate estimators 2009-10-07 01:07:42 -07:00
genetlink.h
icmp.h
ieee80211_radiotap.h
ieee802154_netdev.h ieee802154: add support for channel pages from IEEE 802.15.4-2006 2009-08-19 23:08:22 +04:00
ieee802154.h ieee802154: move headers out of extra directory 2009-07-23 17:08:51 +04:00
if_inet6.h
inet6_connection_sock.h
inet6_hashtables.h
inet_common.h
inet_connection_sock.h net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
inet_ecn.h
inet_frag.h
inet_hashtables.h
inet_sock.h
inet_timewait_sock.h
inetpeer.h
ip6_checksum.h
ip6_fib.h xfrm: select sane defaults for xfrm[4|6] gc_thresh 2009-07-30 18:52:15 -07:00
ip6_route.h
ip6_tunnel.h
ip_fib.h ipv4: fib table algorithm performance improvement 2009-10-05 00:21:56 -07:00
ip_vs.h net: mark read-only arrays as const 2009-08-05 10:42:58 -07:00
ip.h net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
ipcomp.h
ipconfig.h
ipip.h ipv6 sit: 6rd (IPv6 Rapid Deployment) Support. 2009-10-07 01:07:37 -07:00
ipv6.h net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
ipx.h
iw_handler.h libipw: switch from ieee80211_* to libipw_* naming policy 2009-08-28 14:40:28 -04:00
lapb.h
lib80211.h
llc_c_ac.h
llc_c_ev.h
llc_c_st.h
llc_conn.h
llc_if.h
llc_pdu.h
llc_s_ac.h
llc_s_ev.h
llc_s_st.h
llc_sap.h
llc.h
mac80211.h mac80211: remove ieee80211_rx namespace hack 2009-08-28 14:40:29 -04:00
mip6.h
ndisc.h sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
neighbour.h net: make neigh_ops constant 2009-09-01 17:40:57 -07:00
net_namespace.h net: explain netns notifiers a little better 2009-07-20 08:03:00 -07:00
netdma.h
netevent.h
netlabel.h
netlink.h netlink: constify nlmsghdr arguments 2009-08-25 16:07:40 +02:00
netrom.h
nexthop.h
nl802154.h ieee802154: add support for channel pages from IEEE 802.15.4-2006 2009-08-19 23:08:22 +04:00
p8022.h
pkt_cls.h
pkt_sched.h pkt_sched: Revert tasklet_hrtimer changes. 2009-09-01 17:59:25 -07:00
protocol.h net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
psnap.h
raw.h
rawv6.h
red.h
regulatory.h
request_sock.h
rose.h NET: ROSE: Don't use static buffer. 2009-07-26 19:11:14 -07:00
route.h
rtnetlink.h Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6 2009-09-10 18:17:09 -07:00
sch_generic.h pkt_sched: Fix tx queue selection in tc_modify_qdisc 2009-09-15 02:53:07 -07:00
scm.h
slhc_vj.h
snmp.h
sock.h net: speedup sk_wake_async() 2009-10-06 17:28:29 -07:00
stp.h
tcp_states.h
tcp.h net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
timewait_sock.h
transp_v6.h inet: inet_connection_sock_af_ops const 2009-09-02 01:03:49 -07:00
udp.h net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
udplite.h
wext.h wext: add back wireless/ dir in sysfs for cfg80211 interfaces 2009-09-28 16:55:07 -04:00
wimax.h
wpan-phy.h ieee802154: add a sysfs representation of WPAN master devices 2009-08-19 23:08:20 +04:00
x25.h
x25device.h
xfrm.h xfrm: select sane defaults for xfrm[4|6] gc_thresh 2009-07-30 18:52:15 -07:00