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)
(cherry picked from commit ea1143bddbc3671f49219a6b2a054965deea0c63)

Details

Provenance
zleiAuthored on Feb 6 2026, 5:52 PM
Reviewer
kbowling
Differential Revision
D54884: qlnxe: Avoid memcpy with same source and destination
Parents
rG610b81333f48: qlnxe: Fix promiscuous and allmulti settings
Branches
Unknown
Tags
Unknown