qcacmn: Affine NAPIs based INI CPU mask
Affine NAPI CPUs based CPU mask specified in INI config. Change-Id: I0bea3389a7565f8ec157d4587a442b5e11c33fb2 CRs-Fixed: 2255756
This commit is contained in:

committed by
nshrivas

parent
b5a400ee01
commit
617ff247dd
@@ -239,6 +239,7 @@ struct qca_napi_cpu {
|
|||||||
* @state: state variable used in the napi stat machine
|
* @state: state variable used in the napi stat machine
|
||||||
* @ce_map: bit map indicating which ce's have napis running
|
* @ce_map: bit map indicating which ce's have napis running
|
||||||
* @exec_map: bit map of instanciated exec contexts
|
* @exec_map: bit map of instanciated exec contexts
|
||||||
|
* @user_cpu_affin_map: CPU affinity map from INI config.
|
||||||
* @napi_cpu: cpu info for irq affinty
|
* @napi_cpu: cpu info for irq affinty
|
||||||
* @lilcl_head:
|
* @lilcl_head:
|
||||||
* @bigcl_head:
|
* @bigcl_head:
|
||||||
@@ -255,6 +256,7 @@ struct qca_napi_data {
|
|||||||
*/
|
*/
|
||||||
uint32_t ce_map;
|
uint32_t ce_map;
|
||||||
uint32_t exec_map;
|
uint32_t exec_map;
|
||||||
|
uint32_t user_cpu_affin_mask;
|
||||||
struct qca_napi_info *napis[CE_COUNT_MAX];
|
struct qca_napi_info *napis[CE_COUNT_MAX];
|
||||||
struct qca_napi_cpu napi_cpu[NR_CPUS];
|
struct qca_napi_cpu napi_cpu[NR_CPUS];
|
||||||
int lilcl_head, bigcl_head;
|
int lilcl_head, bigcl_head;
|
||||||
|
@@ -1110,7 +1110,7 @@ static void hnc_dump_cpus(struct qca_napi_data *napid) { /* no-op */ };
|
|||||||
* !0: error (at least one of lil/big clusters could not be found)
|
* !0: error (at least one of lil/big clusters could not be found)
|
||||||
*/
|
*/
|
||||||
#define HNC_MIN_CLUSTER 0
|
#define HNC_MIN_CLUSTER 0
|
||||||
#define HNC_MAX_CLUSTER 31
|
#define HNC_MAX_CLUSTER 1
|
||||||
static int hnc_link_clusters(struct qca_napi_data *napid)
|
static int hnc_link_clusters(struct qca_napi_data *napid)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
@@ -1521,13 +1521,17 @@ retry_disperse:
|
|||||||
}
|
}
|
||||||
i = napid->napi_cpu[i].cluster_nxt;
|
i = napid->napi_cpu[i].cluster_nxt;
|
||||||
}
|
}
|
||||||
destidx = smallidx;
|
/* Check if matches with user sepecified CPU mask */
|
||||||
if ((destidx < 0) && (head == napid->bigcl_head)) {
|
smallidx = ((1 << smallidx) & napid->user_cpu_affin_mask) ?
|
||||||
|
smallidx : -1;
|
||||||
|
|
||||||
|
if ((smallidx < 0) && (head == napid->bigcl_head)) {
|
||||||
NAPI_DEBUG("%s: DISPERSE: no bigcl dest, try lilcl",
|
NAPI_DEBUG("%s: DISPERSE: no bigcl dest, try lilcl",
|
||||||
__func__);
|
__func__);
|
||||||
head = i = napid->lilcl_head;
|
head = i = napid->lilcl_head;
|
||||||
goto retry_disperse;
|
goto retry_disperse;
|
||||||
}
|
}
|
||||||
|
destidx = smallidx;
|
||||||
}
|
}
|
||||||
NAPI_DEBUG("<--%s[dest=%d]", __func__, destidx);
|
NAPI_DEBUG("<--%s[dest=%d]", __func__, destidx);
|
||||||
return destidx;
|
return destidx;
|
||||||
|
Reference in New Issue
Block a user