Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
cvmx-pko.c File Reference
#include <asm/octeon/octeon.h>
#include <asm/octeon/cvmx-config.h>
#include <asm/octeon/cvmx-pko.h>
#include <asm/octeon/cvmx-helper.h>

Go to the source code of this file.

Functions

void cvmx_pko_initialize_global (void)
 
int cvmx_pko_initialize_local (void)
 
void cvmx_pko_enable (void)
 
void cvmx_pko_disable (void)
 
void cvmx_pko_shutdown (void)
 
cvmx_pko_status_t cvmx_pko_config_port (uint64_t port, uint64_t base_queue, uint64_t num_queues, const uint64_t priority[])
 
int cvmx_pko_rate_limit_packets (int port, int packets_s, int burst)
 
int cvmx_pko_rate_limit_bits (int port, uint64_t bits_s, int burst)
 

Function Documentation

cvmx_pko_status_t cvmx_pko_config_port ( uint64_t  port,
uint64_t  base_queue,
uint64_t  num_queues,
const uint64_t  priority[] 
)

Configure a output port and the associated queues for use.

: Port to configure. : First queue number to associate with this port. : Number of queues to associate with this port : Array of priority levels for each queue. Values are allowed to be 0-8. A value of 8 get 8 times the traffic of a value of 1. A value of 0 indicates that no rounds will be participated in. These priorities can be changed on the fly while the pko is enabled. A priority of 9 indicates that static priority should be used. If static priority is used all queues with static priority must be contiguous starting at the base_queue, and lower numbered queues have higher priority than higher numbered queues. There must be num_queues elements in the array.

Definition at line 203 of file cvmx-pko.c.

void cvmx_pko_disable ( void  )

Disables the packet output. Does not affect any configuration.

Definition at line 136 of file cvmx-pko.c.

void cvmx_pko_enable ( void  )

Enables the packet output hardware. It must already be configured.

Definition at line 114 of file cvmx-pko.c.

void cvmx_pko_initialize_global ( void  )

Internal state of packet output Call before any other calls to initialize the packet output system. This does chip global config, and should only be done by one core.

Definition at line 48 of file cvmx-pko.c.

int cvmx_pko_initialize_local ( void  )

This function does per-core initialization required by the PKO routines. This must be called on all cores that will do packet output, and must be called after the FPA has been initialized and filled with pages.

Returns 0 on success !0 on failure

Definition at line 104 of file cvmx-pko.c.

int cvmx_pko_rate_limit_bits ( int  port,
uint64_t  bits_s,
int  burst 
)

Rate limit a PKO port to a max bits/sec. This function is only supported on CN51XX and higher, excluding CN58XX.

: Port to rate limit : PKO rate limit in bits/sec : Maximum number of bits to burst before rate limiting cuts in.

Returns Zero on success, negative on failure

Definition at line 480 of file cvmx-pko.c.

int cvmx_pko_rate_limit_packets ( int  port,
int  packets_s,
int  burst 
)

Rate limit a PKO port to a max packets/sec. This function is only supported on CN51XX and higher, excluding CN58XX.

: Port to rate limit : Maximum packet/sec : Maximum number of packets to burst in a row before rate limiting cuts in.

Returns Zero on success, negative on failure

Definition at line 447 of file cvmx-pko.c.

void cvmx_pko_shutdown ( void  )

Shutdown and free resources required by packet output.

Definition at line 159 of file cvmx-pko.c.