path: root/sys/dev/cxgbe/common/common.h
diff options
authorNavdeep Parhar <np@FreeBSD.org>2021-02-19 21:05:19 +0000
committerNavdeep Parhar <np@FreeBSD.org>2021-02-19 22:23:58 +0000
commit7ac8040a99319456c3225cd5166390f5bd172fdf (patch)
treec45d59adc5bc4ebe6053d0f604f0800a51f25a72 /sys/dev/cxgbe/common/common.h
parentd4380c0cdd0517dc038403dd5c99242ce78bdeb5 (diff)
cxgbe(4): Use firmware commands to get/set filter configuration.
1. Query the firmware for filter mode, mask, and related ingress config instead of trying to figure them out from hardware registers. Read configuration from the registers only when the firmware does not support this query. 2. Use the firmware to set the filter mode. This is the correct way to do it and is more flexible as well. The filter mode (and associated ingress config) can now be changed any time it is safe to do so. The user can specify a subset of a valid mode and the driver will enable enough bits to make sure that the mode is maxed out -- that is, it is not possible to set another bit without exceeding the total width for optional filter fields. This is a hardware requirement that was not enforced by the driver previously. MFC after: 2 weeks Sponsored by: Chelsio Communications
Diffstat (limited to 'sys/dev/cxgbe/common/common.h')
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h
index 9cc923eaf2f6..53be2fa2588a 100644
--- a/sys/dev/cxgbe/common/common.h
+++ b/sys/dev/cxgbe/common/common.h
@@ -256,11 +256,11 @@ struct tp_params {
unsigned int la_mask; /* what events are recorded by TP LA */
unsigned short tx_modq[MAX_NCHAN]; /* channel to modulation queue map */
- uint32_t vlan_pri_map;
- uint32_t ingress_config;
+ uint16_t filter_mode;
+ uint16_t filter_mask; /* Used by TOE and hashfilters */
+ int vnic_mode;
uint32_t max_rx_pdu;
uint32_t max_tx_pdu;
- uint64_t hash_filter_mask;
bool rx_pkt_encap;
int8_t fcoe_shift;
@@ -753,8 +753,7 @@ int t4_set_sched_ipg(struct adapter *adap, int sched, unsigned int ipg);
int t4_set_pace_tbl(struct adapter *adap, const unsigned int *pace_vals,
unsigned int start, unsigned int n);
void t4_get_chan_txrate(struct adapter *adap, u64 *nic_rate, u64 *ofld_rate);
-int t4_set_filter_mode(struct adapter *adap, unsigned int mode_map,
- bool sleep_ok);
+int t4_set_filter_cfg(struct adapter *adap, int mode, int mask, int vnic_mode);
void t4_mk_filtdelwr(unsigned int ftid, struct fw_filter_wr *wr, int qid);
void t4_wol_magic_enable(struct adapter *adap, unsigned int port, const u8 *addr);