Merge branch 'ethtool-rss-small-fixes-to-spec-and-get'
Jakub Kicinski says: ==================== ethtool: rss: small fixes to spec and GET Two small fixes to the ethtool RSS_GET over Netlink. Spec is a bit inaccurate and responses miss an identifier. ==================== Link: https://patch.msgid.link/20240724234249.2621109-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
07c10cff66
@ -1753,6 +1753,7 @@ operations:
|
||||
request:
|
||||
attributes:
|
||||
- header
|
||||
- context
|
||||
reply:
|
||||
attributes:
|
||||
- header
|
||||
@ -1761,7 +1762,6 @@ operations:
|
||||
- indir
|
||||
- hkey
|
||||
- input_xfrm
|
||||
dump: *rss-get-op
|
||||
-
|
||||
name: plca-get-cfg
|
||||
doc: Get PLCA params.
|
||||
|
@ -1875,6 +1875,7 @@ Kernel response contents:
|
||||
|
||||
===================================== ====== ==========================
|
||||
``ETHTOOL_A_RSS_HEADER`` nested reply header
|
||||
``ETHTOOL_A_RSS_CONTEXT`` u32 context number
|
||||
``ETHTOOL_A_RSS_HFUNC`` u32 RSS hash func
|
||||
``ETHTOOL_A_RSS_INDIR`` binary Indir table bytes
|
||||
``ETHTOOL_A_RSS_HKEY`` binary Hash key bytes
|
||||
|
@ -111,7 +111,8 @@ rss_reply_size(const struct ethnl_req_info *req_base,
|
||||
const struct rss_reply_data *data = RSS_REPDATA(reply_base);
|
||||
int len;
|
||||
|
||||
len = nla_total_size(sizeof(u32)) + /* _RSS_HFUNC */
|
||||
len = nla_total_size(sizeof(u32)) + /* _RSS_CONTEXT */
|
||||
nla_total_size(sizeof(u32)) + /* _RSS_HFUNC */
|
||||
nla_total_size(sizeof(u32)) + /* _RSS_INPUT_XFRM */
|
||||
nla_total_size(sizeof(u32) * data->indir_size) + /* _RSS_INDIR */
|
||||
nla_total_size(data->hkey_size); /* _RSS_HKEY */
|
||||
@ -124,6 +125,11 @@ rss_fill_reply(struct sk_buff *skb, const struct ethnl_req_info *req_base,
|
||||
const struct ethnl_reply_data *reply_base)
|
||||
{
|
||||
const struct rss_reply_data *data = RSS_REPDATA(reply_base);
|
||||
struct rss_req_info *request = RSS_REQINFO(req_base);
|
||||
|
||||
if (request->rss_context &&
|
||||
nla_put_u32(skb, ETHTOOL_A_RSS_CONTEXT, request->rss_context))
|
||||
return -EMSGSIZE;
|
||||
|
||||
if ((data->hfunc &&
|
||||
nla_put_u32(skb, ETHTOOL_A_RSS_HFUNC, data->hfunc)) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user