Go to the documentation of this file.
38 #include <linux/types.h>
159 #define CPL_OPCODE(x) ((x) << 24)
160 #define MK_OPCODE_TID(opcode, tid) (CPL_OPCODE(opcode) | (tid))
161 #define OPCODE_TID(cmd) ((cmd)->ot.opcode_tid)
162 #define GET_TID(cmd) (ntohl(OPCODE_TID(cmd)) & 0xFFFFFF)
165 #define GET_TID_TID(x) ((x) & 0x3fff)
166 #define GET_TID_QID(x) (((x) >> 14) & 0x3ff)
167 #define TID_QID(x) ((x) << 14)
171 #if defined(__LITTLE_ENDIAN_BITFIELD)
196 #define WR_HDR struct work_request_hdr wr
206 #define TX_CHAN(x) ((x) << 2)
207 #define DELACK(x) ((x) << 5)
208 #define ULP_MODE(x) ((x) << 8)
209 #define RCV_BUFSIZ(x) ((x) << 12)
210 #define DSCP(x) ((x) << 22)
211 #define SMAC_SEL(x) ((u64)(x) << 28)
212 #define L2T_IDX(x) ((u64)(x) << 36)
213 #define NAGLE(x) ((u64)(x) << 49)
214 #define WND_SCALE(x) ((u64)(x) << 50)
215 #define KEEP_ALIVE(x) ((u64)(x) << 54)
216 #define MSS_IDX(x) ((u64)(x) << 60)
218 #define SYN_RSS_ENABLE (1 << 0)
219 #define SYN_RSS_QUEUE(x) ((x) << 2)
220 #define CONN_POLICY_ASK (1 << 22)
246 #define RSS_QUEUE(x) ((x) << 0)
247 #define RSS_QUEUE_VALID (1 << 10)
248 #define RX_COALESCE_VALID(x) ((x) << 11)
249 #define RX_COALESCE(x) ((x) << 12)
250 #define TX_QUEUE(x) ((x) << 23)
251 #define RX_CHANNEL(x) ((x) << 26)
252 #define WND_SCALE_EN(x) ((x) << 28)
253 #define TSTAMPS_EN(x) ((x) << 29)
254 #define SACK_EN(x) ((x) << 30)
287 #define GET_AOPEN_STATUS(x) ((x) & 0xff)
288 #define GET_AOPEN_ATID(x) (((x) >> 8) & 0xffffff)
295 #define GET_POPEN_TID(x) ((x) & 0xffffff)
296 #define GET_POPEN_TOS(x) (((x) >> 24) & 0xff)
299 #define GET_TCPOPT_WSCALE_OK(x) (((x) >> 5) & 1)
300 #define GET_TCPOPT_SACK(x) (((x) >> 6) & 1)
301 #define GET_TCPOPT_TSTAMP(x) (((x) >> 7) & 1)
302 #define GET_TCPOPT_SND_WSCALE(x) (((x) >> 8) & 0xf)
303 #define GET_TCPOPT_MSS(x) (((x) >> 12) & 0xf)
322 #define QUEUENO(x) ((x) << 0)
323 #define REPLY_CHAN(x) ((x) << 14)
324 #define NO_REPLY(x) ((x) << 15)
333 #define TCB_WORD(x) ((x) << 0)
334 #define TCB_COOKIE(x) ((x) << 5)
365 #define LISTSVR_IPV6 (1 << 14)
418 #define TXPKT_VF(x) ((x) << 0)
419 #define TXPKT_PF(x) ((x) << 8)
420 #define TXPKT_VF_VLD (1 << 11)
421 #define TXPKT_OVLAN_IDX(x) ((x) << 12)
422 #define TXPKT_INTF(x) ((x) << 16)
423 #define TXPKT_INS_OVLAN (1 << 21)
424 #define TXPKT_OPCODE(x) ((x) << 24)
428 #define TXPKT_CSUM_END(x) ((x) << 12)
429 #define TXPKT_CSUM_START(x) ((x) << 20)
430 #define TXPKT_IPHDR_LEN(x) ((u64)(x) << 20)
431 #define TXPKT_CSUM_LOC(x) ((u64)(x) << 30)
432 #define TXPKT_ETHHDR_LEN(x) ((u64)(x) << 34)
433 #define TXPKT_CSUM_TYPE(x) ((u64)(x) << 40)
434 #define TXPKT_VLAN(x) ((u64)(x) << 44)
435 #define TXPKT_VLAN_VLD (1ULL << 60)
436 #define TXPKT_IPCSUM_DIS (1ULL << 62)
437 #define TXPKT_L4CSUM_DIS (1ULL << 63)
445 #define cpl_tx_pkt_xt cpl_tx_pkt
449 #define LSO_TCPHDR_LEN(x) ((x) << 0)
450 #define LSO_IPHDR_LEN(x) ((x) << 4)
451 #define LSO_ETHHDR_LEN(x) ((x) << 16)
452 #define LSO_IPV6(x) ((x) << 20)
453 #define LSO_LAST_SLICE (1 << 22)
454 #define LSO_FIRST_SLICE (1 << 23)
455 #define LSO_OPCODE(x) ((x) << 24)
472 #define ISCSI_PDU_LEN(x) ((x) & 0x7FFF)
473 #define ISCSI_DDP (1 << 15)
487 #if defined(__LITTLE_ENDIAN_BITFIELD)
507 #define RX_CREDITS(x) ((x) << 0)
508 #define RX_FORCE_ACK(x) ((x) << 28)
514 #if defined(__LITTLE_ENDIAN_BITFIELD)
531 #define RXF_UDP (1 << 22)
532 #define RXF_TCP (1 << 23)
533 #define RXF_IP (1 << 24)
534 #define RXF_IP6 (1 << 25)
542 #if defined(__LITTLE_ENDIAN_BITFIELD)
564 #define L2T_W_INFO(x) ((x) << 2)
565 #define L2T_W_PORT(x) ((x) << 8)
566 #define L2T_W_NOREPLY(x) ((x) << 15)
586 #define EGR_QID(x) ((x) & 0x1FFFF)
659 #define ULPTX_CMD(x) ((x) << 24)
660 #define ULPTX_NSGE(x) ((x) << 0)
669 #define ULP_MEMIO_ORDER(x) ((x) << 23)
672 #define ULP_MEMIO_DATA_LEN(x) ((x) << 0)
674 #define ULP_MEMIO_ADDR(x) ((x) << 0)
675 #define ULP_MEMIO_LOCK(x) ((x) << 31)