Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1456700
| From | kan.liang@intel.com |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC V2 PATCH 10/25] net/netpolicy: add three new NET policies |
| Date | 2016-08-04 21:50 +0200 |
| Message-ID | <s2wOu-5y4-23@gated-at.bofh.it> (permalink) |
| References | <s2wEN-5rB-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 --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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC V2 PATCH 00/25] Kernel NET policy kan.liang@intel.com - 2016-08-04 21:50 +0200
[RFC V2 PATCH 10/25] net/netpolicy: add three new NET policies kan.liang@intel.com - 2016-08-04 21:50 +0200
[RFC V2 PATCH 02/25] net/netpolicy: init NET policy kan.liang@intel.com - 2016-08-04 21:50 +0200
[RFC V2 PATCH 12/25] net/netpolicy: NET device hotplug kan.liang@intel.com - 2016-08-04 21:50 +0200
[RFC V2 PATCH 09/25] net/netpolicy: set NET policy by policy name kan.liang@intel.com - 2016-08-04 21:50 +0200
[RFC V2 PATCH 11/25] net/netpolicy: add MIX policy kan.liang@intel.com - 2016-08-04 21:50 +0200
[RFC V2 PATCH 01/25] net: introduce NET policy kan.liang@intel.com - 2016-08-04 21:50 +0200
Re: [RFC V2 PATCH 01/25] net: introduce NET policy Randy Dunlap <rdunlap@infradead.org> - 2016-08-04 22:20 +0200
[RFC V2 PATCH 05/25] net/netpolicy: create CPU and queue mapping kan.liang@intel.com - 2016-08-04 21:50 +0200
csiph-web