trivial: renumber ovs tables
No changes in functionality, just renumbering tables 1-8 to make room
to add a new table in the next commit.
@@ -60,14 +60,14 @@ func (c *FlowController) AddOFRules(nodeIP, nodeSubnetCIDR, localIP string) erro
glog.V(5).Infof("AddOFRules for %s", nodeIP)
cookie := generateCookie(nodeIP)
- iprule := fmt.Sprintf("table=7,cookie=0x%s,priority=100,ip,nw_dst=%s,actions=move:NXM_NX_REG0[]->NXM_NX_TUN_ID[0..31],set_field:%s->tun_dst,output:1", cookie, nodeSubnetCIDR, nodeIP)
+ iprule := fmt.Sprintf("table=8,cookie=0x%s,priority=100,ip,nw_dst=%s,actions=move:NXM_NX_REG0[]->NXM_NX_TUN_ID[0..31],set_field:%s->tun_dst,output:1", cookie, nodeSubnetCIDR, nodeIP)
out, err := exec.Command("ovs-ofctl", "-O", "OpenFlow13", "add-flow", "br0", iprule).CombinedOutput()
if err != nil {
glog.Errorf("Error adding flow %q: %s (%v)", iprule, out, err)
return err
}
- arprule := fmt.Sprintf("table=8,cookie=0x%s,priority=100,arp,nw_dst=%s,actions=move:NXM_NX_REG0[]->NXM_NX_TUN_ID[0..31],set_field:%s->tun_dst,output:1", cookie, nodeSubnetCIDR, nodeIP)
+ arprule := fmt.Sprintf("table=9,cookie=0x%s,priority=100,arp,nw_dst=%s,actions=move:NXM_NX_REG0[]->NXM_NX_TUN_ID[0..31],set_field:%s->tun_dst,output:1", cookie, nodeSubnetCIDR, nodeIP)
out, err = exec.Command("ovs-ofctl", "-O", "OpenFlow13", "add-flow", "br0", arprule).CombinedOutput()
if err != nil {
glog.Errorf("Error adding flow %q: %s (%v)", arprule, out, err)
@@ -129,7 +129,7 @@ func (c *FlowController) DelServiceOFRules(netID uint, IP string, protocol api.S
}
func generateBaseServiceRule(IP string, protocol api.ServiceProtocol, port uint) string {
- return fmt.Sprintf("table=4,%s,nw_dst=%s,tp_dst=%d", strings.ToLower(string(protocol)), IP, port)
+ return fmt.Sprintf("table=5,%s,nw_dst=%s,tp_dst=%d", strings.ToLower(string(protocol)), IP, port)
}
func generateAddServiceRule(netID uint, IP string, protocol api.ServiceProtocol, port uint) string {
