diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-02-01 17:56:28 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-03 11:25:34 -0800 |
commit | bff5731d43efbdf0bbd2d73cab32fe6435ea1046 (patch) | |
tree | b8bae276de495c01202d70740023f66ad7a8278b /net/core/devlink.c | |
parent | a98dc6aee784a5daf84a4781dcf02feab9ad5999 (diff) |
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>
Diffstat (limited to 'net/core/devlink.c')
-rw-r--r-- | net/core/devlink.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c index eb839d74bcc0..52bf27491fb8 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -932,6 +932,9 @@ static int devlink_nl_sb_pool_fill(struct sk_buff *msg, struct devlink *devlink, if (nla_put_u8(msg, DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE, pool_info.threshold_type)) goto nla_put_failure; + if (nla_put_u32(msg, DEVLINK_ATTR_SB_POOL_CELL_SIZE, + pool_info.cell_size)) + goto nla_put_failure; genlmsg_end(msg, hdr); return 0; |