qcacmn: Add AC based ATF Scheduler support

Add/Modify functions to support AC based ATF support.
Modify Function pointer declarations and assignments to
comply with the new design.

Change-Id: I17046c4461dc4ba413fd71a4437c0f7cb8997400
CRs-Fixed: 2293193
This commit is contained in:
Jeffin Mammen
2018-08-13 09:53:57 +05:30
committed by Nitesh Shrivastav
parent c2af7e7648
commit c17d8ee4d7
3 changed files with 47 additions and 19 deletions

View File

@@ -234,7 +234,7 @@ struct wlan_lmac_if_p2p_tx_ops {
/** /**
* struct wlan_lmac_if_atf_tx_ops - ATF specific tx function pointers * struct wlan_lmac_if_atf_tx_ops - ATF specific tx function pointers
* @atf_update_peer_txtoken: Update peer Tx token * @atf_node_unblock: Resume node
* @atf_set_enable_disable: Set atf enable/disable * @atf_set_enable_disable: Set atf enable/disable
* @atf_tokens_used: Get used atf tokens * @atf_tokens_used: Get used atf tokens
* @atf_get_unused_txtoken: Get unused atf tokens * @atf_get_unused_txtoken: Get unused atf tokens
@@ -247,6 +247,7 @@ struct wlan_lmac_if_p2p_tx_ops {
* @atf_ssid_sched_policy: Set ssid schedule policy * @atf_ssid_sched_policy: Set ssid schedule policy
* @atf_set: Set atf * @atf_set: Set atf
* @atf_set_grouping: Set atf grouping * @atf_set_grouping: Set atf grouping
* @atf_set_group_ac: Set atf Group AC
* @atf_send_peer_request: Send peer requests * @atf_send_peer_request: Send peer requests
* @atf_set_bwf: Set bandwidth fairness * @atf_set_bwf: Set bandwidth fairness
* @atf_peer_buf_held: Get buffer held * @atf_peer_buf_held: Get buffer held
@@ -257,9 +258,8 @@ struct wlan_lmac_if_p2p_tx_ops {
* @atf_unregister_event_handler ATF unregister wmi event handlers * @atf_unregister_event_handler ATF unregister wmi event handlers
*/ */
struct wlan_lmac_if_atf_tx_ops { struct wlan_lmac_if_atf_tx_ops {
void (*atf_update_peer_txtoken)(struct wlan_objmgr_pdev *pdev, void (*atf_node_unblock)(struct wlan_objmgr_pdev *pdev,
struct wlan_objmgr_peer *peer, struct wlan_objmgr_peer *peer);
struct atf_stats *stats);
void (*atf_set_enable_disable)(struct wlan_objmgr_pdev *pdev, void (*atf_set_enable_disable)(struct wlan_objmgr_pdev *pdev,
uint8_t value); uint8_t value);
uint8_t (*atf_tokens_used)(struct wlan_objmgr_pdev *pdev, uint8_t (*atf_tokens_used)(struct wlan_objmgr_pdev *pdev,
@@ -279,8 +279,8 @@ struct wlan_lmac_if_atf_tx_ops {
uint32_t tput, uint32_t tput,
uint32_t *possible_tput); uint32_t *possible_tput);
uint32_t (*atf_debug_peerstate)(struct wlan_objmgr_pdev *pdev, uint32_t (*atf_debug_peerstate)(struct wlan_objmgr_pdev *pdev,
struct wlan_objmgr_peer *peer); struct wlan_objmgr_peer *peer,
struct atf_peerstate *peerstate);
int32_t (*atf_enable_disable)(struct wlan_objmgr_vdev *vdev, int32_t (*atf_enable_disable)(struct wlan_objmgr_vdev *vdev,
uint8_t value); uint8_t value);
int32_t (*atf_ssid_sched_policy)(struct wlan_objmgr_vdev *vdev, int32_t (*atf_ssid_sched_policy)(struct wlan_objmgr_vdev *vdev,
@@ -291,6 +291,9 @@ struct wlan_lmac_if_atf_tx_ops {
int32_t (*atf_set_grouping)(struct wlan_objmgr_pdev *pdev, int32_t (*atf_set_grouping)(struct wlan_objmgr_pdev *pdev,
struct pdev_atf_ssid_group_req *atf_grp_req, struct pdev_atf_ssid_group_req *atf_grp_req,
uint8_t atf_tput_based); uint8_t atf_tput_based);
int32_t (*atf_set_group_ac)(struct wlan_objmgr_pdev *pdev,
struct pdev_atf_group_wmm_ac_req *atf_acreq,
uint8_t atf_tput_based);
int32_t (*atf_send_peer_request)(struct wlan_objmgr_pdev *pdev, int32_t (*atf_send_peer_request)(struct wlan_objmgr_pdev *pdev,
struct pdev_atf_peer_ext_request *atfr, struct pdev_atf_peer_ext_request *atfr,
uint8_t atf_tput_based); uint8_t atf_tput_based);
@@ -845,19 +848,22 @@ struct wlan_lmac_if_p2p_rx_ops {
* @atf_get_peers: Get number of peers for a radio * @atf_get_peers: Get number of peers for a radio
* @atf_get_tput_based: Get throughput based enabled/disabled * @atf_get_tput_based: Get throughput based enabled/disabled
* @atf_get_logging: Get logging enabled/disabled * @atf_get_logging: Get logging enabled/disabled
* @atf_get_txbuf_share: Get TxBuff share state * @atf_update_buf_held: Set Num buf held by subgroup
* @atf_get_txbuf_max: Get TxBuff MAX number
* @atf_get_txbuf_min: Get TxBuff MIN number
* @atf_get_ssidgroup: Get ssid group state * @atf_get_ssidgroup: Get ssid group state
* @atf_get_tx_block_count: Get tx block count * @atf_get_tx_block_count: Get tx block count
* @atf_get_peer_blk_txtraffic: Get peer tx traffic block state * @atf_get_peer_blk_txtraffic: Get peer tx traffic block state
* @atf_get_vdev_blk_txtraffic: Get vdev tx traffic block state * @atf_get_vdev_blk_txtraffic: Get vdev tx traffic block state
* @atf_get_sched: Get ATF scheduled policy * @atf_get_sched: Get ATF scheduled policy
* @atf_get_tx_tokens: Get Tx tokens * @atf_get_tx_tokens: Get Tx tokens
* @atf_get_shadow_tx_tokens: Get shadow tx tokens * @atf_buf_distribute: Distribute Buffers
* @atf_get_tx_tokens_common: Get common tx tokens * @atf_get_tx_tokens_common: Get common tx tokens
* @atf_get_shadow_alloted_tx_tokens: Get shadow alloted tx tokens * @atf_get_shadow_alloted_tx_tokens: Get shadow alloted tx tokens
* @atf_get_peer_stats: Get atf peer stats * @atf_get_peer_stats: Get atf peer stats
* @atf_adjust_subgroup_txtokens: Adjust tokens based on actual duration
* @atf_account_subgroup_txtokens: Estimate tx time & update subgroup tokens
* @atf_subgroup_free_buf: On tx completion, update num buf held
* @atf_update_subgroup_tidstate: TID state (Paused/unpaused) of node
* @atf_get_subgroup_airtime: Get subgroup airtime
* @atf_get_token_allocated: Get atf token allocated * @atf_get_token_allocated: Get atf token allocated
* @atf_get_token_utilized: Get atf token utilized * @atf_get_token_utilized: Get atf token utilized
* @atf_set_sched: Set ATF schedule policy * @atf_set_sched: Set ATF schedule policy
@@ -883,21 +889,37 @@ struct wlan_lmac_if_atf_rx_ops {
uint32_t (*atf_get_peers)(struct wlan_objmgr_psoc *psoc); uint32_t (*atf_get_peers)(struct wlan_objmgr_psoc *psoc);
uint32_t (*atf_get_tput_based)(struct wlan_objmgr_pdev *pdev); uint32_t (*atf_get_tput_based)(struct wlan_objmgr_pdev *pdev);
uint32_t (*atf_get_logging)(struct wlan_objmgr_pdev *pdev); uint32_t (*atf_get_logging)(struct wlan_objmgr_pdev *pdev);
uint8_t (*atf_get_txbuf_share)(struct wlan_objmgr_pdev *pdev); void* (*atf_update_buf_held)(struct wlan_objmgr_peer *peer,
uint16_t (*atf_get_txbuf_max)(struct wlan_objmgr_pdev *pdev); int8_t ac);
uint16_t (*atf_get_txbuf_min)(struct wlan_objmgr_pdev *pdev);
uint32_t (*atf_get_ssidgroup)(struct wlan_objmgr_pdev *pdev); uint32_t (*atf_get_ssidgroup)(struct wlan_objmgr_pdev *pdev);
uint32_t (*atf_get_tx_block_count)(struct wlan_objmgr_vdev *vdev); uint32_t (*atf_get_tx_block_count)(struct wlan_objmgr_vdev *vdev);
uint8_t (*atf_get_peer_blk_txtraffic)(struct wlan_objmgr_peer *peer); uint8_t (*atf_get_peer_blk_txtraffic)(struct wlan_objmgr_peer *peer);
uint8_t (*atf_get_vdev_blk_txtraffic)(struct wlan_objmgr_vdev *vdev); uint8_t (*atf_get_vdev_blk_txtraffic)(struct wlan_objmgr_vdev *vdev);
uint32_t (*atf_get_sched)(struct wlan_objmgr_pdev *pdev); uint32_t (*atf_get_sched)(struct wlan_objmgr_pdev *pdev);
uint32_t (*atf_get_tx_tokens)(struct wlan_objmgr_peer *peer); uint32_t (*atf_get_tx_tokens)(struct wlan_objmgr_peer *peer);
uint32_t (*atf_get_shadow_tx_tokens)(struct wlan_objmgr_peer *peer); uint32_t (*atf_buf_distribute)(struct wlan_objmgr_pdev *pdev,
struct wlan_objmgr_peer *peer,
int8_t ac);
uint32_t (*atf_get_txtokens_common)(struct wlan_objmgr_pdev *pdev); uint32_t (*atf_get_txtokens_common)(struct wlan_objmgr_pdev *pdev);
uint32_t (*atf_get_shadow_alloted_tx_tokens)( uint32_t (*atf_get_shadow_alloted_tx_tokens)(
struct wlan_objmgr_pdev *pdev); struct wlan_objmgr_pdev *pdev);
void (*atf_get_peer_stats)(struct wlan_objmgr_peer *peer, void (*atf_get_peer_stats)(struct wlan_objmgr_peer *peer,
struct atf_stats *stats); struct atf_stats *stats);
QDF_STATUS
(*atf_adjust_subgroup_txtokens)(struct wlan_objmgr_peer *pr,
uint8_t ac, uint32_t actual_duration,
uint32_t est_duration);
QDF_STATUS
(*atf_account_subgroup_txtokens)(struct wlan_objmgr_peer *pr,
uint8_t ac,
uint32_t duration);
QDF_STATUS
(*atf_subgroup_free_buf)(uint16_t buf_acc_size, void *bf_atf_sg);
QDF_STATUS
(*atf_update_subgroup_tidstate)(struct wlan_objmgr_peer *peer,
uint8_t atf_nodepaused);
uint8_t (*atf_get_subgroup_airtime)(struct wlan_objmgr_peer *peer,
uint8_t ac);
uint16_t (*atf_get_token_allocated)(struct wlan_objmgr_peer *peer); uint16_t (*atf_get_token_allocated)(struct wlan_objmgr_peer *peer);
uint16_t (*atf_get_token_utilized)(struct wlan_objmgr_peer *peer); uint16_t (*atf_get_token_utilized)(struct wlan_objmgr_peer *peer);

View File

@@ -114,16 +114,22 @@ wlan_lmac_if_atf_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
atf_rx_ops->atf_get_peers = tgt_atf_get_peers; atf_rx_ops->atf_get_peers = tgt_atf_get_peers;
atf_rx_ops->atf_get_tput_based = tgt_atf_get_tput_based; atf_rx_ops->atf_get_tput_based = tgt_atf_get_tput_based;
atf_rx_ops->atf_get_logging = tgt_atf_get_logging; atf_rx_ops->atf_get_logging = tgt_atf_get_logging;
atf_rx_ops->atf_get_txbuf_share = tgt_atf_get_txbuf_share; atf_rx_ops->atf_update_buf_held = tgt_atf_update_buf_held;
atf_rx_ops->atf_get_txbuf_max = tgt_atf_get_txbuf_max;
atf_rx_ops->atf_get_txbuf_min = tgt_atf_get_txbuf_min;
atf_rx_ops->atf_get_ssidgroup = tgt_atf_get_ssidgroup; atf_rx_ops->atf_get_ssidgroup = tgt_atf_get_ssidgroup;
atf_rx_ops->atf_get_tx_block_count = tgt_atf_get_tx_block_count; atf_rx_ops->atf_get_tx_block_count = tgt_atf_get_tx_block_count;
atf_rx_ops->atf_get_peer_blk_txtraffic = tgt_atf_get_peer_blk_txtraffic; atf_rx_ops->atf_get_peer_blk_txtraffic = tgt_atf_get_peer_blk_txtraffic;
atf_rx_ops->atf_get_vdev_blk_txtraffic = tgt_atf_get_vdev_blk_txtraffic; atf_rx_ops->atf_get_vdev_blk_txtraffic = tgt_atf_get_vdev_blk_txtraffic;
atf_rx_ops->atf_get_sched = tgt_atf_get_sched; atf_rx_ops->atf_get_sched = tgt_atf_get_sched;
atf_rx_ops->atf_get_tx_tokens = tgt_atf_get_tx_tokens; atf_rx_ops->atf_get_tx_tokens = tgt_atf_get_tx_tokens;
atf_rx_ops->atf_get_shadow_tx_tokens = tgt_atf_get_shadow_tx_tokens; atf_rx_ops->atf_account_subgroup_txtokens =
tgt_atf_account_subgroup_txtokens;
atf_rx_ops->atf_adjust_subgroup_txtokens =
tgt_atf_adjust_subgroup_txtokens;
atf_rx_ops->atf_get_subgroup_airtime = tgt_atf_get_subgroup_airtime;
atf_rx_ops->atf_subgroup_free_buf = tgt_atf_subgroup_free_buf;
atf_rx_ops->atf_update_subgroup_tidstate =
tgt_atf_update_subgroup_tidstate;
atf_rx_ops->atf_buf_distribute = tgt_atf_buf_distribute;
atf_rx_ops->atf_get_shadow_alloted_tx_tokens = atf_rx_ops->atf_get_shadow_alloted_tx_tokens =
tgt_atf_get_shadow_alloted_tx_tokens; tgt_atf_get_shadow_alloted_tx_tokens;
atf_rx_ops->atf_get_txtokens_common = tgt_atf_get_txtokens_common; atf_rx_ops->atf_get_txtokens_common = tgt_atf_get_txtokens_common;

View File

@@ -98,7 +98,7 @@
(WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES/32) (WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES/32)
#define LTEU_MAX_BINS 10 #define LTEU_MAX_BINS 10
#define ATF_ACTIVED_MAX_CLIENTS 50 #define ATF_ACTIVED_MAX_CLIENTS 50
#define ATF_ACTIVED_MAX_ATFGROUPS 8 #define ATF_ACTIVED_MAX_ATFGROUPS 16
#define CTL_5G_SIZE 1536 #define CTL_5G_SIZE 1536
#define CTL_2G_SIZE 684 #define CTL_2G_SIZE 684
#define MAX_CTL_SIZE (CTL_5G_SIZE > CTL_2G_SIZE ? CTL_5G_SIZE : CTL_2G_SIZE) #define MAX_CTL_SIZE (CTL_5G_SIZE > CTL_2G_SIZE ? CTL_5G_SIZE : CTL_2G_SIZE)