netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netdev@vger.kernel.org>
Cc: linux-kernel@vger.kernel.org, Florian Westphal <fw@strlen.de>,
	linux-rdma@vger.kernel.org
Subject: [PATCH net-next 1/6] RDMA/nes: remove use of NETDEV_TX_LOCKED
Date: Sun, 24 Apr 2016 21:38:09 +0200	[thread overview]
Message-ID: <1461526694-11367-2-git-send-email-fw@strlen.de> (raw)
In-Reply-To: <1461526694-11367-1-git-send-email-fw@strlen.de>

ndo_start_xmit never returns it to stack, but nes_nic_send helper used it if
skb could not be queued to hardware.  Switch to bool instead.

Cc: <linux-rdma@vger.kernel.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 drivers/infiniband/hw/nes/nes_nic.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index 3ea9e05..b09a6db 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -356,7 +356,7 @@ static int nes_netdev_stop(struct net_device *netdev)
 /**
  * nes_nic_send
  */
-static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev)
+static bool nes_nic_send(struct sk_buff *skb, struct net_device *netdev)
 {
 	struct nes_vnic *nesvnic = netdev_priv(netdev);
 	struct nes_device *nesdev = nesvnic->nesdev;
@@ -413,7 +413,7 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev)
 					netdev->name, skb_shinfo(skb)->nr_frags + 2, skb_headlen(skb));
 			kfree_skb(skb);
 			nesvnic->tx_sw_dropped++;
-			return NETDEV_TX_LOCKED;
+			return false;
 		}
 		set_bit(nesnic->sq_head, nesnic->first_frag_overflow);
 		bus_address = pci_map_single(nesdev->pcidev, skb->data + NES_FIRST_FRAG_SIZE,
@@ -454,8 +454,7 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev)
 	set_wqe_32bit_value(nic_sqe->wqe_words, NES_NIC_SQ_WQE_MISC_IDX, wqe_misc);
 	nesnic->sq_head++;
 	nesnic->sq_head &= nesnic->sq_size - 1;
-
-	return NETDEV_TX_OK;
+	return true;
 }
 
 
@@ -673,13 +672,11 @@ tso_sq_no_longer_full:
 			skb_linearize(skb);
 			skb_set_transport_header(skb, hoffset);
 			skb_set_network_header(skb, nhoffset);
-			send_rc = nes_nic_send(skb, netdev);
-			if (send_rc != NETDEV_TX_OK)
+			if (!nes_nic_send(skb, netdev))
 				return NETDEV_TX_OK;
 		}
 	} else {
-		send_rc = nes_nic_send(skb, netdev);
-		if (send_rc != NETDEV_TX_OK)
+		if (!nes_nic_send(skb, netdev))
 			return NETDEV_TX_OK;
 	}
 
-- 
2.7.3

  reply	other threads:[~2016-04-24 19:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-24 19:38 [PATCH net-next 0/6] net: core: remove TX_LOCKED support Florian Westphal
2016-04-24 19:38 ` Florian Westphal [this message]
2016-04-24 19:38 ` [PATCH net-next 2/6] atl1c: remove private tx lock Florian Westphal
2016-04-24 22:03   ` Francois Romieu
2016-04-24 22:05   ` Francois Romieu
2016-04-25 15:43     ` Florian Westphal
2016-04-25 23:16       ` Francois Romieu
2016-04-24 19:38 ` [PATCH net-next 3/6] atle1: remove LLTX support and TX_UNLOCKED Florian Westphal
2016-04-24 19:38 ` [PATCH net-next 4/6] drivers: net: use NETDEV_TX_OK instead of NETDEV_TX_LOCKED Florian Westphal
2016-04-24 19:38 ` [PATCH net-next 5/6] drivers: net: remove NETDEV_TX_LOCKED Florian Westphal
2016-04-24 19:38 ` [PATCH net-next 6/6] net: remove NETDEV_TX_LOCKED support Florian Westphal
2016-04-26 19:53 ` [PATCH net-next 0/6] net: core: remove TX_LOCKED support David Miller

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=1461526694-11367-2-git-send-email-fw@strlen.de \
    --to=fw@strlen.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).