3GPP 23.501 v20.2.0 — the document's own text
5.8.2.9.0 Introduction
Taught in 13. Where the packets actually go (The 5G system architecture, in depth), 5. The connection, and what is promised on it (The 5G system architecture, overview).
Sending of "end marker" is a functionality which involve SMF and UPF in order to assist the reordering function in the Target RAN. As part of the functionality, constructing of end marker packets can either be done in the SMF or in the UPF, as described in clauses 5.8.2.9.1 and 5.8.2.9.2. Whether constructing of end marker packets is performed by SMF or UPF is determined by network configuration.