Skip to content

Commit

Permalink
netiucv: displayed TX bytes value much too high
Browse files Browse the repository at this point in the history
tx_bytes value must be updated by skb length before skb is freed.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ursula Braun authored and David S. Miller committed Nov 14, 2009
1 parent 0ca8cc6 commit 998221c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/s390/net/netiucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,13 +741,13 @@ static void conn_action_txdone(fsm_instance *fi, int event, void *arg)
if (single_flag) {
if ((skb = skb_dequeue(&conn->commit_queue))) {
atomic_dec(&skb->users);
dev_kfree_skb_any(skb);
if (privptr) {
privptr->stats.tx_packets++;
privptr->stats.tx_bytes +=
(skb->len - NETIUCV_HDRLEN
- NETIUCV_HDRLEN);
- NETIUCV_HDRLEN);
}
dev_kfree_skb_any(skb);
}
}
conn->tx_buff->data = conn->tx_buff->head;
Expand Down

0 comments on commit 998221c

Please sign in to comment.