21 work_queue_(this), macip_map_mutex_() {
27 switch(ptr->event()) {
33 Add(ptr->mac_learning_entry());
37 Resync(ptr->mac_learning_entry());
41 Delete(ptr->mac_learning_entry());
75 "ip address does not belong to same subnet, ignoring");
83 if ( existing_entry && existing_entry->
Mac() == entry->
Mac()) {
89 "duplicate add request, ingoring");
95 "local IP move detected, delete and add with new mac");
97 if (it->second->deleted() ==
false) {
109 "max mac ip learnt limit reached on interface");
120 if (ptr->deleted() ==
true) {
168 if (!mac_ip_entry || mac_ip_entry->
Mac() == ptr->mac()) {
174 ptr->ip().to_string(), mac_ip_entry->
Mac().
ToString(),
176 "IP Move detected, deleting local entry");
178 it->second->Delete();
193 if (mac_ip_instance_service) {
197 mac_ip_instance_service->
interface()->vrf()->vrf_id();
212 if (mac_ip_entry->
Mac() == ptr->mac()) {
215 mac_ip_entry->
intf()->
name(),
"MACIP unreachable, trigger delete");
216 it->second->Delete();
251 key_(vrf_id, ip), ip_(ip), mac_(mac),
252 intf_(intf), vn_(NULL), hc_service_(NULL), hc_instance_(NULL) {
266 req.
data.reset(data);
285 req.
data.reset(data);
325 gateway_ip,
ip_,
mac_,
false,
false);
333 if (hc_uuid == boost::uuids::nil_uuid()) {
337 health_check_table()->Find(hc_uuid);
boost::asio::ip::address IpAddress
boost::intrusive_ptr< const Interface > InterfaceConstRef
InterfaceTable * interface_table() const
MacLearningModule * mac_learning_module() const
MacLearningProto * mac_learning_proto() const
VrfTable * vrf_table() const
static Agent * GetInstance()
HealthCheckTable * health_check_table() const
bool Enqueue(DBRequest *req)
void set_service(HealthCheckService *service)
IpAddress destination_ip() const
InterfaceRef interface() const
virtual bool UpdateInstanceTask()
virtual const MacAddress destination_mac() const
void StopHealthCheckService(HealthCheckInstanceBase *instance)
bool IsTargetIpPresent(IpAddress &ip)
HealthCheckInstanceBase * StartHealthCheckService(VmInterface *intrface, VmInterface *paired_vmi, const IpAddress &source_ip, const IpAddress &destination_ip, const MacAddress &destination_mac, bool ignore_status_event, bool multi_hop)
void RegisterHealthCheckNotifyCallback(HealthCheckNotifyCallback fn)
const std::string & name() const
std::string ToString() const
void UpdateHealthCheckService()
MacIpLearningEntry(MacIpLearningTable *table, uint32_t vrf_id_, const IpAddress &ip, const MacAddress &mac, InterfaceConstRef intf)
void AddHealthCheckService(HealthCheckService *service)
HealthCheckService * hc_service_
void EnqueueToTable(MacLearningEntryRequestPtr req)
HealthCheckInstanceBase * hc_instance_
MacIpLearningTable * mac_ip_learning_table_
HealthCheckService * GetHealthCheckService(const VnEntry *vn)
MacIpLearningTable * table_
bool HandleEvent(MacLearningEntryRequestPtr ptr)
void Enqueue(MacLearningEntryRequestPtr ptr)
MacIpLearningRequestQueue(MacIpLearningTable *table)
MacAddress GetPairedMacAddress(uint32_t vrf_id, const IpAddress &ip)
void Add(MacLearningEntryPtr ptr)
void Enqueue(MacLearningEntryRequestPtr req)
void DetectIpMove(MacLearningEntryRequestPtr ptr)
bool RequestHandler(MacLearningEntryRequestPtr ptr)
void EnqueueMgmtReq(MacLearningEntryPtr ptr, bool add)
MacIpLearningEntryMap mac_ip_learning_entry_map_
MacIpLearningTable(Agent *agent, MacLearningProto *proto)
MacIpLearningRequestQueue work_queue_
void Delete(MacLearningEntryPtr ptr)
std::pair< MacIpLearningKey, MacLearningEntryPtr > MacIpLearningEntryPair
void MacIpEntryUnreachable(MacLearningEntryRequestPtr ptr)
void Resync(MacLearningEntryPtr ptr)
MacIpLearningEntry * Find(const MacIpLearningKey &key)
tbb::mutex macip_map_mutex_
void MacIpEntryHcNotify(const HealthCheckInstanceService *instance_service)
void Enqueue(MacLearningMgmtRequestPtr &ptr)
MacLearningMgmtManager * mac_learning_mgmt() const
bool ProcessProto(boost::shared_ptr< PktInfo > msg_info)
bool IsMaxMacIpLearnt() const
const VnEntry * vn() const
const boost::uuids::uuid & health_check_uuid() const
const VnIpam * GetIpam(const IpAddress &ip) const
const string & GetName() const
VrfEntry * FindVrfFromId(size_t index)
boost::shared_ptr< MacLearningEntry > MacLearningEntryPtr
boost::shared_ptr< MacLearningEntryRequest > MacLearningEntryRequestPtr
SandeshTraceBufferPtr MacLearningTraceBuf
boost::shared_ptr< MacLearningMgmtRequest > MacLearningMgmtRequestPtr
std::unique_ptr< DBRequestKey > key
std::unique_ptr< DBRequestData > data
VmInterface::LearntMacIpList mac_ip_list_