Hello,
In the gigabit-capable passive optical network (GPON) system, a GPON encapsulation mode (GEM) frame is the smallest service-carrying unit and the basic encapsulation structure. Transmission container (T-CONT) is a service carrier in the upstream direction in the GPON system. All GEM ports are mapped to T-CONTs.

In the GPON system, all services such as Ethernet services are encapsulated into GEM frames and then transmitted on the GPON line. The following figure shows the GEM frame structure.

A GEM header consists of PLI, Port ID, PTI, and header error check (HEC) and is used for differentiating data of different GEM ports.
PLI: indicates the length of data payload.
Port ID: uniquely identifies a GEM port.
PTI: indicates the payload type. It is used for identifying the status and type of data that is being transmitted, for example, whether the operation, administration and maintenance (OAM) message is being transmitted and whether data transmission is complete.
HEC: ensures the forward error correction (FEC) function and transmission quality.
Fragment payload: indicates the frame fragment.
This section uses the mapping mode of Ethernet services in GPON as an example to describe the functions of GEM frames.

The GPON system parses Ethernet frames and maps data into GEM payloads for transmission.
A GEM port identifies a virtual service channel on the GPON line between the OLT and the ONU, that is, a channel that carries the service stream. It is similar to the virtual path identifier (VPI) /virtual channel identifier (VCI) of the asynchronous transfer mode (ATM) virtual connection.
The service streams are identified by GEM ports and each GEM port is identified by a unique port ID. The port ID is globally allocated by the OLT. When the data is sent downstream to the ONU for decapsulation, an ONU receives the data only when GEM frame is intended for it. The GEM port ID is used to identify GEM frames. Therefore, the GEM port ID for each ONU under each GPON port must be unique; otherwise, ONUs cannot distinguish GEM frames intended for them.

T-CONT is short for Transmission Container. It is a container for holding data to e transmitted upstream.
Multiple GEM frames to be transmitted upstream are encapsulated into the corresponding T-CONT. The T-CONT is then packaged, added with GPON transmission convergence (GTC) frame header, and transmitted upstream to the OLT. In other words, one T-CONT contains information about multiple GEM frames, and multiple T-CONTs form a GTC frame to be transmitted to the OLT. The OLT obtains the encapsulated GEM frames for service identification and matching.

In the upstream direction, data is contained in GEM frames and not closely related to the T-CONT. Why does the T-CONT need to be introduced? The T-CONT concept is used for GPON upstream data scheduling. It can be regarded as QoS control. In GPON, the T-CONT implements dynamic bandwidth assignment (DBA). It is the basis of DBA implementation and basic control unit of the upstream bandwidth in the GPON system. An ONU applies for bandwidth using T-CONTs, and the OLT allocates bandwidth to T-CONT. In this way, the bandwidth is dynamically allocated in the upstream direction in the GPON system. The working principles of DBA will be discussed in detail in later sections.
Now, let's see how T-CONT is defined. Each T-CONT is uniquely identified by an Alloc-ID which is allocated by the OLT GPON port. That is, the ONUs connected to the same GPON port of an OLT do not have T-CONTs with the same Alloc-ID. This identifier is applied to the ONU for easy understanding of service planning and implementation, which is not specified in the protocol. ONU IDs and T-CONT IDs are allocated to each ONU and each upstream service. In a PON port, an Alloc-ID is used to uniquely identify an upstream service stream, and a certain bandwidth is allocated in the upstream direction.
Detail
https://forum.huawei.com/carrier/en/thread-445979.html
Hope this helps
Thanks