Skip to content

Commit 8dce04f

Browse files
arjunvynipadathdavem330
authored andcommitted
cxgb4: specify IQTYPE in fw_iq_cmd
congestion argument passed to t4_sge_alloc_rxq() is used to differentiate between nic/ofld queues. Signed-off-by: Arjun Vynipadath <arjun@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 57cd07f commit 8dce04f

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

drivers/net/ethernet/chelsio/cxgb4/sge.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3412,7 +3412,9 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
34123412
c.iqsize = htons(iq->size);
34133413
c.iqaddr = cpu_to_be64(iq->phys_addr);
34143414
if (cong >= 0)
3415-
c.iqns_to_fl0congen = htonl(FW_IQ_CMD_IQFLINTCONGEN_F);
3415+
c.iqns_to_fl0congen = htonl(FW_IQ_CMD_IQFLINTCONGEN_F |
3416+
FW_IQ_CMD_IQTYPE_V(cong ? FW_IQ_IQTYPE_NIC
3417+
: FW_IQ_IQTYPE_OFLD));
34163418

34173419
if (fl) {
34183420
enum chip_type chip = CHELSIO_CHIP_VERSION(adap->params.chip);

drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,6 +1472,12 @@ enum fw_iq_type {
14721472
FW_IQ_TYPE_NO_FL_INT_CAP
14731473
};
14741474

1475+
enum fw_iq_iqtype {
1476+
FW_IQ_IQTYPE_OTHER,
1477+
FW_IQ_IQTYPE_NIC,
1478+
FW_IQ_IQTYPE_OFLD,
1479+
};
1480+
14751481
struct fw_iq_cmd {
14761482
__be32 op_to_vfn;
14771483
__be32 alloc_to_len16;
@@ -1586,6 +1592,12 @@ struct fw_iq_cmd {
15861592
#define FW_IQ_CMD_IQFLINTISCSIC_S 26
15871593
#define FW_IQ_CMD_IQFLINTISCSIC_V(x) ((x) << FW_IQ_CMD_IQFLINTISCSIC_S)
15881594

1595+
#define FW_IQ_CMD_IQTYPE_S 24
1596+
#define FW_IQ_CMD_IQTYPE_M 0x3
1597+
#define FW_IQ_CMD_IQTYPE_V(x) ((x) << FW_IQ_CMD_IQTYPE_S)
1598+
#define FW_IQ_CMD_IQTYPE_G(x) \
1599+
(((x) >> FW_IQ_CMD_IQTYPE_S) & FW_IQ_CMD_IQTYPE_M)
1600+
15891601
#define FW_IQ_CMD_FL0CNGCHMAP_S 20
15901602
#define FW_IQ_CMD_FL0CNGCHMAP_V(x) ((x) << FW_IQ_CMD_FL0CNGCHMAP_S)
15911603

0 commit comments

Comments
 (0)