public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel•org>
To: Sudheer Mogilappagari <sudheer.mogilappagari@intel•com>
Cc: netdev@vger•kernel.org, mkubecek@suse•cz, andrew@lunn•ch,
	corbet@lwn•net, sridhar.samudrala@intel•com,
	anthony.l.nguyen@intel•com
Subject: Re: [PATCH net-next v6] ethtool: add netlink based get rss support
Date: Wed, 30 Nov 2022 21:18:00 -0800	[thread overview]
Message-ID: <20221130211800.372f9a9b@kernel.org> (raw)
In-Reply-To: <20221128175556.49354-1-sudheer.mogilappagari@intel.com>

On Mon, 28 Nov 2022 09:55:56 -0800 Sudheer Mogilappagari wrote:
> Add netlink based support for "ethtool -x <dev> [context x]"
> command by implementing ETHTOOL_MSG_RSS_GET netlink message.
> This is equivalent to functionality provided via ETHTOOL_GRSSH
> in ioctl path. It sends RSS table, hash key and hash function
> of an interface to user space.
> 
> This patch implements existing functionality available
> in ioctl path and enables addition of new RSS context
> based parameters in future.

Please try make htmldocs, the tables below are mis-formatted.

> +=====================================  ======  ==========================
> +  ``ETHTOOL_A_RSS_HEADER``             nested  request header
> +  ``ETHTOOL_A_RSS_CONTEXT``            u32     context number
> + ====================================  ======  ==========================
> +
> +Kernel response contents:
> +
> +=====================================  ======  ==========================
> +  ``ETHTOOL_A_RSS_HEADER``             nested  reply header
> +  ``ETHTOOL_A_RSS_HFUNC``              u32     RSS hash func
> +  ``ETHTOOL_A_RSS_INDIR``              binary  Indir table bytes
> +  ``ETHTOOL_A_RSS_HKEY``               binary  Hash key bytes
> + ====================================  ======  ==========================

> +static int
> +rss_reply_size(const struct ethnl_req_info *req_base,
> +	       const struct ethnl_reply_data *reply_base)
> +{
> +	const struct rss_reply_data *data = RSS_REPDATA(reply_base);
> +	int len;
> +
> +	len =  nla_total_size(sizeof(u32)) +	/* _RSS_HFUNC */
> +	       nla_total_size(sizeof(u32) * data->indir_size) + /* _RSS_INDIR */
> +	       nla_total_size(data->hkey_size);	/* _RSS_HKEY */

nit: double space after =

      reply	other threads:[~2022-12-01  5:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28 17:55 [PATCH net-next v6] ethtool: add netlink based get rss support Sudheer Mogilappagari
2022-12-01  5:18 ` Jakub Kicinski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221130211800.372f9a9b@kernel.org \
    --to=kuba@kernel$(echo .)org \
    --cc=andrew@lunn$(echo .)ch \
    --cc=anthony.l.nguyen@intel$(echo .)com \
    --cc=corbet@lwn$(echo .)net \
    --cc=mkubecek@suse$(echo .)cz \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sridhar.samudrala@intel$(echo .)com \
    --cc=sudheer.mogilappagari@intel$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox