summaryrefslogtreecommitdiff
path: root/lib/bfd.c
diff options
context:
space:
mode:
authorVenkatesan Pradeep <venkatesan.pradeep@ericsson.com>2017-12-25 16:59:22 +0000
committerBen Pfaff <blp@ovn.org>2018-01-23 09:39:33 -0800
commit9f528fdcc897fe163ba3a3a24dd16451e8d17ddf (patch)
treed382f274bb2b73884e18f7b845a52ccd2d85ee48 /lib/bfd.c
parent0cdfddddb66438a8b60635eb1875f32e7afc6735 (diff)
downloadopenvswitch-9f528fdcc897fe163ba3a3a24dd16451e8d17ddf.tar.gz
bfd: Send BFD packets with DSCP CS6
Send BFD packets with TOS value equivalent to DSCP CS6 so that the network can apply the right QoS for those packets. This can help avoid BFD flaps due to network congestion. For a reference on this being the right choice, here is a short declaration: http://www.ciscopress.com/articles/article.asp?p=357102&seqNum=4 A long dissertation: https://www.cisco.com/c/en/us/td/docs/solutions/Enterprise/WAN_and_MAN/QoS_SRND/QoS-SRND-Book/QoSIntro.html But in a nutshell: Network engineers create various queue/drop policies based upon precedence. Routing protocols are considered high priority/high precedence. During link saturation events, packets will get dropped. By creating an egress policy where packets marked by CS6 are allowed front-of-the-queue status, one can be sure that hello's from the various protocols arrive when they need to, without delay and without loss. On the other hand, if the hellos are dropped as part of normal traffic operations, then traffic routing will flap, leading to further congestion and drops. CS6 is a 'well known' marker to network engineers. In many vendor's gear, it is automatically assigned to routing protocol packets. Since OVS does not perform queuing, and leaves that to the kernel edge operations, the queue policies can be used to ensure timely egress of the BFD packets during high utilization events. See also: https://mail.openvswitch.org/pipermail/ovs-dev/2017-October/339784.html https://mail.openvswitch.org/pipermail/ovs-dev/2017-October/339785.html Thanks to Raymond Burkholder <ray@oneunified.net> for much of the above information. Signed-off-by: Venkatesan Pradeep <venkatesan.pradeep@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/bfd.c')
-rw-r--r--lib/bfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bfd.c b/lib/bfd.c
index 482e779ea..55b7453d1 100644
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -613,7 +613,7 @@ bfd_put_packet(struct bfd *bfd, struct dp_packet *p,
ip->ip_ihl_ver = IP_IHL_VER(5, 4);
ip->ip_tot_len = htons(sizeof *ip + sizeof *udp + sizeof *msg);
ip->ip_ttl = MAXTTL;
- ip->ip_tos = IPTOS_LOWDELAY | IPTOS_THROUGHPUT;
+ ip->ip_tos = IPTOS_PREC_INTERNETCONTROL;
ip->ip_proto = IPPROTO_UDP;
put_16aligned_be32(&ip->ip_src, bfd->ip_src);
put_16aligned_be32(&ip->ip_dst, bfd->ip_dst);