Commit ea6f82fe authored by Hariprasad Shenai's avatar Hariprasad Shenai Committed by David S. Miller

cxgb4vf: Read correct FL congestion threshold for T5 and T6

VF driver was reading incorrect freelist congestion notification threshold
for FLM queues when packing is enabled for T5 and T6 adapter. Fixing it
now.
Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e0910bac
...@@ -338,6 +338,11 @@ ...@@ -338,6 +338,11 @@
#define EGRTHRESHOLDPACKING_G(x) \ #define EGRTHRESHOLDPACKING_G(x) \
(((x) >> EGRTHRESHOLDPACKING_S) & EGRTHRESHOLDPACKING_M) (((x) >> EGRTHRESHOLDPACKING_S) & EGRTHRESHOLDPACKING_M)
#define T6_EGRTHRESHOLDPACKING_S 16
#define T6_EGRTHRESHOLDPACKING_M 0xffU
#define T6_EGRTHRESHOLDPACKING_G(x) \
(((x) >> T6_EGRTHRESHOLDPACKING_S) & T6_EGRTHRESHOLDPACKING_M)
#define SGE_TIMESTAMP_LO_A 0x1098 #define SGE_TIMESTAMP_LO_A 0x1098
#define SGE_TIMESTAMP_HI_A 0x109c #define SGE_TIMESTAMP_HI_A 0x109c
......
...@@ -2668,8 +2668,22 @@ int t4vf_sge_init(struct adapter *adapter) ...@@ -2668,8 +2668,22 @@ int t4vf_sge_init(struct adapter *adapter)
* give it more Free List entries. (Note that the SGE's Egress * give it more Free List entries. (Note that the SGE's Egress
* Congestion Threshold is in units of 2 Free List pointers.) * Congestion Threshold is in units of 2 Free List pointers.)
*/ */
s->fl_starve_thres switch (CHELSIO_CHIP_VERSION(adapter->params.chip)) {
= EGRTHRESHOLD_G(sge_params->sge_congestion_control)*2 + 1; case CHELSIO_T4:
s->fl_starve_thres =
EGRTHRESHOLD_G(sge_params->sge_congestion_control);
break;
case CHELSIO_T5:
s->fl_starve_thres =
EGRTHRESHOLDPACKING_G(sge_params->sge_congestion_control);
break;
case CHELSIO_T6:
default:
s->fl_starve_thres =
T6_EGRTHRESHOLDPACKING_G(sge_params->sge_congestion_control);
break;
}
s->fl_starve_thres = s->fl_starve_thres * 2 + 1;
/* /*
* Set up tasklet timers. * Set up tasklet timers.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment