• Tal Gilboa's avatar
    net/dim: Update DIM start sample after each DIM iteration · 0211dda6
    Tal Gilboa authored
    On every iteration of net_dim, the algorithm may choose to
    check for the system state by comparing current data sample
    with previous data sample. After each of these comparison,
    regardless of the action taken, the sample used as baseline
    is needed to be updated.
    This patch fixes a bug that causes DIM to take wrong decisions,
    due to never updating the baseline sample for comparison between
    iterations. This way, DIM always compares current sample with
    Although this is a functional fix, it also improves and stabilizes
    performance as the algorithm works properly now.
    Tested single UDP TX stream with pktgen:
    samples/pktgen/pktgen_sample03_burst_single_flow.sh -i p4p2 -d
    -m 24:8a:07:88:26:8b -f 3 -b 128
    ConnectX-5 100GbE packet rate improved from 15-19Mpps to 19-20Mpps.
    Also, toggling between profiles is less frequent with the fix.
    Fixes: 8115b750 ("net/dim: use struct net_dim_sample as arg to net_dim")
    Signed-off-by: default avatarTal Gilboa <talgi@mellanox.com>
    Reviewed-by: default avatarTariq Toukan <tariqt@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
net_dim.h 11 KB