pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32642 )
Change subject: grr,bssgpllc,sndcp: Define qos_params ......................................................................
grr,bssgpllc,sndcp: Define qos_params
3GPP TS 44.064 loosely defines "QoS params" on each primitive by listing the fields, which are a bit different on each primitive.
Change-Id: I6760bace69d400edd4576ec2820e29b74f8dfca5 --- M include/osmocom/gprs/llc/llc_prim.h M include/osmocom/gprs/rlcmac/rlcmac_prim.h M include/osmocom/gprs/sndcp/sndcp_prim.h M src/gmm/gmm.c M src/gmm/gmm_prim.c 5 files changed, 50 insertions(+), 16 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/42/32642/1
diff --git a/include/osmocom/gprs/llc/llc_prim.h b/include/osmocom/gprs/llc/llc_prim.h index a2b53cb..d5a424d 100644 --- a/include/osmocom/gprs/llc/llc_prim.h +++ b/include/osmocom/gprs/llc/llc_prim.h @@ -167,7 +167,12 @@ } xid; /* OSMO_GPRS_LLC_LL_DATA | Req */ struct { - uint8_t qos_params[3]; + struct { + uint8_t peak_throughput; + /* SGSN-only: */ + uint8_t precedence_class; + uint8_t delay_class; + } qos_params; /* 3GPP TS 44.064 7.2.2.5 */ uint8_t reference; /* TODO: confirm type */ uint8_t radio_prio; /* only for the MS side */ } data_req; @@ -177,7 +182,13 @@ } data_cnf; /* OSMO_GPRS_LLC_LL_UNITDATA | Req */ struct { - uint8_t qos_params[3]; + struct { + uint8_t reliability_class; + uint8_t peak_throughput; + /* SGSN-only: */ + uint8_t precedence_class; + uint8_t delay_class; + } qos_params; /* 3GPP TS 44.064 7.2.2.6 */ uint8_t radio_prio; /* only for the MS side */ bool apply_gea; /* Cipher */ bool apply_gia; /* Integrity Protection */ @@ -209,14 +220,17 @@ struct { uint8_t sapi; uint8_t radio_prio; - uint8_t qos_params[3]; - + struct { + uint8_t peak_throughput; + } qos_params; /* 3GPP TS 44.064 7.2.3.1 */ } data_req; /* OSMO_GPRS_LLC_GRR_UNITDATA| Req */ struct { uint8_t sapi; uint8_t radio_prio; - uint8_t qos_params[3]; + struct { + uint8_t peak_throughput; + } qos_params; /* 3GPP TS 44.064 7.2.3.2 */ uint8_t cause; } unitdata_req; }; @@ -237,7 +251,11 @@ union { /* OSMO_GPRS_LLC_BSSGP_DL_UNITDATA | Req */ struct { - uint8_t qos_params[3]; + struct { + uint8_t precedence_class; + uint8_t delay_class; + uint8_t peak_throughput; + } qos_params; /* 3GPP TS 44.064 7.2.4.1 */ bool rlc_confirm; uint8_t sapi; /* TODO: MOCN specific parameters: diff --git a/include/osmocom/gprs/rlcmac/rlcmac_prim.h b/include/osmocom/gprs/rlcmac/rlcmac_prim.h index 2d7a899..ae6c0d1 100644 --- a/include/osmocom/gprs/rlcmac/rlcmac_prim.h +++ b/include/osmocom/gprs/rlcmac/rlcmac_prim.h @@ -49,13 +49,17 @@ struct { uint8_t sapi; uint8_t radio_prio; - uint8_t qos_params[3]; + struct { + uint8_t peak_throughput; + } qos_params; /* 3GPP TS 44.064 7.2.3.1 */ } data_req; /* OSMO_GPRS_RLCMAC_GRR_UNITDATA | Req */ struct { uint8_t sapi; uint8_t radio_prio; - uint8_t qos_params[3]; + struct { + uint8_t peak_throughput; + } qos_params; /* 3GPP TS 44.064 7.2.3.2 */ uint8_t cause; } unitdata_req; }; diff --git a/include/osmocom/gprs/sndcp/sndcp_prim.h b/include/osmocom/gprs/sndcp/sndcp_prim.h index b19498f..619ffba 100644 --- a/include/osmocom/gprs/sndcp/sndcp_prim.h +++ b/include/osmocom/gprs/sndcp/sndcp_prim.h @@ -125,7 +125,7 @@ struct { uint8_t nsapi; uint8_t sapi; - uint8_t qos_params[3]; + uint8_t qos_profile[3]; uint8_t radio_prio; } activate_ind; /* OSMO_GPRS_SNDCP_SNSM_ACTIVATE | Rsp */ @@ -147,7 +147,7 @@ struct { uint8_t nsapi; uint8_t sapi; - uint8_t qos_params[3]; + uint8_t qos_profile[3]; uint8_t radio_prio; unsigned int tx_npdu_nr; unsigned int rx_npdu_nr; diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c index faba983..c75a279 100644 --- a/src/gmm/gmm.c +++ b/src/gmm/gmm.c @@ -386,7 +386,7 @@ llc_prim->ll.l3_pdu = msg->l3h; llc_prim->ll.l3_pdu_len = msgb_l3len(msg); /* TODO: - llc_prim->ll.qos_params[3]; + llc_prim->ll.qos_params.*; llc_prim->ll.radio_prio; llc_prim->ll.apply_gea; llc_prim->ll.apply_gia; @@ -420,7 +420,7 @@ llc_prim->ll.l3_pdu = msg->l3h; llc_prim->ll.l3_pdu_len = msgb_l3len(msg); /* TODO: - llc_prim->ll.qos_params[3]; + llc_prim->ll.qos_params.*; llc_prim->ll.radio_prio; llc_prim->ll.apply_gea; llc_prim->ll.apply_gia; @@ -457,7 +457,7 @@ llc_prim->ll.l3_pdu = msg->l3h; llc_prim->ll.l3_pdu_len = msgb_l3len(msg); /* TODO: - llc_prim->ll.qos_params[3]; + llc_prim->ll.qos_params.*; llc_prim->ll.radio_prio; llc_prim->ll.apply_gea; llc_prim->ll.apply_gia; @@ -489,7 +489,7 @@ llc_prim->ll.l3_pdu = msg->l3h; llc_prim->ll.l3_pdu_len = msgb_l3len(msg); /* TODO: - llc_prim->ll.qos_params[3]; + llc_prim->ll.qos_params.*; llc_prim->ll.radio_prio; llc_prim->ll.apply_gea; llc_prim->ll.apply_gia; @@ -523,7 +523,7 @@ llc_prim->ll.l3_pdu = msg->l3h; llc_prim->ll.l3_pdu_len = msgb_l3len(msg); /* TODO: - llc_prim->ll.qos_params[3]; + llc_prim->ll.qos_params.*; llc_prim->ll.radio_prio; llc_prim->ll.apply_gea; llc_prim->ll.apply_gia; diff --git a/src/gmm/gmm_prim.c b/src/gmm/gmm_prim.c index ed8fed6..af8f663 100644 --- a/src/gmm/gmm_prim.c +++ b/src/gmm/gmm_prim.c @@ -525,7 +525,7 @@ gmm_prim->gmmsm.unitdata_req.smpdu_len); llc_prim->ll.unitdata_req.radio_prio = gmme->radio_prio; /* TODO: - llc_prim->ll.qos_params[3]; + llc_prim->ll.qos_params.*; llc_prim->ll.apply_gea; llc_prim->ll.apply_gia; */