mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
pktgen: mac count
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>
This commit is contained in:
parent
1211a64554
commit
ff2a79a5a9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user