Commit 3c3bd4a9 authored by Taku Izumi's avatar Taku Izumi Committed by David S. Miller

fjes: fix incorrect statistics information in fjes_xmit_frame()

There are bugs of acounting statistics in fjes_xmit_frame().
Accounting self stats is wrong. accounting stats of other
EPs to be transmitted  is right.
This patch fixes this bug.
Signed-off-by: default avatarTaku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent da5a2383
...@@ -653,7 +653,7 @@ fjes_xmit_frame(struct sk_buff *skb, struct net_device *netdev) ...@@ -653,7 +653,7 @@ fjes_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
&adapter->hw.ep_shm_info[dest_epid].rx, 0)) { &adapter->hw.ep_shm_info[dest_epid].rx, 0)) {
/* version is NOT 0 */ /* version is NOT 0 */
adapter->stats64.tx_carrier_errors += 1; adapter->stats64.tx_carrier_errors += 1;
hw->ep_shm_info[my_epid].net_stats hw->ep_shm_info[dest_epid].net_stats
.tx_carrier_errors += 1; .tx_carrier_errors += 1;
ret = NETDEV_TX_OK; ret = NETDEV_TX_OK;
...@@ -661,9 +661,9 @@ fjes_xmit_frame(struct sk_buff *skb, struct net_device *netdev) ...@@ -661,9 +661,9 @@ fjes_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
&adapter->hw.ep_shm_info[dest_epid].rx, &adapter->hw.ep_shm_info[dest_epid].rx,
netdev->mtu)) { netdev->mtu)) {
adapter->stats64.tx_dropped += 1; adapter->stats64.tx_dropped += 1;
hw->ep_shm_info[my_epid].net_stats.tx_dropped += 1; hw->ep_shm_info[dest_epid].net_stats.tx_dropped += 1;
adapter->stats64.tx_errors += 1; adapter->stats64.tx_errors += 1;
hw->ep_shm_info[my_epid].net_stats.tx_errors += 1; hw->ep_shm_info[dest_epid].net_stats.tx_errors += 1;
ret = NETDEV_TX_OK; ret = NETDEV_TX_OK;
} else if (vlan && } else if (vlan &&
...@@ -694,10 +694,10 @@ fjes_xmit_frame(struct sk_buff *skb, struct net_device *netdev) ...@@ -694,10 +694,10 @@ fjes_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
(long)adapter->tx_start_jiffies) >= (long)adapter->tx_start_jiffies) >=
FJES_TX_RETRY_TIMEOUT) { FJES_TX_RETRY_TIMEOUT) {
adapter->stats64.tx_fifo_errors += 1; adapter->stats64.tx_fifo_errors += 1;
hw->ep_shm_info[my_epid].net_stats hw->ep_shm_info[dest_epid].net_stats
.tx_fifo_errors += 1; .tx_fifo_errors += 1;
adapter->stats64.tx_errors += 1; adapter->stats64.tx_errors += 1;
hw->ep_shm_info[my_epid].net_stats hw->ep_shm_info[dest_epid].net_stats
.tx_errors += 1; .tx_errors += 1;
ret = NETDEV_TX_OK; ret = NETDEV_TX_OK;
...@@ -714,10 +714,10 @@ fjes_xmit_frame(struct sk_buff *skb, struct net_device *netdev) ...@@ -714,10 +714,10 @@ fjes_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
} else { } else {
if (!is_multi) { if (!is_multi) {
adapter->stats64.tx_packets += 1; adapter->stats64.tx_packets += 1;
hw->ep_shm_info[my_epid].net_stats hw->ep_shm_info[dest_epid].net_stats
.tx_packets += 1; .tx_packets += 1;
adapter->stats64.tx_bytes += len; adapter->stats64.tx_bytes += len;
hw->ep_shm_info[my_epid].net_stats hw->ep_shm_info[dest_epid].net_stats
.tx_bytes += len; .tx_bytes += len;
} }
......
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