lkml.org 
[lkml]   [2016]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH 06/30] net/netpolicy: get CPU information
    Date
    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
    \
     
     \ /
      Last update: 2016-07-18 17:21    [W:4.460 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site