]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mvneta: Fix 64-bit MIB reads
authorMark Johnston <markj@FreeBSD.org>
Mon, 4 Jan 2021 13:22:21 +0000 (08:22 -0500)
committerMark Johnston <markj@FreeBSD.org>
Mon, 4 Jan 2021 13:32:54 +0000 (08:32 -0500)
commitcaf552a607191ffc798e3edb697ae99d5b15711a
tree04322991d3312c575a488c3186c4842718372ed9
parentc4cceb1d0d6f59789524feab3ddf7e3110d10d75
mvneta: Fix 64-bit MIB reads

It appears we must read MIB values as 2 4-byte words, lower address
first.  A single 8-byte MIB read returns the value with the lower 4
bytes copied into the upper 4 bytes, resulting in bogus byte counter
values.

Reviewed by: mw
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (Netgate)
Differential Revision: https://reviews.freebsd.org/D27870
sys/dev/neta/if_mvneta.c
sys/dev/neta/if_mvnetavar.h