MCPcopy Create free account
hub / github.com/F-Stack/f-stack / xlp_msgring_cpu_init

Function xlp_msgring_cpu_init

freebsd/mips/nlm/cms.c:154–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154void
155xlp_msgring_cpu_init(int node, int cpu, int credit)
156{
157 uint64_t cmspcibase = nlm_get_cms_pcibase(node);
158 uint64_t cmsbase = nlm_get_cms_regbase(node);
159 int qid, maxqid, src;
160
161 maxqid = nlm_read_reg(cmspcibase, XLP_PCI_DEVINFO_REG0);
162
163 /* cpu credit setup is done only from thread-0 of each core */
164 if((cpu % 4) == 0) {
165 src = cpu << 2; /* each thread has 4 vc's */
166 for (qid = 0; qid < maxqid; qid++)
167 nlm_cms_setup_credits(cmsbase, qid, src, credit);
168 }
169}
170
171/*
172 * Drain out max_messages for the buckets set in the bucket mask.

Callers 1

msgring_processFunction · 0.85

Calls 2

nlm_read_regFunction · 0.85
nlm_cms_setup_creditsFunction · 0.85

Tested by

no test coverage detected