File tree Expand file tree Collapse file tree 5 files changed +13
-1
lines changed
Documentation/netlink/specs Expand file tree Collapse file tree 5 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -328,6 +328,13 @@ attribute-sets:
328
328
name : tx-bytes
329
329
doc : Successfully sent bytes, see `tx-packets`.
330
330
type : uint
331
+ -
332
+ name : rx-alloc-fail
333
+ doc : |
334
+ Number of times skb or buffer allocation failed on the Rx datapath.
335
+ Allocation failure may, or may not result in a packet drop, depending
336
+ on driver implementation and whether system recovers quickly.
337
+ type : uint
331
338
332
339
operations :
333
340
list :
Original file line number Diff line number Diff line change 4
4
5
5
#include <linux/netdevice.h>
6
6
7
+ /* See the netdev.yaml spec for definition of each statistic */
7
8
struct netdev_queue_stats_rx {
8
9
u64 bytes ;
9
10
u64 packets ;
11
+ u64 alloc_fail ;
10
12
};
11
13
12
14
struct netdev_queue_stats_tx {
Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ enum {
145
145
NETDEV_A_QSTATS_RX_BYTES ,
146
146
NETDEV_A_QSTATS_TX_PACKETS ,
147
147
NETDEV_A_QSTATS_TX_BYTES ,
148
+ NETDEV_A_QSTATS_RX_ALLOC_FAIL ,
148
149
149
150
__NETDEV_A_QSTATS_MAX ,
150
151
NETDEV_A_QSTATS_MAX = (__NETDEV_A_QSTATS_MAX - 1 )
Original file line number Diff line number Diff line change @@ -488,7 +488,8 @@ static int
488
488
netdev_nl_stats_write_rx (struct sk_buff * rsp , struct netdev_queue_stats_rx * rx )
489
489
{
490
490
if (netdev_stat_put (rsp , NETDEV_A_QSTATS_RX_PACKETS , rx -> packets ) ||
491
- netdev_stat_put (rsp , NETDEV_A_QSTATS_RX_BYTES , rx -> bytes ))
491
+ netdev_stat_put (rsp , NETDEV_A_QSTATS_RX_BYTES , rx -> bytes ) ||
492
+ netdev_stat_put (rsp , NETDEV_A_QSTATS_RX_ALLOC_FAIL , rx -> alloc_fail ))
492
493
return - EMSGSIZE ;
493
494
return 0 ;
494
495
}
Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ enum {
145
145
NETDEV_A_QSTATS_RX_BYTES ,
146
146
NETDEV_A_QSTATS_TX_PACKETS ,
147
147
NETDEV_A_QSTATS_TX_BYTES ,
148
+ NETDEV_A_QSTATS_RX_ALLOC_FAIL ,
148
149
149
150
__NETDEV_A_QSTATS_MAX ,
150
151
NETDEV_A_QSTATS_MAX = (__NETDEV_A_QSTATS_MAX - 1 )
You can’t perform that action at this time.
0 commit comments