Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1456693 > unrolled thread

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

Started bykan.liang@intel.com
First post2016-08-04 21:50 +0200
Last post2016-08-05 13:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC V2 PATCH 04/25] net/netpolicy: get CPU information kan.liang@intel.com - 2016-08-04 21:50 +0200
    Re: [RFC V2 PATCH 04/25] net/netpolicy: get CPU information Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-08-05 13:10 +0200

#1456693 — [RFC V2 PATCH 04/25] net/netpolicy: get CPU information

Fromkan.liang@intel.com
Date2016-08-04 21:50 +0200
Subject[RFC V2 PATCH 04/25] net/netpolicy: get CPU information
Message-ID<s2wOu-5y4-5@gated-at.bofh.it>
From: Kan Liang <kan.liang@intel.com>

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

Signed-off-by: Kan Liang <kan.liang@intel.com>
---
 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"
 };
-- 
2.5.5

[toc] | [next] | [standalone]


#1457031

FromSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date2016-08-05 13:10 +0200
Message-ID<s2LaO-6JM-13@gated-at.bofh.it>
In reply to#1456693
Hello.

On 8/4/2016 10:36 PM, kan.liang@intel.com wrote:

> From: Kan Liang <kan.liang@intel.com>
>
> Net policy also needs to know CPU information. Currently, online
> CPU number is enough.

    s/number/count/. Or "the number of online CPUs".

>
> Signed-off-by: Kan Liang <kan.liang@intel.com>
> ---
>  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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web