Add Ethernet PDU session support and make PDU session request configurable

This MR adds support for Ethernet PDU sessions, and makes PDU sessions configurable: per-PDU session ID, type (IPv4/IPv4v6/IPv6/Ethernet [1]), DNN, NSSAI.

Concretely, it adds a new configuration file section pdu_sessions below uicc0 that looks like this if everything is specified (default values are shown):

uicc0:
  [...]
  pdu_sessions:
    - id: 1
      type: "IPv4"
      nssai_sst: 1
      nssai_sd: 0xffffff
      dnn: "oai"

It is possible to list multiple PDU sessions (add new line - id: 2 to request a second PDU session). It is backwards-compatible to the current PDU session configuration (uicc0.dnn/nssai_sst/etc), the idea being that either legacy or new configuration could be used, but (1) if pdu_sessions exist, it will overwrite the legacy configuration, and (2) multiple PDU sessions, and type, can only be configured using the new config. The old parameters --extra-pdu-id and --default-pdu-id are not accepted anymore. Documentation has been added to the UE tutorial.

It is possible to test an Ethernet PDU session by applying this rfsim-ethernet-pdu.patch, then bring up the CN, gNB, and the first UE, in ci-scripts/yaml_files/5g_rfsimulator. After bring up, it should be possible to test the PDU session inside the UE by verifying it has an TAP interface oaitap_ue1, and ARPing the data network (arping has been added to oai-nr-ue container for that purpose):

ip addr add 192.168.72.140/26 dev oaitap_ue1  # same subnet as data network!
ip link set dev oaitap_ue1 up
arping -c 20 -I oaitap_ue1 192.168.72.135     # will send ARP request in Ethernet frame to get IP address of data network

Outstanding changes:

  • YAML configuration triggers segfault and needs to be fixed
  • Make sure that first PDU session matches oaitun_ueX, regardless of PDU session ID
  • Make sure that Ethernet interfaces (oaitap_ueX) follows the same patterns (e.g., multiple ethernet PDU sessions should follow oaitap_ue1, oaitap_ue1p2, etc.
  • Clean interworking with legacy uicc0.dnn/nssai_sst/nssai_sd, --default-pdu-id, --extra-pdu-id
    • problem: cannot directly replace --extra-pdu-id with --pdu_sessions.[1].id
  • --pdu_sessions.[0].id on the command line works, while --pdu_sessions.[1].id does not. Only the former is marked CONFIG_CMDLINEOPT_PROCESSED, but (1) why? (2) should it be possible to extend an array on the command line?
  • test multiple UEs in one nr-uesoftmodem process
  • some TODOs to address
  • modify old configuration files
Edited by Robert Schmidt

Merge request reports

Loading