Skip to content

Commit

Permalink
[pfcwd]:inherit PfcAclHanlder from PfcLossyHanlder (sonic-net#423)
Browse files Browse the repository at this point in the history
Signed-off-by: Sihui Han <sihan@microsoft.com>
  • Loading branch information
sihuihan88 authored Jan 3, 2018
1 parent fbe781d commit 0e6183e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion orchagent/pfcactionhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void PfcWdActionHandler::updateWdCounters(const string& queueIdStr, const PfcWdQ

PfcWdAclHandler::PfcWdAclHandler(sai_object_id_t port, sai_object_id_t queue,
uint8_t queueId, shared_ptr<Table> countersTable):
PfcWdActionHandler(port, queue, queueId, countersTable)
PfcWdLossyHandler(port, queue, queueId, countersTable)
{
SWSS_LOG_ENTER();

Expand Down
22 changes: 11 additions & 11 deletions orchagent/pfcactionhandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,17 @@ class PfcWdActionHandler
PfcWdHwStats m_hwStats;
};

class PfcWdAclHandler: public PfcWdActionHandler
// Pfc queue that implements forward action by disabling PFC on queue
class PfcWdLossyHandler: public PfcWdActionHandler
{
public:
PfcWdLossyHandler(sai_object_id_t port, sai_object_id_t queue,
uint8_t queueId, shared_ptr<Table> countersTable);
virtual ~PfcWdLossyHandler(void);
virtual bool getHwCounters(PfcWdHwStats& counters);
};

class PfcWdAclHandler: public PfcWdLossyHandler
{
public:
PfcWdAclHandler(sai_object_id_t port, sai_object_id_t queue,
Expand All @@ -103,16 +113,6 @@ class PfcWdAclHandler: public PfcWdActionHandler
void createPfcAclRule(shared_ptr<AclRuleL3> rule, uint8_t queueId, string strTable);
};

// Pfc queue that implements forward action by disabling PFC on queue
class PfcWdLossyHandler: public PfcWdActionHandler
{
public:
PfcWdLossyHandler(sai_object_id_t port, sai_object_id_t queue,
uint8_t queueId, shared_ptr<Table> countersTable);
virtual ~PfcWdLossyHandler(void);
virtual bool getHwCounters(PfcWdHwStats& counters);
};

// PFC queue that implements drop action by draining queue with buffer of zero size
class PfcWdZeroBufferHandler: public PfcWdLossyHandler
{
Expand Down

0 comments on commit 0e6183e

Please sign in to comment.