FreeBSD kernel CXGBE device code
|
#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_inet6.h"
#include <sys/param.h>
#include <sys/eventhandler.h>
#include <sys/fnv_hash.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/bus.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/rwlock.h>
#include <sys/socket.h>
#include <sys/sbuf.h>
#include <netinet/in.h>
#include "common/common.h"
#include "common/t4_msg.h"
#include "common/t4_regs.h"
#include "common/t4_regs_values.h"
#include "common/t4_tcb.h"
#include "t4_l2t.h"
#include "t4_smt.h"
Go to the source code of this file.
Data Structures | |
struct | filter_entry |
Macros | |
#define | LEN__SET_TCB_FIELD_ULP |
#define | LEN__ABORT_REQ_ULP |
#define | LEN__ABORT_RPL_ULP |
#define | WORD_MASK 0xffffffff |
Functions | |
__FBSDID ("$FreeBSD$") | |
static void | free_filter_resources (struct filter_entry *) |
static int | get_tcamfilter (struct adapter *, struct t4_filter *) |
static int | get_hashfilter (struct adapter *, struct t4_filter *) |
static int | set_hashfilter (struct adapter *, struct t4_filter *, uint64_t, struct l2t_entry *, struct smt_entry *) |
static int | del_hashfilter (struct adapter *, struct t4_filter *) |
static int | configure_hashfilter_tcb (struct adapter *, struct filter_entry *) |
static bool | separate_hpfilter_region (struct adapter *sc) |
static uint32_t | hf_hashfn_4t (struct t4_filter_specification *fs) |
static uint32_t | hf_hashfn_tid (int tid) |
static int | alloc_hftid_hash (struct tid_info *t, int flags) |
void | free_hftid_hash (struct tid_info *t) |
static void | insert_hf (struct adapter *sc, struct filter_entry *f, uint32_t hash) |
static void | insert_hftid (struct adapter *sc, struct filter_entry *f) |
static bool | filter_eq (struct t4_filter_specification *fs1, struct t4_filter_specification *fs2) |
static struct filter_entry * | lookup_hf (struct adapter *sc, struct t4_filter_specification *fs, uint32_t hash) |
static struct filter_entry * | lookup_hftid (struct adapter *sc, int tid) |
static void | remove_hf (struct adapter *sc, struct filter_entry *f) |
static void | remove_hftid (struct adapter *sc, struct filter_entry *f) |
static uint16_t | mode_to_fconf (uint32_t mode) |
static int | mode_to_iconf (uint32_t mode) |
static int | check_fspec_against_fconf_iconf (struct adapter *sc, struct t4_filter_specification *fs) |
static uint32_t | fconf_to_mode (uint16_t hwmode, int vnic_mode) |
int | get_filter_mode (struct adapter *sc, uint32_t *mode) |
int | set_filter_mode (struct adapter *sc, uint32_t mode) |
int | set_filter_mask (struct adapter *sc, uint32_t mode) |
static uint64_t | get_filter_hits (struct adapter *sc, uint32_t tid) |
int | get_filter (struct adapter *sc, struct t4_filter *t) |
static int | set_tcamfilter (struct adapter *sc, struct t4_filter *t, struct l2t_entry *l2te, struct smt_entry *smt) |
static int | hashfilter_ntuple (struct adapter *sc, const struct t4_filter_specification *fs, uint64_t *ftuple) |
static bool | is_4tuple_specified (struct t4_filter_specification *fs) |
int | set_filter (struct adapter *sc, struct t4_filter *t) |
static int | del_tcamfilter (struct adapter *sc, struct t4_filter *t) |
int | del_filter (struct adapter *sc, struct t4_filter *t) |
static int | set_tcb_field (struct adapter *sc, u_int tid, uint16_t word, uint64_t mask, uint64_t val, int no_reply) |
static int | set_tcb_tflag (struct adapter *sc, int tid, u_int bit_pos, u_int val, u_int no_reply) |
int | t4_filter_rpl (struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) |
int | t4_hashfilter_ao_rpl (struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) |
int | t4_hashfilter_tcb_rpl (struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) |
int | t4_del_hashfilter_rpl (struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) |
static void | mk_act_open_req6 (struct adapter *sc, struct filter_entry *f, int atid, uint64_t ftuple, struct cpl_act_open_req6 *cpl) |
static void | mk_act_open_req (struct adapter *sc, struct filter_entry *f, int atid, uint64_t ftuple, struct cpl_act_open_req *cpl) |
static int | act_open_cpl_len16 (struct adapter *sc, int isipv6) |
static void * | mk_set_tcb_field_ulp (struct ulp_txpkt *ulpmc, uint64_t word, uint64_t mask, uint64_t val, uint32_t tid, uint32_t qid) |
static void * | mk_abort_req_ulp (struct ulp_txpkt *ulpmc, uint32_t tid) |
static void * | mk_abort_rpl_ulp (struct ulp_txpkt *ulpmc, uint32_t tid) |
static int | del_hashfilter_wrlen (void) |
static void | mk_del_hashfilter_wr (int tid, struct work_request_hdr *wrh, int wrlen, int qid) |
static void | set_nat_params (struct adapter *sc, struct filter_entry *f, const bool dip, const bool sip, const bool dp, const bool sp) |
#define LEN__ABORT_REQ_ULP |
Definition at line 1738 of file t4_filter.c.
#define LEN__ABORT_RPL_ULP |
Definition at line 1770 of file t4_filter.c.
#define LEN__SET_TCB_FIELD_ULP |
Definition at line 1704 of file t4_filter.c.
#define WORD_MASK 0xffffffff |
Definition at line 1891 of file t4_filter.c.
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 1596 of file t4_filter.c.
References CHELSIO_T4, and chip_id().
Referenced by set_hashfilter().
|
static |
Definition at line 113 of file t4_filter.c.
References tid_info::hftid_4t_mask, tid_info::hftid_cv, tid_info::hftid_hash_4t, tid_info::hftid_hash_tid, tid_info::hftid_tid_mask, and tid_info::ntids.
Referenced by set_filter().
|
static |
Definition at line 388 of file t4_filter.c.
References t4_filter_tuple::ethtype, F_ETHERTYPE, F_FCOE, F_FRAGMENTATION, F_MACMATCH, F_MPSHITTYPE, F_PORT, F_PROTOCOL, F_TOS, F_VLAN, F_VNIC_ID, t4_filter_tuple::fcoe, tp_params::filter_mode, t4_filter_tuple::frag, FW_VNIC_MODE_ENCAP_EN, FW_VNIC_MODE_OUTER_VLAN, FW_VNIC_MODE_PF_VF, t4_filter_tuple::iport, t4_filter_tuple::macidx, t4_filter_specification::mask, t4_filter_tuple::matchtype, t4_filter_tuple::ovlan_vld, adapter::params, t4_filter_tuple::pfvf_vld, t4_filter_tuple::proto, t4_filter_tuple::tos, adapter_params::tp, t4_filter_specification::val, t4_filter_tuple::vlan_vld, and tp_params::vnic_mode.
Referenced by set_filter().
|
static |
Definition at line 1965 of file t4_filter.c.
References FILTER_DROP, FILTER_SWITCH, is_t5(), M_TCB_RCV_NXT, M_TCB_SMAC_SEL, M_TCB_T_RTT_TS_RECENT_AGE, M_TCB_TIMESTAMP, NAT_MODE_ALL, NAT_MODE_DIP, NAT_MODE_DIP_DP, NAT_MODE_DIP_DP_SIP, NAT_MODE_DIP_DP_SP, NAT_MODE_DIP_SIP_SP, NAT_MODE_NONE, NAT_MODE_SIP_SP, tid_info::ntids, S_TF_CCTRL_CWR, S_TF_CCTRL_ECE, S_TF_CCTRL_ECN, S_TF_CCTRL_RFR, set_nat_params(), set_tcb_field(), set_tcb_tflag(), adapter::tids, V_TCB_RCV_NXT, V_TCB_SMAC_SEL, V_TCB_T_RTT_TS_RECENT_AGE, V_TCB_TIMESTAMP, V_TF_MIGRATING, V_TF_NON_OFFLOAD, VLAN_INSERT, VLAN_REWRITE, W_TCB_RCV_NXT, W_TCB_SMAC_SEL, W_TCB_T_FLAGS, and W_TCB_TIMESTAMP.
Referenced by t4_hashfilter_ao_rpl().
Definition at line 1146 of file t4_filter.c.
References del_hashfilter(), del_tcamfilter(), adapter::flags, t4_filter::fs, tid_info::ftid_tab, FULL_INIT_DONE, t4_filter_specification::hash, tid_info::hftid_hash_4t, tid_info::hpftid_tab, t4_filter_specification::prio, separate_hpfilter_region(), and adapter::tids.
Referenced by t4_ioctl().
Definition at line 1825 of file t4_filter.c.
References sge_iq::abs_id, commit_wrq_wr(), sge::ctrlq, del_hashfilter_wrlen(), t4_filter::fs, sge::fwq, tid_info::hftid_cv, tid_info::hftid_hash_4t, t4_filter::idx, lookup_hftid(), mk_del_hashfilter_wr(), tid_info::ntids, adapter::sge, start_wrq_wr(), tid_info::tid_base, and adapter::tids.
Referenced by del_filter().
|
inlinestatic |
Definition at line 1802 of file t4_filter.c.
References LEN__ABORT_REQ_ULP, LEN__ABORT_RPL_ULP, and LEN__SET_TCB_FIELD_ULP.
Referenced by del_hashfilter().
Definition at line 1074 of file t4_filter.c.
References sge_iq::abs_id, commit_wrq_wr(), sge::ctrlq, t4_filter::fs, tid_info::ftid_base, tid_info::ftid_cv, tid_info::ftid_tab, sge::fwq, tid_info::hpftid_base, tid_info::hpftid_tab, t4_filter::idx, tid_info::nftids, tid_info::nhpftids, t4_filter_specification::prio, separate_hpfilter_region(), adapter::sge, start_wrq_wr(), t4_mk_filtdelwr(), and adapter::tids.
Referenced by del_filter().
|
static |
Definition at line 452 of file t4_filter.c.
References F_ETHERTYPE, F_FCOE, F_FRAGMENTATION, F_MACMATCH, F_MPSHITTYPE, F_PORT, F_PROTOCOL, F_TOS, F_VLAN, F_VNIC_ID, FW_VNIC_MODE_ENCAP_EN, FW_VNIC_MODE_OUTER_VLAN, FW_VNIC_MODE_PF_VF, T4_FILTER_ETH_TYPE, T4_FILTER_FCoE, T4_FILTER_IC_ENCAP, T4_FILTER_IC_VNIC, T4_FILTER_IP_DADDR, T4_FILTER_IP_DPORT, T4_FILTER_IP_FRAGMENT, T4_FILTER_IP_PROTO, T4_FILTER_IP_SADDR, T4_FILTER_IP_SPORT, T4_FILTER_IP_TOS, T4_FILTER_IPv4, T4_FILTER_IPv6, T4_FILTER_MAC_IDX, T4_FILTER_MPS_HIT_TYPE, T4_FILTER_PORT, T4_FILTER_VLAN, T4_FILTER_VNIC, and tp_params::vnic_mode.
Referenced by get_filter_mode().
|
static |
Definition at line 216 of file t4_filter.c.
References t4_filter_tuple::dip, t4_filter_tuple::dport, t4_filter_tuple::ethtype, t4_filter_tuple::fcoe, t4_filter_tuple::frag, t4_filter_specification::hash, t4_filter_tuple::iport, t4_filter_tuple::macidx, t4_filter_specification::mask, t4_filter_tuple::matchtype, t4_filter_tuple::ovlan_vld, t4_filter_tuple::pfvf_vld, t4_filter_tuple::proto, t4_filter_tuple::sip, t4_filter_tuple::sport, t4_filter_tuple::tos, t4_filter_specification::type, t4_filter_specification::val, t4_filter_tuple::vlan, t4_filter_tuple::vlan_vld, and t4_filter_tuple::vnic.
Referenced by lookup_hf().
|
static |
Definition at line 1175 of file t4_filter.c.
References t4_l2t_release(), and t4_smt_release().
Referenced by t4_del_hashfilter_rpl(), t4_filter_rpl(), t4_hashfilter_ao_rpl(), and t4_hashfilter_tcb_rpl().
void free_hftid_hash | ( | struct tid_info * | t | ) |
Definition at line 140 of file t4_filter.c.
References tid_info::hftid_4t_mask, tid_info::hftid_cv, tid_info::hftid_hash_4t, tid_info::hftid_hash_tid, tid_info::hftid_tid_mask, LIST_HEAD(), and tid_info::tids_in_use.
Referenced by t4_detach_common().
Definition at line 626 of file t4_filter.c.
References t4_filter::fs, get_hashfilter(), get_tcamfilter(), and t4_filter_specification::hash.
Referenced by t4_ioctl().
|
inlinestatic |
Definition at line 599 of file t4_filter.c.
References A_TP_CMM_TCB_BASE, hw_off_limits(), is_t4(), read_via_memwin(), adapter::reg_lock, t4_read_reg(), and TCB_SIZE.
Referenced by get_hashfilter(), and get_tcamfilter().
int get_filter_mode | ( | struct adapter * | sc, |
uint32_t * | mode | ||
) |
Definition at line 494 of file t4_filter.c.
References fconf_to_mode(), tp_params::filter_mask, tp_params::filter_mode, adapter::params, adapter_params::tp, and tp_params::vnic_mode.
Referenced by t4_ioctl().
Definition at line 1468 of file t4_filter.c.
References t4_filter::fs, get_filter_hits(), t4_filter_specification::hash, tid_info::hftid_hash_tid, t4_filter::hits, t4_filter::idx, t4_filter::l2tidx, lookup_hftid(), tid_info::ntids, t4_filter::smtidx, tid_info::tid_base, adapter::tids, and tid_info::tids_in_use.
Referenced by get_filter().
Definition at line 1412 of file t4_filter.c.
References t4_filter::fs, tid_info::ftid_base, tid_info::ftid_tab, tid_info::ftids_in_use, get_filter_hits(), t4_filter_specification::hash, t4_filter::hits, tid_info::hpftid_base, tid_info::hpftid_tab, tid_info::hpftids_in_use, t4_filter::idx, t4_filter::l2tidx, tid_info::nftids, tid_info::nhpftids, t4_filter_specification::prio, separate_hpfilter_region(), t4_filter::smtidx, and adapter::tids.
Referenced by get_filter().
|
static |
Definition at line 810 of file t4_filter.c.
References tp_params::ethertype_shift, t4_filter_tuple::ethtype, F_ETHERTYPE, F_FCOE, F_FRAGMENTATION, F_FT_VLAN_VLD, F_MACMATCH, F_MPSHITTYPE, F_PORT, F_PROTOCOL, F_TOS, F_VLAN, F_VNIC_ID, t4_filter_tuple::fcoe, tp_params::fcoe_shift, tp_params::filter_mask, t4_filter_tuple::frag, tp_params::frag_shift, FW_VNIC_MODE_ENCAP_EN, FW_VNIC_MODE_OUTER_VLAN, FW_VNIC_MODE_PF_VF, t4_filter_tuple::iport, t4_filter_tuple::macidx, tp_params::macmatch_shift, t4_filter_specification::mask, t4_filter_tuple::matchtype, tp_params::matchtype_shift, t4_filter_tuple::ovlan_vld, adapter::params, t4_filter_tuple::pfvf_vld, tp_params::port_shift, t4_filter_tuple::proto, tp_params::protocol_shift, t4_filter_tuple::tos, tp_params::tos_shift, adapter_params::tp, t4_filter_specification::val, t4_filter_tuple::vlan, tp_params::vlan_shift, t4_filter_tuple::vnic, tp_params::vnic_mode, and tp_params::vnic_shift.
Referenced by set_filter().
|
inlinestatic |
Definition at line 86 of file t4_filter.c.
References t4_filter_tuple::dip, t4_filter_tuple::dport, t4_filter_tuple::sip, t4_filter_tuple::sport, t4_filter_specification::type, and t4_filter_specification::val.
Referenced by insert_hf(), lookup_hf(), and set_hashfilter().
|
inlinestatic |
Definition at line 106 of file t4_filter.c.
Referenced by insert_hftid(), and lookup_hftid().
|
static |
Definition at line 188 of file t4_filter.c.
References hf_hashfn_4t(), tid_info::hftid_4t_mask, tid_info::hftid_hash_4t, LIST_HEAD(), adapter::tids, and tid_info::tids_in_use.
Referenced by set_hashfilter().
|
static |
Definition at line 201 of file t4_filter.c.
References hf_hashfn_tid(), tid_info::hftid_hash_tid, tid_info::hftid_tid_mask, LIST_HEAD(), tid_info::ntids, tid_info::tid_base, and adapter::tids.
Referenced by t4_hashfilter_ao_rpl().
|
static |
Definition at line 890 of file t4_filter.c.
References t4_filter_tuple::dip, t4_filter_tuple::dport, t4_filter_specification::mask, t4_filter_tuple::sip, t4_filter_tuple::sport, and t4_filter_specification::type.
Referenced by set_filter().
|
static |
Definition at line 264 of file t4_filter.c.
References filter_eq(), hf_hashfn_4t(), tid_info::hftid_4t_mask, tid_info::hftid_hash_4t, LIST_HEAD(), and adapter::tids.
Referenced by set_hashfilter().
|
static |
Definition at line 285 of file t4_filter.c.
References hf_hashfn_tid(), tid_info::hftid_hash_tid, tid_info::hftid_tid_mask, LIST_HEAD(), and adapter::tids.
Referenced by del_hashfilter(), get_hashfilter(), t4_del_hashfilter_rpl(), t4_hashfilter_ao_rpl(), and t4_hashfilter_tcb_rpl().
|
static |
Definition at line 1742 of file t4_filter.c.
References cpl_abort_req_core::cmd, ulp_txpkt::cmd_dest, ulptx_idata::cmd_more, CPL_ABORT_NO_RST, CPL_ABORT_REQ, ulptx_idata::len, ulp_txpkt::len, LEN__ABORT_REQ_ULP, MK_OPCODE_TID, OPCODE_TID, cpl_abort_req_core::rsvd0, cpl_abort_req_core::rsvd1, ULP_TX_PKT, ULP_TX_SC_IMM, ULP_TX_SC_NOOP, V_ULP_TXPKT_DEST, and V_ULPTX_CMD.
Referenced by mk_del_hashfilter_wr().
|
static |
Definition at line 1774 of file t4_filter.c.
References cpl_abort_rpl_core::cmd, ulp_txpkt::cmd_dest, ulptx_idata::cmd_more, CPL_ABORT_NO_RST, CPL_ABORT_RPL, ulptx_idata::len, ulp_txpkt::len, LEN__ABORT_RPL_ULP, MK_OPCODE_TID, OPCODE_TID, cpl_abort_rpl_core::rsvd0, cpl_abort_rpl_core::rsvd1, ULP_TX_PKT, ULP_TX_SC_IMM, ULP_TX_SC_NOOP, V_ULP_TXPKT_DEST, and V_ULPTX_CMD.
Referenced by mk_del_hashfilter_wr().
|
static |
Definition at line 1552 of file t4_filter.c.
References sge_iq::abs_id, CHELSIO_T5, CHELSIO_T6, chip_id(), CPL_ACT_OPEN_REQ, CPL_COOKIE_HASHFILTER, F_NON_OFFLOAD, F_RSS_QUEUE_VALID, F_RX_CHANNEL, F_T5_OPT_2_VALID, F_TCAM_BYPASS, FILTER_DROP, sge::fwq, INIT_TP_WR, cpl_act_open_req::local_ip, cpl_act_open_req::local_port, MK_OPCODE_TID, OPCODE_TID, cpl_act_open_req::opt0, cpl_t6_act_open_req::opt2, cpl_t6_act_open_req::opt3, cpl_t6_act_open_req::params, cpl_act_open_req::peer_ip, cpl_act_open_req::peer_port, cpl_t6_act_open_req::rsvd2, adapter::sge, ULP_MODE_NONE, ULP_MODE_TCPDDP, V_CONG_CNTRL, V_DELACK, V_FILTER_TUPLE, V_L2T_IDX, V_NAGLE, V_NO_CONG, V_PACE, V_RSS_QUEUE, V_RX_FC_DISABLE, V_SACK_EN, V_TID_COOKIE, V_TID_QID, V_TID_TID, V_TX_CHAN, V_TX_QUEUE, V_ULP_MODE, V_WND_SCALE_EN, VLAN_REMOVE, and VLAN_REWRITE.
Referenced by set_hashfilter().
|
static |
Definition at line 1508 of file t4_filter.c.
References sge_iq::abs_id, CHELSIO_T5, CHELSIO_T6, chip_id(), CPL_ACT_OPEN_REQ6, CPL_COOKIE_HASHFILTER, F_NON_OFFLOAD, F_RSS_QUEUE_VALID, F_RX_CHANNEL, F_T5_OPT_2_VALID, F_TCAM_BYPASS, FILTER_DROP, sge::fwq, INIT_TP_WR, cpl_act_open_req6::local_ip_hi, cpl_act_open_req6::local_ip_lo, cpl_act_open_req6::local_port, MK_OPCODE_TID, OPCODE_TID, cpl_act_open_req6::opt0, cpl_t6_act_open_req6::opt2, cpl_t6_act_open_req6::opt3, cpl_t6_act_open_req6::params, cpl_act_open_req6::peer_ip_hi, cpl_act_open_req6::peer_ip_lo, cpl_act_open_req6::peer_port, cpl_t6_act_open_req6::rsvd2, adapter::sge, ULP_MODE_NONE, ULP_MODE_TCPDDP, V_CONG_CNTRL, V_DELACK, V_FILTER_TUPLE, V_L2T_IDX, V_NAGLE, V_NO_CONG, V_PACE, V_RSS_QUEUE, V_RX_FC_DISABLE, V_SACK_EN, V_TID_COOKIE, V_TID_QID, V_TID_TID, V_TX_CHAN, V_TX_QUEUE, V_ULP_MODE, V_WND_SCALE_EN, VLAN_REMOVE, and VLAN_REWRITE.
Referenced by set_hashfilter().
|
static |
Definition at line 1812 of file t4_filter.c.
References INIT_ULPTX_WRH, M_TCB_RSS_INFO, mk_abort_req_ulp(), mk_abort_rpl_ulp(), mk_set_tcb_field_ulp(), V_TCB_RSS_INFO, and W_TCB_RSS_INFO.
Referenced by del_hashfilter().
|
static |
Definition at line 1708 of file t4_filter.c.
References ulp_txpkt::cmd_dest, ulptx_idata::cmd_more, CPL_SET_TCB_FIELD, ulptx_idata::len, ulp_txpkt::len, LEN__SET_TCB_FIELD_ULP, cpl_set_tcb_field_core::mask, MK_OPCODE_TID, OPCODE_TID, cpl_set_tcb_field_core::reply_ctrl, ULP_TX_PKT, ULP_TX_SC_IMM, ULP_TX_SC_NOOP, V_COOKIE, V_NO_REPLY, V_QUEUENO, V_ULP_TXPKT_DEST, V_ULPTX_CMD, V_WORD, cpl_set_tcb_field_core::val, and cpl_set_tcb_field_core::word_cookie.
Referenced by mk_del_hashfilter_wr().
|
static |
Definition at line 332 of file t4_filter.c.
References F_ETHERTYPE, F_FCOE, F_FRAGMENTATION, F_MACMATCH, F_MPSHITTYPE, F_PORT, F_PROTOCOL, F_TOS, F_VLAN, F_VNIC_ID, T4_FILTER_ETH_TYPE, T4_FILTER_FCoE, T4_FILTER_IP_FRAGMENT, T4_FILTER_IP_PROTO, T4_FILTER_IP_TOS, T4_FILTER_MAC_IDX, T4_FILTER_MPS_HIT_TYPE, T4_FILTER_PORT, T4_FILTER_VLAN, and T4_FILTER_VNIC.
Referenced by set_filter_mask(), and set_filter_mode().
|
static |
Definition at line 374 of file t4_filter.c.
References FW_VNIC_MODE_ENCAP_EN, FW_VNIC_MODE_OUTER_VLAN, FW_VNIC_MODE_PF_VF, T4_FILTER_IC_ENCAP, T4_FILTER_IC_VNIC, and T4_FILTER_VNIC.
Referenced by set_filter_mask(), and set_filter_mode().
|
static |
Definition at line 305 of file t4_filter.c.
References adapter::tids, and tid_info::tids_in_use.
Referenced by t4_del_hashfilter_rpl(), t4_hashfilter_ao_rpl(), and t4_hashfilter_tcb_rpl().
|
static |
Definition at line 316 of file t4_filter.c.
References adapter::tids.
Referenced by t4_del_hashfilter_rpl(), and t4_hashfilter_tcb_rpl().
Definition at line 79 of file t4_filter.c.
References CHELSIO_T6, and chip_id().
Referenced by del_filter(), del_tcamfilter(), get_tcamfilter(), set_filter(), set_tcamfilter(), and t4_filter_rpl().
Definition at line 909 of file t4_filter.c.
References t4_filter_specification::action, adapter_init(), alloc_hftid_hash(), begin_synchronized_op(), check_fspec_against_fconf_iconf(), t4_filter_specification::dirsteer, t4_filter_specification::dirsteerhash, t4_filter_specification::dmac, end_synchronized_op(), t4_filter_specification::eport, FILTER_SWITCH, adapter::flags, t4_filter::fs, tid_info::ftid_cv, tid_info::ftid_tab, tid_info::ftids_in_use, FULL_INIT_DONE, t4_filter_specification::hash, hashfilter_ntuple(), tid_info::hftid_hash_4t, t4_filter_specification::hitcnts, tid_info::hpftid_tab, tid_info::hpftids_in_use, hw_off_limits(), t4_filter::idx, INTR_OK, t4_filter_tuple::iport, t4_filter_specification::iq, is_4tuple_specified(), is_hashfilter(), is_t4(), is_t5(), t4_filter_specification::maskhash, t4_filter_specification::nat_mode, t4_filter_specification::newdmac, t4_filter_specification::newsmac, t4_filter_specification::newvlan, tid_info::nftids, tid_info::nhpftids, adapter_params::nports, tid_info::ntids, adapter::params, t4_filter_specification::prio, separate_hpfilter_region(), set_hashfilter(), set_tcamfilter(), SLEEP_OK, t4_filter_specification::smac, adapter::smt, t4_filter_specification::swapmac, t4_l2t_alloc_switching(), t4_l2t_release(), t4_smt_alloc_switching(), t4_smt_release(), t4_smt_set_switching(), adapter::tids, t4_filter_specification::type, t4_filter_specification::val, t4_filter_specification::vlan, VLAN_REMOVE, and VLAN_REWRITE.
Referenced by t4_ioctl().
int set_filter_mask | ( | struct adapter * | sc, |
uint32_t | mode | ||
) |
Definition at line 552 of file t4_filter.c.
References begin_synchronized_op(), end_synchronized_op(), tp_params::filter_mask, tp_params::filter_mode, hw_off_limits(), INTR_OK, mode_to_fconf(), mode_to_iconf(), adapter::params, SLEEP_OK, t4_set_filter_cfg(), adapter::tids, tid_info::tids_in_use, adapter_params::tp, ULD_TOM, and tp_params::vnic_mode.
Referenced by t4_ioctl().
int set_filter_mode | ( | struct adapter * | sc, |
uint32_t | mode | ||
) |
Definition at line 510 of file t4_filter.c.
References begin_synchronized_op(), end_synchronized_op(), tp_params::filter_mode, tid_info::ftids_in_use, tid_info::hpftids_in_use, hw_off_limits(), INTR_OK, mode_to_fconf(), mode_to_iconf(), adapter::params, SLEEP_OK, t4_set_filter_cfg(), adapter::tids, tid_info::tids_in_use, adapter_params::tp, ULD_TOM, and tp_params::vnic_mode.
Referenced by t4_ioctl().
|
static |
Definition at line 1621 of file t4_filter.c.
References act_open_cpl_len16(), alloc_atid(), commit_wrq_wr(), sge::ctrlq, free_atid(), t4_filter::fs, t4_filter_specification::hash, hf_hashfn_4t(), tid_info::hftid_cv, t4_filter::idx, insert_hf(), lookup_hf(), t4_filter_specification::mask, mk_act_open_req(), mk_act_open_req6(), t4_filter_tuple::ovlan_vld, t4_filter_tuple::pfvf_vld, adapter::sge, start_wrq_wr(), adapter::tids, and t4_filter_specification::val.
Referenced by set_filter().
|
static |
Definition at line 1893 of file t4_filter.c.
References set_tcb_field(), W_TCB_PDU_HDR_LEN, W_TCB_RX_FRAG2_PTR_RAW, W_TCB_RX_FRAG3_LEN_RAW, W_TCB_RX_FRAG3_START_IDX_OFFSET_RAW, W_TCB_SND_UNA_RAW, and WORD_MASK.
Referenced by configure_hashfilter_tcb().
|
static |
Definition at line 635 of file t4_filter.c.
References sge_iq::abs_id, commit_wrq_wr(), sge::ctrlq, fw_filter2_wr::del_filter_to_l2tix, fw_filter2_wr::ethtype, fw_filter2_wr::ethtypem, adapter_params::filter2_wr_support, FILTER_DROP, FILTER_SWITCH, fw_filter2_wr::filter_type_swapmac, fw_filter2_wr::fip, fw_filter2_wr::fipm, fw_filter2_wr::fp, fw_filter2_wr::fpm, fw_filter2_wr::frag_to_ovlan_vldm, t4_filter::fs, tid_info::ftid_base, tid_info::ftid_cv, tid_info::ftid_tab, tid_info::ftids_in_use, FW_FILTER2_WR, FW_FILTER_WR, FW_LEN16, sge::fwq, t4_filter_specification::hash, tid_info::hpftid_base, tid_info::hpftid_tab, tid_info::hpftids_in_use, t4_filter::idx, fw_filter2_wr::ivlan, fw_filter2_wr::ivlanm, fw_filter2_wr::len16_pkd, fw_filter2_wr::lip, fw_filter2_wr::lipm, fw_filter2_wr::lp, fw_filter2_wr::lpm, fw_filter2_wr::maci_to_matchtypem, t4_filter_specification::mask, fw_filter2_wr::natmode_to_ulp_type, fw_filter2_wr::natseqcheck, fw_filter2_wr::newfip, fw_filter2_wr::newfport, fw_filter2_wr::newlip, fw_filter2_wr::newlport, tid_info::nftids, tid_info::nhpftids, fw_filter2_wr::op_pkd, fw_filter2_wr::ovlan, t4_filter_tuple::ovlan_vld, fw_filter2_wr::ovlanm, adapter::params, t4_filter_tuple::pfvf_vld, t4_filter_specification::prio, fw_filter2_wr::ptcl, fw_filter2_wr::ptclm, fw_filter2_wr::rx_chan_rx_rpl_iq, separate_hpfilter_region(), adapter::sge, fw_filter2_wr::sma, fw_filter2_wr::smac_sel, start_wrq_wr(), fw_filter2_wr::tid_to_iq, adapter::tids, fw_filter2_wr::ttyp, fw_filter2_wr::ttypm, t4_filter_specification::type, ULP_MODE_NONE, ULP_MODE_TCPDDP, V_FW_FILTER2_WR_NATFLAGCHECK, V_FW_FILTER2_WR_NATMODE, V_FW_FILTER2_WR_SWAPMAC, V_FW_FILTER2_WR_ULP_TYPE, V_FW_FILTER_WR_DIRSTEER, V_FW_FILTER_WR_DIRSTEERHASH, V_FW_FILTER_WR_DMAC, V_FW_FILTER_WR_DROP, V_FW_FILTER_WR_FCOE, V_FW_FILTER_WR_FCOEM, V_FW_FILTER_WR_FRAG, V_FW_FILTER_WR_FRAGM, V_FW_FILTER_WR_HITCNTS, V_FW_FILTER_WR_INSVLAN, V_FW_FILTER_WR_IQ, V_FW_FILTER_WR_IVLAN_VLD, V_FW_FILTER_WR_IVLAN_VLDM, V_FW_FILTER_WR_L2TIX, V_FW_FILTER_WR_LPBK, V_FW_FILTER_WR_MACI, V_FW_FILTER_WR_MACIM, V_FW_FILTER_WR_MASKHASH, V_FW_FILTER_WR_MATCHTYPE, V_FW_FILTER_WR_MATCHTYPEM, V_FW_FILTER_WR_NOREPLY, V_FW_FILTER_WR_OVLAN_VLD, V_FW_FILTER_WR_OVLAN_VLDM, V_FW_FILTER_WR_PORT, V_FW_FILTER_WR_PORTM, V_FW_FILTER_WR_PRIO, V_FW_FILTER_WR_RMVLAN, V_FW_FILTER_WR_RPTTID, V_FW_FILTER_WR_RQTYPE, V_FW_FILTER_WR_RX_CHAN, V_FW_FILTER_WR_RX_RPL_IQ, V_FW_FILTER_WR_SMAC, V_FW_FILTER_WR_TID, V_FW_FILTER_WR_TXCHAN, V_FW_WR_OP, t4_filter_specification::val, VLAN_INSERT, VLAN_REMOVE, and VLAN_REWRITE.
Referenced by set_filter().
|
static |
Definition at line 1189 of file t4_filter.c.
References sge_iq::abs_id, commit_wrq_wr(), CPL_COOKIE_HASHFILTER, CPL_SET_TCB_FIELD, sge::ctrlq, sge::fwq, INIT_TP_WR_MIT_CPL, cpl_set_tcb_field::mask, cpl_set_tcb_field::reply_ctrl, adapter::sge, start_wrq_wr(), V_COOKIE, V_NO_REPLY, V_QUEUENO, V_WORD, cpl_set_tcb_field::val, and cpl_set_tcb_field::word_cookie.
Referenced by configure_hashfilter_tcb(), set_nat_params(), set_tcb_tflag(), and t4_filter_rpl().
|
inlinestatic |
Definition at line 1215 of file t4_filter.c.
References set_tcb_field(), cpl_set_tcb_field::val, and W_TCB_T_FLAGS.
Referenced by configure_hashfilter_tcb(), and t4_filter_rpl().
int t4_del_hashfilter_rpl | ( | struct sge_iq * | iq, |
const struct rss_header * | rss, | ||
struct mbuf * | m | ||
) |
Definition at line 1380 of file t4_filter.c.
References sge_iq::adapter, sge::ctrlq, free_filter_resources(), GET_TID, tid_info::hftid_cv, iq, lookup_hftid(), release_tid(), remove_hf(), remove_hftid(), adapter::sge, cpl_abort_rpl_rss::status, and adapter::tids.
Referenced by mod_event().
int t4_filter_rpl | ( | struct sge_iq * | iq, |
const struct rss_header * | rss, | ||
struct mbuf * | m | ||
) |
Definition at line 1224 of file t4_filter.c.
References sge_iq::adapter, cpl_set_tcb_rpl::cookie, free_filter_resources(), tid_info::ftid_base, tid_info::ftid_cv, tid_info::ftid_tab, tid_info::ftids_in_use, FW_FILTER_WR_EINVAL, FW_FILTER_WR_FLT_ADDED, FW_FILTER_WR_FLT_DELETED, FW_FILTER_WR_SMT_TBL_FULL, FW_FILTER_WR_SUCCESS, G_COOKIE, GET_TID, tid_info::hpftid_base, tid_info::hpftid_tab, tid_info::hpftids_in_use, iq, is_ftid(), is_hpftid(), M_TCB_SMAC_SEL, rss_header::opcode, S_TF_CCTRL_CWR, separate_hpfilter_region(), set_tcb_field(), set_tcb_tflag(), adapter::tids, V_TCB_SMAC_SEL, and W_TCB_SMAC_SEL.
Referenced by mod_event().
int t4_hashfilter_ao_rpl | ( | struct sge_iq * | iq, |
const struct rss_header * | rss, | ||
struct mbuf * | m | ||
) |
Definition at line 1296 of file t4_filter.c.
References act_open_has_tid(), act_open_rpl_status_to_errno(), sge_iq::adapter, cpl_act_open_rpl::atid_status, configure_hashfilter_tcb(), CPL_ERR_NONE, sge::ctrlq, free_atid(), free_filter_resources(), G_AOPEN_ATID, G_AOPEN_STATUS, G_TID_TID, GET_TID, tid_info::hftid_cv, insert_hftid(), iq, lookup_atid(), lookup_hftid(), release_tid(), remove_hf(), adapter::sge, and adapter::tids.
Referenced by mod_event().
int t4_hashfilter_tcb_rpl | ( | struct sge_iq * | iq, |
const struct rss_header * | rss, | ||
struct mbuf * | m | ||
) |
Definition at line 1345 of file t4_filter.c.
References sge_iq::adapter, sge::ctrlq, free_filter_resources(), GET_TID, tid_info::hftid_cv, iq, lookup_hftid(), release_tid(), remove_hf(), remove_hftid(), adapter::sge, cpl_set_tcb_rpl::status, and adapter::tids.
Referenced by mod_event().