[PATCH] pktgen mac count

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Miller <davem@...>
Cc: <netdev@...>, <eneas.hunguana@...>, <robert@...>
Date: Tuesday, August 5, 2008 - 7:27 am

One more...

dst_mac_count and src_mac_count patch from Eneas Hunguana
We have sent one mac address to much.


Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>

Cheers.
					--ro


--- a/net/core/pktgen.c	2008-06-09 20:27:19.000000000 +0200
+++ b/net/core/pktgen.c	2008-07-06 03:06:00.000000000 +0200
@@ -2143,7 +2143,7 @@
 			mc = random32() % pkt_dev->src_mac_count;
 		else {
 			mc = pkt_dev->cur_src_mac_offset++;
-			if (pkt_dev->cur_src_mac_offset >
+			if (pkt_dev->cur_src_mac_offset >=
 			    pkt_dev->src_mac_count)
 				pkt_dev->cur_src_mac_offset = 0;
 		}
@@ -2170,7 +2170,7 @@
 
 		else {
 			mc = pkt_dev->cur_dst_mac_offset++;
-			if (pkt_dev->cur_dst_mac_offset >
+			if (pkt_dev->cur_dst_mac_offset >=
 			    pkt_dev->dst_mac_count) {
 				pkt_dev->cur_dst_mac_offset = 0;
 			}

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] pktgen mac count, Robert Olsson, (Tue Aug 5, 7:27 am)
Re: [PATCH] pktgen mac count, David Miller, (Tue Aug 5, 9:45 pm)