Modify sai_create_port to breakout a port for virtual switch#454
Modify sai_create_port to breakout a port for virtual switch#454lguohan merged 6 commits intosonic-net:masterfrom chiourung:tmp_vs_create_remove_port
Conversation
* Use pre match logic to match ACL TABLE * Change log level to info
For breakout a port, it needs to support create port and remove port. When create a port, it needs to init some attributes. Signed-off-by: chiourung_huang <chiourung_huang@edge-core.com>
|
The virtual switch test (sonic-net/sonic-swss#866) needs this patch to pass breakout port test. |
| return SAI_STATUS_NOT_IMPLEMENTED; | ||
| } | ||
|
|
||
| sai_status_t vs_create_port_BCM56850( |
There was a problem hiding this comment.
please reuse logic that creates ports in init function, extract that code to separate function and reuse
vslib/src/sai_vs_switch_BCM56850.cpp
Outdated
| return SAI_STATUS_SUCCESS; | ||
| } | ||
|
|
||
| sai_status_t vs_remove_port_BCM56850( |
There was a problem hiding this comment.
this needs very close validation what' happens here, is this reflecting reverse operation on create port that happens in vs init function ?
vslib/src/sai_vs_switch_BCM56850.cpp
Outdated
| uint32_t port_pgs_count; | ||
| std::vector<sai_object_id_t> pgs; | ||
|
|
||
| attr.id = SAI_PORT_ATTR_NUMBER_OF_INGRESS_PRIORITY_GROUPS; |
There was a problem hiding this comment.
also, does this logic here reflects what happens in the actual BRCM SAI ?
|
@chiourung, can you revise the code based on the comments? |
1. reuse create priority groups and create qos queue
2. remove the modify for remove_port
Signed-off-by: chiourung_huang <chiourung_huang@edge-core.com>
| CHECK_STATUS(meta_sai_create_oid((sai_object_type_t)SAI_OBJECT_TYPE_PORT, | ||
| port_id,switch_id,attr_count,attr_list,&vs_generic_create)); | ||
|
|
||
| if (g_vs_switch_type == SAI_VS_SWITCH_TYPE_BCM56850) |
There was a problem hiding this comment.
what about mlnx chipset implementation ?
Signed-off-by: chiourung_huang <chiourung_huang@edge-core.com>
Signed-off-by: chiourung_huang <chiourung_huang@edge-core.com>
|
@kcudnik , anything good now? can you review? |
vslib/src/sai_vs_switch_MLNX2700.cpp
Outdated
| } | ||
|
|
||
| static sai_status_t create_ingress_priority_groups() | ||
| static sai_status_t create_ingress_priority_groups_per_port(sai_object_id_t switch_id, sai_object_id_t port_id) |
There was a problem hiding this comment.
we keep 1 param per line and adding "in" "out" prefixes, please keep formating
|
hi kamil, instead of asking people on each and every format issue, can you add a similiar clang-format file and we can add the format test in the pr test. sonic-net/sonic-swss@9d69dd5#diff-1c67ffda5f59314d6dabb50a1d45186c |
|
is this automatically taken care if we just add the file ? |
|
no, you need to run the clang-format. to validate. I can add the script in the pr build, but I need you to come up with the file and first run this for the first time. |
Signed-off-by: chiourung_huang <chiourung_huang@edge-core.com>
…et#454) For breakout a port, it needs to support create port and remove port. When create a port, it needs to init some attributes. Signed-off-by: chiourung_huang <chiourung_huang@edge-core.com>
For breakout a port, it needs to support create port and remove port.
When create a port, it needs to init some attributes.
Signed-off-by: chiourung_huang chiourung_huang@edge-core.com