From: Amir Vadai <amirv@mellanox.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: "David S. Miller" <davem@davemloft.net>, <netdev@vger.kernel.org>,
"Or Gerlitz" <ogerlitz@mellanox.com>,
Eugenia Emantayev <eugenia@mellanox.com>
Subject: Re: [PATCH net-next 4/7] net/mlx4_en: Set carrier to off when a port is stopped
Date: Mon, 28 Jan 2013 14:07:19 +0200 [thread overview]
Message-ID: <510669F7.2090705@mellanox.com> (raw)
In-Reply-To: <1358352016.2923.15.camel@bwh-desktop.uk.solarflarecom.com>
On 16/01/2013 18:00, Ben Hutchings wrote:
> On Wed, 2013-01-16 at 17:42 +0200, Amir Vadai wrote:
>> From: Eugenia Emantayev <eugenia@mellanox.com>
>>
>> Under heavy CPU load changing ring size/mtu/etc. could result in transmit
>> timeout, since stop-start port might take more than 10 sec. Set
>> netif_carrier_off to prevent tx queue transmit timeout.
>
> A spurious link change can restart L3 auto-configuration (DHCP, SLAAC,
> etc.) netif_device_detach() also inhibits the watchdog and doesn't have
> that problem.
>
> Ben.
>
But after calling netif_device_detach(), device present bit is cleared
and therefore won't be able to access the device. This means, that after
'ifconfig down', won't be able to do 'ifconfig up'.
Amir
>> Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
>> Signed-off-by: Amir Vadai <amirv@mellanox.com>
>> ---
>> drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
>> index 805e242..108c4cf 100644
>> --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
>> +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
>> @@ -1212,6 +1212,7 @@ void mlx4_en_stop_port(struct net_device *dev)
>>
>> /* Synchronize with tx routine */
>> netif_tx_lock_bh(dev);
>> + netif_carrier_off(dev);
>> netif_tx_stop_all_queues(dev);
>> netif_tx_unlock_bh(dev);
>>
>
next prev parent reply other threads:[~2013-01-28 12:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-16 15:42 [PATCH net-next 0/7] Mellanox Ethernet driver updates 2013-01-16 Amir Vadai
2013-01-16 15:42 ` [PATCH net-next 1/7] net/mlx4_en: Issue the dump eth statistics command under lock Amir Vadai
2013-01-16 15:42 ` [PATCH net-next 2/7] net/mlx4_en: Fix traffic loss under promiscuous mode Amir Vadai
2013-01-16 15:42 ` [PATCH net-next 3/7] net/mlx4_en: Use the correct netif lock on ndo_set_rx_mode Amir Vadai
2013-01-16 15:42 ` [PATCH net-next 4/7] net/mlx4_en: Set carrier to off when a port is stopped Amir Vadai
2013-01-16 16:00 ` Ben Hutchings
2013-01-17 7:04 ` Amir Vadai
2013-01-28 12:07 ` Amir Vadai [this message]
2013-01-28 12:53 ` Ben Hutchings
2013-01-16 15:42 ` [PATCH net-next 5/7] net/mlx4_core: Return proper error code when __mlx4_add_one fails Amir Vadai
2013-01-16 15:42 ` [PATCH net-next 6/7] net/mlx4_en: Fix a race when closing TX queue Amir Vadai
2013-01-16 15:42 ` [PATCH net-next 7/7] net/mlx4_en: Initialize RFS filters lock and list in init_netdev Amir Vadai
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=510669F7.2090705@mellanox.com \
--to=amirv@mellanox.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=eugenia@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).