Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loadbalance svc loopbacks - merge jefferson #314

Merged
merged 1 commit into from
Dec 15, 2020

Conversation

mchalla
Copy link
Contributor

@mchalla mchalla commented Dec 15, 2020

  • bosch has a requirement that when svc target reaches its svc
    the destination should loadbalance across all targets
  • match on correct link while using loopback flows

example flows
Multiple targets on node
/ # ovs-ofctl dump-flows br-int -OOpenFlow13 table=6 | grep 10.106.172.81
cookie=0x0, duration=1177.825s, table=6, n_packets=25, n_bytes=1966, send_flow_rem priority=102,tcp,reg6=0x1,reg7=0,metadata=0/0x200,nw_src=11.3.56.37,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.37->ip_dst,dec_ttl,set_field:10.106.172.81->ip_src,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7
cookie=0x0, duration=1175.826s, table=6, n_packets=12, n_bytes=950, send_flow_rem priority=102,tcp,reg6=0x1,reg7=0x1,metadata=0/0x200,nw_src=11.3.56.38,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.38->ip_dst,dec_ttl,set_field:10.106.172.81->ip_src,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7
cookie=0x0, duration=1175.826s, table=6, n_packets=25, n_bytes=2045, priority=100,tcp,reg6=0x1,reg7=0x2,metadata=0/0x200,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.69->ip_dst,dec_ttl,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7
cookie=0x21, duration=1175.811s, table=6, n_packets=6, n_bytes=475, send_flow_rem priority=100,tcp,reg6=0x1,reg7=0x1,metadata=0/0x200,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.38->ip_dst,dec_ttl,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7
cookie=0x1f, duration=1177.800s, table=6, n_packets=6, n_bytes=475, send_flow_rem priority=99,tcp,reg6=0x1,metadata=0/0x200,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.37->ip_dst,dec_ttl,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7

Single target on node
cookie=0x0, duration=809.410s, table=6, n_packets=37, n_bytes=2916, send_flow_rem priority=102,tcp,reg6=0x1,reg7=0x2,metadata=0/0x200,nw_src=11.3.56.69,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.69->ip_dst,dec_ttl,set_field:10.106.172.81->ip_src,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7
cookie=0x1f, duration=809.410s, table=6, n_packets=0, n_bytes=0, send_flow_rem priority=100,tcp,reg6=0x1,reg7=0x2,metadata=0/0x200,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.69->ip_dst,dec_ttl,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7
cookie=0x0, duration=809.410s, table=6, n_packets=20, n_bytes=1636, priority=100,tcp,reg6=0x1,reg7=0x1,metadata=0/0x200,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.38->ip_dst,dec_ttl,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7
cookie=0x0, duration=811.440s, table=6, n_packets=5, n_bytes=409, priority=99,tcp,reg6=0x1,metadata=0/0x200,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.37->ip_dst,dec_ttl,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7

Signed-off-by: Madhu Challa challa@gmail.com

- bosch has a requirement that when svc target reaches its svc
  the destination should loadbalance across all targets
- match on correct link while using loopback flows

example flows
Multiple targets on node
/ # ovs-ofctl dump-flows br-int -OOpenFlow13 table=6 | grep 10.106.172.81
 cookie=0x0, duration=1177.825s, table=6, n_packets=25, n_bytes=1966, send_flow_rem priority=102,tcp,reg6=0x1,reg7=0,metadata=0/0x200,nw_src=11.3.56.37,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.37->ip_dst,dec_ttl,set_field:10.106.172.81->ip_src,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7
 cookie=0x0, duration=1175.826s, table=6, n_packets=12, n_bytes=950, send_flow_rem priority=102,tcp,reg6=0x1,reg7=0x1,metadata=0/0x200,nw_src=11.3.56.38,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.38->ip_dst,dec_ttl,set_field:10.106.172.81->ip_src,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7
 cookie=0x0, duration=1175.826s, table=6, n_packets=25, n_bytes=2045, priority=100,tcp,reg6=0x1,reg7=0x2,metadata=0/0x200,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.69->ip_dst,dec_ttl,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7
 cookie=0x21, duration=1175.811s, table=6, n_packets=6, n_bytes=475, send_flow_rem priority=100,tcp,reg6=0x1,reg7=0x1,metadata=0/0x200,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.38->ip_dst,dec_ttl,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7
 cookie=0x1f, duration=1177.800s, table=6, n_packets=6, n_bytes=475, send_flow_rem priority=99,tcp,reg6=0x1,metadata=0/0x200,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.37->ip_dst,dec_ttl,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7

Single target on node
 cookie=0x0, duration=809.410s, table=6, n_packets=37, n_bytes=2916, send_flow_rem priority=102,tcp,reg6=0x1,reg7=0x2,metadata=0/0x200,nw_src=11.3.56.69,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.69->ip_dst,dec_ttl,set_field:10.106.172.81->ip_src,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7
 cookie=0x1f, duration=809.410s, table=6, n_packets=0, n_bytes=0, send_flow_rem priority=100,tcp,reg6=0x1,reg7=0x2,metadata=0/0x200,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.69->ip_dst,dec_ttl,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7
 cookie=0x0, duration=809.410s, table=6, n_packets=20, n_bytes=1636, priority=100,tcp,reg6=0x1,reg7=0x1,metadata=0/0x200,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.38->ip_dst,dec_ttl,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7
 cookie=0x0, duration=811.440s, table=6, n_packets=5, n_bytes=409, priority=99,tcp,reg6=0x1,metadata=0/0x200,nw_dst=10.106.172.81,tp_dst=80 actions=set_field:8080->tcp_dst,set_field:11.3.56.37->ip_dst,dec_ttl,load:0xa6aac51->NXM_NX_REG8[],load:0x5->NXM_NX_REG12[],ct(commit,zone=4,exec(load:0x5->NXM_NX_CT_MARK[])),write_metadata:0x400/0x400,goto_table:7

Signed-off-by: Madhu Challa <challa@gmail.com>
@mchalla mchalla merged commit d0e84a0 into jefferson Dec 15, 2020
@mchalla mchalla deleted the jefferson-lb-loopback branch December 15, 2020 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants