Lines Matching defs:context
131 /* number of send context memory pools */
151 /* default send context sizes */
164 /* send context memory pool configuration */
185 int size; /* context size, in blocks */
219 * Read the send context memory pool configuration and send context
221 * counts and sizes for the send context types.
237 * When SDMA is enabled, kernel context pio packet size is capped by
238 * "piothreshold". Reduce pio buffer allocation for kernel context by
276 "Send context memory pool %d: both the block count and centipercent are invalid\n",
289 "All send context memory pools must be described as either centipercent or blocks, no mixing between pools\n");
297 "Send context memory pool centipercent is %d, expecting 10000\n",
306 "Send context memory pool absolute block count %d is larger than the memory size %d\n",
313 * - copy from the context size config
314 * - replace context type wildcard counts with real values
339 "%s send context invalid count wildcard %d\n",
362 "%s send context invalid pool wildcard %d\n",
373 "Send context fixed block count, %u, larger than total block count %u\n",
378 /* step 3: calculate the blocks in the pools, and pool context sizes */
383 "Send context fixed pool sizes, %u, larger than pool block count %u\n",
400 "Send context memory pool %d has %u contexts, but no blocks\n",
409 "Send context memory pool %d has %u blocks, but zero contexts\n",
417 /* step 4: fill in the context type sizes from the pool sizes */
436 dd_dev_info(dd, "unused send context blocks: %d\n", extra);
444 int ret, i, j, context;
462 /* hardware context map starts with invalid send context indices */
468 * for each context one after another from the global space.
470 context = 0;
477 &dd->send_contexts[context];
482 context++;
491 * Allocate a software index and hardware context of the given type.
500 u32 context;
507 context = chip_send_contexts(dd) - index - 1;
508 dd->hw_to_sw[context] = index;
510 *hw_context = context;
514 dd_dev_err(dd, "Unable to locate a free type %d send context\n", type);
519 * Free the send context given by its software index.
536 /* return the base context of a context in a group */
537 static inline u32 group_context(u32 context, u32 group)
539 return (context >> group) << group;
554 * send context, per NUMA.
555 * o Each send context always looks in its relative location in a struct
557 * o Each send context in a group must have its return address CSR programmed
558 * with the same value. Use the address of the first send context in the
584 * Calculate PIO block threshold for this send context using the given MTU.
602 /* check against this context's credits */
661 * Set the CHECK_ENABLE register for the send context 'sc'.
693 * Allocate a NUMA relative send context structure of the given type along
694 * with a HW context.
750 /* grouping is always single context for now */
783 /* per context type checks */
792 /* set the send context check opcode mask and value */
845 * the context yet, so allocate it now.
865 "Send context %u(%u) %s group %u credits %u credit_ctrl 0x%llx threshold %u\n",
877 /* free a per-NUMA send context structure */
909 /* release the index and context for re-use */
918 /* disable the context */
937 * Flush any waiters. Once the context is disabled,
939 * could be one in-process when the context is disabled).
945 if (sc->sr) { /* this context has a shadow ring */
984 /* is egress halted on the context? */
990 /* is the send context halted? */
999 * @sc: valid send context
1007 * NOTE: The context halt bit may not be set immediately. Because of this,
1009 * context bit to determine if the context is halted.
1035 "%s: context %u(%u) timeout waiting for packets to egress, remaining count %u, bouncing link\n",
1065 * Restart a context after it has been halted due to error.
1084 dd_dev_info(dd, "restarting send context %u(%u)\n", sc->sw_index,
1088 * Step 1: Wait for the context to actually halt.
1091 * on the context.
1099 dd_dev_err(dd, "%s: context %u(%u) not halting, skipping\n",
1114 * to the context's PIO pages before calling this routine and will
1118 /* kernel context */
1126 "%s: context %u(%u) timeout waiting for PIO buffers to zero, remaining %d\n",
1137 * This is done while disabling the send context
1139 * Step 4: Disable the context
1147 * Step 5: Enable the context
1149 * This enable will clear the halted flag and per-send context
1170 * calls into the driver to reset its context.
1175 /* only need to disable, the context is already stopped */
1183 * been cleared. Now perform the last step and re-enable each kernel context.
1208 * event is different from a freeze because if the send context is re-enabled
1279 "PIO send context init %s while initializing all PIO blocks\n",
1284 /* enable the context */
1298 * attempts (which should not happen prior to context being
1301 * if the context accounting values have not changed.
1322 * Clear all per-context errors. Some of these will be set when
1323 * we are re-enabling after a context halt. Now that the context
1362 * All is well. Enable the context.
1368 * hazard where a PIO write may reach the context before the enable.
1379 /* force a credit return on the context */
1397 /* allow all in-flight packets to drain on the context */
1406 /* drop all packets on the context, no waiting until they are sent */
1412 dd_dev_info(sc->dd, "%s: context %u(%u) - not implemented\n",
1417 * Start the software reaction to a context halt or SPC freeze:
1418 * - mark the context as halted or frozen
1430 /* mark the context */
1441 * The send context buffer "allocator".
1443 * @sc: the PIO send context we are allocating from
1605 * @sc: the send context
1696 * The send context buffer "releaser".
1752 * Send context group releaser. Argument is the send context that caused
1753 * the interrupt. Called from the send context interrupt handler.
1794 * pio_select_send_context_vl() - select send context
1799 * This function returns a send context based on the selector and a vl.
1812 * Default will return VL0's send context below
1835 * pio_select_send_context_sc() - select send context
1840 * This function returns an send context based on the selector and an sc
1873 * Set credit return threshold for the kernel send context
1892 * @vl_scontexts: per vl send context mapping (optional)
1896 * vl_scontexts is used to specify a non-uniform vl/send context
1974 /* wrap back to first send context */
2043 * receive context but we need the RcvHdrQ entry size,
2070 "Using send context %u(%u) for VL15\n",