FreeBSD kernel CXGBE device code
|
#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ratelimit.h"
#include <sys/types.h>
#include <sys/malloc.h>
#include <sys/queue.h>
#include <sys/sbuf.h>
#include <sys/taskqueue.h>
#include <sys/sysctl.h>
#include "common/common.h"
#include "common/t4_regs.h"
#include "common/t4_regs_values.h"
#include "common/t4_msg.h"
Go to the source code of this file.
Functions | |
__FBSDID ("$FreeBSD$") | |
static int | in_range (int val, int lo, int hi) |
static int | set_sched_class_config (struct adapter *sc, int minmax) |
static int | set_sched_class_params (struct adapter *sc, struct t4_sched_class_params *p, int sleep_ok) |
static void | update_tx_sched (void *context, int pending) |
int | t4_set_sched_class (struct adapter *sc, struct t4_sched_params *p) |
static int | bind_txq_to_traffic_class (struct adapter *sc, struct sge_txq *txq, int idx) |
int | t4_set_sched_queue (struct adapter *sc, struct t4_sched_queue *p) |
int | t4_init_tx_sched (struct adapter *sc) |
int | t4_free_tx_sched (struct adapter *sc) |
void | t4_update_tx_sched (struct adapter *sc) |
int | t4_reserve_cl_rl_kbps (struct adapter *sc, int port_id, u_int maxrate, int *tc_idx) |
void | t4_release_cl_rl (struct adapter *sc, int port_id, int tc_idx) |
int | sysctl_tc (SYSCTL_HANDLER_ARGS) |
int | sysctl_tc_params (SYSCTL_HANDLER_ARGS) |
__FBSDID | ( | "$FreeBSD$" | ) |
Definition at line 320 of file t4_sched.c.
References begin_synchronized_op(), tx_sched_params::cl_rl, sge_eq::cntxt_id, CS_HW_CONFIGURED, end_synchronized_op(), sge_txq::eq, EQ_HW_ALLOCATED, sge_eq::flags, FW_PARAMS_MNEM_DMAQ, FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH, INTR_OK, adapter::mbox, adapter_params::nsched_cls, adapter::params, adapter::pf, adapter::port, tx_cl_rl_params::refcount, port_info::sched_params, SLEEP_OK, tx_cl_rl_params::state, t4_set_params(), sge_txq::tc_idx, adapter::tc_lock, sge_eq::tx_chan, V_FW_PARAMS_MNEM, V_FW_PARAMS_PARAM_X, and V_FW_PARAMS_PARAM_YZ.
Referenced by sysctl_tc(), and t4_set_sched_queue().
|
static |
Definition at line 48 of file t4_sched.c.
Referenced by set_sched_class_params(), sysctl_tc(), and t4_set_sched_queue().
|
static |
Definition at line 55 of file t4_sched.c.
References begin_synchronized_op(), end_synchronized_op(), FW_SCHED_TYPE_PKTSCHED, hw_off_limits(), INTR_OK, SLEEP_OK, and t4_sched_config().
Referenced by t4_set_sched_class().
|
static |
Definition at line 75 of file t4_sched.c.
References begin_synchronized_op(), CF_USER, CH_ERR, adapter::chan_map, t4_sched_class_params::channel, adapter::chip_params, t4_sched_class_params::cl, tx_sched_params::cl_rl, CS_HW_CONFIGURED, CS_HW_UPDATE_IN_PROGRESS, CS_UNINITIALIZED, end_synchronized_op(), tx_cl_rl_params::flags, FW_SCHED_PARAMS_LEVEL_CH_RL, FW_SCHED_PARAMS_LEVEL_CL_RL, FW_SCHED_PARAMS_LEVEL_CL_WRR, FW_SCHED_PARAMS_MODE_CLASS, FW_SCHED_PARAMS_MODE_FLOW, FW_SCHED_PARAMS_RATE_ABS, FW_SCHED_PARAMS_RATE_REL, FW_SCHED_PARAMS_UNIT_BITRATE, FW_SCHED_PARAMS_UNIT_PKTRATE, FW_SCHED_TYPE_PKTSCHED, HOLD_LOCK, hw_off_limits(), vi_info::ifp, in_range(), INTR_OK, t4_sched_class_params::level, LOCK_HELD, tx_cl_rl_params::maxrate, t4_sched_class_params::maxrate, t4_sched_class_params::minrate, tx_cl_rl_params::mode, t4_sched_class_params::mode, chip_params::nchan, adapter_params::nsched_cls, adapter::params, tx_cl_rl_params::pktsize, t4_sched_class_params::pktsize, adapter::port, port_top_speed(), tx_cl_rl_params::ratemode, t4_sched_class_params::ratemode, tx_cl_rl_params::rateunit, t4_sched_class_params::rateunit, tx_cl_rl_params::refcount, SCHED_CLASS_LEVEL_CH_RL, SCHED_CLASS_LEVEL_CL_RL, SCHED_CLASS_LEVEL_CL_WRR, SCHED_CLASS_MODE_CLASS, SCHED_CLASS_MODE_FLOW, SCHED_CLASS_RATEMODE_ABS, SCHED_CLASS_RATEMODE_REL, SCHED_CLASS_RATEUNIT_BITS, SCHED_CLASS_RATEUNIT_PKTS, port_info::sched_params, SLEEP_OK, tx_cl_rl_params::state, t4_sched_params(), adapter::tc_lock, port_info::tx_chan, port_info::vi, and t4_sched_class_params::weight.
Referenced by t4_set_sched_class().
int sysctl_tc | ( | SYSCTL_HANDLER_ARGS | ) |
Definition at line 592 of file t4_sched.c.
References vi_info::adapter, bind_txq_to_traffic_class(), vi_info::first_txq, adapter::flags, in_range(), IS_VF, adapter_params::nsched_cls, vi_info::ntxq, adapter::params, adapter::sge, tc_idx, sge_txq::tc_idx, and sge::txq.
Referenced by add_txq_sysctls().
int sysctl_tc_params | ( | SYSCTL_HANDLER_ARGS | ) |
Definition at line 616 of file t4_sched.c.
References tx_cl_rl_params::burstsize, tx_sched_params::cl_rl, CS_PARAMS_SET, tx_cl_rl_params::maxrate, tx_cl_rl_params::mode, tx_cl_rl_params::pktsize, adapter::port, port_top_speed(), tx_cl_rl_params::ratemode, tx_cl_rl_params::rateunit, SCHED_CLASS_MODE_CLASS, SCHED_CLASS_MODE_FLOW, SCHED_CLASS_RATEMODE_ABS, SCHED_CLASS_RATEMODE_REL, SCHED_CLASS_RATEUNIT_BITS, SCHED_CLASS_RATEUNIT_PKTS, port_info::sched_params, tx_cl_rl_params::state, and adapter::tc_lock.
Referenced by cxgbe_sysctls().
int t4_free_tx_sched | ( | struct adapter * | sc | ) |
Definition at line 472 of file t4_sched.c.
References for_each_port, adapter::port, port_info::sched_params, adapter::tc_lock, and adapter::tc_task.
Referenced by t4_detach_common().
int t4_init_tx_sched | ( | struct adapter * | sc | ) |
Definition at line 454 of file t4_sched.c.
References for_each_port, adapter_params::nsched_cls, adapter::params, adapter::port, port_info::sched_params, adapter::tc_lock, adapter::tc_task, and update_tx_sched().
Referenced by t4_attach().
void t4_release_cl_rl | ( | struct adapter * | sc, |
int | port_id, | ||
int | tc_idx | ||
) |
Definition at line 577 of file t4_sched.c.
References tx_sched_params::cl_rl, adapter::port, tx_cl_rl_params::refcount, port_info::sched_params, tc_idx, and adapter::tc_lock.
int t4_reserve_cl_rl_kbps | ( | struct adapter * | sc, |
int | port_id, | ||
u_int | maxrate, | ||
int * | tc_idx | ||
) |
Definition at line 497 of file t4_sched.c.
References tx_cl_rl_params::burstsize, tx_sched_params::burstsize, CF_USER, tx_sched_params::cl_rl, CS_HW_UPDATE_REQUESTED, CS_PARAMS_SET, CS_UNINITIALIZED, tx_cl_rl_params::flags, FW_SCHED_PARAMS_MODE_FLOW, FW_SCHED_PARAMS_RATE_ABS, FW_SCHED_PARAMS_UNIT_BITRATE, vi_info::ifp, tx_cl_rl_params::maxrate, tx_cl_rl_params::mode, adapter_params::nsched_cls, adapter::params, tx_cl_rl_params::pktsize, tx_sched_params::pktsize, adapter::port, port_info::port_id, tx_cl_rl_params::ratemode, tx_cl_rl_params::rateunit, tx_cl_rl_params::refcount, port_info::sched_params, tx_cl_rl_params::state, t4_update_tx_sched(), tc_idx, adapter::tc_lock, and port_info::vi.
int t4_set_sched_class | ( | struct adapter * | sc, |
struct t4_sched_params * | p | ||
) |
Definition at line 304 of file t4_sched.c.
References t4_sched_params::config, t4_sched_params::minmax, t4_sched_params::params, SCHED_CLASS_SUBCMD_CONFIG, SCHED_CLASS_SUBCMD_PARAMS, SCHED_CLASS_TYPE_PACKET, set_sched_class_config(), set_sched_class_params(), t4_sched_params::subcmd, t4_sched_params::type, and t4_sched_params::u.
Referenced by t4_ioctl(), and t4vf_ioctl().
int t4_set_sched_queue | ( | struct adapter * | sc, |
struct t4_sched_queue * | p | ||
) |
Definition at line 405 of file t4_sched.c.
References bind_txq_to_traffic_class(), t4_sched_queue::cl, vi_info::first_txq, vi_info::flags, for_each_txq, in_range(), adapter_params::nports, adapter_params::nsched_cls, vi_info::ntxq, adapter::params, adapter::port, t4_sched_queue::port, t4_sched_queue::queue, adapter::sge, sge::txq, port_info::vi, and VI_INIT_DONE.
Referenced by t4_ioctl(), and t4vf_ioctl().
void t4_update_tx_sched | ( | struct adapter * | sc | ) |
Definition at line 490 of file t4_sched.c.
References adapter::tc_task.
Referenced by t4_reserve_cl_rl_kbps().
|
static |
Definition at line 252 of file t4_sched.c.
References begin_synchronized_op(), tx_cl_rl_params::burstsize, CH_ERR, tx_sched_params::cl_rl, CS_HW_CONFIGURED, CS_HW_UPDATE_REQUESTED, CS_PARAMS_SET, CS_UNINITIALIZED, end_synchronized_op(), for_each_port, FW_SCHED_PARAMS_LEVEL_CL_RL, FW_SCHED_TYPE_PKTSCHED, INTR_OK, tx_cl_rl_params::maxrate, tx_cl_rl_params::mode, adapter_params::nsched_cls, adapter::params, tx_cl_rl_params::pktsize, adapter::port, tx_cl_rl_params::ratemode, tx_cl_rl_params::rateunit, tx_cl_rl_params::refcount, port_info::sched_params, SLEEP_OK, tx_cl_rl_params::state, t4_sched_params(), adapter::tc_lock, and port_info::tx_chan.
Referenced by t4_init_tx_sched().