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

API for VxLAN-GPE #1457

Merged
merged 6 commits into from
Sep 10, 2019
Merged

API for VxLAN-GPE #1457

merged 6 commits into from
Sep 10, 2019

Conversation

rewenset
Copy link
Contributor

@rewenset rewenset commented Sep 5, 2019

This PR implements VxLAN-GPE tunnel interface from #1388

@rewenset rewenset added the 🚧 WIP do not merge! work in progress! label Sep 5, 2019
@rewenset rewenset changed the title API for VxLAN-GPE WIP: API for VxLAN-GPE Sep 5, 2019
@ondrej-fabry ondrej-fabry changed the title WIP: API for VxLAN-GPE API for VxLAN-GPE Sep 5, 2019
@rewenset rewenset changed the title API for VxLAN-GPE WIP: API for VxLAN-GPE Sep 5, 2019
@rewenset
Copy link
Contributor Author

rewenset commented Sep 6, 2019

Manual tests with localclient:

Definition of VxLAN-GPE tunnel in code

var (
	vxlanGpeInterface = &vpp_interfaces.Interface{
		Name:    "myVxlanGpeInterface",
		Type:    vpp_interfaces.Interface_VXLAN_TUNNEL,
		Enabled: true,
		Link: &vpp_interfaces.Interface_Vxlan{
			Vxlan: &vpp_interfaces.VxlanLink{
				SrcAddress: "10.10.10.10",
				DstAddress: "20.20.20.20",
				Gpe: &vpp_interfaces.VxlanLink_Gpe{
					Protocol: vpp_interfaces.VxlanLink_Gpe_IP4,
				},
			},
		},
	}
)

Create VxLAN-GPE

+======================================================================================================================+
| #0 - NB Transaction                                                                                       FullResync |
+======================================================================================================================+
  * transaction arguments:
      - seqNum: 0
      - type: NB Transaction, Full Resync
      - values:
          - key: config/vpp/v2/interfaces/myVxlanGpeInterface
            val: { name:"myVxlanGpeInterface" type:VXLAN_TUNNEL enabled:true vxlan:<src_address:"10.10.10.10" dst_address:"20.20.20.20" gpe:<protocol:IP4 > >  }

o----------------------------------------------------------------------------------------------------------------------o
  * executed operations (2019-09-06 13:20:22.403 +0300 EEST -> 2019-09-06 13:20:22.414 +0300 EEST, dur: 11ms):
      1. CREATE:
          - key: config/vpp/v2/interfaces/myVxlanGpeInterface
          - value: { name:"myVxlanGpeInterface" type:VXLAN_TUNNEL enabled:true vxlan:<src_address:"10.10.10.10" dst_address:"20.20.20.20" gpe:<protocol:IP4 > >  }
      2. CREATE [DERIVED]:
          - key: vpp/interface/myVxlanGpeInterface/vrf/0/ip-version/v4
          - value: <EMPTY>
x----------------------------------------------------------------------------------------------------------------------x
| #0 - NB Transaction                                                                                      took 10.7ms |
x----------------------------------------------------------------------------------------------------------------------x

+======================================================================================================================+
| #1 - SB Notification                                                                                                 |
+======================================================================================================================+
  * transaction arguments:
      - seqNum: 1
      - type: SB Notification
      - values:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
            val: <EMPTY>

INFO[0002] Transaction #0 successful! (took 11.1ms)      loc="orchestrator/dispatcher.go(179)" logger=dispatcher
o----------------------------------------------------------------------------------------------------------------------o
  * executed operations (2019-09-06 13:20:22.415 +0300 EEST -> 2019-09-06 13:20:22.415 +0300 EEST, dur: 0s):
      1. CREATE [OBTAINED]:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
          - value: <EMPTY>
x----------------------------------------------------------------------------------------------------------------------x
| #1 - SB Notification                                                                                      took 200µs |
x----------------------------------------------------------------------------------------------------------------------x

Update VxLAN-GPE

+======================================================================================================================+                                                                                             
| #2 - NB Transaction                                                                                                  |                                                                                             
+======================================================================================================================+                                                                                             
  * transaction arguments:
      - seqNum: 2
      - type: NB Transaction
      - values:
          - key: config/vpp/v2/interfaces/myVxlanGpeInterface
            val: { name:"myVxlanGpeInterface" type:VXLAN_TUNNEL enabled:true vxlan:<src_address:"10.10.10.10" dst_address:"30.30.30.30" gpe:<protocol:IP4 > >  }

o----------------------------------------------------------------------------------------------------------------------o
  * executed operations (2019-09-06 13:20:32.415 +0300 EEST -> 2019-09-06 13:20:32.418 +0300 EEST, dur: 3ms):
      1. DELETE [DERIVED RECREATE]:
          - key: vpp/interface/myVxlanGpeInterface/vrf/0/ip-version/v4
          - value: <EMPTY>
      2. DELETE [RECREATE]:
          - key: config/vpp/v2/interfaces/myVxlanGpeInterface
          - value: { name:"myVxlanGpeInterface" type:VXLAN_TUNNEL enabled:true vxlan:<src_address:"10.10.10.10" dst_address:"20.20.20.20" gpe:<protocol:IP4 > >  }
      3. CREATE [RECREATE]:
          - key: config/vpp/v2/interfaces/myVxlanGpeInterface
          - value: { name:"myVxlanGpeInterface" type:VXLAN_TUNNEL enabled:true vxlan:<src_address:"10.10.10.10" dst_address:"30.30.30.30" gpe:<protocol:IP4 > >  }
      4. CREATE [DERIVED RECREATE]:
          - key: vpp/interface/myVxlanGpeInterface/vrf/0/ip-version/v4
          - value: <EMPTY>
x----------------------------------------------------------------------------------------------------------------------x
| #2 - NB Transaction                                                                                       took 2.9ms |
x----------------------------------------------------------------------------------------------------------------------x

+======================================================================================================================+
| #3 - SB Notification                                                                                                 |
+======================================================================================================================+
  * transaction arguments:
      - seqNum: 3
      - type: SB Notification
      - values:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
            val: <NIL>

o----------------------------------------------------------------------------------------------------------------------o
  * executed operations (2019-09-06 13:20:32.418 +0300 EEST -> 2019-09-06 13:20:32.419 +0300 EEST, dur: 1ms):
      1. DELETE [WAS-OBTAINED]:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
          - value: <EMPTY>
x----------------------------------------------------------------------------------------------------------------------x
| #3 - SB Notification                                                                                        took 1ms |
x----------------------------------------------------------------------------------------------------------------------x

+======================================================================================================================+
| #4 - SB Notification                                                                                                 |
+======================================================================================================================+
  * transaction arguments:
      - seqNum: 4
      - type: SB Notification
      - values:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
            val: <EMPTY>

o----------------------------------------------------------------------------------------------------------------------o
  * executed operations (2019-09-06 13:20:38.401 +0300 EEST -> 2019-09-06 13:20:38.401 +0300 EEST, dur: 0s):
      1. CREATE [OBTAINED]:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
          - value: <EMPTY>
x----------------------------------------------------------------------------------------------------------------------x
| #4 - SB Notification                                                                                      took 300µs |
x----------------------------------------------------------------------------------------------------------------------x

Delete VxLAN-GPE

+======================================================================================================================+
| #5 - NB Transaction                                                                                                  |
+======================================================================================================================+
  * transaction arguments:
      - seqNum: 5
      - type: NB Transaction
      - values:
          - key: config/vpp/v2/interfaces/myVxlanGpeInterface
            val: <NIL>

o----------------------------------------------------------------------------------------------------------------------o
  * executed operations (2019-09-06 13:20:42.42 +0300 EEST -> 2019-09-06 13:20:42.421 +0300 EEST, dur: 1ms):
      1. DELETE [DERIVED]:
          - key: vpp/interface/myVxlanGpeInterface/vrf/0/ip-version/v4
          - value: <EMPTY>
      2. DELETE:
          - key: config/vpp/v2/interfaces/myVxlanGpeInterface
          - value: { name:"myVxlanGpeInterface" type:VXLAN_TUNNEL enabled:true vxlan:<src_address:"10.10.10.10" dst_address:"30.30.30.30" gpe:<protocol:IP4 > >  }
x----------------------------------------------------------------------------------------------------------------------x
| #5 - NB Transaction                                                                                       took 1.5ms |
x----------------------------------------------------------------------------------------------------------------------x

+======================================================================================================================+
| #6 - SB Notification                                                                                                 |
+======================================================================================================================+
  * transaction arguments:
      - seqNum: 6
      - type: SB Notification
      - values:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
            val: <NIL>

o----------------------------------------------------------------------------------------------------------------------o
  * executed operations (2019-09-06 13:20:42.422 +0300 EEST -> 2019-09-06 13:20:42.422 +0300 EEST, dur: 0s):
      1. DELETE [WAS-OBTAINED]:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
          - value: <EMPTY>
x----------------------------------------------------------------------------------------------------------------------x
| #6 - SB Notification                                                                                      took 100µs |
x----------------------------------------------------------------------------------------------------------------------x

Create VxLAN-GPE and restart Agent without restarting VPP

+======================================================================================================================+
| #0 - NB Transaction                                                                                       FullResync |
+======================================================================================================================+
  * transaction arguments:
      - seqNum: 0
      - type: NB Transaction, Full Resync
      - values:
          - key: config/vpp/v2/interfaces/myVxlanGpeInterface
            val: { name:"myVxlanGpeInterface" type:VXLAN_TUNNEL enabled:true vxlan:<src_address:"10.10.10.10" dst_address:"20.20.20.20" gpe:<protocol:IP4 > >  }

o----------------------------------------------------------------------------------------------------------------------o
  * executed operations:
      <NONE>
x----------------------------------------------------------------------------------------------------------------------x
| #0 - NB Transaction                                                                                       took 9.3ms |
x----------------------------------------------------------------------------------------------------------------------x

I've also checked updating from VxLAN to VxLAN-GPE and other way around

VxLAN-GPE -> VxLAN

+======================================================================================================================+
| #1 - NB Transaction                                                                                                  |
+======================================================================================================================+
  * transaction arguments:
      - seqNum: 1
      - type: NB Transaction
      - values:
          - key: config/vpp/v2/interfaces/myVxlanGpeInterface
            val: { name:"myVxlanGpeInterface" type:VXLAN_TUNNEL enabled:true vxlan:<src_address:"10.10.10.10" dst_address:"20.20.20.20" >  }

o----------------------------------------------------------------------------------------------------------------------o
  * executed operations (2019-09-06 13:59:35.794 +0300 EEST -> 2019-09-06 13:59:35.797 +0300 EEST, dur: 4ms):
      1. DELETE [DERIVED RECREATE]:
          - key: vpp/interface/myVxlanGpeInterface/vrf/0/ip-version/v4
          - value: <EMPTY>
      2. DELETE [RECREATE]:
          - key: config/vpp/v2/interfaces/myVxlanGpeInterface
          - value: { name:"myVxlanGpeInterface" type:VXLAN_TUNNEL enabled:true vxlan:<src_address:"10.10.10.10" dst_address:"20.20.20.20" gpe:<protocol:IP4 > >  }
      3. CREATE [RECREATE]:
          - key: config/vpp/v2/interfaces/myVxlanGpeInterface
          - value: { name:"myVxlanGpeInterface" type:VXLAN_TUNNEL enabled:true vxlan:<src_address:"10.10.10.10" dst_address:"20.20.20.20" >  }
      4. CREATE [DERIVED RECREATE]:
          - key: vpp/interface/myVxlanGpeInterface/vrf/0/ip-version/v4
          - value: <EMPTY>
x----------------------------------------------------------------------------------------------------------------------x
| #1 - NB Transaction                                                                                       took 3.6ms |
x----------------------------------------------------------------------------------------------------------------------x

+======================================================================================================================+
| #2 - SB Notification                                                                                                 |
+======================================================================================================================+
  * transaction arguments:
      - seqNum: 2
      - type: SB Notification
      - values:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
            val: <NIL>

o----------------------------------------------------------------------------------------------------------------------o
  * executed operations (2019-09-06 13:59:35.798 +0300 EEST -> 2019-09-06 13:59:35.798 +0300 EEST, dur: 0s):
      1. DELETE [WAS-OBTAINED]:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
          - value: <EMPTY>
x----------------------------------------------------------------------------------------------------------------------x
| #2 - SB Notification                                                                                      took 100µs |
x----------------------------------------------------------------------------------------------------------------------x

+======================================================================================================================+
| #3 - SB Notification                                                                                                 |
+======================================================================================================================+
  * transaction arguments:
      - seqNum: 3
      - type: SB Notification
      - values:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
            val: <EMPTY>

o----------------------------------------------------------------------------------------------------------------------o
  * executed operations (2019-09-06 13:59:41.78 +0300 EEST -> 2019-09-06 13:59:41.78 +0300 EEST, dur: 0s):
      1. CREATE [OBTAINED]:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
          - value: <EMPTY>
x----------------------------------------------------------------------------------------------------------------------x
| #3 - SB Notification                                                                                      took 100µs |
x----------------------------------------------------------------------------------------------------------------------x

VxLAN -> VxLAN-GPE

+======================================================================================================================+
| #4 - NB Transaction                                                                                                  |
+======================================================================================================================+
  * transaction arguments:
      - seqNum: 4
      - type: NB Transaction
      - values:
          - key: config/vpp/v2/interfaces/myVxlanGpeInterface
            val: { name:"myVxlanGpeInterface" type:VXLAN_TUNNEL enabled:true vxlan:<src_address:"10.10.10.10" dst_address:"20.20.20.20" gpe:<protocol:IP4 > >  }

o----------------------------------------------------------------------------------------------------------------------o
  * executed operations (2019-09-06 13:59:45.799 +0300 EEST -> 2019-09-06 13:59:45.801 +0300 EEST, dur: 3ms):
      1. DELETE [DERIVED RECREATE]:
          - key: vpp/interface/myVxlanGpeInterface/vrf/0/ip-version/v4
          - value: <EMPTY>
      2. DELETE [RECREATE]:
          - key: config/vpp/v2/interfaces/myVxlanGpeInterface
          - value: { name:"myVxlanGpeInterface" type:VXLAN_TUNNEL enabled:true vxlan:<src_address:"10.10.10.10" dst_address:"20.20.20.20" >  }
      3. CREATE [RECREATE]:
          - key: config/vpp/v2/interfaces/myVxlanGpeInterface
          - value: { name:"myVxlanGpeInterface" type:VXLAN_TUNNEL enabled:true vxlan:<src_address:"10.10.10.10" dst_address:"20.20.20.20" gpe:<protocol:IP4 > >  }
      4. CREATE [DERIVED RECREATE]:
          - key: vpp/interface/myVxlanGpeInterface/vrf/0/ip-version/v4
          - value: <EMPTY>
x----------------------------------------------------------------------------------------------------------------------x
| #4 - NB Transaction                                                                                       took 2.6ms |
x----------------------------------------------------------------------------------------------------------------------x

+======================================================================================================================+
| #5 - SB Notification                                                                                                 |
+======================================================================================================================+
  * transaction arguments:
      - seqNum: 5
      - type: SB Notification
      - values:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
            val: <NIL>

o----------------------------------------------------------------------------------------------------------------------o
  * executed operations (2019-09-06 13:59:45.802 +0300 EEST -> 2019-09-06 13:59:45.802 +0300 EEST, dur: 0s):
      1. DELETE [WAS-OBTAINED]:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
          - value: <EMPTY>
x----------------------------------------------------------------------------------------------------------------------x
| #5 - SB Notification                                                                                      took 100µs |
x----------------------------------------------------------------------------------------------------------------------x

+======================================================================================================================+
| #6 - SB Notification                                                                                                 |
+======================================================================================================================+
  * transaction arguments:
      - seqNum: 6
      - type: SB Notification
      - values:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
            val: <EMPTY>

o----------------------------------------------------------------------------------------------------------------------o
  * executed operations (2019-09-06 13:59:45.802 +0300 EEST -> 2019-09-06 13:59:45.802 +0300 EEST, dur: 0s):
      1. CREATE [OBTAINED]:
          - key: vpp/interface/myVxlanGpeInterface/link-state/UP
          - value: <EMPTY>
x----------------------------------------------------------------------------------------------------------------------x
| #6 - SB Notification                                                                                      took 100µs |
x----------------------------------------------------------------------------------------------------------------------x

@rewenset rewenset changed the title WIP: API for VxLAN-GPE API for VxLAN-GPE Sep 6, 2019
@rewenset rewenset removed the 🚧 WIP do not merge! work in progress! label Sep 6, 2019
@ondrej-fabry ondrej-fabry merged commit 766c876 into ligato:dev Sep 10, 2019
@ondrej-fabry ondrej-fabry mentioned this pull request Sep 11, 2019
VladoLavor pushed a commit to VladoLavor/vpp-agent that referenced this pull request Oct 4, 2019
* Initial VxLAN-GPE support

* Add VPP 1901 and 1908 support

* Move inline comments to new lines

* Validate that DecapVrfId is zero if VxLAN-GPE protocol is not IP4 or IP6

* Add more tests

* Fix methods naming
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants