From 4e5d7e8c9c529987f13fdcfc02c8cb08e0f47386 Mon Sep 17 00:00:00 2001 From: "Anand H. Krishnan" Date: Tue, 5 Jul 2016 13:47:29 +0530 Subject: [PATCH] If there is no flow, QOS configuration should come from interface The QOS configuration value from flow was always taken even if there was no valid value in the flow. Change-Id: I0ab874744257318bd90f11263e34dfe5e4b6307d Closes-BUG: #1598772 --- dp-core/vr_qos.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dp-core/vr_qos.c b/dp-core/vr_qos.c index 5ddd38e73..b3fc13a28 100644 --- a/dp-core/vr_qos.c +++ b/dp-core/vr_qos.c @@ -743,16 +743,19 @@ vr_qos_get_forwarding_class(struct vrouter *router, struct vr_packet *pkt, struct vr_forwarding_md *fmd) { uint8_t tos; - int16_t qos_id; + int16_t qos_id = -1; unsigned int fc_id; struct vr_interface *vif; struct vr_forwarding_class *fc_p; + vif = pkt->vp_if; + if (fmd->fmd_flow_index >= 0) { qos_id = vr_flow_get_qos(router, pkt, fmd); - } else { - vif = pkt->vp_if; + } + + if (qos_id < 0) { qos_id = vif->vif_qos_map_index; }