summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/prox_args.c
diff options
context:
space:
mode:
Diffstat (limited to 'VNFs/DPPD-PROX/prox_args.c')
-rw-r--r--VNFs/DPPD-PROX/prox_args.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/VNFs/DPPD-PROX/prox_args.c b/VNFs/DPPD-PROX/prox_args.c
index a5d10a60..d31fac29 100644
--- a/VNFs/DPPD-PROX/prox_args.c
+++ b/VNFs/DPPD-PROX/prox_args.c
@@ -610,8 +610,8 @@ static int get_port_cfg(unsigned sindex, char *str, void *data)
// A frame of 1526 bytes (1500 bytes mtu, 14 bytes hdr, 4 bytes crc and 8 bytes vlan)
// should not be considered as a jumbo frame. However rte_ethdev.c considers that
// the max_rx_pkt_len for a non jumbo frame is 1518
- cfg->port_conf.rxmode.max_rx_pkt_len = cfg->mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
- if (cfg->port_conf.rxmode.max_rx_pkt_len > ETHER_MAX_LEN) {
+ cfg->port_conf.rxmode.max_rx_pkt_len = cfg->mtu + PROX_RTE_ETHER_HDR_LEN + PROX_RTE_ETHER_CRC_LEN;
+ if (cfg->port_conf.rxmode.max_rx_pkt_len > PROX_RTE_ETHER_MAX_LEN) {
cfg->requested_rx_offload |= DEV_RX_OFFLOAD_JUMBO_FRAME;
}
}
@@ -1554,6 +1554,10 @@ static int get_core_cfg(unsigned sindex, char *str, void *data)
if (err) {
return -1;
}
+ if (queue_id >= RTE_SCHED_BE_QUEUES_PER_PIPE) {
+ set_errf("queue_id must be < %d", RTE_SCHED_BE_QUEUES_PER_PIPE);
+ return -1;
+ }
targ->qos_conf.pipe_params[0].wrr_weights[queue_id] = val;
return 0;
}