Skip to contentSkip to conversation

Fix rate computation

PATCH In review Julien Castets 2 participants 2 messages Mar 21, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix rate computation

From: Julien Castets <[email protected]>

---
 app/pktgen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/pktgen.c +1 -1
index e315bff..9a304c0 100644
@@ -110,7 +110,7 @@ pktgen_packet_rate(port_info_t *info)
 	uint64_t cpp = (pps > 0) ? (pktgen.hz / pps) : (pktgen.hz / 4);
 
 	info->tx_pps    = pps;
-	info->tx_cycles = ((cpp * info->tx_burst) / get_port_txcnt(pktgen.l2p, info->pid));
+	info->tx_cycles = ((cpp * info->tx_burst) * get_port_txcnt(pktgen.l2p, info->pid));
 }
 
 /**************************************************************************//**
Signature · 1 line
2.11.0
#1 lore raw
Quoted 15 lines · Julien Castets

From: Julien Castets <[email protected]>

---
app/pktgen.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
app/pktgen.c +0 -0
index e315bff..9a304c0 100644

app/pktgen.c pktgen_packet_rate(port_info_t *info) · line 114

Quoted 6 lines
app/pktgen.c +1 -1
@@ -110,7 +110,7 @@ pktgen_packet_rate(port_info_t *info)
 	uint64_t cpp = (pps > 0) ? (pktgen.hz / pps) : (pktgen.hz / 4);
 
 	info->tx_pps    = pps;
-	info->tx_cycles = ((cpp * info->tx_burst) / get_port_txcnt(pktgen.l2p, info->pid));
+	info->tx_cycles = ((cpp * info->tx_burst) * get_port_txcnt(pktgen.l2p, info->pid));
 }

I have already made the change, thanks for the patch. I assumed it fixed the problem as I have not found an email confirming the fix. Thanks.

Quoted 5 lines
app/pktgen.c +0 -0
 /**************************************************************************//**
Signature · 1 line
2.11.0

Regards,
Keith