diff options
Diffstat (limited to 'net/ethtool/rss.c')
| -rw-r--r-- | net/ethtool/rss.c | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/net/ethtool/rss.c b/net/ethtool/rss.c index 71679137eff2..5c4c4505ab9a 100644 --- a/net/ethtool/rss.c +++ b/net/ethtool/rss.c @@ -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)) || | 
