Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M5: Network Assistance Session API: Delivery Boost #84

Closed
davidjwbbc opened this issue Jun 29, 2023 · 10 comments
Closed

M5: Network Assistance Session API: Delivery Boost #84

davidjwbbc opened this issue Jun 29, 2023 · 10 comments
Assignees
Labels
enhancement New feature or request feature A new high-level feature
Milestone

Comments

@davidjwbbc
Copy link
Contributor

davidjwbbc commented Jun 29, 2023

Introduction

Delivery Boost is one of the Network Assistance facilities that a UE can request via the interface at M5. The Delivery Boost may provide a temporary minimum download bit rate boost for the UE.

Design

This builds on the Network Assistance lifecycle work (see #64).

When the AF starts it will look for the following new configuration values in the msaf.yaml file (defaults are shown if the fields do not exist in the configuration file):

msaf:
    networkAssistance:
        deliveryBoost:
            minDlBitRate: 1Mbps
            boostPeriod: 30

The AF will need to listen for a POST request on the M5 server for the following path:

{apiRoot}/3gpp-m5/v2/network-assistance/{naSessionId}/boost-request

Where {naSessionId} is the network assistance session ID returned from Create Network Assistance Session request (see #64).

The request for Delivery Boost contains no request body. The response provided by the AF should be a 200 status code and an OperationSuccessResponse JSON object which will indicate if the Delivery Boost will be attempted or not. The Cache-Control header shall contain a max-age field indicating for how long the AF will maintain the Delivery Boost.

When the request comes into the AF, the AF will:

  1. Check that a Network Assistance session matching the {naSessionId} exists.
    • If the naSessionId doesn't exist then return a 404 error.
  2. Check that the UE is allowed to request a delivery boost right now (it may have an existing active delivery boost or may have requested too many delivery boosts recently).
    • If there's already an active delivery boost then the OperationSuccessResponse will indicate that this request will be denied and a response will be sent to the UE.
    • We will not implement any further restrictions initially, but a place holder for these checks should be left in the code.
  3. Issue an update to the PCF AppSessionContext associated with the network assistance session which will set the mediaComponent.mirBwDl to a delivery boost value configured in the msaf.yaml configuration file.
  4. Wait for the response from the PCF.
    • If the response is a success, then
      • Return an 200 response with the OperationSuccessResponse indicating that the operation was successful and indicate the period for the boost in the Cache-Control: max-age header and field.
        • The period for the delivery boost will come from the configuration variable in msaf.yaml
      • Mark the delivery boost as being active in the network assistance session.
      • Set a timer event for period of the delivery boost
        • When the timer runs out the AF will update the PCF AppSessionContext associated with the network assistance session to remove the mediaComponent.mirBwDl or set it back to its previous value and will set the delivery boost as being inactive in the network assistance session.
    • If the PCF rejected the change then return a 200 response with the OperationSuccessResponse indicating that the operation failed.
  5. If an AppSessionContext is destroyed by the PCF (AppSessionContext change notification) and there is a delivery boost active for the associated network assistance session, then destroy the Timer for that delivery boost.

The sequence of events should look like:

sequenceDiagram
  UE->>AF: (GET) M5_ServiceAccessInformation_retrieveServiceAccessInformation
  AF-->>UE: 200 OK<br/>ServiceAccessInformation<br/>indicating that Network Assistance is available [M5]
  UE->>AF: (POST) M5_NetworkAssistance_createNetworkAssistanceSession
  AF->>PCF: (POST) Npcf_PolicyAuthorization_PostAppSessions
  PCF-->>AF: 201 Created<br/>AppSessionContext
  AF-->>UE:  201 Created<br/>NetworkAssistanceSession
  UE->>AF: (POST) M5_NetworkAssistance_requestDeliveryBoost
  AF->>PCF: (PATCH) Npcf_PolicyAuthorization_ModAppSession
  activate PCF
  PCF-->>AF: 200 OK
  AF-->>UE: 200 OK<br/>OperationSuccessResponse (true)
  par Delivery Boost timer runs out
    AF->>PCF: (PATCH) Npcf_PolicyAuthorization_ModAppSession
    deactivate PCF
    PCF-->>AF: 200 OK
  end
Loading
@davidjwbbc davidjwbbc converted this from a draft issue Jun 29, 2023
@davidjwbbc davidjwbbc added enhancement New feature or request feature A new high-level feature labels Jun 29, 2023
@davidjwbbc davidjwbbc added this to the IBC2023 milestone Jun 29, 2023
@rjb1000
Copy link
Contributor

rjb1000 commented Jun 29, 2023

@davidjwbbc: I wonder if the boost could be implemented as a positive delta to the current bit rate provisioned for the PDU Session in question?

@davidjwbbc
Copy link
Contributor Author

Possibly, but that will rely on the PCF reporting the current value back to us (if it's even been set, I suspect it will be Nil to signal best effort) when it responds to the creation of the AppSessionContext or if it's polled for the latest information. For now it seemed easier to just apply a fixed low bar. If notifications were working these too could be monitored to determine the current bitrate limits, but since they're not the only source will be the AppSessionContext itself.

There's lots of things we could do, such as dynamic boost levels and boost periods based on current network congestion, per UE boost levels (set and retrieved from the UE database) based on if the UE has a subscription to a preferential service or not, boost rate based upon recent boost requests from the same UE (i.e. if a UE is requesting too many boosts then it may be given a reduced boost to maintain the service for other UEs).

@rjb1000
Copy link
Contributor

rjb1000 commented Jun 30, 2023

Let's see how the various PCF implementations behave with our test application before deciding on a particular implementation.

@devbbc
Copy link
Contributor

devbbc commented Aug 14, 2023

Started implementing the Delivery Boost Network Assistance feature. The AF can now read the new configuration values in the msaf.yaml file and store in its internal data structure.

@devbbc
Copy link
Contributor

devbbc commented Aug 16, 2023

Started implementing the methods to handle delivery boost.

On receipt of the POST request for delivery-boost with naSessionId, the AF checks for a matching network assistance session in the AF.

If there is no match, returns a response with code 404.

If naSessionId exists, the AF checks if the UE is allowed to request delivery boost. At the moment, the AF accepts all delivery boost request unless there is an active delivery boost in the requested network assistance session. Implemented a function to check this. Further restrictions can be implemented as part of this function.

If there is an active delivery boost in the requested network assistance session, the AF sends a 200 response with OperationSuccessResponse as application/json object.

Working on mechanism to update to the PCF with associated AppSessionContext.

@devbbc
Copy link
Contributor

devbbc commented Aug 21, 2023

Implemented functions to update the PCF AppSessionContext associated with the network assistance session. Currently implementing the state machine associated with this operation.

@devbbc
Copy link
Contributor

devbbc commented Aug 24, 2023

On receipt of the response indicating a success from the PCF, the AF:

  • Returns a 200 response with the OperationSuccessResponse json object and Cache-Control: max-age header set to the period of the delivery boost as in the configuration file msaf.yaml.
  • Sets the delivery boost as being active for the network assistance session.

Next is to implement the timer event for period of the delivery boost.

@devbbc
Copy link
Contributor

devbbc commented Sep 4, 2023

Implemented the APIs for Delivery Boost. The code compiles successfully. Moving on to testing this functionality with virtual UE/ gnB.

@devbbc
Copy link
Contributor

devbbc commented Sep 6, 2023

Started testing the Delivery boost functionality with virtual UE/ gnB.

Test report summary

  • 5GMS AF is successfully modifying the Application Session Context in the PCF when a delivery boost is requested at reference point M5.
  • 5GMS AF sets a timer to revert the Application Session Context at the end of the boost period.
  • When the timer expires, the 5GMS attempts to revert the Application Session Context, but this is not yet working.

Details

On request of a delivery boost, the AF gets a success response from the PCF. The AF in-turn sets the delivery boost as being active in the network assistance session. Also sends a OperationSuccessResponse to the client indicating that the operation was successful

On timer event, the AF sends a request to update the PCF AppSessionContext associated with the network assistance session. At this point OpenAPI_app_session_context_update_data_patch_free fails as it tries to free an associated memory. Investigating on this error.

@devbbc
Copy link
Contributor

devbbc commented Sep 7, 2023

Reverting the Application Session Context on timer expiry in the 5GMS AF is now working. Below is the sample output depicting the delivery boost API.

Requesting a delivery boost at M5

The command below requests a delivery boost for the Network Assistance session 4b1d1c4-4d99-41ee-a02a-11ed18062101.

$  curl -H 'User-Agent: AF' -X POST -v 'http://192.168.10.223:7773/3gpp-m5/v2/network-assistance/04b1d1c4-4d99-41ee-a02a-11ed18062101/boost-request'
> POST /3gpp-m5/v2/network-assistance/04b1d1c4-4d99-41ee-a02a-11ed18062101/boost-request HTTP/1.1
> Host: 192.168.10.223:7773
> Accept: */*
> User-Agent: AF
> 
< HTTP/1.1 200 OK
< Date: Thu, 07 Sep 2023 16:10:44 GMT
< Connection: close
< Cache-Control: max-age=30
< Server: 5GMSAF-data-network-functions/17 (info.title=M5_NetworkAssistance; info.version=2.0.1) rt-5gms-application-function/1.3.0
< Content-Type: application/json
< Content-Length: 20
< 
{
	"success":	true
}

Requesting a delivery boost at M5 during an existing boost period

This delivery boost is active for 30 seconds. Trying to request a boost within this period returns a response with OperationSuccessResponse with success: false with the appropriate reason as shown below:

$ curl -H 'User-Agent: AF' -X POST -v 'http://192.168.10.223:7773/3gpp-m5/v2/network-assistance/04b1d1c4-4d99-41ee-a02a-11ed18062101/boost-request'
> POST /3gpp-m5/v2/network-assistance/04b1d1c4-4d99-41ee-a02a-11ed18062101/boost-request HTTP/1.1
> Host: 192.168.10.223:7773
> Accept: */*
> User-Agent: AF
> 
< HTTP/1.1 200 OK
< Date: Thu, 07 Sep 2023 16:10:48 GMT
< Connection: close
< Server: 5GMSAF-data-network-functions/17 (info.title=M5_NetworkAssistance; info.version=2.0.1) rt-5gms-application-function/1.3.0
< Content-Type: application/json
< Content-Length: 146
< 
{
	"reason":	"The AF has an active delivery boost for the network assistance session [04b1d1c4-4d99-41ee-a02a-11ed18062101].",
	"success":	false
}

Requesting a delivery boost at M5 after an existing boost period has expired

Requesting a delivery boost after the boost period activates the delivery boost again:

$ curl -H 'User-Agent: AF' -X POST -v 'http://192.168.10.223:7773/3gpp-m5/v2/network-assistance/04b1d1c4-4d99-41ee-a02a-11ed18062101/boost-request'
> POST /3gpp-m5/v2/network-assistance/04b1d1c4-4d99-41ee-a02a-11ed18062101/boost-request HTTP/1.1
> Host: 192.168.10.223:7773
> Accept: */*
> User-Agent: AF
> 
< HTTP/1.1 200 OK
< Date: Thu, 07 Sep 2023 16:11:27 GMT
< Connection: close
< Cache-Control: max-age=30
< Server: 5GMSAF-data-network-functions/17 (info.title=M5_NetworkAssistance; info.version=2.0.1) rt-5gms-application-function/1.3.0
< Content-Type: application/json
< Content-Length: 20
< 
{
	"success":	true
}

@rjb1000 rjb1000 moved this from In Progress to Ready for Review in 5GMS: Network Assistance and Dynamic Policies features Sep 7, 2023
@davidjwbbc davidjwbbc self-assigned this Sep 25, 2023
@davidjwbbc davidjwbbc moved this from Ready for Review to Pull Request pending in 5GMS: Network Assistance and Dynamic Policies features Dec 12, 2023
@davidjwbbc davidjwbbc moved this from Pull Request pending to Done in 5GMS: Network Assistance and Dynamic Policies features Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature A new high-level feature
Development

No branches or pull requests

3 participants