[PATCH v9] net/bnx2x: fix warnings about rte_memcpy lengths

Jerin Jacob jerinjacobk at gmail.com
Mon Feb 26 09:34:04 CET 2024


On Fri, Feb 23, 2024 at 7:30 PM Morten Brørup <mb at smartsharesystems.com> wrote:
>
> Bugfix: The vlan in the bulletin does not contain a VLAN header, only the
> VLAN ID, so only copy 2 byte, not 4. The target structure has padding
> after the field, so copying 2 byte too many is effectively harmless.
> There is no need to backport this patch.
>
> Use RTE_PTR_ADD where copying arrays to the offset of a first field in a
> structure holding multiple fields, to avoid compiler warnings with
> decorated rte_memcpy.
>
> Bugzilla ID: 1146
>
> Fixes: 540a211084a7695a1c7bc43068934c140d6989be ("bnx2x: driver core")
> Cc: stephen at networkplumber.org
> Cc: rmody at marvell.com
> Cc: shshaikh at marvell.com
> Cc: palok at marvell.com
>
> Signed-off-by: Morten Brørup <mb at smartsharesystems.com>
> Acked-by: Devendra Singh Rawat <dsinghrawat at marvell.com>
> ---
> v9:
> * Fix checkpatch warning about spaces.

Fixed the following issues[1] and updated the git commit as follows
and applied to dpdk-next-net-mrvl/for-main. Thanks

    net/bnx2x: fix warnings about memcpy lengths

    The vlan in the bulletin does not contain a VLAN header, only the
    VLAN ID, so only copy 2 byte, not 4. The target structure has padding
    after the field, so copying 2 byte too many is effectively harmless.
    Fix it by using generic memcpy version instead of specialized
    rte version as it not used in fast path.

    Also, Use RTE_PTR_ADD where copying arrays to the offset of a first field
    in a structure holding multiple fields, to avoid compiler warnings with
    decorated memcpy.

    Bugzilla ID: 1146
    Fixes: 540a211084a7 ("bnx2x: driver core")
    Cc: stable at dpdk.org

    Signed-off-by: Morten Brørup <mb at smartsharesystems.com>
    Acked-by: Devendra Singh Rawat <dsinghrawat at marvell.com>


[1]
Wrong headline format:
        net/bnx2x: fix warnings about rte_memcpy lengths
Wrong tag:
        Bugfix: The vlan in the bulletin does not contain a VLAN
header, only the
Is it candidate for Cc: stable at dpdk.org backport?
        net/bnx2x: fix warnings about rte_memcpy lengths

Invalid patch(es) found - checked 1 patch
check-git-log failed

### [PATCH] net/bnx2x: fix warnings about rte_memcpy lengths

WARNING:BAD_FIXES_TAG: Please use correct Fixes: style 'Fixes: <12
chars of sha1> ("<title line>")' - ie: 'Fixes: 540a211084a7 ("bnx2x:
driver core")'
#20:
Fixes: 540a211084a7695a1c7bc43068934c140d6989be ("bnx2x: driver core")

total: 0 errors, 1 warnings, 0 checks, 76 lines checked

0/1 valid patch
checkpatch failed


More information about the dev mailing list