Page MenuHomeFreeBSD

qlnxe: Avoid memcpy with same source and destination
ClosedPublic

Authored by zlei on Mon, Jan 26, 6:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Feb 13, 4:40 PM
Unknown Object (File)
Wed, Feb 11, 7:59 PM
Unknown Object (File)
Tue, Feb 10, 6:24 AM
Unknown Object (File)
Mon, Feb 9, 2:10 PM
Unknown Object (File)
Mon, Feb 2, 9:40 PM
Unknown Object (File)
Mon, Feb 2, 3:28 AM
Unknown Object (File)
Wed, Jan 28, 2:44 AM
Unknown Object (File)
Tue, Jan 27, 7:38 PM
Subscribers

Details

Summary

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.

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei requested review of this revision.Mon, Jan 26, 6:22 AM
kbowling added inline comments.
sys/dev/qlnx/qlnxe/qlnx_os.c
2328

There is an ether_gen_addr that could replace the generator here

This revision is now accepted and ready to land.Fri, Feb 6, 6:11 AM
sys/dev/qlnx/qlnxe/qlnx_os.c
2328

Yeah, indeed.