5 #ifndef SRC_VNSW_AGENT_MAC_LEARNING_MAC_LEARNING_H_
6 #define SRC_VNSW_AGENT_MAC_LEARNING_MAC_LEARNING_H_
83 virtual bool Add() = 0;
109 tbb::mutex::scoped_lock lock(
mutex_);
110 list_.push_back(ptr);
114 tbb::mutex::scoped_lock lock(
mutex_);
121 tbb::mutex::scoped_lock lock(
mutex_);
122 tbb::mutex::scoped_lock lock2(entry1->
mutex_);
124 entry1->
list_.clear();
128 tbb::mutex::scoped_lock lock(
mutex_);
235 uint32_t
id()
const {
264 std::string resp_ctx,
268 std::string
Description()
const {
return "MacLearningSandeshRespTask"; }
virtual ~MacLearningPartition()
void Add(MacLearningEntryPtr ptr)
MacLearningEntryRemote(MacLearningPartition *table, uint32_t vrf_id, const MacAddress &mac, uint32_t index, const IpAddress remote_ip)
std::map< MacLearningKey, MacLearningEntryPtr, MacLearningKeyCmp > MacLearningEntryTable
void AddToken(TokenPtr ptr)
const MacAddress & mac() const
virtual ~MacLearningEntryLocal()
MacAgingPartition * aging_partition() const
const IpAddress & remote_ip() const
void SetDeleteQueueDisable(bool disable)
DISALLOW_COPY_AND_ASSIGN(MacLearningEntryRemote)
const MacLearningKey & key() const
MacLearningRequestQueue change_request_queue_
DISALLOW_COPY_AND_ASSIGN(MacLearningSandeshResp)
virtual ~MacLearningSandeshResp()
boost::asio::ip::address IpAddress
MacAddress user_given_mac_
void CopyToken(MacLearningEntry *entry)
DISALLOW_COPY_AND_ASSIGN(MacLearningEntryLocal)
DISALLOW_COPY_AND_ASSIGN(MacLearningEntryPBB)
MacLearningRequestQueue delete_request_queue_
void EnqueueMgmtReq(MacLearningEntryPtr ptr, bool add)
boost::shared_ptr< MacAgingPartition > aging_partition_
virtual ~MacPbbLearningEntry()
DISALLOW_COPY_AND_ASSIGN(MacPbbLearningEntry)
DISALLOW_COPY_AND_ASSIGN(MacLearningPartition)
virtual void AddWithToken()
std::string Description() const
bool RequestHandler(MacLearningEntryRequestPtr ptr)
const MacLearningPartition * GetPartition()
MacLearningSandeshResp(Agent *agent, MacEntryResp *resp, std::string resp_ctx, std::string key, const MacAddress &mac)
MacLearningPartition * mac_learning_table_
void MayBeStartRunner(TokenPool *pool)
MacLearningEntryPBB(MacLearningPartition *table, uint32_t vrf_id, const MacAddress &mac, uint32_t index, const MacAddress &bmac)
bool Run()
Code to execute. Returns true if task is completed. Return false to reschedule the task...
bool SetMacKey(string key)
std::pair< MacLearningKey, MacLearningEntryPtr > MacLearningEntryPair
boost::intrusive_ptr< const Interface > InterfaceConstRef
boost::shared_ptr< MacLearningEntryRequest > MacLearningEntryRequestPtr
void ReleaseToken(const MacLearningKey &key)
static const char kDelimiter
MacLearningPartition(Agent *agent, MacLearningProto *proto, uint32_t id)
MacPbbLearningEntry(MacLearningPartition *table, uint32_t vrf_id, const MacAddress &mac, uint32_t index)
MacLearningPartition * mac_learning_table() const
std::vector< TokenPtr > TokenList
MacLearningEntryLocal(MacLearningPartition *table, uint32_t vrf_id, const MacAddress &mac, uint32_t index, InterfaceConstRef intf)
void Delete(MacLearningEntryPtr ptr)
void EnqueueToTable(MacLearningEntryRequestPtr req)
void SendResponse(SandeshResponse *resp)
virtual ~MacLearningEntryPBB()
void Resync(MacLearningEntryPtr ptr)
void SetQueueDisable(bool disable)
static const uint32_t kMaxResponse
boost::shared_ptr< Token > TokenPtr
MacLearningEntryTable mac_learning_table_
virtual ~MacLearningEntryRemote()
MacLearningRequestQueue add_request_queue_
Task is a wrapper over tbb::task to support policies.
void Enqueue(MacLearningEntryRequestPtr req)
const MacAddress & bmac() const
MacLearningEntry * Find(const MacLearningKey &key)
boost::shared_ptr< MacLearningEntry > MacLearningEntryPtr
MacLearningEntryPtr TestGet(const MacLearningKey &key)