Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
map-controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Multi-AP
map-controller
Commits
14cdc795
Commit
14cdc795
authored
1 year ago
by
Maxim Menshikov
Committed by
Jakob Olsson
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
qos: remove rules before adding them to ensure they are up to date
parent
d3232220
No related branches found
No related tags found
1 merge request
!323
Merge QoS changes from devel to 7.3
Pipeline
#147319
passed
1 year ago
Stage: static_code_analysis
Stage: compile_test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cntlr_qos.c
+96
-91
96 additions, 91 deletions
src/cntlr_qos.c
with
96 additions
and
91 deletions
src/cntlr_qos.c
+
96
−
91
View file @
14cdc795
...
...
@@ -66,6 +66,7 @@
/* Send Service Prioritization Request to specific hardware address */
static
int
cntlr_qos_send_sp_req
(
struct
controller
*
c
,
bool
add
,
uint8_t
*
origin
,
struct
qos_rule
*
rule
)
{
...
...
@@ -94,7 +95,7 @@ static int cntlr_qos_send_sp_req(struct controller *c,
ret
=
cntlr_gen_spr_tlv
(
c
,
buf
,
rule
->
rule_num
,
true
,
add
,
255
-
rule
->
rule_num
,
rule
->
output
,
rule
->
always_match
);
...
...
@@ -104,107 +105,110 @@ static int cntlr_qos_send_sp_req(struct controller *c,
return
-
1
;
}
switch
(
rule
->
type
)
{
case
QOS_RULE_TYPE_DSCP_PCP
:
if
(
add
)
{
switch
(
rule
->
type
)
{
case
QOS_RULE_TYPE_DSCP_PCP
:
{
/*
* If triggered, a Multi-AP Controller shall send a
* Service Prioritization Request message with a DSCP Mapping
* Table TLV (see section 17.2.71).
*/
ret
=
cntlr_gen_dscp_mapping_table_tlv
(
c
,
buf
,
rule
->
dscp_pcp
.
dscp_pcp
);
break
;
}
/*
* If triggered, a Multi-AP Controller shall send a
*
Service
Prioritization Request message with a
DSCP Mapping Table
* TLV (see section 17.2.
71
).
* If triggered, a Multi-AP Controller shall send a
Service
* Prioritization Request message with a
QoS Management Descriptor
* TLV (see section 17.2.
93
).
*/
ret
=
cntlr_gen_dscp_mapping_table_tlv
(
c
,
buf
,
rule
->
dscp_pcp
.
dscp_pcp
);
break
;
}
/*
* If triggered, a Multi-AP Controller shall send a Service
* Prioritization Request message with a QoS Management Descriptor TLV
* (see section 17.2.93).
*/
/*
* If the Descriptor Element field within a QoS Management Descriptor
* TLV is an MSCS or SCS Descriptor element, the validity lifetime of
* the QMID is either until the Controller receives a Profile-2 Error
* Code TLV indicating the Multi-AP Agent is unable to configure the
* Descriptor or (if the Descriptor is accepted) until the Multi-AP
* Controller sends a QoS Mangagment Descriptor TLV removing the
* Descriptor.
*/
case
QOS_RULE_TYPE_MSCS
:
case
QOS_RULE_TYPE_SCS
:
case
QOS_RULE_TYPE_MGMT
:
{
uint8_t
*
desc
=
NULL
;
uint32_t
desc_len
=
0
;
switch
(
rule
->
type
)
/*
* If the Descriptor Element field within a QoS Management
* Descriptor TLV is an MSCS or SCS Descriptor element, the validity
* lifetime of the QMID is either until the Controller receives a
* Profile-2 Error Code TLV indicating the Multi-AP Agent is unable
* to configure the Descriptor or (if the Descriptor is accepted)
* until the Multi-AP Controller sends a QoS Management Descriptor
* TLV removing the Descriptor.
*/
case
QOS_RULE_TYPE_MSCS
:
case
QOS_RULE_TYPE_SCS
:
case
QOS_RULE_TYPE_MGMT
:
{
case
QOS_RULE_TYPE_SCS
:
{
desc
=
cntlr_gen_qos_scs_desc
(
c
,
SCS_DESC_REQ_TYPE_ADD
,
&
rule
->
mgmt
.
scs
,
&
desc_len
);
break
;
}
case
QOS_RULE_TYPE_MSCS
:
{
desc
=
cntlr_gen_qos_mscs_desc
(
c
,
SCS_DESC_REQ_TYPE_ADD
,
&
rule
->
mgmt
.
mscs
,
&
desc_len
);
break
;
}
case
QOS_RULE_TYPE_MGMT
:
uint8_t
*
desc
=
NULL
;
uint32_t
desc_len
=
0
;
switch
(
rule
->
type
)
{
desc
=
cntlr_gen_qos_mgmt_elem_desc
(
c
,
0
/* not defined yet */
,
&
rule
->
mgmt
.
qm
,
&
desc_len
);
break
;
case
QOS_RULE_TYPE_SCS
:
{
desc
=
cntlr_gen_qos_scs_desc
(
c
,
SCS_DESC_REQ_TYPE_ADD
,
&
rule
->
mgmt
.
scs
,
&
desc_len
);
break
;
}
case
QOS_RULE_TYPE_MSCS
:
{
desc
=
cntlr_gen_qos_mscs_desc
(
c
,
SCS_DESC_REQ_TYPE_ADD
,
&
rule
->
mgmt
.
mscs
,
&
desc_len
);
break
;
}
case
QOS_RULE_TYPE_MGMT
:
{
desc
=
cntlr_gen_qos_mgmt_elem_desc
(
c
,
0
/* not defined yet */
,
&
rule
->
mgmt
.
qm
,
&
desc_len
);
break
;
}
default:
{
break
;
}
}
default:
{
if
(
desc
==
NULL
)
{
ret
=
-
1
;
break
;
}
}
if
(
desc
==
NULL
)
{
/*
* If the Descriptor Element field within a QoS Management
* Descriptor TLV is a QoS Management element containing a DSCP
* Policy attibute, the QMID is used in a Profile-2 Error Code
* TLV to indicate the Multi-AP Agent is unable to configure the
* rule.
*
* If the Descriptor Element field within a QoS Management
* Descriptor TLV is a QoS Management element containing a DSCP
* Policy attribute, the Policy ID in the Descriptor Element
* field is chosen by the Multi-AP Controller, and (per [25])
* has scope across the ESS (i.e., policy survives a roam after,
* after STA roams to another BSSID).
*
* If triggered, a Multi-AP Controller may modify or remove a
* DSCP Policy by sending an updated QoS Mangement element
* containing a DSCP Policy attribute with the same Policy ID
* within a QoS Management Descriptor TLV in a Service
* Prioritization Request message to a Multi-AP Agent.
*/
ret
=
cntlr_gen_qos_management_desc_tlv
(
c
,
buf
,
rule
->
mgmt
.
qmid
,
rule
->
mgmt
.
bssid
,
rule
->
mgmt
.
sta
,
desc
,
desc_len
);
free
(
desc
);
break
;
}
default:
{
ret
=
-
1
;
break
;
}
/*
* If the Descriptor Element field within a QoS Management
* Descriptor TLV is a QoS Management element containing a DSCP
* Policy attibute, the QMID is used in a Profile-2 Error Code TLV
* to indicate the Multi-AP Agent is unable to configure the rule.
*
* If the Descriptor Element field within a QoS Management
* Descriptor TLV is a QoS Management element containing a DSCP
* Policy attribute, the Policy ID in the Descriptor Element field
* is chosen by the Multi-AP Controller, and (per [25]) has scope
* across the ESS (i.e., policy survives a roam after, after STA
* roams to another BSSID).
*
* If triggered, a Multi-AP Controller may modify or remove a DSCP
* Policy by sending an updated QoS Mangement element containing a
* DSCP Policy attribute with the same Policy ID within a QoS
* Management Descriptor TLV in a Service Prioritization Request
* message to a Multi-AP Agent.
*/
ret
=
cntlr_gen_qos_management_desc_tlv
(
c
,
buf
,
rule
->
mgmt
.
qmid
,
rule
->
mgmt
.
bssid
,
rule
->
mgmt
.
sta
,
desc
,
desc_len
);
free
(
desc
);
break
;
}
default:
{
ret
=
-
1
;
break
;
}
}
...
...
@@ -233,7 +237,8 @@ void cntlr_qos_sync_node(struct controller *c,
*/
list_for_each_entry
(
rule
,
&
cc
->
qos
.
rule
,
list
)
{
dbg
(
"%s: syncing QoS in node, sending SPR
\n
"
,
__func__
);
cntlr_qos_send_sp_req
(
c
,
origin
,
rule
);
cntlr_qos_send_sp_req
(
c
,
false
,
origin
,
rule
);
cntlr_qos_send_sp_req
(
c
,
true
,
origin
,
rule
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment