Skip to content

Modify sai_create_port to breakout a port for virtual switch#454

Merged
lguohan merged 6 commits intosonic-net:masterfrom
chiourung:tmp_vs_create_remove_port
Jun 10, 2019
Merged

Modify sai_create_port to breakout a port for virtual switch#454
lguohan merged 6 commits intosonic-net:masterfrom
chiourung:tmp_vs_create_remove_port

Conversation

@chiourung
Copy link
Contributor

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

kcudnik and others added 2 commits April 24, 2019 00:59
* 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>
@chiourung
Copy link
Contributor Author

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(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please reuse logic that creates ports in init function, extract that code to separate function and reuse

return SAI_STATUS_SUCCESS;
}

sai_status_t vs_remove_port_BCM56850(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs very close validation what' happens here, is this reflecting reverse operation on create port that happens in vs init function ?

uint32_t port_pgs_count;
std::vector<sai_object_id_t> pgs;

attr.id = SAI_PORT_ATTR_NUMBER_OF_INGRESS_PRIORITY_GROUPS;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, does this logic here reflects what happens in the actual BRCM SAI ?

@lguohan
Copy link
Contributor

lguohan commented May 26, 2019

@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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about mlnx chipset implementation ?

chiourung added 2 commits May 28, 2019 11:37
Signed-off-by: chiourung_huang <chiourung_huang@edge-core.com>
Signed-off-by: chiourung_huang <chiourung_huang@edge-core.com>
@lguohan
Copy link
Contributor

lguohan commented Jun 4, 2019

@kcudnik , anything good now? can you review?

}

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we keep 1 param per line and adding "in" "out" prefixes, please keep formating

@lguohan
Copy link
Contributor

lguohan commented Jun 7, 2019

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

@kcudnik
Copy link
Collaborator

kcudnik commented Jun 7, 2019

is this automatically taken care if we just add the file ?

@lguohan
Copy link
Contributor

lguohan commented Jun 8, 2019

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.

@lguohan
Copy link
Contributor

lguohan commented Jun 8, 2019

Signed-off-by: chiourung_huang <chiourung_huang@edge-core.com>
@lguohan lguohan merged commit be5d002 into sonic-net:master Jun 10, 2019
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants