diff --git a/qos_auth/auth_ctl/qos_ctrl.c b/qos_auth/auth_ctl/qos_ctrl.c index 1367f860efb6abe78886e8c80dfbc8de3d048da0..9f51767957a4711683c205281263daa550099e11 100644 --- a/qos_auth/auth_ctl/qos_ctrl.c +++ b/qos_auth/auth_ctl/qos_ctrl.c @@ -479,9 +479,6 @@ static long ctrl_qos_operation(int abi, void __user *uarg) return ret; } - /* transfer user space qos level to kernel space qos level */ - qos_data.level -= QOS_LEVEL_INTERVAL; - return do_qos_manipulate(&qos_data); } @@ -541,7 +538,7 @@ static inline bool valid_qos_item(struct qos_policy_datas *datas) } /* check user space qos polcicy data, level 0 reserved */ - for (i = 0; i <= NR_QOS; ++i) { + for (i = 0; i < NR_QOS; ++i) { data = &datas->policys[i]; if (!valid_nice(data->nice)) { @@ -593,7 +590,7 @@ static long do_qos_policy_change(struct qos_policy_datas *datas) item = &qos_policy_array[type].levels[i]; /* user space policy params */ - data = &datas->policys[i + QOS_LEVEL_INTERVAL]; + data = &datas->policys[i]; item->nice = data->nice; item->latency_nice = data->latency_nice; diff --git a/qos_auth/auth_ctl/qos_ctrl.h b/qos_auth/auth_ctl/qos_ctrl.h index 301f1413d737b209bb1713b55f8f184e08c57044..3ca02053b2f91945363371d617000652e33be319 100644 --- a/qos_auth/auth_ctl/qos_ctrl.h +++ b/qos_auth/auth_ctl/qos_ctrl.h @@ -13,11 +13,8 @@ #include -/* qos level interval between user space and kernel space */ -#define QOS_LEVEL_INTERVAL 1 - /* min qos level used in kernel space, begin index for LOOP */ -#define QOS_POLICY_MIN_LEVEL (NO_QOS + QOS_LEVEL_INTERVAL) +#define QOS_POLICY_MIN_LEVEL 0 struct qos_policy_item { int nice; diff --git a/qos_auth/include/qos_ctrl.h b/qos_auth/include/qos_ctrl.h index 08408215031663828ab1de71540c653ce9f2ee2e..2216b361931602896ad31ca1362e7c9a073a047a 100644 --- a/qos_auth/include/qos_ctrl.h +++ b/qos_auth/include/qos_ctrl.h @@ -104,7 +104,7 @@ struct qos_policy_datas { */ int policy_type; unsigned int policy_flag; - struct qos_policy_data policys[NR_QOS + 1]; + struct qos_policy_data policys[NR_QOS]; }; struct auth_struct;