Thread (38 messages) flat view 38 messages, 8 authors, 2016-09-19
STALE3619d

Revision v3 of 4 in this series.

Revisions (4)
  1. rfc [diff vs current]
  2. v2 [diff vs current]
  3. v2 [diff vs current]
  4. v3 current

[RFC V3 PATCH 04/26] net/netpolicy: get CPU information

From: <hidden>
Date: 2016-09-12 15:06:20
Also in: lkml
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Kan Liang <redacted>

Net policy also needs to know CPU information. Currently, online
CPU count is enough.

Signed-off-by: Kan Liang <redacted>
---
 net/core/netpolicy.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/net/core/netpolicy.c b/net/core/netpolicy.c
index 882f0de..31c41ca 100644
--- a/net/core/netpolicy.c
+++ b/net/core/netpolicy.c
@@ -50,6 +50,11 @@ static void netpolicy_free_dev_info(struct netpolicy_dev_info *d_info)
 	kfree(d_info->tx_irq);
 }
 
+static u32 netpolicy_get_cpu_information(void)
+{
+	return num_online_cpus();
+}
+
 const char *policy_name[NET_POLICY_MAX] = {
 	"NONE"
 };
-- 
2.5.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help