cxgbe(4): Use the correct filter width for T5+.
T5 and above have extra bits for the optional filter fields. This is a correctness issue and not just a waste because a filter mode valid on a T4 (36b) may not be valid on a T5+ (40b). MFC after: 2 weeks Sponsored by: Chelsio Communications
This commit is contained in:
parent
c91dda5ad9
commit
0460a45062
@ -309,6 +309,7 @@ struct chip_params {
|
||||
u8 cng_ch_bits_log; /* congestion channel map bits width */
|
||||
u8 nsched_cls;
|
||||
u8 cim_num_obq;
|
||||
u8 filter_opt_len;
|
||||
u16 mps_rplc_size;
|
||||
u16 vfcount;
|
||||
u32 sge_fl_db;
|
||||
|
@ -9241,6 +9241,7 @@ const struct chip_params *t4_get_chip_params(int chipid)
|
||||
.cng_ch_bits_log = 2,
|
||||
.nsched_cls = 15,
|
||||
.cim_num_obq = CIM_NUM_OBQ,
|
||||
.filter_opt_len = FILTER_OPT_LEN,
|
||||
.mps_rplc_size = 128,
|
||||
.vfcount = 128,
|
||||
.sge_fl_db = F_DBPRIO,
|
||||
@ -9254,6 +9255,7 @@ const struct chip_params *t4_get_chip_params(int chipid)
|
||||
.cng_ch_bits_log = 2,
|
||||
.nsched_cls = 16,
|
||||
.cim_num_obq = CIM_NUM_OBQ_T5,
|
||||
.filter_opt_len = T5_FILTER_OPT_LEN,
|
||||
.mps_rplc_size = 128,
|
||||
.vfcount = 128,
|
||||
.sge_fl_db = F_DBPRIO | F_DBTYPE,
|
||||
@ -9267,6 +9269,7 @@ const struct chip_params *t4_get_chip_params(int chipid)
|
||||
.cng_ch_bits_log = 3,
|
||||
.nsched_cls = 16,
|
||||
.cim_num_obq = CIM_NUM_OBQ_T5,
|
||||
.filter_opt_len = T5_FILTER_OPT_LEN,
|
||||
.mps_rplc_size = 256,
|
||||
.vfcount = 256,
|
||||
.sge_fl_db = 0,
|
||||
@ -10863,7 +10866,7 @@ int t4_set_filter_cfg(struct adapter *adap, int mode, int mask, int vnic_mode)
|
||||
int i, nbits, rc;
|
||||
uint32_t param, val;
|
||||
uint16_t fmode, fmask;
|
||||
const int maxbits = FILTER_OPT_LEN;
|
||||
const int maxbits = adap->chip_params->filter_opt_len;
|
||||
|
||||
if (mode != -1 || mask != -1) {
|
||||
if (mode != -1) {
|
||||
|
@ -55,6 +55,7 @@ enum {
|
||||
NTRACE = 4, /* # of tracing filters */
|
||||
TRACE_LEN = 112, /* length of trace data and mask */
|
||||
FILTER_OPT_LEN = 36, /* filter tuple width of optional components */
|
||||
T5_FILTER_OPT_LEN = 40,
|
||||
NWOL_PAT = 8, /* # of WoL patterns */
|
||||
WOL_PAT_LEN = 128, /* length of WoL patterns */
|
||||
UDBS_SEG_SIZE = 128, /* Segment size of BAR2 doorbells */
|
||||
|
Loading…
Reference in New Issue
Block a user