Fix toeplitz initialization key and rss key len for mlx4
[samplevnf.git] / VNFs / DPPD-PROX / defaults.c
index ac611d0..2156a74 100644 (file)
@@ -76,6 +76,16 @@ static struct rte_eth_txconf default_tx_conf = {
        .tx_rs_thresh = 32, /* Use PMD default values */
 };
 
+#if RTE_VERSION >= RTE_VERSION_NUM(20,11,0,0)
+static struct rte_sched_subport_profile_params subport_profile_params_default = {
+       .tb_rate = TEN_GIGABIT / NB_PIPES,
+       .tb_size = 4000000,
+
+       .tc_rate = {TEN_GIGABIT / NB_PIPES, TEN_GIGABIT / NB_PIPES, TEN_GIGABIT / NB_PIPES, TEN_GIGABIT / NB_PIPES},
+       .tc_period = 40,
+};
+#endif
+
 static struct rte_sched_port_params port_params_default = {
        .name = "port_0",
        .socket = 0,
@@ -83,6 +93,9 @@ static struct rte_sched_port_params port_params_default = {
        .rate = 0,
        .frame_overhead = RTE_SCHED_FRAME_OVERHEAD_DEFAULT,
        .n_subports_per_port = 1,
+#if RTE_VERSION >= RTE_VERSION_NUM(20,11,0,0)
+       .subport_profiles = &subport_profile_params_default,
+#endif
        .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},
@@ -106,11 +119,13 @@ static struct rte_sched_pipe_params pipe_params_default = {
 };
 
 static struct rte_sched_subport_params subport_params_default = {
+#if RTE_VERSION < RTE_VERSION_NUM(20,11,0,0)
        .tb_rate = TEN_GIGABIT,
        .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)
+#endif
+#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 */
@@ -154,7 +169,7 @@ void set_task_defaults(struct prox_cfg* prox_cfg, struct lcore_cfg* lcore_cfg_in
                        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)
+#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;
@@ -187,6 +202,8 @@ void set_task_defaults(struct prox_cfg* prox_cfg, struct lcore_cfg* lcore_cfg_in
 
                        targ->runtime_flags |= TASK_TX_CRC;
                        targ->accuracy_limit_nsec = 5000;
+                       targ->probability_delay = 1000000;
+                       targ->probability_no_drop = 1000000;
                }
        }
 }