-
Notifications
You must be signed in to change notification settings - Fork 544
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
[proxy_arp] Implement proxy ARP feature #1285
Conversation
This pull request introduces 1 alert and fixes 10 when merging 1e4a62e into 3829053 - view on LGTM.com new alerts:
fixed alerts:
|
de6a68c
to
1215973
Compare
Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
1215973
to
931c8e7
Compare
can you please fix lgtm alerts? |
* Update VNET virtual switch test Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
* Remove redundant attribute check from VNET virtual switch test Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
* Remove redundant code in VNET virtual test Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
retest this please |
1 similar comment
retest this please |
orchagent/intfsorch.cpp
Outdated
{ | ||
SWSS_LOG_ENTER(); | ||
|
||
if (proxy_arp != "enabled" || proxy_arp != "disabled") |
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.
I don't think we need this check. It wouldn't be added by IntfMgr if value is different
cfgmgr/intfmgr.cpp
Outdated
@@ -420,7 +454,22 @@ bool IntfMgr::doIntfGeneralTask(const vector<string>& keys, | |||
FieldValueTuple fvTuple("mac_addr", MacAddress().to_string()); | |||
data.push_back(fvTuple); | |||
} | |||
|
|||
|
|||
if (!proxy_arp.empty() || !vrf_name.compare(0, strlen(VNET_PREFIX), VNET_PREFIX)) |
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.
A small request for change : After some internal discussion, we don't want to have proxy_arp enabled explicitly for Vnets. Let that also be triggered by config_db entry. I'll make necessary modifications to requirement doc. Please remove this check on Vnets
cfgmgr/intfmgr.cpp
Outdated
EXEC_WITH_ERROR_THROW(cmd.str(), res); | ||
|
||
SWSS_LOG_INFO("Proxy ARP set to \"%s\" on interface \"%s\"", proxy_arp.c_str(), alias.c_str()); | ||
|
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.
Suggest to remove extra line to avoid file getting bigger
orchagent/intfsorch.cpp
Outdated
} | ||
else | ||
{ | ||
port.m_vlan_info.vlan_flood_type = SAI_VLAN_FLOOD_CONTROL_TYPE_ALL; |
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.
I don't see this updated back to port map. Please refer this after updating a field of port. In this case, i dont think you need to store this value. Just pass the flood_type
to setIntfVlanFloodType
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.
Hi @volodymyrsamotiy @prsunny, is it alright to influence the flooding behavior of all BUM packets when proxy_arp enabled? This flood_type attr seems not only applied to ARP packets.
typedef enum _sai_vlan_flood_control_type_t
{
/**
* @brief Flood on all vlan members
*
* When setting all to broadcast or unknown multicast flood, it also includes
* flooding to the router. When setting all to unknown unicast flood, it does
* not include flooding to the router
*/
SAI_VLAN_FLOOD_CONTROL_TYPE_ALL,
/** Disable flooding */
SAI_VLAN_FLOOD_CONTROL_TYPE_NONE,
/** Flood on the L2MC group */
SAI_VLAN_FLOOD_CONTROL_TYPE_L2MC_GROUP,
/**
* @brief Flood on all vlan members and L2MC group
*
* Flood on all vlan members, without the router
* In addition, flood on the supplied L2MC group
*/
SAI_VLAN_FLOOD_CONTROL_TYPE_COMBINED
} sai_vlan_flood_control_type_t;
orchagent/intfsorch.cpp
Outdated
} | ||
|
||
m_syncdIntfses[alias].proxy_arp = (proxy_arp == "enabled") ? true : false; | ||
|
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.
Pls remove this extra line. Just a suggestion
orchagent/port.h
Outdated
sai_vlan_id_t vlan_id = 0; | ||
sai_object_id_t vlan_oid = 0; | ||
sai_vlan_id_t vlan_id = 0; | ||
sai_vlan_flood_control_type_t vlan_flood_type = SAI_VLAN_FLOOD_CONTROL_TYPE_ALL; |
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.
I suggest to remove this attribute as it is a function handled in intforch and portorch doesn't necessarily be aware of this
* Fix review comments Sined-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
* Fix review comments Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
* Remove extra line Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
fixed review comments |
cfgmgr/intfmgr.cpp
Outdated
@@ -420,7 +453,23 @@ bool IntfMgr::doIntfGeneralTask(const vector<string>& keys, | |||
FieldValueTuple fvTuple("mac_addr", MacAddress().to_string()); | |||
data.push_back(fvTuple); | |||
} | |||
|
|||
|
|||
|
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.
Please remove this extra line
cfgmgr/intfmgr.cpp
Outdated
@@ -272,6 +272,33 @@ void IntfMgr::removeSubIntfState(const string &alias) | |||
} | |||
} | |||
|
|||
bool IntfMgr::setIntfProxyArp(const string &alias, const string &vrf_name, const string &proxy_arp) |
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.
Could you please remove this parameter as it is not used?
* Fix review comments Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
@volodymyrsamotiy please create PR for 201911 branch. Chery-pick has conflict |
Signed-off-by: Volodymyr Samotiy volodymyrs@mellanox.com
What I did
Implemented ARP proxy feature.
Why I did it
Feature request according to HLD https://github.com/Azure/SONiC/blob/master/doc/arp/Proxy%20Arp.md.
How I verified it
proc
FSDetails if related
N/A