2 // Copyright (c) 2010-2017 Intel Corporation
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
17 #include "handle_nop.h"
18 #include "thread_nop.h"
20 static struct task_init task_init_nop_thrpt_opt = {
23 .handle = handle_nop_bulk,
24 .thread_x = thread_nop,
25 .flag_features = TASK_FEATURE_NEVER_DISCARDS|TASK_FEATURE_TXQ_FLAGS_NOOFFLOADS|TASK_FEATURE_THROUGHPUT_OPT|TASK_FEATURE_MULTI_RX,
26 .size = sizeof(struct task_nop),
29 static struct task_init task_init_nop_lat_opt = {
31 .sub_mode_str = "latency optimized",
33 .handle = handle_nop_bulk,
34 .thread_x = thread_nop,
35 .flag_features = TASK_FEATURE_NEVER_DISCARDS|TASK_FEATURE_TXQ_FLAGS_NOOFFLOADS|TASK_FEATURE_MULTI_RX,
36 .size = sizeof(struct task_nop),
39 static struct task_init task_init_none;
41 __attribute__((constructor)) static void reg_task_nop(void)
43 reg_task(&task_init_nop_thrpt_opt);
44 reg_task(&task_init_nop_lat_opt);
46 /* For backwards compatibility, add none */
47 task_init_none = task_init_nop_thrpt_opt;
48 strcpy(task_init_none.mode_str, "none");
50 reg_task(&task_init_none);