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"; }
boost::asio::ip::address IpAddress
boost::intrusive_ptr< const Interface > InterfaceConstRef
MacLearningEntryLocal(MacLearningPartition *table, uint32_t vrf_id, const MacAddress &mac, uint32_t index, InterfaceConstRef intf)
DISALLOW_COPY_AND_ASSIGN(MacLearningEntryLocal)
virtual ~MacLearningEntryLocal()
DISALLOW_COPY_AND_ASSIGN(MacLearningEntryPBB)
MacLearningEntryPBB(MacLearningPartition *table, uint32_t vrf_id, const MacAddress &mac, uint32_t index, const MacAddress &bmac)
virtual ~MacLearningEntryPBB()
const MacAddress & bmac() const
const IpAddress & remote_ip() const
MacLearningEntryRemote(MacLearningPartition *table, uint32_t vrf_id, const MacAddress &mac, uint32_t index, const IpAddress remote_ip)
DISALLOW_COPY_AND_ASSIGN(MacLearningEntryRemote)
virtual ~MacLearningEntryRemote()
void Resync(MacLearningEntryPtr ptr)
MacLearningEntry * Find(const MacLearningKey &key)
virtual ~MacLearningPartition()
DISALLOW_COPY_AND_ASSIGN(MacLearningPartition)
void ReleaseToken(const MacLearningKey &key)
MacLearningEntryPtr TestGet(const MacLearningKey &key)
void SetDeleteQueueDisable(bool disable)
MacLearningRequestQueue add_request_queue_
MacAgingPartition * aging_partition() const
void EnqueueMgmtReq(MacLearningEntryPtr ptr, bool add)
std::pair< MacLearningKey, MacLearningEntryPtr > MacLearningEntryPair
std::map< MacLearningKey, MacLearningEntryPtr, MacLearningKeyCmp > MacLearningEntryTable
void Add(MacLearningEntryPtr ptr)
MacLearningPartition(Agent *agent, MacLearningProto *proto, uint32_t id)
MacLearningRequestQueue change_request_queue_
void Delete(MacLearningEntryPtr ptr)
MacLearningEntryTable mac_learning_table_
void Enqueue(MacLearningEntryRequestPtr req)
void MayBeStartRunner(TokenPool *pool)
boost::shared_ptr< MacAgingPartition > aging_partition_
MacLearningRequestQueue delete_request_queue_
bool RequestHandler(MacLearningEntryRequestPtr ptr)
void SetQueueDisable(bool disable)
static const uint32_t kMaxResponse
static const char kDelimiter
void SendResponse(SandeshResponse *resp)
DISALLOW_COPY_AND_ASSIGN(MacLearningSandeshResp)
bool SetMacKey(string key)
std::string Description() const
MacLearningSandeshResp(Agent *agent, MacEntryResp *resp, std::string resp_ctx, std::string key, const MacAddress &mac)
MacAddress user_given_mac_
bool Run()
Code to execute. Returns true if task is completed. Return false to reschedule the task.
const MacLearningPartition * GetPartition()
virtual ~MacLearningSandeshResp()
MacLearningPartition * mac_learning_table_
std::vector< TokenPtr > TokenList
void EnqueueToTable(MacLearningEntryRequestPtr req)
DISALLOW_COPY_AND_ASSIGN(MacPbbLearningEntry)
const MacLearningKey & key() const
MacPbbLearningEntry(MacLearningPartition *table, uint32_t vrf_id, const MacAddress &mac, uint32_t index)
void AddToken(TokenPtr ptr)
const MacAddress & mac() const
void CopyToken(MacLearningEntry *entry)
MacLearningPartition * mac_learning_table() const
virtual ~MacPbbLearningEntry()
virtual void AddWithToken()
Task is a wrapper over tbb::task to support policies.
boost::shared_ptr< Token > TokenPtr
boost::shared_ptr< MacLearningEntry > MacLearningEntryPtr
boost::shared_ptr< MacLearningEntryRequest > MacLearningEntryRequestPtr