TWSD-581 APV GENEVE feature CLI

Review Request #734 — Created March 21, 2025 and submitted

jasonchang
APV10
rel_apv_10_7
mingji, timsu, weikai

/usr/click/bin/backend/geneve.c has been created to support GENEVE CLI commands in Geneve Generic Network Virtualization Encapsulation.

Additionally, I have added the CLI structure in /usr/click/lib/libparser/commands.pm to define the format of each CLI command, including its arguments, types, and whether they are optional.

Following the approach used in VXLAN, I found that different VXLAN CLI command functions are defined in two separate files:
- ./usr/src/sys/net/if_vxlan.c
- ./usr/click/lib/libip/sip.c

Similarly, I have split the definition of Geneve functions into two different files:
- ./usr/src/sys/net/if_geneve.c
- ./usr/click/bin/backend/geneve.c

However, this build only provides the Geneve framework, meaning it lacks actual functionality.

All CLI commands in Geneve Generic Network Virtualization Encapsulation are now available. A response message will be printed based on the provided arguments.

AN(config)#geneve interface g1 22
Set GENEVE: g1, VI number: 22

AN(config)#no geneve associate g1 v1
GENEVE : g1, port name: v1

AN(config)#show geneve bind g1
show GENEVE bind

AN(config)#clear geneve tunnel
Clear GENEVE tunnel

AN(config)#geneve ?
associate Associate GENEVE with VLAN to enable GENEVE gateway function
bind Bind a GENEVE interface to a GENEVE tunnel
disable Disable GENEVE
enable Enable GENEVE
forwarding Configure GENEVE forwarding entries
interface Create a GENEVE interface
learn Enable or disable GENEVE learning function
port Configure GENEVE port
tunnel Create a GENEVE tunnel

AN(config)#no geneve ?
associate Disassociate GENEVE from VLAN
bind Unbind GENEVE interface from GENEVE tunnel
forwarding Delete GENEVE forwarding entries
interface Delete a GENEVE interface
tunnel Delete a GENEVE tunnel

AN(config)#show geneve ?
all Display all configurations of GENEVE
associate Display associated Layer 2 configurations
bind Display tunnel binding configurations
forwarding Display all GENEVE forwarding entries
interface Display GENEVE interface configurations
learn Display GENEVE learn configurations
port Display GENEVE port configurations
tunnel Display GENEVE tunnel configurations

AN(config)#clear geneve ?
all Clear all GENEVE configurations
associate Clear associated Layer 2 configurations
bind Clear tunnel binding configurations of GENEVE interfaces
forwarding Clear GENEVE forwarding entries
interface Clear all GENEVE interfaces
tunnel Clear all GENEVE tunnels

Description From Last Updated

Is it possilbe to has new file like if_geneve.c to implement corresponding functions?

timsutimsu
mingji
  1. Ship It!
  2. 
      
jasonchang
jasonchang
weikai
  1. Ship It!
  2. 
      
jasonchang
timsu
  1. Ship It!
  2. Is it possilbe to has new file like if_geneve.c to implement corresponding functions?

  3. 
      
jasonchang
Review request changed

Status: Closed (submitted)

Loading...