| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
#include <linux/fs.h> |
| 9 |
#include <linux/debugfs.h> |
| 10 |
#include <linux/module.h> |
| 11 |
#include <linux/pci.h> |
| 12 |
|
| 13 |
#include "struct.h" |
| 14 |
#include "rvu.h" |
| 15 |
#include "debugfs.h" |
| 16 |
#include "cn20k/npc.h" |
| 17 |
|
| 18 |
static int npc_mcam_layout_show(struct seq_file *s, void *unused) |
| 19 |
{ |
| 20 |
int i, j, sbd, idx0, idx1, vidx0, vidx1; |
| 21 |
struct npc_priv_t *npc_priv; |
| 22 |
char buf0[32], buf1[32]; |
| 23 |
struct npc_subbank *sb; |
| 24 |
unsigned int bw0, bw1; |
| 25 |
bool v0, v1; |
| 26 |
int pf1, pf2; |
| 27 |
bool e0, e1; |
| 28 |
void *map; |
| 29 |
|
| 30 |
npc_priv = s->private; |
| 31 |
|
| 32 |
sbd = npc_priv->subbank_depth; |
| 33 |
|
| 34 |
for (i = npc_priv->num_subbanks - 1; i >= 0; i--) { |
| 35 |
sb = &npc_priv->sb[i]; |
| 36 |
mutex_lock(&sb->lock); |
| 37 |
|
| 38 |
if (sb->flags & NPC_SUBBANK_FLAG_FREE) |
| 39 |
goto next; |
| 40 |
|
| 41 |
bw0 = bitmap_weight(sb->b0map, npc_priv->subbank_depth); |
| 42 |
if (sb->key_type == NPC_MCAM_KEY_X4) { |
| 43 |
seq_printf(s, "\n\nsubbank:%u, x4, free=%u, used=%u\n", |
| 44 |
sb->idx, sb->free_cnt, bw0); |
| 45 |
|
| 46 |
for (j = sbd - 1; j >= 0; j--) { |
| 47 |
if (!test_bit(j, sb->b0map)) |
| 48 |
continue; |
| 49 |
|
| 50 |
idx0 = sb->b0b + j; |
| 51 |
map = xa_load(&npc_priv->xa_idx2pf_map, idx0); |
| 52 |
pf1 = xa_to_value(map); |
| 53 |
|
| 54 |
map = xa_load(&npc_priv->xa_idx2vidx_map, idx0); |
| 55 |
if (map) { |
| 56 |
vidx0 = xa_to_value(map); |
| 57 |
snprintf(buf0, sizeof(buf0), |
| 58 |
"v:%u", vidx0); |
| 59 |
} |
| 60 |
|
| 61 |
seq_printf(s, "\t%u(%#x) %s\n", idx0, pf1, |
| 62 |
map ? buf0 : " "); |
| 63 |
} |
| 64 |
goto next; |
| 65 |
} |
| 66 |
|
| 67 |
bw1 = bitmap_weight(sb->b1map, npc_priv->subbank_depth); |
| 68 |
seq_printf(s, "\n\nsubbank:%u, x2, free=%u, used=%u\n", |
| 69 |
sb->idx, sb->free_cnt, bw0 + bw1); |
| 70 |
seq_printf(s, "bank1(%u)\t\tbank0(%u)\n", bw1, bw0); |
| 71 |
|
| 72 |
for (j = sbd - 1; j >= 0; j--) { |
| 73 |
e0 = test_bit(j, sb->b0map); |
| 74 |
e1 = test_bit(j, sb->b1map); |
| 75 |
|
| 76 |
if (!e1 && !e0) |
| 77 |
continue; |
| 78 |
|
| 79 |
if (e1 && e0) { |
| 80 |
idx0 = sb->b0b + j; |
| 81 |
map = xa_load(&npc_priv->xa_idx2pf_map, idx0); |
| 82 |
pf1 = xa_to_value(map); |
| 83 |
|
| 84 |
map = xa_load(&npc_priv->xa_idx2vidx_map, idx0); |
| 85 |
v0 = !!map; |
| 86 |
if (v0) { |
| 87 |
vidx0 = xa_to_value(map); |
| 88 |
snprintf(buf0, sizeof(buf0), "v:%05u", |
| 89 |
vidx0); |
| 90 |
} |
| 91 |
|
| 92 |
idx1 = sb->b1b + j; |
| 93 |
map = xa_load(&npc_priv->xa_idx2pf_map, idx1); |
| 94 |
pf2 = xa_to_value(map); |
| 95 |
|
| 96 |
map = xa_load(&npc_priv->xa_idx2vidx_map, idx1); |
| 97 |
v1 = !!map; |
| 98 |
if (v1) { |
| 99 |
vidx1 = xa_to_value(map); |
| 100 |
snprintf(buf1, sizeof(buf1), "v:%05u", |
| 101 |
vidx1); |
| 102 |
} |
| 103 |
|
| 104 |
seq_printf(s, "%05u(%#x) %s\t\t%05u(%#x) %s\n", |
| 105 |
idx1, pf2, v1 ? buf1 : " ", |
| 106 |
idx0, pf1, v0 ? buf0 : " "); |
| 107 |
|
| 108 |
continue; |
| 109 |
} |
| 110 |
|
| 111 |
if (e0) { |
| 112 |
idx0 = sb->b0b + j; |
| 113 |
map = xa_load(&npc_priv->xa_idx2pf_map, idx0); |
| 114 |
pf1 = xa_to_value(map); |
| 115 |
|
| 116 |
map = xa_load(&npc_priv->xa_idx2vidx_map, idx0); |
| 117 |
if (map) { |
| 118 |
vidx0 = xa_to_value(map); |
| 119 |
snprintf(buf0, sizeof(buf0), "v:%05u", |
| 120 |
vidx0); |
| 121 |
} |
| 122 |
|
| 123 |
seq_printf(s, "\t\t \t\t%05u(%#x) %s\n", idx0, |
| 124 |
pf1, map ? buf0 : " "); |
| 125 |
continue; |
| 126 |
} |
| 127 |
|
| 128 |
idx1 = sb->b1b + j; |
| 129 |
map = xa_load(&npc_priv->xa_idx2pf_map, idx1); |
| 130 |
pf1 = xa_to_value(map); |
| 131 |
map = xa_load(&npc_priv->xa_idx2vidx_map, idx1); |
| 132 |
if (map) { |
| 133 |
vidx1 = xa_to_value(map); |
| 134 |
snprintf(buf1, sizeof(buf1), "v:%05u", vidx1); |
| 135 |
} |
| 136 |
|
| 137 |
seq_printf(s, "%05u(%#x) %s\n", idx1, pf1, |
| 138 |
map ? buf1 : " "); |
| 139 |
} |
| 140 |
next: |
| 141 |
mutex_unlock(&sb->lock); |
| 142 |
} |
| 143 |
return 0; |
| 144 |
} |
| 145 |
|
| 146 |
DEFINE_SHOW_ATTRIBUTE(npc_mcam_layout); |
| 147 |
|
| 148 |
static int npc_mcam_default_show(struct seq_file *s, void *unused) |
| 149 |
{ |
| 150 |
struct npc_priv_t *npc_priv; |
| 151 |
unsigned long index; |
| 152 |
u16 ptr[4], pcifunc; |
| 153 |
struct rvu *rvu; |
| 154 |
int rc, i; |
| 155 |
void *map; |
| 156 |
|
| 157 |
npc_priv = npc_priv_get(); |
| 158 |
rvu = s->private; |
| 159 |
|
| 160 |
seq_puts(s, "\npcifunc\tBcast\tmcast\tpromisc\tucast\n"); |
| 161 |
|
| 162 |
xa_for_each(&npc_priv->xa_pf_map, index, map) { |
| 163 |
pcifunc = index; |
| 164 |
|
| 165 |
for (i = 0; i < ARRAY_SIZE(ptr); i++) |
| 166 |
ptr[i] = USHRT_MAX; |
| 167 |
|
| 168 |
rc = npc_cn20k_dft_rules_idx_get(rvu, pcifunc, &ptr[0], |
| 169 |
&ptr[1], &ptr[2], &ptr[3]); |
| 170 |
if (rc) |
| 171 |
continue; |
| 172 |
|
| 173 |
seq_printf(s, "%#x\t", pcifunc); |
| 174 |
for (i = 0; i < ARRAY_SIZE(ptr); i++) { |
| 175 |
if (ptr[i] != USHRT_MAX) |
| 176 |
seq_printf(s, "%u\t", ptr[i]); |
| 177 |
else |
| 178 |
seq_puts(s, "\t"); |
| 179 |
} |
| 180 |
seq_puts(s, "\n"); |
| 181 |
} |
| 182 |
|
| 183 |
return 0; |
| 184 |
} |
| 185 |
DEFINE_SHOW_ATTRIBUTE(npc_mcam_default); |
| 186 |
|
| 187 |
static int npc_vidx2idx_map_show(struct seq_file *s, void *unused) |
| 188 |
{ |
| 189 |
struct npc_priv_t *npc_priv; |
| 190 |
unsigned long index, start; |
| 191 |
struct xarray *xa; |
| 192 |
void *map; |
| 193 |
|
| 194 |
npc_priv = s->private; |
| 195 |
start = npc_priv->bank_depth * 2; |
| 196 |
xa = &npc_priv->xa_vidx2idx_map; |
| 197 |
|
| 198 |
seq_puts(s, "\nvidx\tmcam_idx\n"); |
| 199 |
|
| 200 |
xa_for_each_start(xa, index, map, start) |
| 201 |
seq_printf(s, "%lu\t%lu\n", index, xa_to_value(map)); |
| 202 |
return 0; |
| 203 |
} |
| 204 |
DEFINE_SHOW_ATTRIBUTE(npc_vidx2idx_map); |
| 205 |
|
| 206 |
static int npc_idx2vidx_map_show(struct seq_file *s, void *unused) |
| 207 |
{ |
| 208 |
struct npc_priv_t *npc_priv; |
| 209 |
unsigned long index; |
| 210 |
struct xarray *xa; |
| 211 |
void *map; |
| 212 |
|
| 213 |
npc_priv = s->private; |
| 214 |
xa = &npc_priv->xa_idx2vidx_map; |
| 215 |
|
| 216 |
seq_puts(s, "\nmidx\tvidx\n"); |
| 217 |
|
| 218 |
xa_for_each(xa, index, map) |
| 219 |
seq_printf(s, "%lu\t%lu\n", index, xa_to_value(map)); |
| 220 |
return 0; |
| 221 |
} |
| 222 |
DEFINE_SHOW_ATTRIBUTE(npc_idx2vidx_map); |
| 223 |
|
| 224 |
static int npc_defrag_show(struct seq_file *s, void *unused) |
| 225 |
{ |
| 226 |
struct npc_defrag_show_node *node; |
| 227 |
struct npc_priv_t *npc_priv; |
| 228 |
u16 sbd, bdm; |
| 229 |
|
| 230 |
npc_priv = s->private; |
| 231 |
bdm = npc_priv->bank_depth - 1; |
| 232 |
sbd = npc_priv->subbank_depth; |
| 233 |
|
| 234 |
seq_puts(s, "\nold(sb) -> new(sb)\t\tvidx\n"); |
| 235 |
|
| 236 |
mutex_lock(&npc_priv->lock); |
| 237 |
list_for_each_entry(node, &npc_priv->defrag_lh, list) |
| 238 |
seq_printf(s, "%u(%u)\t%u(%u)\t%u\n", node->old_midx, |
| 239 |
(node->old_midx & bdm) / sbd, |
| 240 |
node->new_midx, |
| 241 |
(node->new_midx & bdm) / sbd, |
| 242 |
node->vidx); |
| 243 |
mutex_unlock(&npc_priv->lock); |
| 244 |
return 0; |
| 245 |
} |
| 246 |
|
| 247 |
DEFINE_SHOW_ATTRIBUTE(npc_defrag); |
| 248 |
|
| 249 |
int npc_cn20k_debugfs_init(struct rvu *rvu) |
| 250 |
{ |
| 251 |
struct npc_priv_t *npc_priv = npc_priv_get(); |
| 252 |
|
| 253 |
debugfs_create_file("mcam_layout", 0444, rvu->rvu_dbg.npc, |
| 254 |
npc_priv, &npc_mcam_layout_fops); |
| 255 |
|
| 256 |
debugfs_create_file("mcam_default", 0444, rvu->rvu_dbg.npc, |
| 257 |
rvu, &npc_mcam_default_fops); |
| 258 |
|
| 259 |
debugfs_create_file("vidx2idx", 0444, rvu->rvu_dbg.npc, |
| 260 |
npc_priv, &npc_vidx2idx_map_fops); |
| 261 |
|
| 262 |
debugfs_create_file("idx2vidx", 0444, rvu->rvu_dbg.npc, |
| 263 |
npc_priv, &npc_idx2vidx_map_fops); |
| 264 |
|
| 265 |
debugfs_create_file("defrag", 0444, rvu->rvu_dbg.npc, |
| 266 |
npc_priv, &npc_defrag_fops); |
| 267 |
|
| 268 |
return 0; |
| 269 |
} |
| 270 |
|
| 271 |
void npc_cn20k_debugfs_deinit(struct rvu *rvu) |
| 272 |
{ |
| 273 |
debugfs_remove_recursive(rvu->rvu_dbg.npc); |
| 274 |
} |
| 275 |
|
| 276 |
void print_nix_cn20k_sq_ctx(struct seq_file *m, |
| 277 |
struct nix_cn20k_sq_ctx_s *sq_ctx) |
| 278 |
{ |
| 279 |
seq_printf(m, "W0: ena \t\t\t%d\nW0: qint_idx \t\t\t%d\n", |
| 280 |
sq_ctx->ena, sq_ctx->qint_idx); |
| 281 |
seq_printf(m, "W0: substream \t\t\t0x%03x\nW0: sdp_mcast \t\t\t%d\n", |
| 282 |
sq_ctx->substream, sq_ctx->sdp_mcast); |
| 283 |
seq_printf(m, "W0: cq \t\t\t\t%d\nW0: sqe_way_mask \t\t%d\n\n", |
| 284 |
sq_ctx->cq, sq_ctx->sqe_way_mask); |
| 285 |
|
| 286 |
seq_printf(m, "W1: smq \t\t\t%d\nW1: cq_ena \t\t\t%d\nW1: xoff\t\t\t%d\n", |
| 287 |
sq_ctx->smq, sq_ctx->cq_ena, sq_ctx->xoff); |
| 288 |
seq_printf(m, "W1: sso_ena \t\t\t%d\nW1: smq_rr_weight\t\t%d\n", |
| 289 |
sq_ctx->sso_ena, sq_ctx->smq_rr_weight); |
| 290 |
seq_printf(m, "W1: default_chan\t\t%d\nW1: sqb_count\t\t\t%d\n\n", |
| 291 |
sq_ctx->default_chan, sq_ctx->sqb_count); |
| 292 |
|
| 293 |
seq_printf(m, "W1: smq_rr_count_lb \t\t%d\n", sq_ctx->smq_rr_count_lb); |
| 294 |
seq_printf(m, "W2: smq_rr_count_ub \t\t%d\n", sq_ctx->smq_rr_count_ub); |
| 295 |
seq_printf(m, "W2: sqb_aura \t\t\t%d\nW2: sq_int \t\t\t%d\n", |
| 296 |
sq_ctx->sqb_aura, sq_ctx->sq_int); |
| 297 |
seq_printf(m, "W2: sq_int_ena \t\t\t%d\nW2: sqe_stype \t\t\t%d\n", |
| 298 |
sq_ctx->sq_int_ena, sq_ctx->sqe_stype); |
| 299 |
|
| 300 |
seq_printf(m, "W3: max_sqe_size\t\t%d\nW3: cq_limit\t\t\t%d\n", |
| 301 |
sq_ctx->max_sqe_size, sq_ctx->cq_limit); |
| 302 |
seq_printf(m, "W3: lmt_dis \t\t\t%d\nW3: mnq_dis \t\t\t%d\n", |
| 303 |
sq_ctx->lmt_dis, sq_ctx->mnq_dis); |
| 304 |
seq_printf(m, "W3: smq_next_sq\t\t\t%d\nW3: smq_lso_segnum\t\t%d\n", |
| 305 |
sq_ctx->smq_next_sq, sq_ctx->smq_lso_segnum); |
| 306 |
seq_printf(m, "W3: tail_offset \t\t%d\nW3: smenq_offset\t\t%d\n", |
| 307 |
sq_ctx->tail_offset, sq_ctx->smenq_offset); |
| 308 |
seq_printf(m, "W3: head_offset\t\t\t%d\nW3: smenq_next_sqb_vld\t\t%d\n\n", |
| 309 |
sq_ctx->head_offset, sq_ctx->smenq_next_sqb_vld); |
| 310 |
|
| 311 |
seq_printf(m, "W3: smq_next_sq_vld\t\t%d\nW3: smq_pend\t\t\t%d\n", |
| 312 |
sq_ctx->smq_next_sq_vld, sq_ctx->smq_pend); |
| 313 |
seq_printf(m, "W4: next_sqb \t\t\t%llx\n\n", sq_ctx->next_sqb); |
| 314 |
seq_printf(m, "W5: tail_sqb \t\t\t%llx\n\n", sq_ctx->tail_sqb); |
| 315 |
seq_printf(m, "W6: smenq_sqb \t\t\t%llx\n\n", sq_ctx->smenq_sqb); |
| 316 |
seq_printf(m, "W7: smenq_next_sqb \t\t%llx\n\n", |
| 317 |
sq_ctx->smenq_next_sqb); |
| 318 |
|
| 319 |
seq_printf(m, "W8: head_sqb\t\t\t%llx\n\n", sq_ctx->head_sqb); |
| 320 |
|
| 321 |
seq_printf(m, "W9: vfi_lso_total\t\t%d\n", sq_ctx->vfi_lso_total); |
| 322 |
seq_printf(m, "W9: vfi_lso_sizem1\t\t%d\nW9: vfi_lso_sb\t\t\t%d\n", |
| 323 |
sq_ctx->vfi_lso_sizem1, sq_ctx->vfi_lso_sb); |
| 324 |
seq_printf(m, "W9: vfi_lso_mps\t\t\t%d\nW9: vfi_lso_vlan0_ins_ena\t%d\n", |
| 325 |
sq_ctx->vfi_lso_mps, sq_ctx->vfi_lso_vlan0_ins_ena); |
| 326 |
seq_printf(m, "W9: vfi_lso_vlan1_ins_ena\t%d\nW9: vfi_lso_vld \t\t%d\n\n", |
| 327 |
sq_ctx->vfi_lso_vld, sq_ctx->vfi_lso_vlan1_ins_ena); |
| 328 |
|
| 329 |
seq_printf(m, "W10: scm_lso_rem \t\t%llu\n\n", |
| 330 |
(u64)sq_ctx->scm_lso_rem); |
| 331 |
seq_printf(m, "W11: octs \t\t\t%llu\n\n", (u64)sq_ctx->octs); |
| 332 |
seq_printf(m, "W12: pkts \t\t\t%llu\n\n", (u64)sq_ctx->pkts); |
| 333 |
seq_printf(m, "W13: aged_drop_octs \t\t\t%llu\n\n", |
| 334 |
(u64)sq_ctx->aged_drop_octs); |
| 335 |
seq_printf(m, "W13: aged_drop_pkts \t\t\t%llu\n\n", |
| 336 |
(u64)sq_ctx->aged_drop_pkts); |
| 337 |
seq_printf(m, "W14: dropped_octs \t\t%llu\n\n", |
| 338 |
(u64)sq_ctx->dropped_octs); |
| 339 |
seq_printf(m, "W15: dropped_pkts \t\t%llu\n\n", |
| 340 |
(u64)sq_ctx->dropped_pkts); |
| 341 |
} |
| 342 |
|
| 343 |
void print_nix_cn20k_cq_ctx(struct seq_file *m, |
| 344 |
struct nix_cn20k_aq_enq_rsp *rsp) |
| 345 |
{ |
| 346 |
struct nix_cn20k_cq_ctx_s *cq_ctx = &rsp->cq; |
| 347 |
|
| 348 |
seq_printf(m, "W0: base \t\t\t%llx\n\n", cq_ctx->base); |
| 349 |
|
| 350 |
seq_printf(m, "W1: wrptr \t\t\t%llx\n", (u64)cq_ctx->wrptr); |
| 351 |
seq_printf(m, "W1: avg_con \t\t\t%d\nW1: cint_idx \t\t\t%d\n", |
| 352 |
cq_ctx->avg_con, cq_ctx->cint_idx); |
| 353 |
seq_printf(m, "W1: cq_err \t\t\t%d\nW1: qint_idx \t\t\t%d\n", |
| 354 |
cq_ctx->cq_err, cq_ctx->qint_idx); |
| 355 |
seq_printf(m, "W1: bpid \t\t\t%d\nW1: bp_ena \t\t\t%d\n\n", |
| 356 |
cq_ctx->bpid, cq_ctx->bp_ena); |
| 357 |
|
| 358 |
seq_printf(m, "W1: lbpid_high \t\t\t0x%03x\n", cq_ctx->lbpid_high); |
| 359 |
seq_printf(m, "W1: lbpid_med \t\t\t0x%03x\n", cq_ctx->lbpid_med); |
| 360 |
seq_printf(m, "W1: lbpid_low \t\t\t0x%03x\n", cq_ctx->lbpid_low); |
| 361 |
seq_printf(m, "(W1: lbpid) \t\t\t0x%03x\n", |
| 362 |
cq_ctx->lbpid_high << 6 | cq_ctx->lbpid_med << 3 | |
| 363 |
cq_ctx->lbpid_low); |
| 364 |
seq_printf(m, "W1: lbp_ena \t\t\t\t%d\n\n", cq_ctx->lbp_ena); |
| 365 |
|
| 366 |
seq_printf(m, "W2: update_time \t\t%d\nW2:avg_level \t\t\t%d\n", |
| 367 |
cq_ctx->update_time, cq_ctx->avg_level); |
| 368 |
seq_printf(m, "W2: head \t\t\t%d\nW2:tail \t\t\t%d\n\n", |
| 369 |
cq_ctx->head, cq_ctx->tail); |
| 370 |
|
| 371 |
seq_printf(m, "W3: cq_err_int_ena \t\t%d\nW3:cq_err_int \t\t\t%d\n", |
| 372 |
cq_ctx->cq_err_int_ena, cq_ctx->cq_err_int); |
| 373 |
seq_printf(m, "W3: qsize \t\t\t%d\nW3:stashing \t\t\t%d\n", |
| 374 |
cq_ctx->qsize, cq_ctx->stashing); |
| 375 |
|
| 376 |
seq_printf(m, "W3: caching \t\t\t%d\n", cq_ctx->caching); |
| 377 |
seq_printf(m, "W3: lbp_frac \t\t\t%d\n", cq_ctx->lbp_frac); |
| 378 |
seq_printf(m, "W3: stash_thresh \t\t\t%d\n", |
| 379 |
cq_ctx->stash_thresh); |
| 380 |
|
| 381 |
seq_printf(m, "W3: msh_valid \t\t\t%d\nW3:msh_dst \t\t\t%d\n", |
| 382 |
cq_ctx->msh_valid, cq_ctx->msh_dst); |
| 383 |
|
| 384 |
seq_printf(m, "W3: cpt_drop_err_en \t\t\t%d\n", |
| 385 |
cq_ctx->cpt_drop_err_en); |
| 386 |
seq_printf(m, "W3: ena \t\t\t%d\n", |
| 387 |
cq_ctx->ena); |
| 388 |
seq_printf(m, "W3: drop_ena \t\t\t%d\nW3: drop \t\t\t%d\n", |
| 389 |
cq_ctx->drop_ena, cq_ctx->drop); |
| 390 |
seq_printf(m, "W3: bp \t\t\t\t%d\n\n", cq_ctx->bp); |
| 391 |
|
| 392 |
seq_printf(m, "W4: lbpid_ext \t\t\t\t%d\n\n", cq_ctx->lbpid_ext); |
| 393 |
seq_printf(m, "W4: bpid_ext \t\t\t\t%d\n\n", cq_ctx->bpid_ext); |
| 394 |
} |
| 395 |
|
| 396 |
void print_npa_cn20k_aura_ctx(struct seq_file *m, |
| 397 |
struct npa_cn20k_aq_enq_rsp *rsp) |
| 398 |
{ |
| 399 |
struct npa_cn20k_aura_s *aura = &rsp->aura; |
| 400 |
|
| 401 |
seq_printf(m, "W0: Pool addr\t\t%llx\n", aura->pool_addr); |
| 402 |
|
| 403 |
seq_printf(m, "W1: ena\t\t\t%d\nW1: pool caching\t%d\n", |
| 404 |
aura->ena, aura->pool_caching); |
| 405 |
seq_printf(m, "W1: avg con\t\t%d\n", aura->avg_con); |
| 406 |
seq_printf(m, "W1: pool drop ena\t%d\nW1: aura drop ena\t%d\n", |
| 407 |
aura->pool_drop_ena, aura->aura_drop_ena); |
| 408 |
seq_printf(m, "W1: bp_ena\t\t%d\nW1: aura drop\t\t%d\n", |
| 409 |
aura->bp_ena, aura->aura_drop); |
| 410 |
seq_printf(m, "W1: aura shift\t\t%d\nW1: avg_level\t\t%d\n", |
| 411 |
aura->shift, aura->avg_level); |
| 412 |
|
| 413 |
seq_printf(m, "W2: count\t\t%llu\nW2: nix_bpid\t\t%d\n", |
| 414 |
(u64)aura->count, aura->bpid); |
| 415 |
|
| 416 |
seq_printf(m, "W3: limit\t\t%llu\nW3: bp\t\t\t%d\nW3: fc_ena\t\t%d\n", |
| 417 |
(u64)aura->limit, aura->bp, aura->fc_ena); |
| 418 |
|
| 419 |
seq_printf(m, "W3: fc_up_crossing\t%d\nW3: fc_stype\t\t%d\n", |
| 420 |
aura->fc_up_crossing, aura->fc_stype); |
| 421 |
seq_printf(m, "W3: fc_hyst_bits\t%d\n", aura->fc_hyst_bits); |
| 422 |
|
| 423 |
seq_printf(m, "W4: fc_addr\t\t%llx\n", aura->fc_addr); |
| 424 |
|
| 425 |
seq_printf(m, "W5: pool_drop\t\t%d\nW5: update_time\t\t%d\n", |
| 426 |
aura->pool_drop, aura->update_time); |
| 427 |
seq_printf(m, "W5: err_int \t\t%d\nW5: err_int_ena\t\t%d\n", |
| 428 |
aura->err_int, aura->err_int_ena); |
| 429 |
seq_printf(m, "W5: thresh_int\t\t%d\nW5: thresh_int_ena \t%d\n", |
| 430 |
aura->thresh_int, aura->thresh_int_ena); |
| 431 |
seq_printf(m, "W5: thresh_up\t\t%d\nW5: thresh_qint_idx\t%d\n", |
| 432 |
aura->thresh_up, aura->thresh_qint_idx); |
| 433 |
seq_printf(m, "W5: err_qint_idx \t%d\n", aura->err_qint_idx); |
| 434 |
|
| 435 |
seq_printf(m, "W6: thresh\t\t%llu\n", (u64)aura->thresh); |
| 436 |
seq_printf(m, "W6: fc_msh_dst\t\t%d\n", aura->fc_msh_dst); |
| 437 |
} |
| 438 |
|
| 439 |
void print_npa_cn20k_pool_ctx(struct seq_file *m, |
| 440 |
struct npa_cn20k_aq_enq_rsp *rsp) |
| 441 |
{ |
| 442 |
struct npa_cn20k_pool_s *pool = &rsp->pool; |
| 443 |
|
| 444 |
seq_printf(m, "W0: Stack base\t\t%llx\n", pool->stack_base); |
| 445 |
|
| 446 |
seq_printf(m, "W1: ena \t\t%d\nW1: nat_align \t\t%d\n", |
| 447 |
pool->ena, pool->nat_align); |
| 448 |
seq_printf(m, "W1: stack_caching\t%d\n", |
| 449 |
pool->stack_caching); |
| 450 |
seq_printf(m, "W1: buf_offset\t\t%d\nW1: buf_size\t\t%d\n", |
| 451 |
pool->buf_offset, pool->buf_size); |
| 452 |
|
| 453 |
seq_printf(m, "W2: stack_max_pages \t%d\nW2: stack_pages\t\t%d\n", |
| 454 |
pool->stack_max_pages, pool->stack_pages); |
| 455 |
|
| 456 |
seq_printf(m, "W4: stack_offset\t%d\nW4: shift\t\t%d\nW4: avg_level\t\t%d\n", |
| 457 |
pool->stack_offset, pool->shift, pool->avg_level); |
| 458 |
seq_printf(m, "W4: avg_con \t\t%d\nW4: fc_ena\t\t%d\nW4: fc_stype\t\t%d\n", |
| 459 |
pool->avg_con, pool->fc_ena, pool->fc_stype); |
| 460 |
seq_printf(m, "W4: fc_hyst_bits\t%d\nW4: fc_up_crossing\t%d\n", |
| 461 |
pool->fc_hyst_bits, pool->fc_up_crossing); |
| 462 |
seq_printf(m, "W4: update_time\t\t%d\n", pool->update_time); |
| 463 |
|
| 464 |
seq_printf(m, "W5: fc_addr\t\t%llx\n", pool->fc_addr); |
| 465 |
|
| 466 |
seq_printf(m, "W6: ptr_start\t\t%llx\n", pool->ptr_start); |
| 467 |
|
| 468 |
seq_printf(m, "W7: ptr_end\t\t%llx\n", pool->ptr_end); |
| 469 |
|
| 470 |
seq_printf(m, "W8: err_int\t\t%d\nW8: err_int_ena\t\t%d\n", |
| 471 |
pool->err_int, pool->err_int_ena); |
| 472 |
seq_printf(m, "W8: thresh_int\t\t%d\n", pool->thresh_int); |
| 473 |
seq_printf(m, "W8: thresh_int_ena\t%d\nW8: thresh_up\t\t%d\n", |
| 474 |
pool->thresh_int_ena, pool->thresh_up); |
| 475 |
seq_printf(m, "W8: thresh_qint_idx\t%d\nW8: err_qint_idx\t%d\n", |
| 476 |
pool->thresh_qint_idx, pool->err_qint_idx); |
| 477 |
seq_printf(m, "W8: fc_msh_dst\t\t%d\n", pool->fc_msh_dst); |
| 478 |
} |