[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AAEA33E297BCAC4B9BB20A7C2DF0AB8D6556FAEF@FMSMSX113.amr.corp.intel.com>
Date: Mon, 17 Mar 2014 18:55:44 +0000
From: "Williams, Mitch A" <mitch.a.williams@...el.com>
To: Ben Hutchings <ben@...adent.org.uk>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"gospo@...hat.com" <gospo@...hat.com>,
"sassmann@...hat.com" <sassmann@...hat.com>,
"Sullivan, Catherine" <catherine.sullivan@...el.com>
Subject: RE: [net-next 03/16] i40evf: Support RSS option in ethtool
> -----Original Message-----
> From: Ben Hutchings [mailto:ben@...adent.org.uk]
> Sent: Monday, March 17, 2014 11:54 AM
> To: Kirsher, Jeffrey T
> Cc: davem@...emloft.net; Williams, Mitch A; netdev@...r.kernel.org;
> gospo@...hat.com; sassmann@...hat.com; Sullivan, Catherine
> Subject: Re: [net-next 03/16] i40evf: Support RSS option in ethtool
>
> On Mon, 2014-03-17 at 05:45 -0700, Jeff Kirsher wrote:
> > From: Mitch Williams <mitch.a.williams@...el.com>
> >
> > Add support for viewing and modifying RSS hash options and RSS hash
> > look-up table programming through ethtool. Because the lookup table is
> > so small for the VFs (only 16 registers), we don't bother to maintain a
> > shadow table in memory, we just read and write the registers directly.
> [...]
> > +static int i40evf_get_rss_hash_opts(struct i40evf_adapter *adapter,
> > + struct ethtool_rxnfc *cmd)
> > +{
> > + cmd->data = 0;
> > +
> > + /* Report default options for RSS on i40e */
>
> But you're allowing them to be changed from the defaults, so this is
> wrong.
>
> [...]
> > +static int i40evf_set_rxfh_indir(struct net_device *netdev, const u32
> *indir)
> > +{
> > + struct i40evf_adapter *adapter = netdev_priv(netdev);
> > + struct i40e_hw *hw = &adapter->hw;
> > + u32 hlut_val;
> > + int i, j;
> > +
> > + /* Verify user input. */
> > + for (i = 0; i < (I40E_VFQF_HLUT_MAX_INDEX + 1) * 4; i++) {
> > + if (indir[i] >= adapter->vsi_res->num_queue_pairs)
> > + return -EINVAL;
> > + }
> [...]
>
> ethtool_set_rxfh_indir() does this validation so you don't have to.
> (This wasn't true originally so you'll need to keep it in compatibility
> code for your OOT driver.)
Thanks, Ben. We'll respin this.
-Mitch
>
> Ben.
>
> --
> Ben Hutchings
> I'm always amazed by the number of people who take up solipsism because
> they heard someone else explain it. - E*Borg on alt.fan.pratchett
Powered by blists - more mailing lists