|
@@ -2437,9 +2437,12 @@ static void __iomem *bar2_address(struct adapter *adapter,
|
|
|
return adapter->bar2 + bar2_qoffset;
|
|
|
}
|
|
|
|
|
|
+/* @intr_idx: MSI/MSI-X vector if >=0, -(absolute qid + 1) if < 0
|
|
|
+ * @cong: < 0 -> no congestion feedback, >= 0 -> congestion channel map
|
|
|
+ */
|
|
|
int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
|
|
|
struct net_device *dev, int intr_idx,
|
|
|
- struct sge_fl *fl, rspq_handler_t hnd)
|
|
|
+ struct sge_fl *fl, rspq_handler_t hnd, int cong)
|
|
|
{
|
|
|
int ret, flsz = 0;
|
|
|
struct fw_iq_cmd c;
|
|
@@ -2471,6 +2474,8 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
|
|
|
FW_IQ_CMD_IQESIZE_V(ilog2(iq->iqe_len) - 4));
|
|
|
c.iqsize = htons(iq->size);
|
|
|
c.iqaddr = cpu_to_be64(iq->phys_addr);
|
|
|
+ if (cong >= 0)
|
|
|
+ c.iqns_to_fl0congen = htonl(FW_IQ_CMD_IQFLINTCONGEN_F);
|
|
|
|
|
|
if (fl) {
|
|
|
/* Allocate the ring for the hardware free list (with space
|
|
@@ -2490,10 +2495,15 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
|
|
|
goto fl_nomem;
|
|
|
|
|
|
flsz = fl->size / 8 + s->stat_len / sizeof(struct tx_desc);
|
|
|
- c.iqns_to_fl0congen = htonl(FW_IQ_CMD_FL0PACKEN_F |
|
|
|
- FW_IQ_CMD_FL0FETCHRO_F |
|
|
|
- FW_IQ_CMD_FL0DATARO_F |
|
|
|
- FW_IQ_CMD_FL0PADEN_F);
|
|
|
+ c.iqns_to_fl0congen |= htonl(FW_IQ_CMD_FL0PACKEN_F |
|
|
|
+ FW_IQ_CMD_FL0FETCHRO_F |
|
|
|
+ FW_IQ_CMD_FL0DATARO_F |
|
|
|
+ FW_IQ_CMD_FL0PADEN_F);
|
|
|
+ if (cong >= 0)
|
|
|
+ c.iqns_to_fl0congen |=
|
|
|
+ htonl(FW_IQ_CMD_FL0CNGCHMAP_V(cong) |
|
|
|
+ FW_IQ_CMD_FL0CONGCIF_F |
|
|
|
+ FW_IQ_CMD_FL0CONGEN_F);
|
|
|
c.fl0dcaen_to_fl0cidxfthresh = htons(FW_IQ_CMD_FL0FBMIN_V(2) |
|
|
|
FW_IQ_CMD_FL0FBMAX_V(3));
|
|
|
c.fl0size = htons(flsz);
|