2017-05-12 20:14:02 +08:00
|
|
|
Linux Networking Documentation
|
|
|
|
==============================
|
|
|
|
|
|
|
|
Contents:
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 2
|
|
|
|
|
2018-07-26 13:02:25 +08:00
|
|
|
netdev-FAQ
|
2018-05-02 19:01:36 +08:00
|
|
|
af_xdp
|
2020-02-24 13:27:50 +08:00
|
|
|
bareudp
|
2017-07-12 19:14:48 +08:00
|
|
|
batman-adv
|
2018-01-24 18:19:11 +08:00
|
|
|
can
|
2018-04-12 00:06:42 +08:00
|
|
|
can_ucan_protocol
|
2019-05-22 09:57:12 +08:00
|
|
|
device_drivers/index
|
2019-04-12 19:55:18 +08:00
|
|
|
dsa/index
|
2020-01-10 06:46:10 +08:00
|
|
|
devlink/index
|
2020-04-28 06:01:16 +08:00
|
|
|
caif/index
|
2019-12-27 22:55:18 +08:00
|
|
|
ethtool-netlink
|
2019-02-28 03:59:13 +08:00
|
|
|
ieee802154
|
2018-10-08 17:48:36 +08:00
|
|
|
j1939
|
2017-05-12 20:14:02 +08:00
|
|
|
kapi
|
2018-01-08 14:50:17 +08:00
|
|
|
msg_zerocopy
|
2018-07-12 05:42:49 +08:00
|
|
|
failover
|
2020-04-10 05:21:58 +08:00
|
|
|
net_dim
|
2018-07-12 05:42:49 +08:00
|
|
|
net_failover
|
2020-05-01 22:44:58 +08:00
|
|
|
page_pool
|
2019-01-26 18:25:37 +08:00
|
|
|
phy
|
2019-02-22 19:31:46 +08:00
|
|
|
sfp-phylink
|
2018-07-18 11:27:35 +08:00
|
|
|
alias
|
2018-07-18 11:27:36 +08:00
|
|
|
bridge
|
2018-11-11 05:38:12 +08:00
|
|
|
snmp_counter
|
2019-01-06 07:29:41 +08:00
|
|
|
checksum-offloads
|
|
|
|
segmentation-offloads
|
2019-01-19 04:38:32 +08:00
|
|
|
scaling
|
2019-05-22 09:57:13 +08:00
|
|
|
tls
|
2019-05-22 09:57:14 +08:00
|
|
|
tls-offload
|
2019-11-22 15:43:06 +08:00
|
|
|
nfc
|
2020-02-06 23:17:22 +08:00
|
|
|
6lowpan
|
2020-04-28 06:01:17 +08:00
|
|
|
6pack
|
2020-04-28 06:01:19 +08:00
|
|
|
arcnet-hardware
|
2020-04-28 06:01:20 +08:00
|
|
|
arcnet
|
2020-04-28 06:01:21 +08:00
|
|
|
atm
|
2020-04-28 06:01:22 +08:00
|
|
|
ax25
|
2020-04-28 06:01:24 +08:00
|
|
|
bonding
|
2020-04-28 06:01:25 +08:00
|
|
|
cdc_mbim
|
2020-04-28 06:01:28 +08:00
|
|
|
dccp
|
2020-04-28 06:01:29 +08:00
|
|
|
dctcp
|
2020-04-28 06:01:30 +08:00
|
|
|
decnet
|
2020-04-28 06:01:32 +08:00
|
|
|
dns_resolver
|
2020-04-28 06:01:33 +08:00
|
|
|
driver
|
2020-04-28 06:01:34 +08:00
|
|
|
eql
|
2020-04-28 06:01:35 +08:00
|
|
|
fib_trie
|
2020-04-28 06:01:36 +08:00
|
|
|
filter
|
2020-04-28 06:01:39 +08:00
|
|
|
generic-hdlc
|
2020-04-28 06:01:40 +08:00
|
|
|
generic_netlink
|
2020-04-28 06:01:41 +08:00
|
|
|
gen_stats
|
2020-04-28 06:01:42 +08:00
|
|
|
gtp
|
2020-04-28 06:01:44 +08:00
|
|
|
ila
|
2020-04-28 06:01:45 +08:00
|
|
|
ipddp
|
2020-04-28 06:01:46 +08:00
|
|
|
ip_dynaddr
|
2020-04-28 06:01:48 +08:00
|
|
|
ipsec
|
2020-04-28 06:01:49 +08:00
|
|
|
ip-sysctl
|
2020-04-28 06:01:50 +08:00
|
|
|
ipv6
|
2020-04-28 06:01:51 +08:00
|
|
|
ipvlan
|
2020-04-28 06:01:52 +08:00
|
|
|
ipvs-sysctl
|
2020-04-28 06:01:53 +08:00
|
|
|
kcm
|
2020-05-01 00:03:56 +08:00
|
|
|
l2tp
|
2020-05-01 00:03:57 +08:00
|
|
|
lapb-module
|
2020-05-01 00:03:59 +08:00
|
|
|
mac80211-injection
|
2020-05-01 00:04:00 +08:00
|
|
|
mpls-sysctl
|
2020-11-04 03:05:08 +08:00
|
|
|
mptcp-sysctl
|
2020-05-01 00:04:01 +08:00
|
|
|
multiqueue
|
2020-05-01 00:04:02 +08:00
|
|
|
netconsole
|
2020-05-01 00:04:03 +08:00
|
|
|
netdev-features
|
2020-05-01 00:04:04 +08:00
|
|
|
netdevices
|
2020-05-01 00:04:05 +08:00
|
|
|
netfilter-sysctl
|
2020-05-01 00:04:06 +08:00
|
|
|
netif-msg
|
2021-03-29 23:57:31 +08:00
|
|
|
nexthop-group-resilient
|
2020-05-01 00:04:07 +08:00
|
|
|
nf_conntrack-sysctl
|
2020-05-01 00:04:08 +08:00
|
|
|
nf_flowtable
|
2020-05-01 00:04:09 +08:00
|
|
|
openvswitch
|
2020-05-01 00:04:10 +08:00
|
|
|
operstates
|
2020-05-01 00:04:11 +08:00
|
|
|
packet_mmap
|
2020-05-01 00:04:12 +08:00
|
|
|
phonet
|
2020-05-01 00:04:13 +08:00
|
|
|
pktgen
|
2020-05-01 00:04:14 +08:00
|
|
|
plip
|
2020-05-01 00:04:15 +08:00
|
|
|
ppp_generic
|
2020-05-01 00:04:16 +08:00
|
|
|
proc_net_tcp
|
2020-05-01 00:04:17 +08:00
|
|
|
radiotap-headers
|
2020-05-01 00:04:19 +08:00
|
|
|
rds
|
2020-05-01 00:04:20 +08:00
|
|
|
regulatory
|
2020-05-01 00:04:21 +08:00
|
|
|
rxrpc
|
2020-05-01 00:04:22 +08:00
|
|
|
sctp
|
2020-05-01 00:04:23 +08:00
|
|
|
secid
|
2020-05-01 00:04:24 +08:00
|
|
|
seg6-sysctl
|
net: tighten the definition of interface statistics
This patch is born out of an investigation into which IEEE statistics
correspond to which struct rtnl_link_stats64 members. Turns out that
there seems to be reasonable consensus on the matter, among many drivers.
To save others the time (and it took more time than I'm comfortable
admitting) I'm adding comments referring to IEEE attributes to
struct rtnl_link_stats64.
Up until now we had two forms of documentation for stats - in
Documentation/ABI/testing/sysfs-class-net-statistics and the comments
on struct rtnl_link_stats64 itself. While the former is very cautious
in defining the expected behavior, the latter feel quite dated and
may not be easy to understand for modern day driver author
(e.g. rx_over_errors). At the same time modern systems are far more
complex and once obvious definitions lost their clarity. For example
- does rx_packet count at the MAC layer (aFramesReceivedOK)?
packets processed correctly by hardware? received by the driver?
or maybe received by the stack?
I tried to clarify the expectations, further clarifications from
others are very welcome.
The part hardest to untangle is rx_over_errors vs rx_fifo_errors
vs rx_missed_errors. After much deliberation I concluded that for
modern HW only two of the counters will make sense. The distinction
between internal FIFO overflow and packets dropped due to back-pressure
from the host is likely too implementation (driver and device) specific
to expose in the standard stats.
Now - which two of those counters we select to use is anyone's pick:
sysfs documentation suggests rx_over_errors counts packets which
did not fit into buffers due to MTU being too small, which I reused.
There don't seem to be many modern drivers using it (well, CAN drivers
seem to love this statistic).
Of the remaining two I picked rx_missed_errors to report device drops.
bnxt reports it and it's folded into "drop"s in procfs (while
rx_fifo_errors is an error, and modern devices usually receive the frame
OK, they just can't admit it into the pipeline).
Of the drivers I looked at only AMD Lance-like and NS8390-like use all
three of these counters. rx_missed_errors counts missed frames,
rx_over_errors counts overflow events, and rx_fifo_errors counts frames
which were truncated because they didn't fit into buffers. This suggests
that rx_fifo_errors may be the correct stat for truncated packets, but
I'd think a FIFO stat counting truncated packets would be very confusing
to a modern reader.
v2:
- add driver developer notes about ethtool stat count and reset
- replace Ethernet with IEEE 802.3 to better indicate source of attrs
- mention byte counters don't count FCS
- clarify RX counter is from device to host
- drop "sightly" from sysfs paragraph
- add examples of ethtool stats
- s/incoming/received/ s/incoming/transmitted/
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-09-04 07:14:31 +08:00
|
|
|
statistics
|
2020-05-01 00:04:26 +08:00
|
|
|
strparser
|
2020-05-01 00:04:27 +08:00
|
|
|
switchdev
|
2020-10-09 15:01:28 +08:00
|
|
|
sysfs-tagging
|
2020-05-01 00:04:28 +08:00
|
|
|
tc-actions-env-rules
|
2020-05-01 00:04:29 +08:00
|
|
|
tcp-thin
|
2020-05-01 00:04:30 +08:00
|
|
|
team
|
2020-05-01 00:04:31 +08:00
|
|
|
timestamping
|
2020-11-30 02:32:51 +08:00
|
|
|
tipc
|
2020-05-01 00:04:32 +08:00
|
|
|
tproxy
|
2020-05-01 22:44:23 +08:00
|
|
|
tuntap
|
2020-05-01 22:44:24 +08:00
|
|
|
udplite
|
2020-05-01 22:44:25 +08:00
|
|
|
vrf
|
2020-05-01 22:44:26 +08:00
|
|
|
vxlan
|
2020-05-01 22:44:27 +08:00
|
|
|
x25-iface
|
2020-05-01 22:44:28 +08:00
|
|
|
x25
|
2020-05-01 22:44:29 +08:00
|
|
|
xfrm_device
|
2020-05-01 22:44:30 +08:00
|
|
|
xfrm_proc
|
2020-05-01 22:44:31 +08:00
|
|
|
xfrm_sync
|
2020-05-01 22:44:32 +08:00
|
|
|
xfrm_sysctl
|
2017-05-12 20:14:02 +08:00
|
|
|
|
2019-07-26 20:51:29 +08:00
|
|
|
.. only:: subproject and html
|
2017-05-12 20:14:02 +08:00
|
|
|
|
|
|
|
Indices
|
|
|
|
=======
|
|
|
|
|
|
|
|
* :ref:`genindex`
|