diff mbox

[RFC,V3,10/26] net/netpolicy: add three new NET policies

Message ID 1473692159-4017-11-git-send-email-kan.liang@intel.com
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

kan.liang@intel.com Sept. 12, 2016, 2:55 p.m. UTC
From: Kan Liang <kan.liang@intel.com>

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 <kan.liang@intel.com>
---
 include/linux/netpolicy.h | 3 +++
 net/core/netpolicy.c      | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/include/linux/netpolicy.h b/include/linux/netpolicy.h
index 8596b6a..951227b 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 511d1c6..1d796a8 100644
--- a/net/core/netpolicy.c
+++ b/net/core/netpolicy.c
@@ -226,7 +226,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,