opencomputeproject / SAI

Switch Abstraction Interface
Other
481 stars 476 forks source link

SAI vlan translation/ vlan tunneling #1337

Open mad4321 opened 3 years ago

mad4321 commented 3 years ago

Is the SAI has support for 802.1q vlan translation or double tag tunneling or selective inner vlanid tunneling?

For example it is possible to create vlan translation in SONiC on Broadcom ASIC via bcmsh, but I did't find such functionality via sai_api.

richardyu-ms commented 2 years ago

could you help elaborate on the description about double tag tunneling or selective inner vlanid tunneling?

for port tagging, you can set different tags on different vlan on the same port by the method https://github.com/opencomputeproject/SAI/blob/4c40bac0d08dec7fa1b4db50bd7a1c6c5af0c004/inc/saivlan.h#L549

and you can set the VLAN port attribute by method, https://github.com/opencomputeproject/SAI/blob/4c40bac0d08dec7fa1b4db50bd7a1c6c5af0c004/inc/saiport.h#L478

i am not so sure about the command in bcmsh, could you help specify the details as well?

@Megathrone to share some other information

kuanyu99 commented 2 years ago

I add some SAI definition to support vlan translation/QinQ feature.

1400

The overall HLD can refer to https://github.com/Azure/SONiC/pull/915