summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorGuangbin Huang <huangguangbin2@huawei.com>2021-10-24 17:41:09 +0800
committerDavid S. Miller <davem@davemloft.net>2021-10-25 14:00:59 +0100
commit0bd7e894dffaa1fdbef9dcf68b5994a18ff32024 (patch)
treea9bfae1dc2cc812055b994fa2aee12aa5b6f3fb1 /tools/perf/scripts/python/export-to-sqlite.py
parentc99fead7cb07979f5db38035ccb5f02ad2c7106a (diff)
net: hns3: modify mac statistics update process for compatibility
After querying mac statistics from firmware, driver copies data from descriptors to struct mac_stats of hdev, and the number of copied data is just according to the register number queried from firmware. There is a problem that if the register number queried from firmware is larger than data number of struct mac_stats, it will cause a copy overflow. So if the firmware adds more mac statistics in later version, it is not compatible with driver of old version. To fix this problem, the number of copied data needs to be used the minimum value between the register number queried from firmware and data number of struct mac_stats. The first descriptor has three data and there is one reserved, to optimize the copy process, add this reserverd data to struct mac_stats. Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions