HomeFreeBSD

qlnxe: Avoid memcpy with same source and destination

Description

qlnxe: Avoid memcpy with same source and destination

In case the device is VF, qlnx_get_mac_addr() returns ha->primary_mac
hence it ends up memcpy with same source and destination. Refactor
slightly to avoid that.

Reviewed by: kbowling
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D54884

(cherry picked from commit 3aeeedc7e0dc231c16406ff64f4a08a716964c40)
(cherry picked from commit 6462189595047800337aaf052e397d1aade3f9a7)

Details

Provenance
zleiAuthored on Feb 6 2026, 5:52 PM
Reviewer
kbowling
Differential Revision
D54884: qlnxe: Avoid memcpy with same source and destination
Parents
rG7d7cee09b9a4: qlnxe: Remove a pointless copy back from the link-layer address
Branches
Unknown
Tags
Unknown