diff options
-rw-r--r-- | net/core/pktgen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 5ce017bf4afa..d38470a32792 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -340,6 +340,7 @@ struct pktgen_dev { | |||
340 | __u16 cur_udp_src; | 340 | __u16 cur_udp_src; |
341 | __u16 cur_queue_map; | 341 | __u16 cur_queue_map; |
342 | __u32 cur_pkt_size; | 342 | __u32 cur_pkt_size; |
343 | __u32 last_pkt_size; | ||
343 | 344 | ||
344 | __u8 hh[14]; | 345 | __u8 hh[14]; |
345 | /* = { | 346 | /* = { |
@@ -3434,7 +3435,7 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev) | |||
3434 | pkt_dev->clone_count--; /* back out increment, OOM */ | 3435 | pkt_dev->clone_count--; /* back out increment, OOM */ |
3435 | return; | 3436 | return; |
3436 | } | 3437 | } |
3437 | 3438 | pkt_dev->last_pkt_size = pkt_dev->skb->len; | |
3438 | pkt_dev->allocated_skbs++; | 3439 | pkt_dev->allocated_skbs++; |
3439 | pkt_dev->clone_count = 0; /* reset counter */ | 3440 | pkt_dev->clone_count = 0; /* reset counter */ |
3440 | } | 3441 | } |
@@ -3461,7 +3462,7 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev) | |||
3461 | pkt_dev->last_ok = 1; | 3462 | pkt_dev->last_ok = 1; |
3462 | pkt_dev->sofar++; | 3463 | pkt_dev->sofar++; |
3463 | pkt_dev->seq_num++; | 3464 | pkt_dev->seq_num++; |
3464 | pkt_dev->tx_bytes += pkt_dev->cur_pkt_size; | 3465 | pkt_dev->tx_bytes += pkt_dev->last_pkt_size; |
3465 | break; | 3466 | break; |
3466 | default: /* Drivers are not supposed to return other values! */ | 3467 | default: /* Drivers are not supposed to return other values! */ |
3467 | if (net_ratelimit()) | 3468 | if (net_ratelimit()) |