netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [RFC 3/7] ixgbe: use netdev_irqname
Date: Tue, 21 Jun 2011 10:05:44 -0700	[thread overview]
Message-ID: <20110621170658.597977868@vyatta.com> (raw)
In-Reply-To: 20110621170541.309890798@vyatta.com

[-- Attachment #1: ixgbe-use-irq-name.patch --]
[-- Type: text/plain, Size: 1563 bytes --]

New standard function for generating irq names.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


--- a/drivers/net/ixgbe/ixgbe_main.c	2011-06-21 09:30:35.327952251 -0700
+++ b/drivers/net/ixgbe/ixgbe_main.c	2011-06-21 09:32:33.483952184 -0700
@@ -2352,20 +2352,19 @@ static int ixgbe_request_msix_irqs(struc
 		struct ixgbe_q_vector *q_vector = adapter->q_vector[vector];
 		handler = SET_HANDLER(q_vector);
 
-		if (handler == &ixgbe_msix_clean_rx) {
-			snprintf(q_vector->name, sizeof(q_vector->name) - 1,
-			         "%s-%s-%d", netdev->name, "rx", ri++);
-		} else if (handler == &ixgbe_msix_clean_tx) {
-			snprintf(q_vector->name, sizeof(q_vector->name) - 1,
-			         "%s-%s-%d", netdev->name, "tx", ti++);
-		} else if (handler == &ixgbe_msix_clean_many) {
-			snprintf(q_vector->name, sizeof(q_vector->name) - 1,
-			         "%s-%s-%d", netdev->name, "TxRx", ri++);
+		if (handler == &ixgbe_msix_clean_rx)
+			netdev_irqname(q_vector->name, sizeof(q_vector->name),
+				       netdev, NETIF_IRQ_RX, ri++);
+		else if (handler == &ixgbe_msix_clean_tx)
+			netdev_irqname(q_vector->name, sizeof(q_vector->name),
+				       netdev, NETIF_IRQ_TX, ti++);
+		else if (handler == &ixgbe_msix_clean_many) {
+			netdev_irqname(q_vector->name, sizeof(q_vector->name),
+				       netdev, NETIF_IRQ_TXRX, ri++);
 			ti++;
-		} else {
-			/* skip this unused q_vector */
+		} else /* skip this unused q_vector */
 			continue;
-		}
+
 		err = request_irq(adapter->msix_entries[vector].vector,
 				  handler, 0, q_vector->name,
 				  q_vector);



  parent reply	other threads:[~2011-06-21 17:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-21 17:05 [RFC 0/7] network device irq naming Stephen Hemminger
2011-06-21 17:05 ` [RFC 1/7] netdev: add standardized irq naming function Stephen Hemminger
2011-06-21 17:30   ` Michał Mirosław
2011-06-21 17:48     ` Ben Hutchings
2011-06-21 17:56       ` Stephen Hemminger
2011-06-21 18:07   ` Ben Hutchings
2011-06-21 17:05 ` [RFC 2/7] igb: use netdev_irqname Stephen Hemminger
2011-06-21 17:05 ` Stephen Hemminger [this message]
2011-06-21 17:05 ` [RFC 4/7] benet: use irq naming standard Stephen Hemminger
2011-06-21 17:05 ` [RFC 5/7] bnx2: use netdev_irqname Stephen Hemminger
2011-06-21 18:11   ` Ben Hutchings
2011-06-21 18:17     ` Stephen Hemminger
2011-06-21 18:42       ` Ben Hutchings
2011-06-21 17:05 ` [RFC 6/7] niu: " Stephen Hemminger
2011-06-21 17:05 ` [RFC 7/7] netxen: " Stephen Hemminger

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=20110621170658.597977868@vyatta.com \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --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).