net: devlink: report cell size of shared buffers

Shared buffer allocation is usually done in cell increments.
Drivers will either round up the allocation or refuse the
configuration if it's not an exact multiple of cell size.
Drivers know exactly the cell size of shared buffer, so help
out users by providing this information in dumps.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jakub Kicinski
2019-02-01 17:56:28 -08:00
committed by David S. Miller
parent a98dc6aee7
commit bff5731d43
5 changed files with 8 additions and 0 deletions

View File

@@ -300,6 +300,8 @@ enum devlink_attr {
DEVLINK_ATTR_INFO_VERSION_NAME, /* string */
DEVLINK_ATTR_INFO_VERSION_VALUE, /* string */
DEVLINK_ATTR_SB_POOL_CELL_SIZE, /* u32 */
/* add new attributes above here, update the policy in devlink.c */
__DEVLINK_ATTR_MAX,