[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1380643148.1939.11.camel@bwh-desktop.uk.level5networks.com>
Date: Tue, 1 Oct 2013 16:59:08 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
CC: <davem@...emloft.net>,
Laura Mihaela Vasilescu <laura.vasilescu@...edu.org>,
<netdev@...r.kernel.org>, <gospo@...hat.com>, <sassmann@...hat.com>
Subject: Re: [net-next 9/9] igb: Add ethtool support to configure number of
channels
On Tue, 2013-10-01 at 04:33 -0700, Jeff Kirsher wrote:
> From: Laura Mihaela Vasilescu <laura.vasilescu@...edu.org>
>
> This patch adds the ethtool callbacks necessary to configure the
> number of RSS queues.
>
> The maximum number of queues is in accordance with the datasheets.
>
> Signed-off-by: Laura Mihaela Vasilescu <laura.vasilescu@...edu.org>
> Tested-by: Aaron Brown <aaron.f.brown@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
[...]
> --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
> +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
[...]
> +static void igb_get_channels(struct net_device *netdev,
> + struct ethtool_channels *ch)
[...]
> +static int igb_set_channels(struct net_device *netdev,
> + struct ethtool_channels *ch)
These functions look fine to me.
[...]
> --- a/drivers/net/ethernet/intel/igb/igb_main.c
> +++ b/drivers/net/ethernet/intel/igb/igb_main.c
> @@ -7838,4 +7838,26 @@ s32 igb_write_i2c_byte(struct e1000_hw *hw, u8 byte_offset,
> return E1000_SUCCESS;
>
> }
> +
> +int igb_reinit_queues(struct igb_adapter *adapter)
> +{
> + struct net_device *netdev = adapter->netdev;
> + struct pci_dev *pdev = adapter->pdev;
> + int err = 0;
> +
> + if (netif_running(netdev))
> + igb_close(netdev);
> +
> + igb_clear_interrupt_scheme(adapter);
> +
> + if (igb_init_interrupt_scheme(adapter, true)) {
> + dev_err(&pdev->dev, "Unable to allocate memory for queues\n");
> + return -ENOMEM;
> + }
> +
> + if (netif_running(netdev))
> + err = igb_open(netdev);
> +
> + return err;
> +}
> /* igb_main.c */
In case this fails, is the interface in a consistent state where is it
safe to reconfigure the interface again or to unbind the driver?
If it fails, and the interface was up, shouldn't it call dev_close() so
that it's obviously down and the user can then try to bring it up again?
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists