@@ -109,7 +109,7 @@ bool FdbOrch::storeFdbEntryState(const FdbUpdate& update)
109
109
m_entries[entry] = fdbdata;
110
110
SWSS_LOG_INFO (" FdbOrch notification: mac %s was inserted in port %s into bv_id 0x%" PRIx64,
111
111
entry.mac .to_string ().c_str (), portName.c_str (), entry.bv_id );
112
- SWSS_LOG_INFO (" m_entries size=%lu mac=%s port=0x%" PRIx64,
112
+ SWSS_LOG_INFO (" m_entries size=%zu mac=%s port=0x%" PRIx64,
113
113
m_entries.size (), entry.mac .to_string ().c_str (), m_entries[entry].bridge_port_id );
114
114
115
115
// Write to StateDb
@@ -213,29 +213,31 @@ void FdbOrch::update(sai_fdb_event_t type,
213
213
}
214
214
case SAI_FDB_EVENT_AGED:
215
215
{
216
- SWSS_LOG_INFO (" Received AGE event for bvid=%lx mac=%s port=%lx" , entry->bv_id , update.entry .mac .to_string ().c_str (), bridge_port_id);
216
+ SWSS_LOG_INFO (" Received AGE event for bvid=0x%" PRIx64 " mac=%s port=0x%" PRIx64,
217
+ entry->bv_id , update.entry .mac .to_string ().c_str (), bridge_port_id);
217
218
218
219
if (!m_portsOrch->getPort (entry->bv_id , vlan))
219
220
{
220
- SWSS_LOG_NOTICE (" FdbOrch AGE notification: Failed to locate vlan port from bv_id 0x%lx " , entry->bv_id );
221
+ SWSS_LOG_NOTICE (" FdbOrch AGE notification: Failed to locate vlan port from bv_id 0x%" PRIx64 , entry->bv_id );
221
222
}
222
223
223
224
auto existing_entry = m_entries.find (update.entry );
224
225
// we don't have such entries
225
226
if (existing_entry == m_entries.end ())
226
227
{
227
- SWSS_LOG_INFO (" FdbOrch AGE notification: mac %s is not present in bv_id 0x%lx bp 0x%lx " ,
228
+ SWSS_LOG_INFO (" FdbOrch AGE notification: mac %s is not present in bv_id 0x%" PRIx64 " bp 0x%" PRIx64 ,
228
229
update.entry .mac .to_string ().c_str (), entry->bv_id , bridge_port_id);
229
230
break ;
230
231
}
231
232
232
233
if (existing_entry->second .bridge_port_id != bridge_port_id)
233
234
{
234
- SWSS_LOG_INFO (" FdbOrch AGE notification: Stale aging event received for mac-bv_id %s-0x%lx with bp=0x%lx existing bp=0x%lx" , update.entry .mac .to_string ().c_str (), entry->bv_id , bridge_port_id, existing_entry->second .bridge_port_id );
235
+ SWSS_LOG_INFO (" FdbOrch AGE notification: Stale aging event received for mac-bv_id %s-0x%" PRIx64 " with bp=0x%" PRIx64 " existing bp=0x%" PRIx64,
236
+ update.entry .mac .to_string ().c_str (), entry->bv_id , bridge_port_id, existing_entry->second .bridge_port_id );
235
237
// We need to get the port for bridge-port in existing fdb
236
238
if (!m_portsOrch->getPortByBridgePortId (existing_entry->second .bridge_port_id , update.port ))
237
239
{
238
- SWSS_LOG_INFO (" FdbOrch AGE notification: Failed to get port by bridge port ID 0x%lx " , existing_entry->second .bridge_port_id );
240
+ SWSS_LOG_INFO (" FdbOrch AGE notification: Failed to get port by bridge port ID 0x%" PRIx64 , existing_entry->second .bridge_port_id );
239
241
}
240
242
// dont return, let it delete just to bring SONiC and SAI in sync
241
243
// return;
@@ -305,23 +307,24 @@ void FdbOrch::update(sai_fdb_event_t type,
305
307
Port port_old;
306
308
auto existing_entry = m_entries.find (update.entry );
307
309
308
- SWSS_LOG_INFO (" Received MOVE event for bvid=%lx mac=%s port=%lx" , entry->bv_id , update.entry .mac .to_string ().c_str (), bridge_port_id);
310
+ SWSS_LOG_INFO (" Received MOVE event for bvid=0x%" PRIx64 " mac=%s port=0x%" PRIx64,
311
+ entry->bv_id , update.entry .mac .to_string ().c_str (), bridge_port_id);
309
312
310
313
if (!m_portsOrch->getPort (entry->bv_id , vlan))
311
314
{
312
- SWSS_LOG_ERROR (" FdbOrch MOVE notification: Failed to locate vlan port from bv_id 0x%lx " , entry->bv_id );
315
+ SWSS_LOG_ERROR (" FdbOrch MOVE notification: Failed to locate vlan port from bv_id 0x%" PRIx64 , entry->bv_id );
313
316
return ;
314
317
}
315
318
316
319
// We should already have such entry
317
320
if (existing_entry == m_entries.end ())
318
321
{
319
- SWSS_LOG_WARN (" FdbOrch MOVE notification: mac %s is not found in bv_id 0x%lx " ,
322
+ SWSS_LOG_WARN (" FdbOrch MOVE notification: mac %s is not found in bv_id 0x%" PRIx64 ,
320
323
update.entry .mac .to_string ().c_str (), entry->bv_id );
321
324
}
322
325
else if (!m_portsOrch->getPortByBridgePortId (existing_entry->second .bridge_port_id , port_old))
323
326
{
324
- SWSS_LOG_ERROR (" FdbOrch MOVE notification: Failed to get port by bridge port ID 0x%lx " , existing_entry->second .bridge_port_id );
327
+ SWSS_LOG_ERROR (" FdbOrch MOVE notification: Failed to get port by bridge port ID 0x%" PRIx64 , existing_entry->second .bridge_port_id );
325
328
return ;
326
329
}
327
330
@@ -880,13 +883,13 @@ bool FdbOrch::addFdbEntry(const FdbEntry& entry, const string& port_name,
880
883
Port port;
881
884
882
885
SWSS_LOG_ENTER ();
883
- SWSS_LOG_INFO (" mac=%s bv_id=0x%lx port_name=%s type=%s origin=%d" ,
886
+ SWSS_LOG_INFO (" mac=%s bv_id=0x%" PRIx64 " port_name=%s type=%s origin=%d" ,
884
887
entry.mac .to_string ().c_str (), entry.bv_id , port_name.c_str (),
885
888
fdbData.type .c_str (), fdbData.origin );
886
889
887
890
if (!m_portsOrch->getPort (entry.bv_id , vlan))
888
891
{
889
- SWSS_LOG_NOTICE (" addFdbEntry: Failed to locate vlan port from bv_id 0x%lx " , entry.bv_id );
892
+ SWSS_LOG_NOTICE (" addFdbEntry: Failed to locate vlan port from bv_id 0x%" PRIx64 , entry.bv_id );
890
893
return false ;
891
894
}
892
895
@@ -927,7 +930,7 @@ bool FdbOrch::addFdbEntry(const FdbEntry& entry, const string& port_name,
927
930
928
931
if (!m_portsOrch->getPortByBridgePortId (it->second .bridge_port_id , oldPort))
929
932
{
930
- SWSS_LOG_ERROR (" Existing port 0x%lx details not found" , it->second .bridge_port_id );
933
+ SWSS_LOG_ERROR (" Existing port 0x%" PRIx64 " details not found" , it->second .bridge_port_id );
931
934
return false ;
932
935
}
933
936
@@ -1153,18 +1156,18 @@ bool FdbOrch::removeFdbEntry(const FdbEntry& entry, FdbOrigin origin)
1153
1156
1154
1157
SWSS_LOG_ENTER ();
1155
1158
1156
- SWSS_LOG_INFO (" FdbOrch RemoveFDBEntry: mac=%s bv_id=0x%lx origin %d" , entry.mac .to_string ().c_str (), entry.bv_id , origin);
1159
+ SWSS_LOG_INFO (" FdbOrch RemoveFDBEntry: mac=%s bv_id=0x%" PRIx64 " origin %d" , entry.mac .to_string ().c_str (), entry.bv_id , origin);
1157
1160
1158
1161
if (!m_portsOrch->getPort (entry.bv_id , vlan))
1159
1162
{
1160
- SWSS_LOG_NOTICE (" FdbOrch notification: Failed to locate vlan port from bv_id 0x%lx " , entry.bv_id );
1163
+ SWSS_LOG_NOTICE (" FdbOrch notification: Failed to locate vlan port from bv_id 0x%" PRIx64 , entry.bv_id );
1161
1164
return false ;
1162
1165
}
1163
1166
1164
1167
auto it= m_entries.find (entry);
1165
1168
if (it == m_entries.end ())
1166
1169
{
1167
- SWSS_LOG_INFO (" FdbOrch RemoveFDBEntry: FDB entry isn't found. mac=%s bv_id=0x%lx " , entry.mac .to_string ().c_str (), entry.bv_id );
1170
+ SWSS_LOG_INFO (" FdbOrch RemoveFDBEntry: FDB entry isn't found. mac=%s bv_id=0x%" PRIx64 , entry.mac .to_string ().c_str (), entry.bv_id );
1168
1171
1169
1172
/* check whether the entry is in the saved fdb, if so delete it from there. */
1170
1173
deleteFdbEntryFromSavedFDB (entry.mac , vlan.m_vlan_info .vlan_id , origin);
@@ -1174,7 +1177,7 @@ bool FdbOrch::removeFdbEntry(const FdbEntry& entry, FdbOrigin origin)
1174
1177
FdbData fdbData = it->second ;
1175
1178
if (!m_portsOrch->getPortByBridgePortId (fdbData.bridge_port_id , port))
1176
1179
{
1177
- SWSS_LOG_NOTICE (" FdbOrch RemoveFDBEntry: Failed to locate port from bridge_port_id 0x%lx " , fdbData.bridge_port_id );
1180
+ SWSS_LOG_NOTICE (" FdbOrch RemoveFDBEntry: Failed to locate port from bridge_port_id 0x%" PRIx64 , fdbData.bridge_port_id );
1178
1181
return false ;
1179
1182
}
1180
1183
@@ -1207,12 +1210,12 @@ bool FdbOrch::removeFdbEntry(const FdbEntry& entry, FdbOrigin origin)
1207
1210
status = sai_fdb_api->remove_fdb_entry (&fdb_entry);
1208
1211
if (status != SAI_STATUS_SUCCESS)
1209
1212
{
1210
- SWSS_LOG_ERROR (" FdbOrch RemoveFDBEntry: Failed to remove FDB entry. mac=%s, bv_id=0x%lx " ,
1213
+ SWSS_LOG_ERROR (" FdbOrch RemoveFDBEntry: Failed to remove FDB entry. mac=%s, bv_id=0x%" PRIx64 ,
1211
1214
entry.mac .to_string ().c_str (), entry.bv_id );
1212
1215
return true ; // FIXME: it should be based on status. Some could be retried. some not
1213
1216
}
1214
1217
1215
- SWSS_LOG_INFO (" Removed mac=%s bv_id=0x%lx port:%s" ,
1218
+ SWSS_LOG_INFO (" Removed mac=%s bv_id=0x%" PRIx64 " port:%s" ,
1216
1219
entry.mac .to_string ().c_str (), entry.bv_id , port.m_alias .c_str ());
1217
1220
1218
1221
port.m_fdb_count --;
0 commit comments