public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pktgen: correct uninitialized queue_map
@ 2010-11-08  9:19 Junchang Wang
  2010-11-08 20:19 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Junchang Wang @ 2010-11-08  9:19 UTC (permalink / raw)
  To: davem, robert.olsson, eric.dumazet, joe, andy.shevchenko, backyes; +Cc: netdev


This fix a bug reported by backyes.
Right the first time pktgen's using queue_map that's not been initialized
by set_cur_queue_map(pkt_dev);

Signed-off-by: Junchang Wang <junchangwang@gmail.com>
Signed-off-by: Backyes <backyes@mail.ustc.edu.cn>
---

 net/core/pktgen.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 2c0df0f..564d9ba 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2611,8 +2611,8 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev,
 	/* Update any of the values, used when we're incrementing various
 	 * fields.
 	 */
-	queue_map = pkt_dev->cur_queue_map;
 	mod_cur_headers(pkt_dev);
+	queue_map = pkt_dev->cur_queue_map;
 
 	datalen = (odev->hard_header_len + 16) & ~0xf;
 
@@ -2975,8 +2975,8 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,
 	/* Update any of the values, used when we're incrementing various
 	 * fields.
 	 */
-	queue_map = pkt_dev->cur_queue_map;
 	mod_cur_headers(pkt_dev);
+	queue_map = pkt_dev->cur_queue_map;
 
 	skb = __netdev_alloc_skb(odev,
 				 pkt_dev->cur_pkt_size + 64
--

--Junchang

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] pktgen: correct uninitialized queue_map
  2010-11-08  9:19 [PATCH] pktgen: correct uninitialized queue_map Junchang Wang
@ 2010-11-08 20:19 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-11-08 20:19 UTC (permalink / raw)
  To: junchangwang
  Cc: robert.olsson, eric.dumazet, joe, andy.shevchenko, backyes,
	netdev

From: Junchang Wang <junchangwang@gmail.com>
Date: Mon, 8 Nov 2010 17:19:43 +0800

> 
> This fix a bug reported by backyes.
> Right the first time pktgen's using queue_map that's not been initialized
> by set_cur_queue_map(pkt_dev);
> 
> Signed-off-by: Junchang Wang <junchangwang@gmail.com>
> Signed-off-by: Backyes <backyes@mail.ustc.edu.cn>

Applied, thank you.

I think I added this bug :-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-08 20:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-08  9:19 [PATCH] pktgen: correct uninitialized queue_map Junchang Wang
2010-11-08 20:19 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox