[dpdk-dev] Fix rate computation
Checks
Commit Message
From: Julien Castets <jcastets@scaleway.com>
Signed-off-by: Julien Castets <jcastets@scaleway.com>
---
app/pktgen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> On Mar 21, 2017, at 4:54 AM, Julien Castets <castets.j@gmail.com> wrote:
>
> From: Julien Castets <jcastets@scaleway.com>
>
> Signed-off-by: Julien Castets <jcastets@scaleway.com>
> ---
> app/pktgen.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/pktgen.c b/app/pktgen.c
> index e315bff..9a304c0 100644
> --- a/app/pktgen.c
> +++ b/app/pktgen.c
> @@ -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.
>
> /**************************************************************************//**
> --
> 2.11.0
>
Regards,
Keith
@@ -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));
}
/**************************************************************************//**