cap.policer_action_recolor_supported);
printf("cap.policer_action_drop_supported %" PRId32 "\n",
cap.policer_action_drop_supported);
+ printf("cap.srtcm_rfc2697_byte_mode_supported %" PRId32 "\n",
+ cap.srtcm_rfc2697_byte_mode_supported);
+ printf("cap.srtcm_rfc2697_packet_mode_supported %" PRId32 "\n",
+ cap.srtcm_rfc2697_packet_mode_supported);
+ printf("cap.trtcm_rfc2698_byte_mode_supported %" PRId32 "\n",
+ cap.trtcm_rfc2698_byte_mode_supported);
+ printf("cap.trtcm_rfc2698_packet_mode_supported %" PRId32 "\n",
+ cap.trtcm_rfc2698_packet_mode_supported);
+ printf("cap.trtcm_rfc4115_byte_mode_supported %" PRId32 "\n",
+ cap.trtcm_rfc4115_byte_mode_supported);
+ printf("cap.trtcm_rfc4115_packet_mode_supported %" PRId32 "\n",
+ cap.trtcm_rfc4115_packet_mode_supported);
printf("cap.stats_mask %" PRIx64 "\n", cap.stats_mask);
}
uint64_t cir;
uint64_t cbs;
uint64_t ebs;
+ int packet_mode;
};
cmdline_parse_token_string_t cmd_add_port_meter_profile_srtcm_add =
TOKEN_NUM_INITIALIZER(
struct cmd_add_port_meter_profile_srtcm_result,
ebs, RTE_UINT64);
+cmdline_parse_token_num_t cmd_add_port_meter_profile_srtcm_packet_mode =
+ TOKEN_NUM_INITIALIZER(
+ struct cmd_add_port_meter_profile_srtcm_result,
+ packet_mode, RTE_UINT32);
static void cmd_add_port_meter_profile_srtcm_parsed(void *parsed_result,
__rte_unused struct cmdline *cl,
mp.srtcm_rfc2697.cir = res->cir;
mp.srtcm_rfc2697.cbs = res->cbs;
mp.srtcm_rfc2697.ebs = res->ebs;
+ mp.packet_mode = res->packet_mode;
ret = rte_mtr_meter_profile_add(port_id, profile_id, &mp, &error);
if (ret != 0) {
cmdline_parse_inst_t cmd_add_port_meter_profile_srtcm = {
.f = cmd_add_port_meter_profile_srtcm_parsed,
.data = NULL,
- .help_str = "add port meter profile srtcm_rfc2697 <port_id> <profile_id> <cir> <cbs> <ebs>",
+ .help_str = "add port meter profile srtcm_rfc2697 <port_id> <profile_id> <cir> <cbs> <ebs> <packet_mode>",
.tokens = {
(void *)&cmd_add_port_meter_profile_srtcm_add,
(void *)&cmd_add_port_meter_profile_srtcm_port,
(void *)&cmd_add_port_meter_profile_srtcm_cir,
(void *)&cmd_add_port_meter_profile_srtcm_cbs,
(void *)&cmd_add_port_meter_profile_srtcm_ebs,
+ (void *)&cmd_add_port_meter_profile_srtcm_packet_mode,
NULL,
},
};
uint64_t pir;
uint64_t cbs;
uint64_t pbs;
+ int packet_mode;
};
cmdline_parse_token_string_t cmd_add_port_meter_profile_trtcm_add =
TOKEN_NUM_INITIALIZER(
struct cmd_add_port_meter_profile_trtcm_result,
pbs, RTE_UINT64);
+cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_packet_mode =
+ TOKEN_NUM_INITIALIZER(
+ struct cmd_add_port_meter_profile_trtcm_result,
+ packet_mode, RTE_UINT32);
static void cmd_add_port_meter_profile_trtcm_parsed(void *parsed_result,
__rte_unused struct cmdline *cl,
mp.trtcm_rfc2698.pir = res->pir;
mp.trtcm_rfc2698.cbs = res->cbs;
mp.trtcm_rfc2698.pbs = res->pbs;
+ mp.packet_mode = res->packet_mode;
ret = rte_mtr_meter_profile_add(port_id, profile_id, &mp, &error);
if (ret != 0) {
cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm = {
.f = cmd_add_port_meter_profile_trtcm_parsed,
.data = NULL,
- .help_str = "add port meter profile trtcm_rfc2698 <port_id> <profile_id> <cir> <pir> <cbs> <pbs>",
+ .help_str = "add port meter profile trtcm_rfc2698 <port_id> <profile_id> <cir> <pir> <cbs> <pbs> <packet_mode>",
.tokens = {
(void *)&cmd_add_port_meter_profile_trtcm_add,
(void *)&cmd_add_port_meter_profile_trtcm_port,
(void *)&cmd_add_port_meter_profile_trtcm_pir,
(void *)&cmd_add_port_meter_profile_trtcm_cbs,
(void *)&cmd_add_port_meter_profile_trtcm_pbs,
+ (void *)&cmd_add_port_meter_profile_trtcm_packet_mode,
NULL,
},
};
uint64_t eir;
uint64_t cbs;
uint64_t ebs;
+ int packet_mode;
};
cmdline_parse_token_string_t cmd_add_port_meter_profile_trtcm_rfc4115_add =
TOKEN_NUM_INITIALIZER(
struct cmd_add_port_meter_profile_trtcm_rfc4115_result,
ebs, RTE_UINT64);
+cmdline_parse_token_num_t
+ cmd_add_port_meter_profile_trtcm_rfc4115_packet_mode =
+ TOKEN_NUM_INITIALIZER(
+ struct cmd_add_port_meter_profile_trtcm_rfc4115_result,
+ packet_mode, RTE_UINT32);
static void cmd_add_port_meter_profile_trtcm_rfc4115_parsed(
void *parsed_result,
mp.trtcm_rfc4115.eir = res->eir;
mp.trtcm_rfc4115.cbs = res->cbs;
mp.trtcm_rfc4115.ebs = res->ebs;
+ mp.packet_mode = res->packet_mode;
ret = rte_mtr_meter_profile_add(port_id, profile_id, &mp, &error);
if (ret != 0) {
cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm_rfc4115 = {
.f = cmd_add_port_meter_profile_trtcm_rfc4115_parsed,
.data = NULL,
- .help_str = "add port meter profile trtcm_rfc4115 <port_id> <profile_id> <cir> <eir> <cbs> <ebs>",
+ .help_str = "add port meter profile trtcm_rfc4115 <port_id> <profile_id> <cir> <eir> <cbs> <ebs> <packet_mode>",
.tokens = {
(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_add,
(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_port,
(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_eir,
(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_cbs,
(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_ebs,
+ (void *)&cmd_add_port_meter_profile_trtcm_rfc4115_packet_mode,
NULL,
},
};
Add meter profile (srTCM rfc2697) to the ethernet device::
testpmd> add port meter profile srtcm_rfc2697 (port_id) (profile_id) \
- (cir) (cbs) (ebs)
+ (cir) (cbs) (ebs) (packet_mode)
where:
* ``profile_id``: ID for the meter profile.
-* ``cir``: Committed Information Rate (CIR) (bytes/second).
-* ``cbs``: Committed Burst Size (CBS) (bytes).
-* ``ebs``: Excess Burst Size (EBS) (bytes).
+* ``cir``: Committed Information Rate (CIR) (bytes per second or packets per second).
+* ``cbs``: Committed Burst Size (CBS) (bytes or packets).
+* ``ebs``: Excess Burst Size (EBS) (bytes or packets).
+* ``packet_mode``: Packets mode for meter profile.
add port meter profile (trTCM rfc2968)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Add meter profile (srTCM rfc2698) to the ethernet device::
testpmd> add port meter profile trtcm_rfc2698 (port_id) (profile_id) \
- (cir) (pir) (cbs) (pbs)
+ (cir) (pir) (cbs) (pbs) (packet_mode)
where:
* ``profile_id``: ID for the meter profile.
-* ``cir``: Committed information rate (bytes/second).
-* ``pir``: Peak information rate (bytes/second).
-* ``cbs``: Committed burst size (bytes).
-* ``pbs``: Peak burst size (bytes).
+* ``cir``: Committed information rate (bytes per second or packets per second).
+* ``pir``: Peak information rate (bytes per second or packets per second).
+* ``cbs``: Committed burst size (bytes or packets).
+* ``pbs``: Peak burst size (bytes or packets).
+* ``packet_mode``: Packets mode for meter profile.
add port meter profile (trTCM rfc4115)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Add meter profile (trTCM rfc4115) to the ethernet device::
testpmd> add port meter profile trtcm_rfc4115 (port_id) (profile_id) \
- (cir) (eir) (cbs) (ebs)
+ (cir) (eir) (cbs) (ebs) (packet_mode)
where:
* ``profile_id``: ID for the meter profile.
-* ``cir``: Committed information rate (bytes/second).
-* ``eir``: Excess information rate (bytes/second).
-* ``cbs``: Committed burst size (bytes).
-* ``ebs``: Excess burst size (bytes).
+* ``cir``: Committed information rate (bytes per second or packets per second).
+* ``eir``: Excess information rate (bytes per second or packets per second).
+* ``cbs``: Committed burst size (bytes or packets).
+* ``ebs``: Excess burst size (bytes or packets).
+* ``packet_mode``: Packets mode for meter profile.
delete port meter profile
~~~~~~~~~~~~~~~~~~~~~~~~~