mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
net: ethtool: fix missing closing paren in rings_reply_size()
sizeof(u32) on the _RINGS_CQE_SIZE line is missing its closing parenthesis, causing nla_total_size() to absorb the subsequent _TX_PUSH and _RX_PUSH entries. The resulting size estimate happens to be numerically identical due to NLA alignment, so not treating this as a real fix. But the nesting is wrong and misleading. Signed-off-by: Tao Cui <cuitao@kylinos.cn> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Reviewed-by: Breno Leitao <leitao@debian.org> Link: https://patch.msgid.link/20260508125412.189804-1-cuitao@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -63,9 +63,9 @@ static int rings_reply_size(const struct ethnl_req_info *req_base,
|
||||
nla_total_size(sizeof(u32)) + /* _RINGS_TX */
|
||||
nla_total_size(sizeof(u32)) + /* _RINGS_RX_BUF_LEN */
|
||||
nla_total_size(sizeof(u8)) + /* _RINGS_TCP_DATA_SPLIT */
|
||||
nla_total_size(sizeof(u32) + /* _RINGS_CQE_SIZE */
|
||||
nla_total_size(sizeof(u32)) + /* _RINGS_CQE_SIZE */
|
||||
nla_total_size(sizeof(u8)) + /* _RINGS_TX_PUSH */
|
||||
nla_total_size(sizeof(u8))) + /* _RINGS_RX_PUSH */
|
||||
nla_total_size(sizeof(u8)) + /* _RINGS_RX_PUSH */
|
||||
nla_total_size(sizeof(u32)) + /* _RINGS_TX_PUSH_BUF_LEN */
|
||||
nla_total_size(sizeof(u32)) + /* _RINGS_TX_PUSH_BUF_LEN_MAX */
|
||||
nla_total_size(sizeof(u32)) + /* _RINGS_HDS_THRESH */
|
||||
|
||||
Reference in New Issue
Block a user