Skip to content

Commit

Permalink
cxgb4: specify IQTYPE in fw_iq_cmd
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arjun Vynipadath authored and David S. Miller committed Jul 12, 2018
1 parent 57cd07f commit 8dce04f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/chelsio/cxgb4/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -3412,7 +3412,9 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
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);
c.iqns_to_fl0congen = htonl(FW_IQ_CMD_IQFLINTCONGEN_F |
FW_IQ_CMD_IQTYPE_V(cong ? FW_IQ_IQTYPE_NIC
: FW_IQ_IQTYPE_OFLD));

if (fl) {
enum chip_type chip = CHELSIO_CHIP_VERSION(adap->params.chip);
Expand Down
12 changes: 12 additions & 0 deletions drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -1472,6 +1472,12 @@ enum fw_iq_type {
FW_IQ_TYPE_NO_FL_INT_CAP
};

enum fw_iq_iqtype {
FW_IQ_IQTYPE_OTHER,
FW_IQ_IQTYPE_NIC,
FW_IQ_IQTYPE_OFLD,
};

struct fw_iq_cmd {
__be32 op_to_vfn;
__be32 alloc_to_len16;
Expand Down Expand Up @@ -1586,6 +1592,12 @@ struct fw_iq_cmd {
#define FW_IQ_CMD_IQFLINTISCSIC_S 26
#define FW_IQ_CMD_IQFLINTISCSIC_V(x) ((x) << FW_IQ_CMD_IQFLINTISCSIC_S)

#define FW_IQ_CMD_IQTYPE_S 24
#define FW_IQ_CMD_IQTYPE_M 0x3
#define FW_IQ_CMD_IQTYPE_V(x) ((x) << FW_IQ_CMD_IQTYPE_S)
#define FW_IQ_CMD_IQTYPE_G(x) \
(((x) >> FW_IQ_CMD_IQTYPE_S) & FW_IQ_CMD_IQTYPE_M)

#define FW_IQ_CMD_FL0CNGCHMAP_S 20
#define FW_IQ_CMD_FL0CNGCHMAP_V(x) ((x) << FW_IQ_CMD_FL0CNGCHMAP_S)

Expand Down

0 comments on commit 8dce04f

Please sign in to comment.