pp-load

Synopsis

(pp-load port-number program)

Parameters

  • port-number
  • program

Description

This procedure loads a PPRM (packet processing register machine) program and associates it with the specified packet processing port. A program is represented as a vector of instructions. Loading an empty vector clears the port specific PPMR program.

If a syntax error is determined in a first pass, nothing is changed and an error is signalled.

Loading a PPMR program is possible during operation of a connected port, theoretically there may be a writer starvation effect on heaviliy busy ports with multiple collector threads.

Side Effects

The PPMR program is loaded for the specified port.

Return Value

ok

Example

> (pp-load 2 '#((noop) (outport 3) (out)))
ok
> (pp-load 2 '#())
ok
>