.frame_overhead = RTE_SCHED_FRAME_OVERHEAD_DEFAULT,
.n_subports_per_port = 1,
.n_pipes_per_subport = NB_PIPES,
+#if RTE_VERSION < RTE_VERSION_NUM(19,11,0,0)
.qsize = {QUEUE_SIZES, QUEUE_SIZES, QUEUE_SIZES, QUEUE_SIZES},
.pipe_profiles = NULL,
.n_pipe_profiles = 1 /* only one profile */
+#endif
};
static struct rte_sched_pipe_params pipe_params_default = {
.tb_size = 4000000,
.tc_rate = {TEN_GIGABIT, TEN_GIGABIT, TEN_GIGABIT, TEN_GIGABIT},
.tc_period = 40, /* default was 10 */
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ .qsize = {QUEUE_SIZES, QUEUE_SIZES, QUEUE_SIZES, QUEUE_SIZES},
+ .pipe_profiles = NULL,
+ .n_pipe_profiles = 1 /* only one profile */
+#endif
};
void set_global_defaults(__attribute__((unused)) struct prox_cfg *prox_cfg)
targ->qos_conf.port_params = port_params_default;
targ->qos_conf.pipe_params[0] = pipe_params_default;
targ->qos_conf.subport_params[0] = subport_params_default;
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ targ->qos_conf.subport_params[0].pipe_profiles = targ->qos_conf.pipe_params;
+#else
targ->qos_conf.port_params.pipe_profiles = targ->qos_conf.pipe_params;
+#endif
targ->qos_conf.port_params.rate = TEN_GIGABIT;
targ->qinq_tag = ETYPE_8021ad;
targ->n_concur_conn = 8192*2;
if (err) {
return -1;
}
-
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ targ->qos_conf.subport_params[0].qsize[0] = val;
+ targ->qos_conf.subport_params[0].qsize[1] = val;
+ targ->qos_conf.subport_params[0].qsize[2] = val;
+ targ->qos_conf.subport_params[0].qsize[3] = val;
+#else
targ->qos_conf.port_params.qsize[0] = val;
targ->qos_conf.port_params.qsize[1] = val;
targ->qos_conf.port_params.qsize[2] = val;
targ->qos_conf.port_params.qsize[3] = val;
+#endif
return 0;
}
if (STR_EQ(str, "subport tb rate")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ return parse_u64(&targ->qos_conf.subport_params[0].tb_rate, pkey);
+#else
return parse_int(&targ->qos_conf.subport_params[0].tb_rate, pkey);
+#endif
}
if (STR_EQ(str, "subport tb size")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ return parse_u64(&targ->qos_conf.subport_params[0].tb_size, pkey);
+#else
return parse_int(&targ->qos_conf.subport_params[0].tb_size, pkey);
+#endif
}
if (STR_EQ(str, "subport tc 0 rate")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ return parse_u64(&targ->qos_conf.subport_params[0].tc_rate[0], pkey);
+#else
return parse_int(&targ->qos_conf.subport_params[0].tc_rate[0], pkey);
+#endif
}
if (STR_EQ(str, "subport tc 1 rate")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ return parse_u64(&targ->qos_conf.subport_params[0].tc_rate[1], pkey);
+#else
return parse_int(&targ->qos_conf.subport_params[0].tc_rate[1], pkey);
+#endif
}
if (STR_EQ(str, "subport tc 2 rate")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ return parse_u64(&targ->qos_conf.subport_params[0].tc_rate[2], pkey);
+#else
return parse_int(&targ->qos_conf.subport_params[0].tc_rate[2], pkey);
+#endif
}
if (STR_EQ(str, "subport tc 3 rate")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ return parse_u64(&targ->qos_conf.subport_params[0].tc_rate[3], pkey);
+#else
return parse_int(&targ->qos_conf.subport_params[0].tc_rate[3], pkey);
+#endif
}
if (STR_EQ(str, "subport tc rate")) {
return 0;
}
if (STR_EQ(str, "subport tc period")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ return parse_u64(&targ->qos_conf.subport_params[0].tc_period, pkey);
+#else
return parse_int(&targ->qos_conf.subport_params[0].tc_period, pkey);
+#endif
}
if (STR_EQ(str, "pipe tb rate")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ return parse_u64(&targ->qos_conf.pipe_params[0].tb_rate, pkey);
+#else
return parse_int(&targ->qos_conf.pipe_params[0].tb_rate, pkey);
+#endif
}
if (STR_EQ(str, "pipe tb size")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ return parse_u64(&targ->qos_conf.pipe_params[0].tb_size, pkey);
+#else
return parse_int(&targ->qos_conf.pipe_params[0].tb_size, pkey);
+#endif
}
if (STR_EQ(str, "pipe tc rate")) {
uint32_t val;
return 0;
}
if (STR_EQ(str, "pipe tc 0 rate")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ return parse_u64(&targ->qos_conf.pipe_params[0].tc_rate[0], pkey);
+#else
return parse_int(&targ->qos_conf.pipe_params[0].tc_rate[0], pkey);
+#endif
}
if (STR_EQ(str, "pipe tc 1 rate")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ return parse_u64(&targ->qos_conf.pipe_params[0].tc_rate[1], pkey);
+#else
return parse_int(&targ->qos_conf.pipe_params[0].tc_rate[1], pkey);
+#endif
}
if (STR_EQ(str, "pipe tc 2 rate")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ return parse_u64(&targ->qos_conf.pipe_params[0].tc_rate[2], pkey);
+#else
return parse_int(&targ->qos_conf.pipe_params[0].tc_rate[2], pkey);
+#endif
}
if (STR_EQ(str, "pipe tc 3 rate")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ return parse_u64(&targ->qos_conf.pipe_params[0].tc_rate[3], pkey);
+#else
return parse_int(&targ->qos_conf.pipe_params[0].tc_rate[3], pkey);
+#endif
}
if (STR_EQ(str, "pipe tc period")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ return parse_u64(&targ->qos_conf.pipe_params[0].tc_period, pkey);
+#else
return parse_int(&targ->qos_conf.pipe_params[0].tc_period, pkey);
+#endif
}
if (STR_EQ(str, "police action")) {
char *in = strstr(pkey, " io=");