]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
pktgen: mac count
authorRobert Olsson <robert.olsson@its.uu.se>
Wed, 6 Aug 2008 01:45:05 +0000 (18:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Aug 2008 01:45:05 +0000 (18:45 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/pktgen.c

index 9c87320fdf3f3c04239f9871348f20398f984b2b..2498cdaf8cbe9d8e7511c29e8d8cee121fe51d40 100644 (file)
@@ -2166,7 +2166,7 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev)
                        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;
                }
@@ -2193,7 +2193,7 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev)
 
                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;
                        }