diff options
| author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-05-29 03:52:57 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-05-30 18:27:05 +0300 |
| commit | 8b3d5a47ae6b93654e39b543e33ded07c06fa8a9 (patch) | |
| tree | 2dc5f7883ab3af37e48130e0dda71758f55dd75d /tools/perf/scripts/python/futex-contention.py | |
| parent | 321b5e9afe2d2b31f78b60724d58a9d02888bb57 (diff) | |
| download | linux-8b3d5a47ae6b93654e39b543e33ded07c06fa8a9.tar.xz | |
nfp: support long reads and writes with the cpp helpers
nfp_cpp_{read,write}() helpers perform device memory mapping (setting
the PCIe -> NOC translation BARs) and accessing it. They, however,
currently implicitly expect that the length of entire operation will
fit in one BAR translation window. There is a number of 16MB windows
available, and we don't really need to access such large areas today.
If the user, however, manages to trick the driver into making a big
mapping (e.g. by providing a huge fake FW file), the driver will
print a warning saying "No suitable BAR found for request" and a
stack trace - which most users find concerning.
To be future-proof and not scare users with warnings, make the
nfp_cpp_{read,write}() helpers do accesses chunk by chunk if the area
size is large. Set the notion of "large" to 2MB, which is the size
of the smallest BAR window.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/futex-contention.py')
0 files changed, 0 insertions, 0 deletions
