Rate limiting in DPAA

Document created by Ugendreshwar Kudupudi Employee on Apr 15, 2015Last modified by Ugendreshwar Kudupudi Employee on Apr 15, 2015
Version 3Show Document
  • View in full screen mode

Currently rate limiting is supported on TX side only via IOCTL call FM_PORT_IOC_SET_RATE_LIMIT. A user-space application has to be implement which opens the character driver interface of the TX port and issue the IOCTL. The rate_limit structure (mentioned below) has to be filled to implement the restriction.


For example:


fd = open ("/dev/fm0_port_tx5", O_RDWR);


err = ioctl(fd, FM_PORT_IOC_SET_RATE_LIMIT, &fm_port);


Structure to pass to the IOCTL:

 

/**************************************************************************//**

@Description@@   A structure for defining Tx rate limiting

(Must match struct t_FmPortRateLimit defined in fm_port_ext.h)

*//***************************************************************************/

typedef struct ioc_fm_port_rate_limit_t {

uint16_t max_burst_size;         /**< in KBytes for Tx ports, in frames

for offline parsing ports. (note that

for early chips burst size is

rounded up to a multiply of 1000 frames).*/

    uint32_t rate_limit; /**< in Kb/sec for Tx ports, in frame/sec for

offline parsing ports. Rate limit refers to

data rate (rather than line rate). */

ioc_fm_port_dual_rate_limiter_scale_down rate_limit_divider; /**< For offline parsing ports only. Not-valid

for some earlier chip revisions */

} ioc_fm_port_rate_limit_t;

 

Further information in the below link.

 

http://www.freescale.com/infocenter/index.jsp?topic=%2FQORIQSDK%2F2283674.html

Attachments

    Outcomes