Skip to content

Commit

Permalink
Handled review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
srj102 committed Oct 30, 2020
1 parent 27f3e5e commit 4a4ca68
Show file tree
Hide file tree
Showing 3 changed files with 183 additions and 184 deletions.
5 changes: 4 additions & 1 deletion orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,10 @@ bool PortsOrch::setPortPvid(Port &port, sai_uint32_t pvid)
SWSS_LOG_ENTER();

if(port.m_type == Port::TUNNEL)
return true;
{
SWSS_LOG_ERROR("pvid setting for tunnel %s is not allowed", port.m_alias.c_str());
return true;
}

if (port.m_rif_id)
{
Expand Down
20 changes: 10 additions & 10 deletions orchagent/portsorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ class PortsOrch : public Orch, public Subject
bool addSubPort(Port &port, const string &alias, const bool &adminUp = true, const uint32_t &mtu = 0);
bool removeSubPort(const string &alias);
void getLagMember(Port &lag, vector<Port> &portv);

bool addTunnel(string tunnel,sai_object_id_t, bool learning=true);
bool removeTunnel(Port tunnel);
bool addBridgePort(Port &port);
bool removeBridgePort(Port &port);
bool addVlanMember(Port &vlan, Port &port, string& tagging_mode);
bool removeVlanMember(Port &vlan, Port &port);
bool isVlanMember(Port &vlan, Port &port);


private:
unique_ptr<Table> m_counterTable;
unique_ptr<Table> m_counterLagTable;
Expand Down Expand Up @@ -214,15 +224,10 @@ class PortsOrch : public Orch, public Subject
bool addHostIntfs(Port &port, string alias, sai_object_id_t &host_intfs_id);
bool setHostIntfsStripTag(Port &port, sai_hostif_vlan_tag_t strip);

bool addBridgePort(Port &port);
bool removeBridgePort(Port &port);
bool setBridgePortLearnMode(Port &port, string learn_mode);

bool addVlan(string vlan);
bool removeVlan(Port vlan);
bool addVlanMember(Port &vlan, Port &port, string& tagging_mode);
bool removeVlanMember(Port &vlan, Port &port);
bool isVlanMember(Port &vlan, Port &port);

bool addLag(string lag);
bool removeLag(Port lag);
Expand All @@ -231,9 +236,6 @@ class PortsOrch : public Orch, public Subject
bool setCollectionOnLagMember(Port &lagMember, bool enableCollection);
bool setDistributionOnLagMember(Port &lagMember, bool enableDistribution);

bool addTunnel(string tunnel,sai_object_id_t, bool learning=true);
bool removeTunnel(Port tunnel);

bool addPort(const set<int> &lane_set, uint32_t speed, int an=0, string fec="");
sai_status_t removePort(sai_object_id_t port_id);
bool initPort(const string &alias, const int index, const set<int> &lane_set);
Expand Down Expand Up @@ -280,8 +282,6 @@ class PortsOrch : public Orch, public Subject
sai_acl_bind_point_type_t &sai_acl_bind_type);
void initGearbox();
bool initGearboxPort(Port &port);
friend class VxlanTunnelOrch;
friend class EvpnRemoteVniOrch;

};
#endif /* SWSS_PORTSORCH_H */
Expand Down
Loading

0 comments on commit 4a4ca68

Please sign in to comment.