examples/ip_pipeline: update subport rate dynamically
[dpdk.git] / examples / ip_pipeline / cli.c
index 7421585..ec4acf0 100644 (file)
@@ -245,22 +245,35 @@ static void
 print_link_info(struct link *link, char *out, size_t out_size)
 {
        struct rte_eth_stats stats;
-       struct ether_addr mac_addr;
+       struct rte_ether_addr mac_addr;
        struct rte_eth_link eth_link;
        uint16_t mtu;
+       int ret;
 
        memset(&stats, 0, sizeof(stats));
        rte_eth_stats_get(link->port_id, &stats);
 
-       rte_eth_macaddr_get(link->port_id, &mac_addr);
-       rte_eth_link_get(link->port_id, &eth_link);
+       ret = rte_eth_macaddr_get(link->port_id, &mac_addr);
+       if (ret != 0) {
+               snprintf(out, out_size, "\n%s: MAC address get failed: %s",
+                        link->name, rte_strerror(-ret));
+               return;
+       }
+
+       ret = rte_eth_link_get(link->port_id, &eth_link);
+       if (ret < 0) {
+               snprintf(out, out_size, "\n%s: link get failed: %s",
+                        link->name, rte_strerror(-ret));
+               return;
+       }
+
        rte_eth_dev_get_mtu(link->port_id, &mtu);
 
        snprintf(out, out_size,
                "\n"
                "%s: flags=<%s> mtu %u\n"
                "\tether %02X:%02X:%02X:%02X:%02X:%02X rxqueues %u txqueues %u\n"
-               "\tport# %u  speed %u Mbps\n"
+               "\tport# %u  speed %s\n"
                "\tRX packets %" PRIu64"  bytes %" PRIu64"\n"
                "\tRX errors %" PRIu64"  missed %" PRIu64"  no-mbuf %" PRIu64"\n"
                "\tTX packets %" PRIu64"  bytes %" PRIu64"\n"
@@ -274,7 +287,7 @@ print_link_info(struct link *link, char *out, size_t out_size)
                link->n_rxq,
                link->n_txq,
                link->port_id,
-               eth_link.link_speed,
+               rte_eth_link_speed_to_str(eth_link.link_speed),
                stats.ipackets,
                stats.ibytes,
                stats.ierrors,
@@ -377,7 +390,9 @@ cmd_swq(char **tokens,
 static const char cmd_tmgr_subport_profile_help[] =
 "tmgr subport profile\n"
 "   <tb_rate> <tb_size>\n"
-"   <tc0_rate> <tc1_rate> <tc2_rate> <tc3_rate>\n"
+"   <tc0_rate> <tc1_rate> <tc2_rate> <tc3_rate> <tc4_rate>"
+"        <tc5_rate> <tc6_rate> <tc7_rate> <tc8_rate>"
+"        <tc9_rate> <tc10_rate> <tc11_rate> <tc12_rate>\n"
 "   <tc_period>\n";
 
 static void
@@ -386,36 +401,37 @@ cmd_tmgr_subport_profile(char **tokens,
        char *out,
        size_t out_size)
 {
-       struct rte_sched_subport_params p;
+       struct rte_sched_subport_profile_params subport_profile;
        int status, i;
 
-       if (n_tokens != 10) {
+       if (n_tokens != 19) {
                snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
                return;
        }
 
-       if (parser_read_uint32(&p.tb_rate, tokens[3]) != 0) {
+       if (parser_read_uint64(&subport_profile.tb_rate, tokens[3]) != 0) {
                snprintf(out, out_size, MSG_ARG_INVALID, "tb_rate");
                return;
        }
 
-       if (parser_read_uint32(&p.tb_size, tokens[4]) != 0) {
+       if (parser_read_uint64(&subport_profile.tb_size, tokens[4]) != 0) {
                snprintf(out, out_size, MSG_ARG_INVALID, "tb_size");
                return;
        }
 
        for (i = 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++)
-               if (parser_read_uint32(&p.tc_rate[i], tokens[5 + i]) != 0) {
+               if (parser_read_uint64(&subport_profile.tc_rate[i],
+                               tokens[5 + i]) != 0) {
                        snprintf(out, out_size, MSG_ARG_INVALID, "tc_rate");
                        return;
                }
 
-       if (parser_read_uint32(&p.tc_period, tokens[9]) != 0) {
+       if (parser_read_uint64(&subport_profile.tc_period, tokens[18]) != 0) {
                snprintf(out, out_size, MSG_ARG_INVALID, "tc_period");
                return;
        }
 
-       status = tmgr_subport_profile_add(&p);
+       status = tmgr_subport_profile_add(&subport_profile);
        if (status != 0) {
                snprintf(out, out_size, MSG_CMD_FAIL, tokens[0]);
                return;
@@ -425,10 +441,12 @@ cmd_tmgr_subport_profile(char **tokens,
 static const char cmd_tmgr_pipe_profile_help[] =
 "tmgr pipe profile\n"
 "   <tb_rate> <tb_size>\n"
-"   <tc0_rate> <tc1_rate> <tc2_rate> <tc3_rate>\n"
+"   <tc0_rate> <tc1_rate> <tc2_rate> <tc3_rate> <tc4_rate>"
+"     <tc5_rate> <tc6_rate> <tc7_rate> <tc8_rate>"
+"     <tc9_rate> <tc10_rate> <tc11_rate> <tc12_rate>\n"
 "   <tc_period>\n"
 "   <tc_ov_weight>\n"
-"   <wrr_weight0..15>\n";
+"   <wrr_weight0..3>\n";
 
 static void
 cmd_tmgr_pipe_profile(char **tokens,
@@ -439,41 +457,39 @@ cmd_tmgr_pipe_profile(char **tokens,
        struct rte_sched_pipe_params p;
        int status, i;
 
-       if (n_tokens != 27) {
+       if (n_tokens != 24) {
                snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
                return;
        }
 
-       if (parser_read_uint32(&p.tb_rate, tokens[3]) != 0) {
+       if (parser_read_uint64(&p.tb_rate, tokens[3]) != 0) {
                snprintf(out, out_size, MSG_ARG_INVALID, "tb_rate");
                return;
        }
 
-       if (parser_read_uint32(&p.tb_size, tokens[4]) != 0) {
+       if (parser_read_uint64(&p.tb_size, tokens[4]) != 0) {
                snprintf(out, out_size, MSG_ARG_INVALID, "tb_size");
                return;
        }
 
        for (i = 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++)
-               if (parser_read_uint32(&p.tc_rate[i], tokens[5 + i]) != 0) {
+               if (parser_read_uint64(&p.tc_rate[i], tokens[5 + i]) != 0) {
                        snprintf(out, out_size, MSG_ARG_INVALID, "tc_rate");
                        return;
                }
 
-       if (parser_read_uint32(&p.tc_period, tokens[9]) != 0) {
+       if (parser_read_uint64(&p.tc_period, tokens[18]) != 0) {
                snprintf(out, out_size, MSG_ARG_INVALID, "tc_period");
                return;
        }
 
-#ifdef RTE_SCHED_SUBPORT_TC_OV
-       if (parser_read_uint8(&p.tc_ov_weight, tokens[10]) != 0) {
+       if (parser_read_uint8(&p.tc_ov_weight, tokens[19]) != 0) {
                snprintf(out, out_size, MSG_ARG_INVALID, "tc_ov_weight");
                return;
        }
-#endif
 
-       for (i = 0; i < RTE_SCHED_QUEUES_PER_PIPE; i++)
-               if (parser_read_uint8(&p.wrr_weights[i], tokens[11 + i]) != 0) {
+       for (i = 0; i < RTE_SCHED_BE_QUEUES_PER_PIPE; i++)
+               if (parser_read_uint8(&p.wrr_weights[i], tokens[20 + i]) != 0) {
                        snprintf(out, out_size, MSG_ARG_INVALID, "wrr_weights");
                        return;
                }
@@ -490,7 +506,6 @@ static const char cmd_tmgr_help[] =
 "   rate <rate>\n"
 "   spp <n_subports_per_port>\n"
 "   pps <n_pipes_per_subport>\n"
-"   qsize <qsize_tc0> <qsize_tc1> <qsize_tc2> <qsize_tc3>\n"
 "   fo <frame_overhead>\n"
 "   mtu <mtu>\n"
 "   cpu <cpu_id>\n";
@@ -504,9 +519,8 @@ cmd_tmgr(char **tokens,
        struct tmgr_port_params p;
        char *name;
        struct tmgr_port *tmgr_port;
-       int i;
 
-       if (n_tokens != 19) {
+       if (n_tokens != 14) {
                snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
                return;
        }
@@ -518,7 +532,7 @@ cmd_tmgr(char **tokens,
                return;
        }
 
-       if (parser_read_uint32(&p.rate, tokens[3]) != 0) {
+       if (parser_read_uint64(&p.rate, tokens[3]) != 0) {
                snprintf(out, out_size, MSG_ARG_INVALID, "rate");
                return;
        }
@@ -534,7 +548,7 @@ cmd_tmgr(char **tokens,
        }
 
        if (strcmp(tokens[6], "pps") != 0) {
-               snprintf(out, out_size, MSG_ARG_NOT_FOUND, "pps");
+               snprintf(out, out_size, MSG_ARG_NOT_FOUND, "spp");
                return;
        }
 
@@ -543,43 +557,32 @@ cmd_tmgr(char **tokens,
                return;
        }
 
-       if (strcmp(tokens[8], "qsize") != 0) {
-               snprintf(out, out_size, MSG_ARG_NOT_FOUND, "qsize");
-               return;
-       }
-
-       for (i = 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++)
-               if (parser_read_uint16(&p.qsize[i], tokens[9 + i]) != 0) {
-                       snprintf(out, out_size, MSG_ARG_INVALID, "qsize");
-                       return;
-               }
-
-       if (strcmp(tokens[13], "fo") != 0) {
+       if (strcmp(tokens[8], "fo") != 0) {
                snprintf(out, out_size, MSG_ARG_NOT_FOUND, "fo");
                return;
        }
 
-       if (parser_read_uint32(&p.frame_overhead, tokens[14]) != 0) {
+       if (parser_read_uint32(&p.frame_overhead, tokens[9]) != 0) {
                snprintf(out, out_size, MSG_ARG_INVALID, "frame_overhead");
                return;
        }
 
-       if (strcmp(tokens[15], "mtu") != 0) {
+       if (strcmp(tokens[10], "mtu") != 0) {
                snprintf(out, out_size, MSG_ARG_NOT_FOUND, "mtu");
                return;
        }
 
-       if (parser_read_uint32(&p.mtu, tokens[16]) != 0) {
+       if (parser_read_uint32(&p.mtu, tokens[11]) != 0) {
                snprintf(out, out_size, MSG_ARG_INVALID, "mtu");
                return;
        }
 
-       if (strcmp(tokens[17], "cpu") != 0) {
+       if (strcmp(tokens[12], "cpu") != 0) {
                snprintf(out, out_size, MSG_ARG_NOT_FOUND, "cpu");
                return;
        }
 
-       if (parser_read_uint32(&p.cpu_id, tokens[18]) != 0) {
+       if (parser_read_uint32(&p.cpu_id, tokens[13]) != 0) {
                snprintf(out, out_size, MSG_ARG_INVALID, "cpu_id");
                return;
        }
@@ -2654,7 +2657,7 @@ struct pkt_key_qinq {
        uint16_t svlan;
        uint16_t ethertype_cvlan;
        uint16_t cvlan;
-} __attribute__((__packed__));
+} __rte_packed;
 
 struct pkt_key_ipv4_5tuple {
        uint8_t time_to_live;
@@ -2664,7 +2667,7 @@ struct pkt_key_ipv4_5tuple {
        uint32_t da;
        uint16_t sp;
        uint16_t dp;
-} __attribute__((__packed__));
+} __rte_packed;
 
 struct pkt_key_ipv6_5tuple {
        uint16_t payload_length;
@@ -2674,15 +2677,15 @@ struct pkt_key_ipv6_5tuple {
        uint8_t da[16];
        uint16_t sp;
        uint16_t dp;
-} __attribute__((__packed__));
+} __rte_packed;
 
 struct pkt_key_ipv4_addr {
        uint32_t addr;
-} __attribute__((__packed__));
+} __rte_packed;
 
 struct pkt_key_ipv6_addr {
        uint8_t addr[16];
-} __attribute__((__packed__));
+} __rte_packed;
 
 static uint32_t
 parse_match(char **tokens,
@@ -3237,11 +3240,11 @@ parse_table_action_meter_tc(char **tokens,
                parser_read_uint32(&mtr->meter_profile_id, tokens[1]) ||
                strcmp(tokens[2], "policer") ||
                strcmp(tokens[3], "g") ||
-               parse_policer_action(tokens[4], &mtr->policer[e_RTE_METER_GREEN]) ||
+               parse_policer_action(tokens[4], &mtr->policer[RTE_COLOR_GREEN]) ||
                strcmp(tokens[5], "y") ||
-               parse_policer_action(tokens[6], &mtr->policer[e_RTE_METER_YELLOW]) ||
+               parse_policer_action(tokens[6], &mtr->policer[RTE_COLOR_YELLOW]) ||
                strcmp(tokens[7], "r") ||
-               parse_policer_action(tokens[8], &mtr->policer[e_RTE_METER_RED]))
+               parse_policer_action(tokens[8], &mtr->policer[RTE_COLOR_RED]))
                return 0;
 
        return 9;
@@ -3772,24 +3775,18 @@ parse_free_sym_crypto_param_data(struct rte_table_action_sym_crypto_params *p)
 
                switch (xform[i]->type) {
                case RTE_CRYPTO_SYM_XFORM_CIPHER:
-                       if (xform[i]->cipher.key.data)
-                               free(xform[i]->cipher.key.data);
                        if (p->cipher_auth.cipher_iv.val)
                                free(p->cipher_auth.cipher_iv.val);
                        if (p->cipher_auth.cipher_iv_update.val)
                                free(p->cipher_auth.cipher_iv_update.val);
                        break;
                case RTE_CRYPTO_SYM_XFORM_AUTH:
-                       if (xform[i]->auth.key.data)
-                               free(xform[i]->cipher.key.data);
                        if (p->cipher_auth.auth_iv.val)
                                free(p->cipher_auth.cipher_iv.val);
                        if (p->cipher_auth.auth_iv_update.val)
                                free(p->cipher_auth.cipher_iv_update.val);
                        break;
                case RTE_CRYPTO_SYM_XFORM_AEAD:
-                       if (xform[i]->aead.key.data)
-                               free(xform[i]->cipher.key.data);
                        if (p->aead.iv.val)
                                free(p->aead.iv.val);
                        if (p->aead.aad.val)
@@ -3804,8 +3801,8 @@ parse_free_sym_crypto_param_data(struct rte_table_action_sym_crypto_params *p)
 
 static struct rte_crypto_sym_xform *
 parse_table_action_cipher(struct rte_table_action_sym_crypto_params *p,
-               char **tokens, uint32_t n_tokens, uint32_t encrypt,
-               uint32_t *used_n_tokens)
+               uint8_t *key, uint32_t max_key_len, char **tokens,
+               uint32_t n_tokens, uint32_t encrypt, uint32_t *used_n_tokens)
 {
        struct rte_crypto_sym_xform *xform_cipher;
        int status;
@@ -3832,16 +3829,16 @@ parse_table_action_cipher(struct rte_table_action_sym_crypto_params *p,
 
        /* cipher_key */
        len = strlen(tokens[4]);
-       xform_cipher->cipher.key.data = calloc(1, len / 2 + 1);
-       if (xform_cipher->cipher.key.data == NULL)
+       if (len / 2 > max_key_len) {
+               status = -ENOMEM;
                goto error_exit;
+       }
 
-       status = parse_hex_string(tokens[4],
-                       xform_cipher->cipher.key.data,
-                       (uint32_t *)&len);
+       status = parse_hex_string(tokens[4], key, (uint32_t *)&len);
        if (status < 0)
                goto error_exit;
 
+       xform_cipher->cipher.key.data = key;
        xform_cipher->cipher.key.length = (uint16_t)len;
 
        /* cipher_iv */
@@ -3865,9 +3862,6 @@ parse_table_action_cipher(struct rte_table_action_sym_crypto_params *p,
        return xform_cipher;
 
 error_exit:
-       if (xform_cipher->cipher.key.data)
-               free(xform_cipher->cipher.key.data);
-
        if (p->cipher_auth.cipher_iv.val) {
                free(p->cipher_auth.cipher_iv.val);
                p->cipher_auth.cipher_iv.val = NULL;
@@ -3880,8 +3874,8 @@ error_exit:
 
 static struct rte_crypto_sym_xform *
 parse_table_action_cipher_auth(struct rte_table_action_sym_crypto_params *p,
-               char **tokens, uint32_t n_tokens, uint32_t encrypt,
-               uint32_t *used_n_tokens)
+               uint8_t *key, uint32_t max_key_len, char **tokens,
+               uint32_t n_tokens, uint32_t encrypt, uint32_t *used_n_tokens)
 {
        struct rte_crypto_sym_xform *xform_cipher;
        struct rte_crypto_sym_xform *xform_auth;
@@ -3910,17 +3904,21 @@ parse_table_action_cipher_auth(struct rte_table_action_sym_crypto_params *p,
 
        /* auth_key */
        len = strlen(tokens[10]);
-       xform_auth->auth.key.data = calloc(1, len / 2 + 1);
-       if (xform_auth->auth.key.data == NULL)
+       if (len / 2 > max_key_len) {
+               status = -ENOMEM;
                goto error_exit;
+       }
 
-       status = parse_hex_string(tokens[10],
-                       xform_auth->auth.key.data, (uint32_t *)&len);
+       status = parse_hex_string(tokens[10], key, (uint32_t *)&len);
        if (status < 0)
                goto error_exit;
 
+       xform_auth->auth.key.data = key;
        xform_auth->auth.key.length = (uint16_t)len;
 
+       key += xform_auth->auth.key.length;
+       max_key_len -= xform_auth->auth.key.length;
+
        if (strcmp(tokens[11], "digest_size"))
                goto error_exit;
 
@@ -3929,8 +3927,8 @@ parse_table_action_cipher_auth(struct rte_table_action_sym_crypto_params *p,
        if (status < 0)
                goto error_exit;
 
-       xform_cipher = parse_table_action_cipher(p, tokens, 7, encrypt,
-                       used_n_tokens);
+       xform_cipher = parse_table_action_cipher(p, key, max_key_len, tokens,
+                       7, encrypt, used_n_tokens);
        if (xform_cipher == NULL)
                goto error_exit;
 
@@ -3945,8 +3943,6 @@ parse_table_action_cipher_auth(struct rte_table_action_sym_crypto_params *p,
        }
 
 error_exit:
-       if (xform_auth->auth.key.data)
-               free(xform_auth->auth.key.data);
        if (p->cipher_auth.auth_iv.val) {
                free(p->cipher_auth.auth_iv.val);
                p->cipher_auth.auth_iv.val = 0;
@@ -3959,8 +3955,8 @@ error_exit:
 
 static struct rte_crypto_sym_xform *
 parse_table_action_aead(struct rte_table_action_sym_crypto_params *p,
-               char **tokens, uint32_t n_tokens, uint32_t encrypt,
-               uint32_t *used_n_tokens)
+               uint8_t *key, uint32_t max_key_len, char **tokens,
+               uint32_t n_tokens, uint32_t encrypt, uint32_t *used_n_tokens)
 {
        struct rte_crypto_sym_xform *xform_aead;
        int status;
@@ -3989,15 +3985,16 @@ parse_table_action_aead(struct rte_table_action_sym_crypto_params *p,
 
        /* aead_key */
        len = strlen(tokens[4]);
-       xform_aead->aead.key.data = calloc(1, len / 2 + 1);
-       if (xform_aead->aead.key.data == NULL)
+       if (len / 2 > max_key_len) {
+               status = -ENOMEM;
                goto error_exit;
+       }
 
-       status = parse_hex_string(tokens[4], xform_aead->aead.key.data,
-                       (uint32_t *)&len);
+       status = parse_hex_string(tokens[4], key, (uint32_t *)&len);
        if (status < 0)
                goto error_exit;
 
+       xform_aead->aead.key.data = key;
        xform_aead->aead.key.length = (uint16_t)len;
 
        /* aead_iv */
@@ -4039,8 +4036,6 @@ parse_table_action_aead(struct rte_table_action_sym_crypto_params *p,
        return xform_aead;
 
 error_exit:
-       if (xform_aead->aead.key.data)
-               free(xform_aead->aead.key.data);
        if (p->aead.iv.val) {
                free(p->aead.iv.val);
                p->aead.iv.val = NULL;
@@ -4063,6 +4058,8 @@ parse_table_action_sym_crypto(char **tokens,
 {
        struct rte_table_action_sym_crypto_params *p = &a->sym_crypto;
        struct rte_crypto_sym_xform *xform = NULL;
+       uint8_t *key = a->sym_crypto_key;
+       uint32_t max_key_len = SYM_CRYPTO_MAX_KEY_SIZE;
        uint32_t used_n_tokens;
        uint32_t encrypt;
        int status;
@@ -4087,20 +4084,20 @@ parse_table_action_sym_crypto(char **tokens,
                tokens += 3;
                n_tokens -= 3;
 
-               xform = parse_table_action_cipher(p, tokens, n_tokens, encrypt,
-                               &used_n_tokens);
+               xform = parse_table_action_cipher(p, key, max_key_len, tokens,
+                               n_tokens, encrypt, &used_n_tokens);
        } else if (strcmp(tokens[3], "cipher_auth") == 0) {
                tokens += 3;
                n_tokens -= 3;
 
-               xform = parse_table_action_cipher_auth(p, tokens, n_tokens,
-                               encrypt, &used_n_tokens);
+               xform = parse_table_action_cipher_auth(p, key, max_key_len,
+                               tokens, n_tokens, encrypt, &used_n_tokens);
        } else if (strcmp(tokens[3], "aead") == 0) {
                tokens += 3;
                n_tokens -= 3;
 
-               xform = parse_table_action_aead(p, tokens, n_tokens, encrypt,
-                               &used_n_tokens);
+               xform = parse_table_action_aead(p, key, max_key_len, tokens,
+                               n_tokens, encrypt, &used_n_tokens);
        }
 
        if (xform == NULL)
@@ -4777,7 +4774,7 @@ cmd_pipeline_table_rule_delete_default(char **tokens,
 }
 
 static void
-ether_addr_show(FILE *f, struct ether_addr *addr)
+ether_addr_show(FILE *f, struct rte_ether_addr *addr)
 {
        fprintf(f, "%02x:%02x:%02x:%02x:%02x:%02x",
                (uint32_t)addr->addr_bytes[0], (uint32_t)addr->addr_bytes[1],
@@ -4949,11 +4946,11 @@ table_rule_show(const char *pipeline_name,
                                        struct rte_table_action_mtr_tc_params *p =
                                                &a->mtr.mtr[i];
                                        enum rte_table_action_policer ga =
-                                               p->policer[e_RTE_METER_GREEN];
+                                               p->policer[RTE_COLOR_GREEN];
                                        enum rte_table_action_policer ya =
-                                               p->policer[e_RTE_METER_YELLOW];
+                                               p->policer[RTE_COLOR_YELLOW];
                                        enum rte_table_action_policer ra =
-                                               p->policer[e_RTE_METER_RED];
+                                               p->policer[RTE_COLOR_RED];
 
                                        fprintf(f, "tc%u meter %u policer g %s y %s r %s ",
                                                i,
@@ -5646,7 +5643,7 @@ load_dscp_table(struct rte_table_action_dscp_table *dscp_table,
        for (dscp = 0, l = 1; ; l++) {
                char line[64];
                char *tokens[3];
-               enum rte_meter_color color;
+               enum rte_color color;
                uint32_t tc_id, tc_queue_id, n_tokens = RTE_DIM(tokens);
 
                if (fgets(line, sizeof(line), f) == NULL)
@@ -5679,17 +5676,17 @@ load_dscp_table(struct rte_table_action_dscp_table *dscp_table,
                switch (tokens[2][0]) {
                case 'g':
                case 'G':
-                       color = e_RTE_METER_GREEN;
+                       color = RTE_COLOR_GREEN;
                        break;
 
                case 'y':
                case 'Y':
-                       color = e_RTE_METER_YELLOW;
+                       color = RTE_COLOR_YELLOW;
                        break;
 
                case 'r':
                case 'R':
-                       color = e_RTE_METER_RED;
+                       color = RTE_COLOR_RED;
                        break;
 
                default: