[vlan] Add support of VLAN host interface#1645
Conversation
* Infrastructure needed for the VNET ping tool Signed-off-by: Volodymyr Samotiy <[email protected]>
|
missing pytest |
| { | ||
| if (!createVlanHostIntf(vl, hostif_name)) | ||
| { | ||
| throw runtime_error("Cannot create VLAN host interface"); |
There was a problem hiding this comment.
Lets handle the failure gracefully as this is for monitoring Vlan. We can erase it and continue.
| mac = fvValue(i); | ||
| setHostVlanMac(vlan_id, mac); | ||
| } | ||
| else if (fvField(i) == "hostif_name") |
There was a problem hiding this comment.
Does this mean, for every Vlan thats in VNET, a corresponding host if shall be created?
There was a problem hiding this comment.
Yes, since it is per VLAN attribute and created for specific VLAN.
* Add VS test Signed-off-by: Volodymyr Samotiy <[email protected]>
|
In order for VS test to pass first need to merge the following PR for "vslib": sonic-net/sonic-sairedis#804 |
|
@prsunny can you please review? |
@volodymyrsamotiy it was merged. please check that submodule is updated and then retest. |
* Handle gracefully faiure for creating monitoring VLAN hostif Signed-off-by: Volodymyr Samotiy <[email protected]>
c780519 to
c4cdd71
Compare
|
retest this please |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| return false; | ||
| } | ||
|
|
||
| if (!removeVlanHostIntf(vlan)) |
There was a problem hiding this comment.
This must be called only if host_intf_id is present, else skip
| if (!createVlanHostIntf(vl, hostif_name)) | ||
| { | ||
| // No need to fail in case of error as this is for monitoring VLAN. | ||
| // Error message is printed by "createVlanHostIntf" so just handle faiure gracefully. |
|
@volodymyrsamotiy , can you please take a look at the test failures? |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
* Fix review comments Signed-off-by: Volodymyr Samotiy <[email protected]>
|
Fixed last review comments and test failure |
|
Need pr for 201911. cherry-pick has conflict. |
* [vlan] Add support of VLAN host interface * Infrastructure needed for the VNET ping tool Signed-off-by: Volodymyr Samotiy <[email protected]>
* [vlan] Add support of VLAN host interface * Infrastructure needed for the VNET ping tool Signed-off-by: Volodymyr Samotiy <[email protected]>
|
Included without dvs test. Please create new pr for dvs test in 201911. |
|
@volodymyrsamotiy we should optimize the PR to use addHostIntfs() as this can support VLAN based Host router interface. There should not be need of new set of create/remove API's(). We can just add this check |
- Why I did it To include below changes: Set monitoring VLAN hostif up dy default (for VNET ping tool) - How I did it Updated SAI submodule pointer - How to verify it Create VLAN hostif according to changes in PR: sonic-net/sonic-swss#1645 Verify it is admin up by default Signed-off-by: Volodymyr Samotiy <[email protected]>
* [vlan] Add support of VLAN host interface * Infrastructure needed for the VNET ping tool Signed-off-by: Volodymyr Samotiy <[email protected]>
Signed-off-by: Volodymyr Samotiy [email protected]
What I did
Add support of VLAN host interface
Why I did it
It is infrastructure needed for the VNET ping tool
How I verified it
Configured new VLAN with "hostif_name" attribute and verified that it created in HW
Details if related
N/A