Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c9d191c authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller
Browse files

pktgen: avoid calling gettimeofday



If not using delay then no need to update next_tx after
each packet sent. This allows pktgen to send faster especially
on systems with slower clock sources.

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5b8db2f5
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -3450,6 +3450,7 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev)
			pkt_dev->last_ok = 0;
		}

		if (pkt_dev->delay_us || pkt_dev->delay_ns) {
			pkt_dev->next_tx_us = getCurUs();
			pkt_dev->next_tx_ns = 0;

@@ -3461,6 +3462,7 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev)
				pkt_dev->next_tx_ns -= 1000;
			}
		}
	}
	__netif_tx_unlock_bh(txq);

	/* If pkt_dev->count is zero, then run forever */