Section: 6.3.3.1 Overview
Content: The selection and reselection of the UPF for PDU session establishment, UE mobility or UE traffic offloading are performed by the SMF by considering UPF deployment scenarios such as centrally located UPF and distributed UPF located close to or at the Access Network site. The selection of the UPF shall also enable deployment of UPF with different capabilities, e.g. UPFs supporting no or a subset of optional functionalities. The UPF selection for PDU session establishment in home routed roaming case, the UPF(s) in home PLMN is selected by SMF(s) in HPLMN, and the UPF(s) in the VPLMN is selected by SMF(s) in VPLMN. The exact set of parameters used for the selection mechanism is deployment specific and controlled by the operator configuration. The UPF selection for PDU session establishment, UE mobility or UE traffic offloading involves: - a step of SMF Provisioning of available UPF(s). This step may take place while there is no PDU Session to establish and may be followed by N4 Node Level procedures defined in clause 4.4.3 of TS 23.502[ Procedures for the 5G System (5GS) ]  [3] where the UPF and the SMF may exchange information such as the support of optional functionalities and capabilities. - A step of selection of an UPF for a particular PDU Session; it is followed by N4 session management procedures defined in clause 4.4.1 of TS 23.502[ Procedures for the 5G System (5GS) ]  [3]. To collect the data from the UPF as defined in clause 5.8.2.17, the related dedicated UPF is discovered and selected as following: - When the NF consumer or SCP directly subscribes to the UPF, the NF consumer or SCP queries the NRF including the related discovery parameter. The NRF returns the UPF(s) which meet(s) the discovery request. - When the NF consumer or SCP shall subscribe via the SMF, the NF consumer gets the serving SMF information from the UDM per SUPI, DNN and S-NSSAI. After that, the NF consumer sends a subscription to the indicated SMF and the SMF identifies the related UPF(s) using the parameters of the subscription (e.g. target flow description, AoI, etc.) and transfers the related event subscription information to the identified UPF(s). If the NF consumer does not know the SUPI but only the UE IP address, it may need to invoke the BSF to get the SUPI corresponding to the triplet (IP address, DNN and S-NSSAI).