[dpdk-dev] [PATCH] eal/reciprocal: fix off by one when divisor is 32bit

David Marchand david.marchand at redhat.com
Sat Oct 26 16:33:20 CEST 2019


On Tue, Sep 3, 2019 at 9:17 PM <pbhagavatula at marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula at marvell.com>
>
> Fix off by one error in 64bit reciprocal division when divisor is 32bit.

Added log from unit test:

    RTE>>reciprocal_division
    Validating unsigned 32bit division.
    Validating unsigned 64bit division.
    Validating unsigned 64bit division with 32bit divisor.
    Division failed, 16983222950483802557/819 = expected 20736535959076681
    result 20736535959076682
    Validating division by power of 2.
    Test Failed

>
> Fixes: 6d45659eacb8 ("eal: add u64-bit variant for reciprocal divide")
> Cc: stable at dpdk.org
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>

Please continue working on enhancing the functional test so that it
can be part of the standard unit test list.
Thanks.


-- 
David Marchand


More information about the dev mailing list