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 @@ -497,7 +497,8 @@ static int
497
497
netdev_nl_stats_write_rx (struct sk_buff * rsp , struct netdev_queue_stats_rx * rx )
498
498
{
499
499
if (netdev_stat_put (rsp , NETDEV_A_QSTATS_RX_PACKETS , rx -> packets ) ||
500
- netdev_stat_put (rsp , NETDEV_A_QSTATS_RX_BYTES , rx -> bytes ))
500
+ netdev_stat_put (rsp , NETDEV_A_QSTATS_RX_BYTES , rx -> bytes ) ||
501
+ netdev_stat_put (rsp , NETDEV_A_QSTATS_RX_ALLOC_FAIL , rx -> alloc_fail ))
501
502
return - EMSGSIZE ;
502
503
return 0 ;
503
504
}
Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ enum {
148
148
NETDEV_A_QSTATS_RX_BYTES ,
149
149
NETDEV_A_QSTATS_TX_PACKETS ,
150
150
NETDEV_A_QSTATS_TX_BYTES ,
151
+ NETDEV_A_QSTATS_RX_ALLOC_FAIL ,
151
152
152
153
__NETDEV_A_QSTATS_MAX ,
153
154
NETDEV_A_QSTATS_MAX = (__NETDEV_A_QSTATS_MAX - 1 )
You can’t perform that action at this time.
0 commit comments