Skip to content

Commit a3cdaa6

Browse files
RajuRangojudavem330
authored andcommitted
cxgb4: Adds CPL support for Shared Receive Queues
- Add srq table query cpl support for srq - Add cpl_abort_req_rss6 and cpl_abort_rpl_rss6 structs. - Add accessors, macros to get the SRQ IDX value. Signed-off-by: Raju Rangoju <[email protected]> Reviewed-by: Steve Wise <[email protected]> Signed-off-by: Ganesh Goudar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0dfebaf commit a3cdaa6

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

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

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ enum {
5252
CPL_L2T_WRITE_REQ = 0x12,
5353
CPL_SMT_WRITE_REQ = 0x14,
5454
CPL_TID_RELEASE = 0x1A,
55+
CPL_SRQ_TABLE_REQ = 0x1C,
5556
CPL_TX_DATA_ISO = 0x1F,
5657

5758
CPL_CLOSE_LISTSRV_RPL = 0x20,
@@ -102,6 +103,7 @@ enum {
102103
CPL_FW4_MSG = 0xC0,
103104
CPL_FW4_PLD = 0xC1,
104105
CPL_FW4_ACK = 0xC3,
106+
CPL_SRQ_TABLE_RPL = 0xCC,
105107

106108
CPL_RX_PHYS_DSGL = 0xD0,
107109

@@ -136,6 +138,8 @@ enum CPL_error {
136138
CPL_ERR_KEEPALV_NEG_ADVICE = 37,
137139
CPL_ERR_ABORT_FAILED = 42,
138140
CPL_ERR_IWARP_FLM = 50,
141+
CPL_CONTAINS_READ_RPL = 60,
142+
CPL_CONTAINS_WRITE_RPL = 61,
139143
};
140144

141145
enum {
@@ -198,6 +202,7 @@ union opcode_tid {
198202
/* partitioning of TID fields that also carry a queue id */
199203
#define TID_TID_S 0
200204
#define TID_TID_M 0x3fff
205+
#define TID_TID_V(x) ((x) << TID_TID_S)
201206
#define TID_TID_G(x) (((x) >> TID_TID_S) & TID_TID_M)
202207

203208
#define TID_QID_S 14
@@ -743,6 +748,22 @@ struct cpl_abort_req_rss {
743748
u8 status;
744749
};
745750

751+
struct cpl_abort_req_rss6 {
752+
WR_HDR;
753+
union opcode_tid ot;
754+
__u32 srqidx_status;
755+
};
756+
757+
#define ABORT_RSS_STATUS_S 0
758+
#define ABORT_RSS_STATUS_M 0xff
759+
#define ABORT_RSS_STATUS_V(x) ((x) << ABORT_RSS_STATUS_S)
760+
#define ABORT_RSS_STATUS_G(x) (((x) >> ABORT_RSS_STATUS_S) & ABORT_RSS_STATUS_M)
761+
762+
#define ABORT_RSS_SRQIDX_S 8
763+
#define ABORT_RSS_SRQIDX_M 0xffffff
764+
#define ABORT_RSS_SRQIDX_V(x) ((x) << ABORT_RSS_SRQIDX_S)
765+
#define ABORT_RSS_SRQIDX_G(x) (((x) >> ABORT_RSS_SRQIDX_S) & ABORT_RSS_SRQIDX_M)
766+
746767
struct cpl_abort_req {
747768
WR_HDR;
748769
union opcode_tid ot;
@@ -758,6 +779,11 @@ struct cpl_abort_rpl_rss {
758779
u8 status;
759780
};
760781

782+
struct cpl_abort_rpl_rss6 {
783+
union opcode_tid ot;
784+
__u32 srqidx_status;
785+
};
786+
761787
struct cpl_abort_rpl {
762788
WR_HDR;
763789
union opcode_tid ot;
@@ -2112,4 +2138,49 @@ enum {
21122138
X_CPL_RX_MPS_PKT_TYPE_QFC = 1 << 2,
21132139
X_CPL_RX_MPS_PKT_TYPE_PTP = 1 << 3
21142140
};
2141+
2142+
struct cpl_srq_table_req {
2143+
WR_HDR;
2144+
union opcode_tid ot;
2145+
__u8 status;
2146+
__u8 rsvd[2];
2147+
__u8 idx;
2148+
__be64 rsvd_pdid;
2149+
__be32 qlen_qbase;
2150+
__be16 cur_msn;
2151+
__be16 max_msn;
2152+
};
2153+
2154+
struct cpl_srq_table_rpl {
2155+
union opcode_tid ot;
2156+
__u8 status;
2157+
__u8 rsvd[2];
2158+
__u8 idx;
2159+
__be64 rsvd_pdid;
2160+
__be32 qlen_qbase;
2161+
__be16 cur_msn;
2162+
__be16 max_msn;
2163+
};
2164+
2165+
/* cpl_srq_table_{req,rpl}.params fields */
2166+
#define SRQT_QLEN_S 28
2167+
#define SRQT_QLEN_M 0xF
2168+
#define SRQT_QLEN_V(x) ((x) << SRQT_QLEN_S)
2169+
#define SRQT_QLEN_G(x) (((x) >> SRQT_QLEN_S) & SRQT_QLEN_M)
2170+
2171+
#define SRQT_QBASE_S 0
2172+
#define SRQT_QBASE_M 0x3FFFFFF
2173+
#define SRQT_QBASE_V(x) ((x) << SRQT_QBASE_S)
2174+
#define SRQT_QBASE_G(x) (((x) >> SRQT_QBASE_S) & SRQT_QBASE_M)
2175+
2176+
#define SRQT_PDID_S 0
2177+
#define SRQT_PDID_M 0xFF
2178+
#define SRQT_PDID_V(x) ((x) << SRQT_PDID_S)
2179+
#define SRQT_PDID_G(x) (((x) >> SRQT_PDID_S) & SRQT_PDID_M)
2180+
2181+
#define SRQT_IDX_S 0
2182+
#define SRQT_IDX_M 0xF
2183+
#define SRQT_IDX_V(x) ((x) << SRQT_IDX_S)
2184+
#define SRQT_IDX_G(x) (((x) >> SRQT_IDX_S) & SRQT_IDX_M)
2185+
21152186
#endif /* __T4_MSG_H */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,8 @@ enum fw_params_param_pfvf {
12441244
FW_PARAMS_PARAM_PFVF_SQRQ_END = 0x16,
12451245
FW_PARAMS_PARAM_PFVF_CQ_START = 0x17,
12461246
FW_PARAMS_PARAM_PFVF_CQ_END = 0x18,
1247+
FW_PARAMS_PARAM_PFVF_SRQ_START = 0x19,
1248+
FW_PARAMS_PARAM_PFVF_SRQ_END = 0x1A,
12471249
FW_PARAMS_PARAM_PFVF_SCHEDCLASS_ETH = 0x20,
12481250
FW_PARAMS_PARAM_PFVF_VIID = 0x24,
12491251
FW_PARAMS_PARAM_PFVF_CPMASK = 0x25,

0 commit comments

Comments
 (0)