From patchwork Sat Jan 19 09:02:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Mason X-Patchwork-Id: 213789 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 29CEA2C007B for ; Sat, 19 Jan 2013 20:07:03 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752093Ab3ASJGh (ORCPT ); Sat, 19 Jan 2013 04:06:37 -0500 Received: from mga02.intel.com ([134.134.136.20]:15001 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752069Ab3ASJDU (ORCPT ); Sat, 19 Jan 2013 04:03:20 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 19 Jan 2013 01:03:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,498,1355126400"; d="scan'208";a="249499458" Received: from jonmason-lab.ch.intel.com (HELO jonmason-lab) ([143.182.51.20]) by orsmga001.jf.intel.com with SMTP; 19 Jan 2013 01:03:18 -0800 Received: by jonmason-lab (sSMTP sendmail emulation); Sat, 19 Jan 2013 02:03:18 -0700 From: Jon Mason To: Greg KH Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Dave Jiang , Nicholas Bellinger Subject: [PATCH 18/21] ntb_netdev: remove tx timeout Date: Sat, 19 Jan 2013 02:02:32 -0700 Message-Id: <1358586155-23322-19-git-send-email-jon.mason@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1358586155-23322-1-git-send-email-jon.mason@intel.com> References: <1358586155-23322-1-git-send-email-jon.mason@intel.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org There is a race between disabling and enabling the tx queue, resulting in tx timeouts. Since all the tx timeout does is re-enable the tx queue, simple remove the start/stop of the queue and the tx timeout routine. Signed-off-by: Jon Mason --- drivers/net/ntb_netdev.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/net/ntb_netdev.c b/drivers/net/ntb_netdev.c index 28d6fea..07c06cd 100644 --- a/drivers/net/ntb_netdev.c +++ b/drivers/net/ntb_netdev.c @@ -144,9 +144,6 @@ static void ntb_netdev_tx_handler(struct ntb_transport_qp *qp, void *qp_data, } dev_kfree_skb(skb); - - if (netif_queue_stopped(ndev)) - netif_wake_queue(ndev); } static netdev_tx_t ntb_netdev_start_xmit(struct sk_buff *skb, @@ -166,7 +163,6 @@ static netdev_tx_t ntb_netdev_start_xmit(struct sk_buff *skb, err: ndev->stats.tx_dropped++; ndev->stats.tx_errors++; - netif_stop_queue(ndev); return NETDEV_TX_BUSY; } @@ -270,18 +266,11 @@ err: return rc; } -static void ntb_netdev_tx_timeout(struct net_device *ndev) -{ - if (netif_running(ndev)) - netif_wake_queue(ndev); -} - static const struct net_device_ops ntb_netdev_ops = { .ndo_open = ntb_netdev_open, .ndo_stop = ntb_netdev_close, .ndo_start_xmit = ntb_netdev_start_xmit, .ndo_change_mtu = ntb_netdev_change_mtu, - .ndo_tx_timeout = ntb_netdev_tx_timeout, .ndo_set_mac_address = eth_mac_addr, };