OSDN Git Service

Merge branch 'devlink-resource'
authorDavid S. Miller <davem@davemloft.net>
Tue, 16 Jan 2018 19:15:36 +0000 (14:15 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Jan 2018 19:15:36 +0000 (14:15 -0500)
commitfedae6d7e6b4e05928b228b7f1c85407aa37fd04
treeb1961af26dd36e7675639accebb89fc48dca4965
parentd98c8ccdebda9de011d3ea29ffb5aac57cd2b69a
parentf261708b92fbc51200fee782845a2a891f67234d
Merge branch 'devlink-resource'

Jiri Pirko says:

====================
devlink: Add support for resource abstraction

Arkadi says:

Many of the ASIC's internal resources are limited and are shared between
several hardware procedures. For example, unified hash-based memory can
be used for many lookup purposes, like FDB and LPM. In many cases the user
can provide a partitioning scheme for such a resource in order to perform
fine tuning for his application. In such cases performing driver reload is
needed for the changes to take place, thus this patchset also adds support
for hot reload.

Such an abstraction can be coupled with devlink's dpipe interface, which
models the ASIC's pipeline as a graph of match/action tables. By modeling
the hardware resource object, and by coupling it to several dpipe tables,
further visibility can be achieved in order to debug ASIC-wide issues.

The proposed interface will provide the user the ability to understand the
limitations of the hardware, and receive notification regarding its occupancy.
Furthermore, monitoring the resource occupancy can be done in real-time and
can be useful in many cases.

---
v2->v3
- Mix/Max/Gran attributes.
- Add resource consumption per table.
- Change basic resource unit to 'entry'.
- ABI documentation.

v1->v2
- Add resource size attribute.
- Fix split bug.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>