A port may be in multiple VLANs in the case of vlan trunk configuration, bv_id could be different for fdb learned on a port.
/**
* @brief Bridge ID. for .1D and Vlan ID for .1Q
*
* @objects SAI_OBJECT_TYPE_BRIDGE, SAI_OBJECT_TYPE_VLAN
*/
sai_object_id_t bv_id;
A port may be in multiple VLANs in the case of vlan trunk configuration, bv_id could be different for fdb learned on a port.
Here the vlan id is set as port pvid all the time:
https://github.com/Azure/sonic-swss/blob/f1e1109442455ff0f89bde9e7cc4b5b94994e011/orchagent/fdborch.cpp#L60