-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vlan] Add support of VLAN host interface #1645
Conversation
* Infrastructure needed for the VNET ping tool Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
missing pytest |
orchagent/portsorch.cpp
Outdated
{ | ||
if (!createVlanHostIntf(vl, hostif_name)) | ||
{ | ||
throw runtime_error("Cannot create VLAN host interface"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets handle the failure gracefully as this is for monitoring Vlan. We can erase it
and continue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
@@ -362,6 +363,10 @@ void VlanMgr::doVlanTask(Consumer &consumer) | |||
mac = fvValue(i); | |||
setHostVlanMac(vlan_id, mac); | |||
} | |||
else if (fvField(i) == "hostif_name") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean, for every Vlan thats in VNET, a corresponding host if shall be created?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, since it is per VLAN attribute and created for specific VLAN.
* Add VS test Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
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 <volodymyrs@nvidia.com>
c780519
to
c4cdd71
Compare
retest this please |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
orchagent/portsorch.cpp
Outdated
@@ -3689,6 +3753,12 @@ bool PortsOrch::removeVlan(Port vlan) | |||
return false; | |||
} | |||
|
|||
if (!removeVlanHostIntf(vlan)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must be called only if host_intf_id
is present, else skip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
orchagent/portsorch.cpp
Outdated
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
failure - typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@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 <volodymyrs@nvidia.com>
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 <volodymyrs@nvidia.com>
* [vlan] Add support of VLAN host interface * Infrastructure needed for the VNET ping tool Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
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 <volodymyrs@nvidia.com>
* [vlan] Add support of VLAN host interface * Infrastructure needed for the VNET ping tool Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
Signed-off-by: Volodymyr Samotiy volodymyrs@nvidia.com
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