Commit ee2c46f3 authored by Murali Karicheri's avatar Murali Karicheri Committed by David S. Miller

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: default avatarMurali Karicheri <m-karicheri2@ti.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 32712733
...@@ -359,6 +359,13 @@ void hsr_forward_skb(struct sk_buff *skb, struct hsr_port *port) ...@@ -359,6 +359,13 @@ void hsr_forward_skb(struct sk_buff *skb, struct hsr_port *port)
goto out_drop; goto out_drop;
hsr_register_frame_in(frame.node_src, port, frame.sequence_nr); hsr_register_frame_in(frame.node_src, port, frame.sequence_nr);
hsr_forward_do(&frame); hsr_forward_do(&frame);
/* Gets called for ingress frames as well as egress from master port.
* So check and increment stats for master port only here.
*/
if (port->type == HSR_PT_MASTER) {
port->dev->stats.tx_packets++;
port->dev->stats.tx_bytes += skb->len;
}
if (frame.skb_hsr) if (frame.skb_hsr)
kfree_skb(frame.skb_hsr); kfree_skb(frame.skb_hsr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment