Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

From,GTP hash is supported on pica8 switch.GTP hash support ecmp-gtp-hash and lag-gtp-hash.GTP teid hash works well whatever adding a lag port or lag-select-group.But only works well when configure ecmp-select-group.The layer4 port hash fields does not work when setting with gtp_teid(ovs-vsctl set-lag-advance-hash-mapping-fields gtp_teid port_src),but works well when not set gtp_teid(ovs-vsctl set-lag-advance-hash-mapping-fields port_src).You can modify the udf dst port through this commnad "ovs-vsctl set-gtp-udp-dst-ports <portnumber>",default is 2152.After enable advance mode on lag port,all hash fields are enabled except gtp_teid.The same with the ecmp-hash-fields.


support platforms

TridentII, tridentII+,thomahawk support gtp hash

1. hash through a lag port
step1,add a lag port
    ovs-vsctl add-port br0 te-1/1/4 vlan_mode=trunk tag=1 
    ovs-vsctl add-port br0 te-1/1/5 vlan_mode=trunk tag=1 
    ovs-vsctl add-port br0 ae1 vlan_mode=trunk tag=1 -- set interface ae1 type=pica8_lag options:members=te-1/1/4,te-1/1/5
step2,set hash-fields to teid
    ovs-vsctl set interface ae1 options:hash-mapping=advance
    ovs-vsctl set-lag-advance-hash-mapping-fields gtp_teid
step3,add a flow 
without matching teid
    ovs-ofctl add-flow br0 in_port=3,actions=1025
 matching teid
    ovs-vsctl set-udf-mode "udf0(l4,offset=12,length=4)"
    ovs-ofctl add-flow br0 in_port=1,table=250,udf0=0x00000000/0xfffffff0,actions=1025 
2. lag-select-group
step1,enable lag-select-group and add a group
    ovs-vsctl set-group-ranges lag-select-groups=2-20
    sudo systemctl restart picos

    ovs-ofctl add-group br0 group_id=2,type=select,bucket=output:4,bucket=output:5

step2,set hash-fields to teid
     ovs-vsctl set-lag-advance-hash-mapping-fields gtp_teid
step3,add a flow 
without matching teid
    ovs-ofctl add-flow br0 in_port=3,actions=group:2
with matching teid:
    ovs-vsctl set-udf-mode "udf0(l4,offset=12,length=4)"
    ovs-ofctl add-flow br0 in_port=1,table=250,udf0=0x00000000/0xfffffff0,actions=group:2 
3. ecmp-select-group
step1,enable ecmp-select-group and add a group

ovs-vsctl set-group-ranges ecmp-select-groups=1-100

sudo systemctl restart picos

ovs-ofctl add-group br0 group_id=1,type=select,bucket=output:14,bucket=output:25,bucket=output:38

Step2, enable ecmp-udf-hash and configure hash-fields is gtp_teid.

ovs-vsctl  set-l3-ecmp-hash-fields gtp_teid

Step3, add a flow

ovs-ofctl add-flow br0 in_port=1,actions=group:1

  • No labels