From: Yinghai Lu <Yinghai.Lu@Sun.COM>
To: Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <ak@suse.de>, Greg KH <greg@kroah.com>,
rientjes@google.com, Christoph Lameter <clameter@sgi.com>,
Christoph Hellwig <hch@infradead.org>,
David Miller <davem@davemloft.net>,
Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
netdev@vger.kernel.org
Subject: [PATCH 4/5] net: show numa_node for net_device in /sys
Date: Tue, 10 Jul 2007 16:52:58 -0700 [thread overview]
Message-ID: <200707101652.59346.yinghai.lu@sun.com> (raw)
In-Reply-To: <200707101641.17672.yinghai.lu@sun.com>
[PATCH 4/5] net: show numa_node for net_device in /sys
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 5c19b06..45b87a5 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -230,6 +230,14 @@ static ssize_t store_weight(struct device *dev, struct device_attribute *attr,
return netdev_store(dev, attr, buf, len, change_weight);
}
+#ifdef CONFIG_NUMA
+static ssize_t
+numa_node_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ return sprintf (buf, "%d\n", dev->numa_node);
+}
+#endif
+
static struct device_attribute net_class_attributes[] = {
__ATTR(addr_len, S_IRUGO, show_addr_len, NULL),
__ATTR(iflink, S_IRUGO, show_iflink, NULL),
@@ -247,6 +255,9 @@ static struct device_attribute net_class_attributes[] = {
__ATTR(tx_queue_len, S_IRUGO | S_IWUSR, show_tx_queue_len,
store_tx_queue_len),
__ATTR(weight, S_IRUGO | S_IWUSR, show_weight, store_weight),
+#ifdef CONFIG_NUMA
+ __ATTR_RO(numa_node),
+#endif
{}
};
next prev parent reply other threads:[~2007-07-11 0:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200707101641.17672.yinghai.lu@sun.com>
2007-07-10 23:52 ` [PATCH 1/5] try parent numa_node at first before using default Yinghai Lu
2007-07-11 10:54 ` Stefan Richter
2007-07-11 11:03 ` Stefan Richter
2007-07-11 21:08 ` Greg KH
2007-07-11 21:28 ` Yinghai Lu
2007-07-12 2:47 ` Stefan Richter
2007-07-12 3:01 ` Yinghai Lu
2007-07-12 5:47 ` Stefan Richter
2007-07-12 7:15 ` Cornelia Huck
2007-07-12 11:30 ` Stefan Richter
2007-07-12 15:23 ` Cornelia Huck
2007-07-12 17:59 ` [PATCH] " Yinghai Lu
2007-07-12 18:31 ` Greg KH
2007-07-12 19:06 ` Yinghai Lu
2007-07-13 3:16 ` Greg KH
2007-07-13 4:42 ` Yinghai Lu
2007-07-13 5:48 ` Cornelia Huck
2007-07-13 19:27 ` [PATCH] try parent numa_node at first before using default v2 Yinghai Lu
2007-07-10 23:52 ` Yinghai Lu [this message]
2007-07-10 23:53 ` [PATCH 5/5] dma: use dev_to_node to get node for device in dma_alloc_pages Yinghai Lu
2007-07-23 19:30 ` Christoph Lameter
2007-07-11 0:05 ` [PATCH 2/5] net: use numa_node in net_devcice->dev instead of parent Yinghai Lu
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=200707101652.59346.yinghai.lu@sun.com \
--to=yinghai.lu@sun.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=davem@davemloft.net \
--cc=greg@kroah.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rientjes@google.com \
--cc=stefanr@s5r6.in-berlin.de \
/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).