Thread (37 messages) flat view 37 messages, 8 authors, 2016-08-17

Re: [RFC V2 PATCH 04/25] net/netpolicy: get CPU information

From: Sergei Shtylyov <hidden>
Date: 2016-08-05 11:00:39
Also in: lkml

Hello.

On 8/4/2016 10:36 PM, kan.liang@intel.com wrote:
From: Kan Liang <redacted>

Net policy also needs to know CPU information. Currently, online
CPU number is enough.
    s/number/count/. Or "the number of online CPUs".
quoted hunk ↗ jump to hunk
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 7c34c8a..075aaca 100644
--- a/net/core/netpolicy.c
+++ b/net/core/netpolicy.c
@@ -49,6 +49,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"
 };
MBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help