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());
71 !vm_intf->vn()->GetIpam(entry->
IpAddr())) {
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) {
105 if (vm_intf->IsMaxMacIpLearnt()) {
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");
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");
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);
324 const_cast< VmInterface *>(vm_intf), NULL,
325 gateway_ip,
ip_,
mac_,
false,
false);
333 if (hc_uuid == boost::uuids::nil_uuid()) {
337 health_check_table()->Find(hc_uuid);
void Enqueue(MacLearningMgmtRequestPtr &ptr)
bool RequestHandler(MacLearningEntryRequestPtr ptr)
MacIpLearningEntry * Find(const MacIpLearningKey &key)
InterfaceRef interface() const
void Delete(MacLearningEntryPtr ptr)
bool IsTargetIpPresent(IpAddress &ip)
static Agent * GetInstance()
void RegisterHealthCheckNotifyCallback(HealthCheckNotifyCallback fn)
void MacIpEntryUnreachable(MacLearningEntryRequestPtr ptr)
boost::shared_ptr< MacLearningMgmtRequest > MacLearningMgmtRequestPtr
IpAddress destination_ip() const
HealthCheckService * GetHealthCheckService(const VnEntry *vn)
MacIpLearningEntryMap mac_ip_learning_entry_map_
HealthCheckService * hc_service_
boost::asio::ip::address IpAddress
MacLearningProto * mac_learning_proto() const
void Enqueue(MacLearningEntryRequestPtr req)
std::unique_ptr< DBRequestData > data
MacIpLearningTable * table_
InterfaceTable * interface_table() const
bool Enqueue(DBRequest *req)
MacLearningModule * mac_learning_module() const
MacAddress GetPairedMacAddress(uint32_t vrf_id, const IpAddress &ip)
const string & GetName() const
void set_service(HealthCheckService *service)
void AddHealthCheckService(HealthCheckService *service)
void Add(MacLearningEntryPtr ptr)
VmInterface::LearntMacIpList mac_ip_list_
std::string ToString() const
void StopHealthCheckService(HealthCheckInstanceBase *instance)
VrfEntry * FindVrfFromId(size_t index)
tbb::mutex macip_map_mutex_
MacIpLearningRequestQueue work_queue_
std::unique_ptr< DBRequestKey > key
MacIpLearningEntry(MacIpLearningTable *table, uint32_t vrf_id_, const IpAddress &ip, const MacAddress &mac, InterfaceConstRef intf)
SandeshTraceBufferPtr MacLearningTraceBuf
boost::intrusive_ptr< const Interface > InterfaceConstRef
boost::shared_ptr< MacLearningEntryRequest > MacLearningEntryRequestPtr
const VnEntry * vn() const
MacIpLearningTable(Agent *agent, MacLearningProto *proto)
virtual bool UpdateInstanceTask()
void DetectIpMove(MacLearningEntryRequestPtr ptr)
void Enqueue(MacLearningEntryRequestPtr ptr)
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)
VrfTable * vrf_table() const
HealthCheckTable * health_check_table() const
bool HandleEvent(MacLearningEntryRequestPtr ptr)
const boost::uuids::uuid & health_check_uuid() const
void UpdateHealthCheckService()
const std::string & name() const
void EnqueueMgmtReq(MacLearningEntryPtr ptr, bool add)
void MacIpEntryHcNotify(const HealthCheckInstanceService *instance_service)
virtual const MacAddress destination_mac() const
HealthCheckInstanceBase * hc_instance_
void EnqueueToTable(MacLearningEntryRequestPtr req)
std::pair< MacIpLearningKey, MacLearningEntryPtr > MacIpLearningEntryPair
bool ProcessProto(boost::shared_ptr< PktInfo > msg_info)
MacIpLearningRequestQueue(MacIpLearningTable *table)
void Resync(MacLearningEntryPtr ptr)
MacLearningMgmtManager * mac_learning_mgmt() const
MacIpLearningTable * mac_ip_learning_table_
boost::shared_ptr< MacLearningEntry > MacLearningEntryPtr