Skip to content

Commit

Permalink
Merge "Do not add 1 to the queue in the common code"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Sep 6, 2016
2 parents 958abf1 + c301e8d commit 21ff1a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions dp-core/vr_nexthop.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ nh_udp_tunnel_helper(struct vr_packet *pkt, unsigned short sport,
ip->ip_hl = 5;
if (qos) {
ip->ip_tos = VR_IP_DSCP(qos->vfcq_dscp);
pkt->vp_queue = qos->vfcq_queue_id + 1;
pkt->vp_queue = qos->vfcq_queue_id;
pkt->vp_priority = qos->vfcq_dotonep_qos;
} else {
ip->ip_tos = 0;
Expand Down Expand Up @@ -1902,7 +1902,7 @@ nh_gre_tunnel(struct vr_packet *pkt, struct vr_nexthop *nh,
ip->ip_hl = 5;
if (qos) {
ip->ip_tos = VR_IP_DSCP(qos->vfcq_dscp);
pkt->vp_queue = qos->vfcq_queue_id + 1;
pkt->vp_queue = qos->vfcq_queue_id;
pkt->vp_priority = qos->vfcq_dotonep_qos;
} else {
ip->ip_tos = 0;
Expand Down Expand Up @@ -2036,7 +2036,7 @@ nh_encap_l2(struct vr_packet *pkt, struct vr_nexthop *nh,
vr_inet6_set_tos((struct vr_ip6 *)pkt_network_header(pkt),
qos->vfcq_dscp);
}
pkt->vp_queue = qos->vfcq_queue_id + 1;
pkt->vp_queue = qos->vfcq_queue_id;
pkt->vp_priority = qos->vfcq_dotonep_qos;
}
}
Expand Down
2 changes: 1 addition & 1 deletion dp-core/vr_proto_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ vr_ip_rcv(struct vrouter *router, struct vr_packet *pkt,

if (qos) {
vr_inet_set_tos(ip, VR_IP_DSCP(qos->vfcq_dscp));
pkt->vp_queue = qos->vfcq_queue_id + 1;
pkt->vp_queue = qos->vfcq_queue_id;
pkt->vp_priority = qos->vfcq_dotonep_qos;
}

Expand Down
3 changes: 2 additions & 1 deletion linux/vr_host_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,8 +793,9 @@ linux_if_tx(struct vr_interface *vif, struct vr_packet *pkt)
}

skb_reset_mac_header(skb);
/* linux subtracts 1 from the queue value */
if (pkt->vp_queue != VP_QUEUE_INVALID)
skb->queue_mapping = pkt->vp_queue;
skb->queue_mapping = pkt->vp_queue + 1;

if (pkt->vp_priority != VP_PRIORITY_INVALID)
skb->priority = pkt->vp_priority;
Expand Down

0 comments on commit 21ff1a6

Please sign in to comment.