From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965582AbcHDTNI (ORCPT ); Thu, 4 Aug 2016 15:13:08 -0400 Received: from mga03.intel.com ([134.134.136.65]:28525 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934302AbcHDTNA (ORCPT ); Thu, 4 Aug 2016 15:13:00 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,471,1464678000"; d="scan'208";a="859869522" From: kan.liang@intel.com To: davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: jeffrey.t.kirsher@intel.com, mingo@redhat.com, peterz@infradead.org, kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, akpm@linux-foundation.org, keescook@chromium.org, viro@zeniv.linux.org.uk, gorcunov@openvz.org, john.stultz@linaro.org, aduyck@mirantis.com, ben@decadent.org.uk, decot@googlers.com, fw@strlen.de, alexander.duyck@gmail.com, daniel@iogearbox.net, tom@herbertland.com, rdunlap@infradead.org, xiyou.wangcong@gmail.com, hannes@stressinduktion.org, jesse.brandeburg@intel.com, andi@firstfloor.org, Kan Liang Subject: [RFC V2 PATCH 10/25] net/netpolicy: add three new NET policies Date: Wed, 31 Dec 2014 20:38:59 -0500 Message-Id: <1420076354-4861-11-git-send-email-kan.liang@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1420076354-4861-1-git-send-email-kan.liang@intel.com> References: <1420076354-4861-1-git-send-email-kan.liang@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kan Liang Introduce three NET policies CPU policy: configure for higher throughput and lower CPU% (power saving). BULK policy: configure for highest throughput. LATENCY policy: configure for lowest latency. Signed-off-by: Kan Liang --- include/linux/netpolicy.h | 3 +++ net/core/netpolicy.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/linux/netpolicy.h b/include/linux/netpolicy.h index b1d9277..3d348a7 100644 --- a/include/linux/netpolicy.h +++ b/include/linux/netpolicy.h @@ -18,6 +18,9 @@ enum netpolicy_name { NET_POLICY_NONE = 0, + NET_POLICY_CPU, + NET_POLICY_BULK, + NET_POLICY_LATENCY, NET_POLICY_MAX, }; diff --git a/net/core/netpolicy.c b/net/core/netpolicy.c index 8112839..71e9163 100644 --- a/net/core/netpolicy.c +++ b/net/core/netpolicy.c @@ -223,7 +223,10 @@ static int netpolicy_enable(struct net_device *dev) } const char *policy_name[NET_POLICY_MAX] = { - "NONE" + "NONE", + "CPU", + "BULK", + "LATENCY" }; static u32 cpu_to_queue(struct net_device *dev, -- 2.5.5