Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: hsr: add tx stats for master interface

Add tx stats to hsr interface. Without this
ifconfig for hsr interface doesn't show tx packet stats.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Murali Karicheri and committed by
David S. Miller
ee2c46f3 32712733

+7
+7
net/hsr/hsr_forward.c
··· 359 359 goto out_drop; 360 360 hsr_register_frame_in(frame.node_src, port, frame.sequence_nr); 361 361 hsr_forward_do(&frame); 362 + /* Gets called for ingress frames as well as egress from master port. 363 + * So check and increment stats for master port only here. 364 + */ 365 + if (port->type == HSR_PT_MASTER) { 366 + port->dev->stats.tx_packets++; 367 + port->dev->stats.tx_bytes += skb->len; 368 + } 362 369 363 370 if (frame.skb_hsr) 364 371 kfree_skb(frame.skb_hsr);