diff mbox series

[ovs-dev] bfd: Send BFD packets with DSCP CS6

Message ID DBXPR07MB479E7752ADDF5FC0323D1DCEA010@DBXPR07MB479.eurprd07.prod.outlook.com
State Accepted
Headers show
Series [ovs-dev] bfd: Send BFD packets with DSCP CS6 | expand

Commit Message

Venkatesan Pradeep Dec. 25, 2017, 4:59 p.m. UTC
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.

Signed-off-by: Venkatesan Pradeep <venkatesan.pradeep@ericsson.com>
---
 lib/bfd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Venkatesan Pradeep Jan. 10, 2018, 5:01 a.m. UTC | #1
Gentle reminder to review this patch.

Regards,

Pradeep

-----Original Message-----
From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-bounces@openvswitch.org] On Behalf Of Venkatesan Pradeep
Sent: Monday, December 25, 2017 10:29 PM
To: dev@openvswitch.org
Subject: [ovs-dev] [PATCH] 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.

Signed-off-by: Venkatesan Pradeep <venkatesan.pradeep@ericsson.com>
---
 lib/bfd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bfd.c b/lib/bfd.c
index 40cd0be..8d291bb 100644
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -612,7 +612,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); _______________________________________________
dev mailing list
dev@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Zoltan Balogh Jan. 16, 2018, 9:55 a.m. UTC | #2
Hi,

Acked-by: Zoltan Balogh <zoltan.balogh@ericsson.com>

Ben, is there a chance to get this into 2.9?

Best regards,
Zoltan

> -----Original Message-----
> From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-bounces@openvswitch.org] On Behalf Of Venkatesan Pradeep
> Sent: Wednesday, January 10, 2018 6:02 AM
> To: dev@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH] bfd: Send BFD packets with DSCP CS6
> 
> Gentle reminder to review this patch.
> 
> Regards,
> 
> Pradeep
> 
> -----Original Message-----
> From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-bounces@openvswitch.org] On Behalf Of Venkatesan Pradeep
> Sent: Monday, December 25, 2017 10:29 PM
> To: dev@openvswitch.org
> Subject: [ovs-dev] [PATCH] 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.
> 
> Signed-off-by: Venkatesan Pradeep <venkatesan.pradeep@ericsson.com>
> ---
>  lib/bfd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/bfd.c b/lib/bfd.c
> index 40cd0be..8d291bb 100644
> --- a/lib/bfd.c
> +++ b/lib/bfd.c
> @@ -612,7 +612,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); _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Ben Pfaff Jan. 22, 2018, 7:36 p.m. UTC | #3
Can you provide a reference to something that helps me understand why
the new value is the "correct" one?  This is not my area of expertise
and all I learn from the commit message is an assertion that the new
value is better.

Thanks,

Ben.

On Mon, Dec 25, 2017 at 04:59:22PM +0000, Venkatesan Pradeep wrote:
> 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.
> 
> Signed-off-by: Venkatesan Pradeep <venkatesan.pradeep@ericsson.com>
> ---
>  lib/bfd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/bfd.c b/lib/bfd.c
> index 40cd0be..8d291bb 100644
> --- a/lib/bfd.c
> +++ b/lib/bfd.c
> @@ -612,7 +612,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);
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Raymond Burkholder Jan. 23, 2018, 2:23 a.m. UTC | #4
On 01/22/2018 03:36 PM, Ben Pfaff wrote:
> Can you provide a reference to something that helps me understand why
> the new value is the "correct" one?  This is not my area of expertise
> and all I learn from the commit message is an assertion that the new
> value is better.

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.


> 
> Thanks,
> 
> Ben.
> 
> On Mon, Dec 25, 2017 at 04:59:22PM +0000, Venkatesan Pradeep wrote:
>> 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.
>>
>> Signed-off-by: Venkatesan Pradeep <venkatesan.pradeep@ericsson.com>
>> ---
>>   lib/bfd.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/bfd.c b/lib/bfd.c
>> index 40cd0be..8d291bb 100644
>> --- a/lib/bfd.c
>> +++ b/lib/bfd.c
>> @@ -612,7 +612,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);
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Venkatesan Pradeep Jan. 23, 2018, 5:35 a.m. UTC | #5
Hi Raymond,

Thanks for providing the references.

@Ben - we had previously discussed the proposed change on the ovs-dev mailing list:
   https://mail.openvswitch.org/pipermail/ovs-dev/2017-October/339784.html
   https://mail.openvswitch.org/pipermail/ovs-dev/2017-October/339785.html

Thanks,

Pradeep

-----Original Message-----
From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-bounces@openvswitch.org] On Behalf Of Raymond Burkholder
Sent: Tuesday, January 23, 2018 7:53 AM
To: ovs-dev@openvswitch.org
Subject: Re: [ovs-dev] [PATCH] bfd: Send BFD packets with DSCP CS6

On 01/22/2018 03:36 PM, Ben Pfaff wrote:
> Can you provide a reference to something that helps me understand why 
> the new value is the "correct" one?  This is not my area of expertise 
> and all I learn from the commit message is an assertion that the new 
> value is better.

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.


> 
> Thanks,
> 
> Ben.
> 
> On Mon, Dec 25, 2017 at 04:59:22PM +0000, Venkatesan Pradeep wrote:
>> 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.
>>
>> Signed-off-by: Venkatesan Pradeep <venkatesan.pradeep@ericsson.com>
>> ---
>>   lib/bfd.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/bfd.c b/lib/bfd.c
>> index 40cd0be..8d291bb 100644
>> --- a/lib/bfd.c
>> +++ b/lib/bfd.c
>> @@ -612,7 +612,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); 
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> 

--
Raymond Burkholder
ray@oneunified.net
https://blog.raymond.burkholder.net

--
This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Ben Pfaff Jan. 23, 2018, 5:40 p.m. UTC | #6
Thanks Raymond and Venkatesan.  That is exactly the kind of information
I wanted.  I incorporated all of your references into the commit message
and applied this to master and branch-2.9.

On Tue, Jan 23, 2018 at 05:35:11AM +0000, Venkatesan Pradeep wrote:
> Hi Raymond,
> 
> Thanks for providing the references.
> 
> @Ben - we had previously discussed the proposed change on the ovs-dev mailing list:
>    https://mail.openvswitch.org/pipermail/ovs-dev/2017-October/339784.html
>    https://mail.openvswitch.org/pipermail/ovs-dev/2017-October/339785.html
> 
> Thanks,
> 
> Pradeep
> 
> -----Original Message-----
> From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-bounces@openvswitch.org] On Behalf Of Raymond Burkholder
> Sent: Tuesday, January 23, 2018 7:53 AM
> To: ovs-dev@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH] bfd: Send BFD packets with DSCP CS6
> 
> On 01/22/2018 03:36 PM, Ben Pfaff wrote:
> > Can you provide a reference to something that helps me understand why 
> > the new value is the "correct" one?  This is not my area of expertise 
> > and all I learn from the commit message is an assertion that the new 
> > value is better.
> 
> 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.
> 
> 
> > 
> > Thanks,
> > 
> > Ben.
> > 
> > On Mon, Dec 25, 2017 at 04:59:22PM +0000, Venkatesan Pradeep wrote:
> >> 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.
> >>
> >> Signed-off-by: Venkatesan Pradeep <venkatesan.pradeep@ericsson.com>
> >> ---
> >>   lib/bfd.c | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/lib/bfd.c b/lib/bfd.c
> >> index 40cd0be..8d291bb 100644
> >> --- a/lib/bfd.c
> >> +++ b/lib/bfd.c
> >> @@ -612,7 +612,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); 
> >> _______________________________________________
> >> dev mailing list
> >> dev@openvswitch.org
> >> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> > 
> 
> --
> Raymond Burkholder
> ray@oneunified.net
> https://blog.raymond.burkholder.net
> 
> --
> This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff mbox series

Patch

diff --git a/lib/bfd.c b/lib/bfd.c
index 40cd0be..8d291bb 100644
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -612,7 +612,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);