netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Manlunas <felix.manlunas@cavium.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, raghu.vatsavayi@cavium.com,
	derek.chickles@cavium.com, satananda.burla@cavium.com,
	intiyaz.basha@cavium.com
Subject: [PATCH net-next 02/13] liquidio: Moved common function txqs_wake to octeon_network.h
Date: Fri, 23 Mar 2018 17:36:58 -0700	[thread overview]
Message-ID: <20180324003658.GA6487@felix-thinkpad.cavium.com> (raw)
In-Reply-To: <20180324003618.GA6457@felix-thinkpad.cavium.com>

From: Intiyaz Basha <intiyaz.basha@cavium.com>

Moving common function txqs_wake to octeon_network.h

Signed-off-by: Intiyaz Basha <intiyaz.basha@cavium.com>
Acked-by: Derek Chickles <derek.chickles@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
---
 drivers/net/ethernet/cavium/liquidio/lio_main.c    | 28 ----------------------
 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 27 ---------------------
 .../net/ethernet/cavium/liquidio/octeon_network.h  | 27 +++++++++++++++++++++
 3 files changed, 27 insertions(+), 55 deletions(-)

diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index 05c5162f..089f494 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -525,34 +525,6 @@ static inline void txqs_start(struct net_device *netdev)
 }
 
 /**
- * \brief Wake Tx queues
- * @param netdev network device
- */
-static inline void txqs_wake(struct net_device *netdev)
-{
-	struct lio *lio = GET_LIO(netdev);
-
-	if (netif_is_multiqueue(netdev)) {
-		int i;
-
-		for (i = 0; i < netdev->num_tx_queues; i++) {
-			int qno = lio->linfo.txpciq[i %
-				lio->oct_dev->num_iqs].s.q_no;
-
-			if (__netif_subqueue_stopped(netdev, i)) {
-				INCR_INSTRQUEUE_PKT_COUNT(lio->oct_dev, qno,
-							  tx_restart, 1);
-				netif_wake_subqueue(netdev, i);
-			}
-		}
-	} else {
-		INCR_INSTRQUEUE_PKT_COUNT(lio->oct_dev, lio->txq,
-					  tx_restart, 1);
-		netif_wake_queue(netdev);
-	}
-}
-
-/**
  * \brief Stop Tx queue
  * @param netdev network device
  */
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
index 2e31446..60743c3 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
@@ -301,33 +301,6 @@ static void txqs_start(struct net_device *netdev)
 }
 
 /**
- * \brief Wake Tx queues
- * @param netdev network device
- */
-static void txqs_wake(struct net_device *netdev)
-{
-	struct lio *lio = GET_LIO(netdev);
-
-	if (netif_is_multiqueue(netdev)) {
-		int i;
-
-		for (i = 0; i < netdev->num_tx_queues; i++) {
-			int qno = lio->linfo.txpciq[i % lio->oct_dev->num_iqs]
-				      .s.q_no;
-			if (__netif_subqueue_stopped(netdev, i)) {
-				INCR_INSTRQUEUE_PKT_COUNT(lio->oct_dev, qno,
-							  tx_restart, 1);
-				netif_wake_subqueue(netdev, i);
-			}
-		}
-	} else {
-		INCR_INSTRQUEUE_PKT_COUNT(lio->oct_dev, lio->txq,
-					  tx_restart, 1);
-		netif_wake_queue(netdev);
-	}
-}
-
-/**
  * \brief Start Tx queue
  * @param netdev network device
  */
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_network.h b/drivers/net/ethernet/cavium/liquidio/octeon_network.h
index d8079e35..2d2f49b 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_network.h
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_network.h
@@ -522,4 +522,31 @@ static inline void txqs_stop(struct net_device *netdev)
 	}
 }
 
+/**
+ * \brief Wake Tx queues
+ * @param netdev network device
+ */
+static inline void txqs_wake(struct net_device *netdev)
+{
+	struct lio *lio = GET_LIO(netdev);
+
+	if (netif_is_multiqueue(netdev)) {
+		int i;
+
+		for (i = 0; i < netdev->num_tx_queues; i++) {
+			int qno = lio->linfo.txpciq[i %
+				lio->oct_dev->num_iqs].s.q_no;
+
+			if (__netif_subqueue_stopped(netdev, i)) {
+				INCR_INSTRQUEUE_PKT_COUNT(lio->oct_dev, qno,
+							  tx_restart, 1);
+				netif_wake_subqueue(netdev, i);
+			}
+		}
+	} else {
+		INCR_INSTRQUEUE_PKT_COUNT(lio->oct_dev, lio->txq,
+					  tx_restart, 1);
+		netif_wake_queue(netdev);
+	}
+}
 #endif
-- 
1.8.3.1

  parent reply	other threads:[~2018-03-24  0:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-24  0:36 [PATCH net-next 00/13] liquidio: Tx queue cleanup Felix Manlunas
2018-03-24  0:36 ` [PATCH net-next 01/13] liquidio: Moved common function txqs_stop to octeon_network.h Felix Manlunas
2018-03-24  0:36 ` Felix Manlunas [this message]
2018-03-24  0:37 ` [PATCH net-next 03/13] liquidio: Moved common function txqs_start " Felix Manlunas
2018-03-24  0:37 ` [PATCH net-next 04/13] liquidio: Moved common function skb_iq to " Felix Manlunas
2018-03-24  0:37 ` [PATCH net-next 05/13] liquidio: Removed one line function stop_txq Felix Manlunas
2018-03-24  0:37 ` [PATCH net-next 06/13] liquidio: Removed start_txq function Felix Manlunas
2018-03-24  0:37 ` [PATCH net-next 07/13] liquidio: Removed netif_is_multiqueue check Felix Manlunas
2018-03-24  0:37 ` [PATCH net-next 08/13] liquidio: Removed one line function stop_q Felix Manlunas
2018-03-24  0:37 ` [PATCH net-next 09/13] liquidio: Removed one line function wake_q Felix Manlunas
2018-03-24  0:37 ` [PATCH net-next 10/13] liquidio: Function call skb_iq for deriving queue from skb Felix Manlunas
2018-03-24  0:37 ` [PATCH net-next 11/13] liquidio: Renamed txqs_wake to wake_txqs Felix Manlunas
2018-03-24  0:37 ` [PATCH net-next 12/13] liquidio: Renamed txqs_stop to stop_txqs Felix Manlunas
2018-03-24  0:37 ` [PATCH net-next 13/13] liquidio: Renamed txqs_start to start_txqs Felix Manlunas
2018-03-25 20:22 ` [PATCH net-next 00/13] liquidio: Tx queue cleanup 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=20180324003658.GA6487@felix-thinkpad.cavium.com \
    --to=felix.manlunas@cavium.com \
    --cc=davem@davemloft.net \
    --cc=derek.chickles@cavium.com \
    --cc=intiyaz.basha@cavium.com \
    --cc=netdev@vger.kernel.org \
    --cc=raghu.vatsavayi@cavium.com \
    --cc=satananda.burla@cavium.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).