162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * This file is part of the Chelsio T4 Ethernet driver for Linux. 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Copyright (c) 2003-2014 Chelsio Communications, Inc. All rights reserved. 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * This software is available to you under a choice of one of two 762306a36Sopenharmony_ci * licenses. You may choose to be licensed under the terms of the GNU 862306a36Sopenharmony_ci * General Public License (GPL) Version 2, available from the file 962306a36Sopenharmony_ci * COPYING in the main directory of this source tree, or the 1062306a36Sopenharmony_ci * OpenIB.org BSD license below: 1162306a36Sopenharmony_ci * 1262306a36Sopenharmony_ci * Redistribution and use in source and binary forms, with or 1362306a36Sopenharmony_ci * without modification, are permitted provided that the following 1462306a36Sopenharmony_ci * conditions are met: 1562306a36Sopenharmony_ci * 1662306a36Sopenharmony_ci * - Redistributions of source code must retain the above 1762306a36Sopenharmony_ci * copyright notice, this list of conditions and the following 1862306a36Sopenharmony_ci * disclaimer. 1962306a36Sopenharmony_ci * 2062306a36Sopenharmony_ci * - Redistributions in binary form must reproduce the above 2162306a36Sopenharmony_ci * copyright notice, this list of conditions and the following 2262306a36Sopenharmony_ci * disclaimer in the documentation and/or other materials 2362306a36Sopenharmony_ci * provided with the distribution. 2462306a36Sopenharmony_ci * 2562306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 2662306a36Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2762306a36Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 2862306a36Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 2962306a36Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 3062306a36Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 3162306a36Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 3262306a36Sopenharmony_ci * SOFTWARE. 3362306a36Sopenharmony_ci */ 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci#ifndef __T4_MSG_H 3662306a36Sopenharmony_ci#define __T4_MSG_H 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci#include <linux/types.h> 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_cienum { 4162306a36Sopenharmony_ci CPL_PASS_OPEN_REQ = 0x1, 4262306a36Sopenharmony_ci CPL_PASS_ACCEPT_RPL = 0x2, 4362306a36Sopenharmony_ci CPL_ACT_OPEN_REQ = 0x3, 4462306a36Sopenharmony_ci CPL_SET_TCB_FIELD = 0x5, 4562306a36Sopenharmony_ci CPL_GET_TCB = 0x6, 4662306a36Sopenharmony_ci CPL_CLOSE_CON_REQ = 0x8, 4762306a36Sopenharmony_ci CPL_CLOSE_LISTSRV_REQ = 0x9, 4862306a36Sopenharmony_ci CPL_ABORT_REQ = 0xA, 4962306a36Sopenharmony_ci CPL_ABORT_RPL = 0xB, 5062306a36Sopenharmony_ci CPL_TX_DATA = 0xC, 5162306a36Sopenharmony_ci CPL_RX_DATA_ACK = 0xD, 5262306a36Sopenharmony_ci CPL_TX_PKT = 0xE, 5362306a36Sopenharmony_ci CPL_L2T_WRITE_REQ = 0x12, 5462306a36Sopenharmony_ci CPL_SMT_WRITE_REQ = 0x14, 5562306a36Sopenharmony_ci CPL_TID_RELEASE = 0x1A, 5662306a36Sopenharmony_ci CPL_SRQ_TABLE_REQ = 0x1C, 5762306a36Sopenharmony_ci CPL_TX_DATA_ISO = 0x1F, 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ci CPL_CLOSE_LISTSRV_RPL = 0x20, 6062306a36Sopenharmony_ci CPL_GET_TCB_RPL = 0x22, 6162306a36Sopenharmony_ci CPL_L2T_WRITE_RPL = 0x23, 6262306a36Sopenharmony_ci CPL_PASS_OPEN_RPL = 0x24, 6362306a36Sopenharmony_ci CPL_ACT_OPEN_RPL = 0x25, 6462306a36Sopenharmony_ci CPL_PEER_CLOSE = 0x26, 6562306a36Sopenharmony_ci CPL_ABORT_REQ_RSS = 0x2B, 6662306a36Sopenharmony_ci CPL_ABORT_RPL_RSS = 0x2D, 6762306a36Sopenharmony_ci CPL_SMT_WRITE_RPL = 0x2E, 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci CPL_RX_PHYS_ADDR = 0x30, 7062306a36Sopenharmony_ci CPL_CLOSE_CON_RPL = 0x32, 7162306a36Sopenharmony_ci CPL_ISCSI_HDR = 0x33, 7262306a36Sopenharmony_ci CPL_RDMA_CQE = 0x35, 7362306a36Sopenharmony_ci CPL_RDMA_CQE_READ_RSP = 0x36, 7462306a36Sopenharmony_ci CPL_RDMA_CQE_ERR = 0x37, 7562306a36Sopenharmony_ci CPL_RX_DATA = 0x39, 7662306a36Sopenharmony_ci CPL_SET_TCB_RPL = 0x3A, 7762306a36Sopenharmony_ci CPL_RX_PKT = 0x3B, 7862306a36Sopenharmony_ci CPL_RX_DDP_COMPLETE = 0x3F, 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ci CPL_ACT_ESTABLISH = 0x40, 8162306a36Sopenharmony_ci CPL_PASS_ESTABLISH = 0x41, 8262306a36Sopenharmony_ci CPL_RX_DATA_DDP = 0x42, 8362306a36Sopenharmony_ci CPL_PASS_ACCEPT_REQ = 0x44, 8462306a36Sopenharmony_ci CPL_RX_ISCSI_CMP = 0x45, 8562306a36Sopenharmony_ci CPL_TRACE_PKT_T5 = 0x48, 8662306a36Sopenharmony_ci CPL_RX_ISCSI_DDP = 0x49, 8762306a36Sopenharmony_ci CPL_RX_TLS_CMP = 0x4E, 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ci CPL_RDMA_READ_REQ = 0x60, 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ci CPL_PASS_OPEN_REQ6 = 0x81, 9262306a36Sopenharmony_ci CPL_ACT_OPEN_REQ6 = 0x83, 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_ci CPL_TX_TLS_PDU = 0x88, 9562306a36Sopenharmony_ci CPL_TX_TLS_SFO = 0x89, 9662306a36Sopenharmony_ci CPL_TX_SEC_PDU = 0x8A, 9762306a36Sopenharmony_ci CPL_TX_TLS_ACK = 0x8B, 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci CPL_RDMA_TERMINATE = 0xA2, 10062306a36Sopenharmony_ci CPL_RDMA_WRITE = 0xA4, 10162306a36Sopenharmony_ci CPL_SGE_EGR_UPDATE = 0xA5, 10262306a36Sopenharmony_ci CPL_RX_MPS_PKT = 0xAF, 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ci CPL_TRACE_PKT = 0xB0, 10562306a36Sopenharmony_ci CPL_TLS_DATA = 0xB1, 10662306a36Sopenharmony_ci CPL_ISCSI_DATA = 0xB2, 10762306a36Sopenharmony_ci 10862306a36Sopenharmony_ci CPL_FW4_MSG = 0xC0, 10962306a36Sopenharmony_ci CPL_FW4_PLD = 0xC1, 11062306a36Sopenharmony_ci CPL_FW4_ACK = 0xC3, 11162306a36Sopenharmony_ci CPL_SRQ_TABLE_RPL = 0xCC, 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci CPL_RX_PHYS_DSGL = 0xD0, 11462306a36Sopenharmony_ci 11562306a36Sopenharmony_ci CPL_FW6_MSG = 0xE0, 11662306a36Sopenharmony_ci CPL_FW6_PLD = 0xE1, 11762306a36Sopenharmony_ci CPL_TX_TNL_LSO = 0xEC, 11862306a36Sopenharmony_ci CPL_TX_PKT_LSO = 0xED, 11962306a36Sopenharmony_ci CPL_TX_PKT_XT = 0xEE, 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_ci NUM_CPL_CMDS 12262306a36Sopenharmony_ci}; 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_cienum CPL_error { 12562306a36Sopenharmony_ci CPL_ERR_NONE = 0, 12662306a36Sopenharmony_ci CPL_ERR_TCAM_PARITY = 1, 12762306a36Sopenharmony_ci CPL_ERR_TCAM_MISS = 2, 12862306a36Sopenharmony_ci CPL_ERR_TCAM_FULL = 3, 12962306a36Sopenharmony_ci CPL_ERR_BAD_LENGTH = 15, 13062306a36Sopenharmony_ci CPL_ERR_BAD_ROUTE = 18, 13162306a36Sopenharmony_ci CPL_ERR_CONN_RESET = 20, 13262306a36Sopenharmony_ci CPL_ERR_CONN_EXIST_SYNRECV = 21, 13362306a36Sopenharmony_ci CPL_ERR_CONN_EXIST = 22, 13462306a36Sopenharmony_ci CPL_ERR_ARP_MISS = 23, 13562306a36Sopenharmony_ci CPL_ERR_BAD_SYN = 24, 13662306a36Sopenharmony_ci CPL_ERR_CONN_TIMEDOUT = 30, 13762306a36Sopenharmony_ci CPL_ERR_XMIT_TIMEDOUT = 31, 13862306a36Sopenharmony_ci CPL_ERR_PERSIST_TIMEDOUT = 32, 13962306a36Sopenharmony_ci CPL_ERR_FINWAIT2_TIMEDOUT = 33, 14062306a36Sopenharmony_ci CPL_ERR_KEEPALIVE_TIMEDOUT = 34, 14162306a36Sopenharmony_ci CPL_ERR_RTX_NEG_ADVICE = 35, 14262306a36Sopenharmony_ci CPL_ERR_PERSIST_NEG_ADVICE = 36, 14362306a36Sopenharmony_ci CPL_ERR_KEEPALV_NEG_ADVICE = 37, 14462306a36Sopenharmony_ci CPL_ERR_ABORT_FAILED = 42, 14562306a36Sopenharmony_ci CPL_ERR_IWARP_FLM = 50, 14662306a36Sopenharmony_ci CPL_CONTAINS_READ_RPL = 60, 14762306a36Sopenharmony_ci CPL_CONTAINS_WRITE_RPL = 61, 14862306a36Sopenharmony_ci}; 14962306a36Sopenharmony_ci 15062306a36Sopenharmony_cienum { 15162306a36Sopenharmony_ci CPL_CONN_POLICY_AUTO = 0, 15262306a36Sopenharmony_ci CPL_CONN_POLICY_ASK = 1, 15362306a36Sopenharmony_ci CPL_CONN_POLICY_FILTER = 2, 15462306a36Sopenharmony_ci CPL_CONN_POLICY_DENY = 3 15562306a36Sopenharmony_ci}; 15662306a36Sopenharmony_ci 15762306a36Sopenharmony_cienum { 15862306a36Sopenharmony_ci ULP_MODE_NONE = 0, 15962306a36Sopenharmony_ci ULP_MODE_ISCSI = 2, 16062306a36Sopenharmony_ci ULP_MODE_RDMA = 4, 16162306a36Sopenharmony_ci ULP_MODE_TCPDDP = 5, 16262306a36Sopenharmony_ci ULP_MODE_FCOE = 6, 16362306a36Sopenharmony_ci ULP_MODE_TLS = 8, 16462306a36Sopenharmony_ci}; 16562306a36Sopenharmony_ci 16662306a36Sopenharmony_cienum { 16762306a36Sopenharmony_ci ULP_CRC_HEADER = 1 << 0, 16862306a36Sopenharmony_ci ULP_CRC_DATA = 1 << 1 16962306a36Sopenharmony_ci}; 17062306a36Sopenharmony_ci 17162306a36Sopenharmony_cienum { 17262306a36Sopenharmony_ci CPL_ABORT_SEND_RST = 0, 17362306a36Sopenharmony_ci CPL_ABORT_NO_RST, 17462306a36Sopenharmony_ci}; 17562306a36Sopenharmony_ci 17662306a36Sopenharmony_cienum { /* TX_PKT_XT checksum types */ 17762306a36Sopenharmony_ci TX_CSUM_TCP = 0, 17862306a36Sopenharmony_ci TX_CSUM_UDP = 1, 17962306a36Sopenharmony_ci TX_CSUM_CRC16 = 4, 18062306a36Sopenharmony_ci TX_CSUM_CRC32 = 5, 18162306a36Sopenharmony_ci TX_CSUM_CRC32C = 6, 18262306a36Sopenharmony_ci TX_CSUM_FCOE = 7, 18362306a36Sopenharmony_ci TX_CSUM_TCPIP = 8, 18462306a36Sopenharmony_ci TX_CSUM_UDPIP = 9, 18562306a36Sopenharmony_ci TX_CSUM_TCPIP6 = 10, 18662306a36Sopenharmony_ci TX_CSUM_UDPIP6 = 11, 18762306a36Sopenharmony_ci TX_CSUM_IP = 12, 18862306a36Sopenharmony_ci}; 18962306a36Sopenharmony_ci 19062306a36Sopenharmony_ciunion opcode_tid { 19162306a36Sopenharmony_ci __be32 opcode_tid; 19262306a36Sopenharmony_ci u8 opcode; 19362306a36Sopenharmony_ci}; 19462306a36Sopenharmony_ci 19562306a36Sopenharmony_ci#define CPL_OPCODE_S 24 19662306a36Sopenharmony_ci#define CPL_OPCODE_V(x) ((x) << CPL_OPCODE_S) 19762306a36Sopenharmony_ci#define CPL_OPCODE_G(x) (((x) >> CPL_OPCODE_S) & 0xFF) 19862306a36Sopenharmony_ci#define TID_G(x) ((x) & 0xFFFFFF) 19962306a36Sopenharmony_ci 20062306a36Sopenharmony_ci/* tid is assumed to be 24-bits */ 20162306a36Sopenharmony_ci#define MK_OPCODE_TID(opcode, tid) (CPL_OPCODE_V(opcode) | (tid)) 20262306a36Sopenharmony_ci 20362306a36Sopenharmony_ci#define OPCODE_TID(cmd) ((cmd)->ot.opcode_tid) 20462306a36Sopenharmony_ci 20562306a36Sopenharmony_ci/* extract the TID from a CPL command */ 20662306a36Sopenharmony_ci#define GET_TID(cmd) (TID_G(be32_to_cpu(OPCODE_TID(cmd)))) 20762306a36Sopenharmony_ci 20862306a36Sopenharmony_ci/* partitioning of TID fields that also carry a queue id */ 20962306a36Sopenharmony_ci#define TID_TID_S 0 21062306a36Sopenharmony_ci#define TID_TID_M 0x3fff 21162306a36Sopenharmony_ci#define TID_TID_V(x) ((x) << TID_TID_S) 21262306a36Sopenharmony_ci#define TID_TID_G(x) (((x) >> TID_TID_S) & TID_TID_M) 21362306a36Sopenharmony_ci 21462306a36Sopenharmony_ci#define TID_QID_S 14 21562306a36Sopenharmony_ci#define TID_QID_M 0x3ff 21662306a36Sopenharmony_ci#define TID_QID_V(x) ((x) << TID_QID_S) 21762306a36Sopenharmony_ci#define TID_QID_G(x) (((x) >> TID_QID_S) & TID_QID_M) 21862306a36Sopenharmony_ci 21962306a36Sopenharmony_cistruct rss_header { 22062306a36Sopenharmony_ci u8 opcode; 22162306a36Sopenharmony_ci#if defined(__LITTLE_ENDIAN_BITFIELD) 22262306a36Sopenharmony_ci u8 channel:2; 22362306a36Sopenharmony_ci u8 filter_hit:1; 22462306a36Sopenharmony_ci u8 filter_tid:1; 22562306a36Sopenharmony_ci u8 hash_type:2; 22662306a36Sopenharmony_ci u8 ipv6:1; 22762306a36Sopenharmony_ci u8 send2fw:1; 22862306a36Sopenharmony_ci#else 22962306a36Sopenharmony_ci u8 send2fw:1; 23062306a36Sopenharmony_ci u8 ipv6:1; 23162306a36Sopenharmony_ci u8 hash_type:2; 23262306a36Sopenharmony_ci u8 filter_tid:1; 23362306a36Sopenharmony_ci u8 filter_hit:1; 23462306a36Sopenharmony_ci u8 channel:2; 23562306a36Sopenharmony_ci#endif 23662306a36Sopenharmony_ci __be16 qid; 23762306a36Sopenharmony_ci __be32 hash_val; 23862306a36Sopenharmony_ci}; 23962306a36Sopenharmony_ci 24062306a36Sopenharmony_cistruct work_request_hdr { 24162306a36Sopenharmony_ci __be32 wr_hi; 24262306a36Sopenharmony_ci __be32 wr_mid; 24362306a36Sopenharmony_ci __be64 wr_lo; 24462306a36Sopenharmony_ci}; 24562306a36Sopenharmony_ci 24662306a36Sopenharmony_ci/* wr_hi fields */ 24762306a36Sopenharmony_ci#define WR_OP_S 24 24862306a36Sopenharmony_ci#define WR_OP_V(x) ((__u64)(x) << WR_OP_S) 24962306a36Sopenharmony_ci 25062306a36Sopenharmony_ci#define WR_HDR struct work_request_hdr wr 25162306a36Sopenharmony_ci 25262306a36Sopenharmony_ci/* option 0 fields */ 25362306a36Sopenharmony_ci#define TX_CHAN_S 2 25462306a36Sopenharmony_ci#define TX_CHAN_V(x) ((x) << TX_CHAN_S) 25562306a36Sopenharmony_ci 25662306a36Sopenharmony_ci#define ULP_MODE_S 8 25762306a36Sopenharmony_ci#define ULP_MODE_V(x) ((x) << ULP_MODE_S) 25862306a36Sopenharmony_ci 25962306a36Sopenharmony_ci#define RCV_BUFSIZ_S 12 26062306a36Sopenharmony_ci#define RCV_BUFSIZ_M 0x3FFU 26162306a36Sopenharmony_ci#define RCV_BUFSIZ_V(x) ((x) << RCV_BUFSIZ_S) 26262306a36Sopenharmony_ci 26362306a36Sopenharmony_ci#define SMAC_SEL_S 28 26462306a36Sopenharmony_ci#define SMAC_SEL_V(x) ((__u64)(x) << SMAC_SEL_S) 26562306a36Sopenharmony_ci 26662306a36Sopenharmony_ci#define L2T_IDX_S 36 26762306a36Sopenharmony_ci#define L2T_IDX_V(x) ((__u64)(x) << L2T_IDX_S) 26862306a36Sopenharmony_ci 26962306a36Sopenharmony_ci#define WND_SCALE_S 50 27062306a36Sopenharmony_ci#define WND_SCALE_V(x) ((__u64)(x) << WND_SCALE_S) 27162306a36Sopenharmony_ci 27262306a36Sopenharmony_ci#define KEEP_ALIVE_S 54 27362306a36Sopenharmony_ci#define KEEP_ALIVE_V(x) ((__u64)(x) << KEEP_ALIVE_S) 27462306a36Sopenharmony_ci#define KEEP_ALIVE_F KEEP_ALIVE_V(1ULL) 27562306a36Sopenharmony_ci 27662306a36Sopenharmony_ci#define MSS_IDX_S 60 27762306a36Sopenharmony_ci#define MSS_IDX_M 0xF 27862306a36Sopenharmony_ci#define MSS_IDX_V(x) ((__u64)(x) << MSS_IDX_S) 27962306a36Sopenharmony_ci#define MSS_IDX_G(x) (((x) >> MSS_IDX_S) & MSS_IDX_M) 28062306a36Sopenharmony_ci 28162306a36Sopenharmony_ci/* option 2 fields */ 28262306a36Sopenharmony_ci#define RSS_QUEUE_S 0 28362306a36Sopenharmony_ci#define RSS_QUEUE_M 0x3FF 28462306a36Sopenharmony_ci#define RSS_QUEUE_V(x) ((x) << RSS_QUEUE_S) 28562306a36Sopenharmony_ci#define RSS_QUEUE_G(x) (((x) >> RSS_QUEUE_S) & RSS_QUEUE_M) 28662306a36Sopenharmony_ci 28762306a36Sopenharmony_ci#define RSS_QUEUE_VALID_S 10 28862306a36Sopenharmony_ci#define RSS_QUEUE_VALID_V(x) ((x) << RSS_QUEUE_VALID_S) 28962306a36Sopenharmony_ci#define RSS_QUEUE_VALID_F RSS_QUEUE_VALID_V(1U) 29062306a36Sopenharmony_ci 29162306a36Sopenharmony_ci#define RX_FC_DISABLE_S 20 29262306a36Sopenharmony_ci#define RX_FC_DISABLE_V(x) ((x) << RX_FC_DISABLE_S) 29362306a36Sopenharmony_ci#define RX_FC_DISABLE_F RX_FC_DISABLE_V(1U) 29462306a36Sopenharmony_ci 29562306a36Sopenharmony_ci#define RX_FC_VALID_S 22 29662306a36Sopenharmony_ci#define RX_FC_VALID_V(x) ((x) << RX_FC_VALID_S) 29762306a36Sopenharmony_ci#define RX_FC_VALID_F RX_FC_VALID_V(1U) 29862306a36Sopenharmony_ci 29962306a36Sopenharmony_ci#define RX_CHANNEL_S 26 30062306a36Sopenharmony_ci#define RX_CHANNEL_V(x) ((x) << RX_CHANNEL_S) 30162306a36Sopenharmony_ci#define RX_CHANNEL_F RX_CHANNEL_V(1U) 30262306a36Sopenharmony_ci 30362306a36Sopenharmony_ci#define WND_SCALE_EN_S 28 30462306a36Sopenharmony_ci#define WND_SCALE_EN_V(x) ((x) << WND_SCALE_EN_S) 30562306a36Sopenharmony_ci#define WND_SCALE_EN_F WND_SCALE_EN_V(1U) 30662306a36Sopenharmony_ci 30762306a36Sopenharmony_ci#define T5_OPT_2_VALID_S 31 30862306a36Sopenharmony_ci#define T5_OPT_2_VALID_V(x) ((x) << T5_OPT_2_VALID_S) 30962306a36Sopenharmony_ci#define T5_OPT_2_VALID_F T5_OPT_2_VALID_V(1U) 31062306a36Sopenharmony_ci 31162306a36Sopenharmony_cistruct cpl_pass_open_req { 31262306a36Sopenharmony_ci WR_HDR; 31362306a36Sopenharmony_ci union opcode_tid ot; 31462306a36Sopenharmony_ci __be16 local_port; 31562306a36Sopenharmony_ci __be16 peer_port; 31662306a36Sopenharmony_ci __be32 local_ip; 31762306a36Sopenharmony_ci __be32 peer_ip; 31862306a36Sopenharmony_ci __be64 opt0; 31962306a36Sopenharmony_ci __be64 opt1; 32062306a36Sopenharmony_ci}; 32162306a36Sopenharmony_ci 32262306a36Sopenharmony_ci/* option 0 fields */ 32362306a36Sopenharmony_ci#define NO_CONG_S 4 32462306a36Sopenharmony_ci#define NO_CONG_V(x) ((x) << NO_CONG_S) 32562306a36Sopenharmony_ci#define NO_CONG_F NO_CONG_V(1U) 32662306a36Sopenharmony_ci 32762306a36Sopenharmony_ci#define DELACK_S 5 32862306a36Sopenharmony_ci#define DELACK_V(x) ((x) << DELACK_S) 32962306a36Sopenharmony_ci#define DELACK_F DELACK_V(1U) 33062306a36Sopenharmony_ci 33162306a36Sopenharmony_ci#define NON_OFFLOAD_S 7 33262306a36Sopenharmony_ci#define NON_OFFLOAD_V(x) ((x) << NON_OFFLOAD_S) 33362306a36Sopenharmony_ci#define NON_OFFLOAD_F NON_OFFLOAD_V(1U) 33462306a36Sopenharmony_ci 33562306a36Sopenharmony_ci#define DSCP_S 22 33662306a36Sopenharmony_ci#define DSCP_M 0x3F 33762306a36Sopenharmony_ci#define DSCP_V(x) ((x) << DSCP_S) 33862306a36Sopenharmony_ci#define DSCP_G(x) (((x) >> DSCP_S) & DSCP_M) 33962306a36Sopenharmony_ci 34062306a36Sopenharmony_ci#define TCAM_BYPASS_S 48 34162306a36Sopenharmony_ci#define TCAM_BYPASS_V(x) ((__u64)(x) << TCAM_BYPASS_S) 34262306a36Sopenharmony_ci#define TCAM_BYPASS_F TCAM_BYPASS_V(1ULL) 34362306a36Sopenharmony_ci 34462306a36Sopenharmony_ci#define NAGLE_S 49 34562306a36Sopenharmony_ci#define NAGLE_V(x) ((__u64)(x) << NAGLE_S) 34662306a36Sopenharmony_ci#define NAGLE_F NAGLE_V(1ULL) 34762306a36Sopenharmony_ci 34862306a36Sopenharmony_ci/* option 1 fields */ 34962306a36Sopenharmony_ci#define SYN_RSS_ENABLE_S 0 35062306a36Sopenharmony_ci#define SYN_RSS_ENABLE_V(x) ((x) << SYN_RSS_ENABLE_S) 35162306a36Sopenharmony_ci#define SYN_RSS_ENABLE_F SYN_RSS_ENABLE_V(1U) 35262306a36Sopenharmony_ci 35362306a36Sopenharmony_ci#define SYN_RSS_QUEUE_S 2 35462306a36Sopenharmony_ci#define SYN_RSS_QUEUE_V(x) ((x) << SYN_RSS_QUEUE_S) 35562306a36Sopenharmony_ci 35662306a36Sopenharmony_ci#define CONN_POLICY_S 22 35762306a36Sopenharmony_ci#define CONN_POLICY_V(x) ((x) << CONN_POLICY_S) 35862306a36Sopenharmony_ci 35962306a36Sopenharmony_cistruct cpl_pass_open_req6 { 36062306a36Sopenharmony_ci WR_HDR; 36162306a36Sopenharmony_ci union opcode_tid ot; 36262306a36Sopenharmony_ci __be16 local_port; 36362306a36Sopenharmony_ci __be16 peer_port; 36462306a36Sopenharmony_ci __be64 local_ip_hi; 36562306a36Sopenharmony_ci __be64 local_ip_lo; 36662306a36Sopenharmony_ci __be64 peer_ip_hi; 36762306a36Sopenharmony_ci __be64 peer_ip_lo; 36862306a36Sopenharmony_ci __be64 opt0; 36962306a36Sopenharmony_ci __be64 opt1; 37062306a36Sopenharmony_ci}; 37162306a36Sopenharmony_ci 37262306a36Sopenharmony_cistruct cpl_pass_open_rpl { 37362306a36Sopenharmony_ci union opcode_tid ot; 37462306a36Sopenharmony_ci u8 rsvd[3]; 37562306a36Sopenharmony_ci u8 status; 37662306a36Sopenharmony_ci}; 37762306a36Sopenharmony_ci 37862306a36Sopenharmony_cistruct tcp_options { 37962306a36Sopenharmony_ci __be16 mss; 38062306a36Sopenharmony_ci __u8 wsf; 38162306a36Sopenharmony_ci#if defined(__LITTLE_ENDIAN_BITFIELD) 38262306a36Sopenharmony_ci __u8:4; 38362306a36Sopenharmony_ci __u8 unknown:1; 38462306a36Sopenharmony_ci __u8:1; 38562306a36Sopenharmony_ci __u8 sack:1; 38662306a36Sopenharmony_ci __u8 tstamp:1; 38762306a36Sopenharmony_ci#else 38862306a36Sopenharmony_ci __u8 tstamp:1; 38962306a36Sopenharmony_ci __u8 sack:1; 39062306a36Sopenharmony_ci __u8:1; 39162306a36Sopenharmony_ci __u8 unknown:1; 39262306a36Sopenharmony_ci __u8:4; 39362306a36Sopenharmony_ci#endif 39462306a36Sopenharmony_ci}; 39562306a36Sopenharmony_ci 39662306a36Sopenharmony_cistruct cpl_pass_accept_req { 39762306a36Sopenharmony_ci union opcode_tid ot; 39862306a36Sopenharmony_ci __be16 rsvd; 39962306a36Sopenharmony_ci __be16 len; 40062306a36Sopenharmony_ci __be32 hdr_len; 40162306a36Sopenharmony_ci __be16 vlan; 40262306a36Sopenharmony_ci __be16 l2info; 40362306a36Sopenharmony_ci __be32 tos_stid; 40462306a36Sopenharmony_ci struct tcp_options tcpopt; 40562306a36Sopenharmony_ci}; 40662306a36Sopenharmony_ci 40762306a36Sopenharmony_ci/* cpl_pass_accept_req.hdr_len fields */ 40862306a36Sopenharmony_ci#define SYN_RX_CHAN_S 0 40962306a36Sopenharmony_ci#define SYN_RX_CHAN_M 0xF 41062306a36Sopenharmony_ci#define SYN_RX_CHAN_V(x) ((x) << SYN_RX_CHAN_S) 41162306a36Sopenharmony_ci#define SYN_RX_CHAN_G(x) (((x) >> SYN_RX_CHAN_S) & SYN_RX_CHAN_M) 41262306a36Sopenharmony_ci 41362306a36Sopenharmony_ci#define TCP_HDR_LEN_S 10 41462306a36Sopenharmony_ci#define TCP_HDR_LEN_M 0x3F 41562306a36Sopenharmony_ci#define TCP_HDR_LEN_V(x) ((x) << TCP_HDR_LEN_S) 41662306a36Sopenharmony_ci#define TCP_HDR_LEN_G(x) (((x) >> TCP_HDR_LEN_S) & TCP_HDR_LEN_M) 41762306a36Sopenharmony_ci 41862306a36Sopenharmony_ci#define IP_HDR_LEN_S 16 41962306a36Sopenharmony_ci#define IP_HDR_LEN_M 0x3FF 42062306a36Sopenharmony_ci#define IP_HDR_LEN_V(x) ((x) << IP_HDR_LEN_S) 42162306a36Sopenharmony_ci#define IP_HDR_LEN_G(x) (((x) >> IP_HDR_LEN_S) & IP_HDR_LEN_M) 42262306a36Sopenharmony_ci 42362306a36Sopenharmony_ci#define ETH_HDR_LEN_S 26 42462306a36Sopenharmony_ci#define ETH_HDR_LEN_M 0x1F 42562306a36Sopenharmony_ci#define ETH_HDR_LEN_V(x) ((x) << ETH_HDR_LEN_S) 42662306a36Sopenharmony_ci#define ETH_HDR_LEN_G(x) (((x) >> ETH_HDR_LEN_S) & ETH_HDR_LEN_M) 42762306a36Sopenharmony_ci 42862306a36Sopenharmony_ci/* cpl_pass_accept_req.l2info fields */ 42962306a36Sopenharmony_ci#define SYN_MAC_IDX_S 0 43062306a36Sopenharmony_ci#define SYN_MAC_IDX_M 0x1FF 43162306a36Sopenharmony_ci#define SYN_MAC_IDX_V(x) ((x) << SYN_MAC_IDX_S) 43262306a36Sopenharmony_ci#define SYN_MAC_IDX_G(x) (((x) >> SYN_MAC_IDX_S) & SYN_MAC_IDX_M) 43362306a36Sopenharmony_ci 43462306a36Sopenharmony_ci#define SYN_XACT_MATCH_S 9 43562306a36Sopenharmony_ci#define SYN_XACT_MATCH_V(x) ((x) << SYN_XACT_MATCH_S) 43662306a36Sopenharmony_ci#define SYN_XACT_MATCH_F SYN_XACT_MATCH_V(1U) 43762306a36Sopenharmony_ci 43862306a36Sopenharmony_ci#define SYN_INTF_S 12 43962306a36Sopenharmony_ci#define SYN_INTF_M 0xF 44062306a36Sopenharmony_ci#define SYN_INTF_V(x) ((x) << SYN_INTF_S) 44162306a36Sopenharmony_ci#define SYN_INTF_G(x) (((x) >> SYN_INTF_S) & SYN_INTF_M) 44262306a36Sopenharmony_ci 44362306a36Sopenharmony_cienum { /* TCP congestion control algorithms */ 44462306a36Sopenharmony_ci CONG_ALG_RENO, 44562306a36Sopenharmony_ci CONG_ALG_TAHOE, 44662306a36Sopenharmony_ci CONG_ALG_NEWRENO, 44762306a36Sopenharmony_ci CONG_ALG_HIGHSPEED 44862306a36Sopenharmony_ci}; 44962306a36Sopenharmony_ci 45062306a36Sopenharmony_ci#define CONG_CNTRL_S 14 45162306a36Sopenharmony_ci#define CONG_CNTRL_M 0x3 45262306a36Sopenharmony_ci#define CONG_CNTRL_V(x) ((x) << CONG_CNTRL_S) 45362306a36Sopenharmony_ci#define CONG_CNTRL_G(x) (((x) >> CONG_CNTRL_S) & CONG_CNTRL_M) 45462306a36Sopenharmony_ci 45562306a36Sopenharmony_ci#define T5_ISS_S 18 45662306a36Sopenharmony_ci#define T5_ISS_V(x) ((x) << T5_ISS_S) 45762306a36Sopenharmony_ci#define T5_ISS_F T5_ISS_V(1U) 45862306a36Sopenharmony_ci 45962306a36Sopenharmony_cistruct cpl_pass_accept_rpl { 46062306a36Sopenharmony_ci WR_HDR; 46162306a36Sopenharmony_ci union opcode_tid ot; 46262306a36Sopenharmony_ci __be32 opt2; 46362306a36Sopenharmony_ci __be64 opt0; 46462306a36Sopenharmony_ci}; 46562306a36Sopenharmony_ci 46662306a36Sopenharmony_ci/* option 2 fields */ 46762306a36Sopenharmony_ci#define RX_COALESCE_VALID_S 11 46862306a36Sopenharmony_ci#define RX_COALESCE_VALID_V(x) ((x) << RX_COALESCE_VALID_S) 46962306a36Sopenharmony_ci#define RX_COALESCE_VALID_F RX_COALESCE_VALID_V(1U) 47062306a36Sopenharmony_ci 47162306a36Sopenharmony_ci#define RX_COALESCE_S 12 47262306a36Sopenharmony_ci#define RX_COALESCE_V(x) ((x) << RX_COALESCE_S) 47362306a36Sopenharmony_ci 47462306a36Sopenharmony_ci#define PACE_S 16 47562306a36Sopenharmony_ci#define PACE_V(x) ((x) << PACE_S) 47662306a36Sopenharmony_ci 47762306a36Sopenharmony_ci#define TX_QUEUE_S 23 47862306a36Sopenharmony_ci#define TX_QUEUE_M 0x7 47962306a36Sopenharmony_ci#define TX_QUEUE_V(x) ((x) << TX_QUEUE_S) 48062306a36Sopenharmony_ci#define TX_QUEUE_G(x) (((x) >> TX_QUEUE_S) & TX_QUEUE_M) 48162306a36Sopenharmony_ci 48262306a36Sopenharmony_ci#define CCTRL_ECN_S 27 48362306a36Sopenharmony_ci#define CCTRL_ECN_V(x) ((x) << CCTRL_ECN_S) 48462306a36Sopenharmony_ci#define CCTRL_ECN_F CCTRL_ECN_V(1U) 48562306a36Sopenharmony_ci 48662306a36Sopenharmony_ci#define TSTAMPS_EN_S 29 48762306a36Sopenharmony_ci#define TSTAMPS_EN_V(x) ((x) << TSTAMPS_EN_S) 48862306a36Sopenharmony_ci#define TSTAMPS_EN_F TSTAMPS_EN_V(1U) 48962306a36Sopenharmony_ci 49062306a36Sopenharmony_ci#define SACK_EN_S 30 49162306a36Sopenharmony_ci#define SACK_EN_V(x) ((x) << SACK_EN_S) 49262306a36Sopenharmony_ci#define SACK_EN_F SACK_EN_V(1U) 49362306a36Sopenharmony_ci 49462306a36Sopenharmony_cistruct cpl_t5_pass_accept_rpl { 49562306a36Sopenharmony_ci WR_HDR; 49662306a36Sopenharmony_ci union opcode_tid ot; 49762306a36Sopenharmony_ci __be32 opt2; 49862306a36Sopenharmony_ci __be64 opt0; 49962306a36Sopenharmony_ci __be32 iss; 50062306a36Sopenharmony_ci __be32 rsvd; 50162306a36Sopenharmony_ci}; 50262306a36Sopenharmony_ci 50362306a36Sopenharmony_cistruct cpl_act_open_req { 50462306a36Sopenharmony_ci WR_HDR; 50562306a36Sopenharmony_ci union opcode_tid ot; 50662306a36Sopenharmony_ci __be16 local_port; 50762306a36Sopenharmony_ci __be16 peer_port; 50862306a36Sopenharmony_ci __be32 local_ip; 50962306a36Sopenharmony_ci __be32 peer_ip; 51062306a36Sopenharmony_ci __be64 opt0; 51162306a36Sopenharmony_ci __be32 params; 51262306a36Sopenharmony_ci __be32 opt2; 51362306a36Sopenharmony_ci}; 51462306a36Sopenharmony_ci 51562306a36Sopenharmony_ci#define FILTER_TUPLE_S 24 51662306a36Sopenharmony_ci#define FILTER_TUPLE_M 0xFFFFFFFFFF 51762306a36Sopenharmony_ci#define FILTER_TUPLE_V(x) ((x) << FILTER_TUPLE_S) 51862306a36Sopenharmony_ci#define FILTER_TUPLE_G(x) (((x) >> FILTER_TUPLE_S) & FILTER_TUPLE_M) 51962306a36Sopenharmony_cistruct cpl_t5_act_open_req { 52062306a36Sopenharmony_ci WR_HDR; 52162306a36Sopenharmony_ci union opcode_tid ot; 52262306a36Sopenharmony_ci __be16 local_port; 52362306a36Sopenharmony_ci __be16 peer_port; 52462306a36Sopenharmony_ci __be32 local_ip; 52562306a36Sopenharmony_ci __be32 peer_ip; 52662306a36Sopenharmony_ci __be64 opt0; 52762306a36Sopenharmony_ci __be32 rsvd; 52862306a36Sopenharmony_ci __be32 opt2; 52962306a36Sopenharmony_ci __be64 params; 53062306a36Sopenharmony_ci}; 53162306a36Sopenharmony_ci 53262306a36Sopenharmony_cistruct cpl_t6_act_open_req { 53362306a36Sopenharmony_ci WR_HDR; 53462306a36Sopenharmony_ci union opcode_tid ot; 53562306a36Sopenharmony_ci __be16 local_port; 53662306a36Sopenharmony_ci __be16 peer_port; 53762306a36Sopenharmony_ci __be32 local_ip; 53862306a36Sopenharmony_ci __be32 peer_ip; 53962306a36Sopenharmony_ci __be64 opt0; 54062306a36Sopenharmony_ci __be32 rsvd; 54162306a36Sopenharmony_ci __be32 opt2; 54262306a36Sopenharmony_ci __be64 params; 54362306a36Sopenharmony_ci __be32 rsvd2; 54462306a36Sopenharmony_ci __be32 opt3; 54562306a36Sopenharmony_ci}; 54662306a36Sopenharmony_ci 54762306a36Sopenharmony_cistruct cpl_act_open_req6 { 54862306a36Sopenharmony_ci WR_HDR; 54962306a36Sopenharmony_ci union opcode_tid ot; 55062306a36Sopenharmony_ci __be16 local_port; 55162306a36Sopenharmony_ci __be16 peer_port; 55262306a36Sopenharmony_ci __be64 local_ip_hi; 55362306a36Sopenharmony_ci __be64 local_ip_lo; 55462306a36Sopenharmony_ci __be64 peer_ip_hi; 55562306a36Sopenharmony_ci __be64 peer_ip_lo; 55662306a36Sopenharmony_ci __be64 opt0; 55762306a36Sopenharmony_ci __be32 params; 55862306a36Sopenharmony_ci __be32 opt2; 55962306a36Sopenharmony_ci}; 56062306a36Sopenharmony_ci 56162306a36Sopenharmony_cistruct cpl_t5_act_open_req6 { 56262306a36Sopenharmony_ci WR_HDR; 56362306a36Sopenharmony_ci union opcode_tid ot; 56462306a36Sopenharmony_ci __be16 local_port; 56562306a36Sopenharmony_ci __be16 peer_port; 56662306a36Sopenharmony_ci __be64 local_ip_hi; 56762306a36Sopenharmony_ci __be64 local_ip_lo; 56862306a36Sopenharmony_ci __be64 peer_ip_hi; 56962306a36Sopenharmony_ci __be64 peer_ip_lo; 57062306a36Sopenharmony_ci __be64 opt0; 57162306a36Sopenharmony_ci __be32 rsvd; 57262306a36Sopenharmony_ci __be32 opt2; 57362306a36Sopenharmony_ci __be64 params; 57462306a36Sopenharmony_ci}; 57562306a36Sopenharmony_ci 57662306a36Sopenharmony_cistruct cpl_t6_act_open_req6 { 57762306a36Sopenharmony_ci WR_HDR; 57862306a36Sopenharmony_ci union opcode_tid ot; 57962306a36Sopenharmony_ci __be16 local_port; 58062306a36Sopenharmony_ci __be16 peer_port; 58162306a36Sopenharmony_ci __be64 local_ip_hi; 58262306a36Sopenharmony_ci __be64 local_ip_lo; 58362306a36Sopenharmony_ci __be64 peer_ip_hi; 58462306a36Sopenharmony_ci __be64 peer_ip_lo; 58562306a36Sopenharmony_ci __be64 opt0; 58662306a36Sopenharmony_ci __be32 rsvd; 58762306a36Sopenharmony_ci __be32 opt2; 58862306a36Sopenharmony_ci __be64 params; 58962306a36Sopenharmony_ci __be32 rsvd2; 59062306a36Sopenharmony_ci __be32 opt3; 59162306a36Sopenharmony_ci}; 59262306a36Sopenharmony_ci 59362306a36Sopenharmony_cistruct cpl_act_open_rpl { 59462306a36Sopenharmony_ci union opcode_tid ot; 59562306a36Sopenharmony_ci __be32 atid_status; 59662306a36Sopenharmony_ci}; 59762306a36Sopenharmony_ci 59862306a36Sopenharmony_ci/* cpl_act_open_rpl.atid_status fields */ 59962306a36Sopenharmony_ci#define AOPEN_STATUS_S 0 60062306a36Sopenharmony_ci#define AOPEN_STATUS_M 0xFF 60162306a36Sopenharmony_ci#define AOPEN_STATUS_G(x) (((x) >> AOPEN_STATUS_S) & AOPEN_STATUS_M) 60262306a36Sopenharmony_ci 60362306a36Sopenharmony_ci#define AOPEN_ATID_S 8 60462306a36Sopenharmony_ci#define AOPEN_ATID_M 0xFFFFFF 60562306a36Sopenharmony_ci#define AOPEN_ATID_G(x) (((x) >> AOPEN_ATID_S) & AOPEN_ATID_M) 60662306a36Sopenharmony_ci 60762306a36Sopenharmony_cistruct cpl_pass_establish { 60862306a36Sopenharmony_ci union opcode_tid ot; 60962306a36Sopenharmony_ci __be32 rsvd; 61062306a36Sopenharmony_ci __be32 tos_stid; 61162306a36Sopenharmony_ci __be16 mac_idx; 61262306a36Sopenharmony_ci __be16 tcp_opt; 61362306a36Sopenharmony_ci __be32 snd_isn; 61462306a36Sopenharmony_ci __be32 rcv_isn; 61562306a36Sopenharmony_ci}; 61662306a36Sopenharmony_ci 61762306a36Sopenharmony_ci/* cpl_pass_establish.tos_stid fields */ 61862306a36Sopenharmony_ci#define PASS_OPEN_TID_S 0 61962306a36Sopenharmony_ci#define PASS_OPEN_TID_M 0xFFFFFF 62062306a36Sopenharmony_ci#define PASS_OPEN_TID_V(x) ((x) << PASS_OPEN_TID_S) 62162306a36Sopenharmony_ci#define PASS_OPEN_TID_G(x) (((x) >> PASS_OPEN_TID_S) & PASS_OPEN_TID_M) 62262306a36Sopenharmony_ci 62362306a36Sopenharmony_ci#define PASS_OPEN_TOS_S 24 62462306a36Sopenharmony_ci#define PASS_OPEN_TOS_M 0xFF 62562306a36Sopenharmony_ci#define PASS_OPEN_TOS_V(x) ((x) << PASS_OPEN_TOS_S) 62662306a36Sopenharmony_ci#define PASS_OPEN_TOS_G(x) (((x) >> PASS_OPEN_TOS_S) & PASS_OPEN_TOS_M) 62762306a36Sopenharmony_ci 62862306a36Sopenharmony_ci/* cpl_pass_establish.tcp_opt fields (also applies to act_open_establish) */ 62962306a36Sopenharmony_ci#define TCPOPT_WSCALE_OK_S 5 63062306a36Sopenharmony_ci#define TCPOPT_WSCALE_OK_M 0x1 63162306a36Sopenharmony_ci#define TCPOPT_WSCALE_OK_G(x) \ 63262306a36Sopenharmony_ci (((x) >> TCPOPT_WSCALE_OK_S) & TCPOPT_WSCALE_OK_M) 63362306a36Sopenharmony_ci 63462306a36Sopenharmony_ci#define TCPOPT_SACK_S 6 63562306a36Sopenharmony_ci#define TCPOPT_SACK_M 0x1 63662306a36Sopenharmony_ci#define TCPOPT_SACK_G(x) (((x) >> TCPOPT_SACK_S) & TCPOPT_SACK_M) 63762306a36Sopenharmony_ci 63862306a36Sopenharmony_ci#define TCPOPT_TSTAMP_S 7 63962306a36Sopenharmony_ci#define TCPOPT_TSTAMP_M 0x1 64062306a36Sopenharmony_ci#define TCPOPT_TSTAMP_G(x) (((x) >> TCPOPT_TSTAMP_S) & TCPOPT_TSTAMP_M) 64162306a36Sopenharmony_ci 64262306a36Sopenharmony_ci#define TCPOPT_SND_WSCALE_S 8 64362306a36Sopenharmony_ci#define TCPOPT_SND_WSCALE_M 0xF 64462306a36Sopenharmony_ci#define TCPOPT_SND_WSCALE_G(x) \ 64562306a36Sopenharmony_ci (((x) >> TCPOPT_SND_WSCALE_S) & TCPOPT_SND_WSCALE_M) 64662306a36Sopenharmony_ci 64762306a36Sopenharmony_ci#define TCPOPT_MSS_S 12 64862306a36Sopenharmony_ci#define TCPOPT_MSS_M 0xF 64962306a36Sopenharmony_ci#define TCPOPT_MSS_G(x) (((x) >> TCPOPT_MSS_S) & TCPOPT_MSS_M) 65062306a36Sopenharmony_ci 65162306a36Sopenharmony_ci#define T6_TCP_HDR_LEN_S 8 65262306a36Sopenharmony_ci#define T6_TCP_HDR_LEN_V(x) ((x) << T6_TCP_HDR_LEN_S) 65362306a36Sopenharmony_ci#define T6_TCP_HDR_LEN_G(x) (((x) >> T6_TCP_HDR_LEN_S) & TCP_HDR_LEN_M) 65462306a36Sopenharmony_ci 65562306a36Sopenharmony_ci#define T6_IP_HDR_LEN_S 14 65662306a36Sopenharmony_ci#define T6_IP_HDR_LEN_V(x) ((x) << T6_IP_HDR_LEN_S) 65762306a36Sopenharmony_ci#define T6_IP_HDR_LEN_G(x) (((x) >> T6_IP_HDR_LEN_S) & IP_HDR_LEN_M) 65862306a36Sopenharmony_ci 65962306a36Sopenharmony_ci#define T6_ETH_HDR_LEN_S 24 66062306a36Sopenharmony_ci#define T6_ETH_HDR_LEN_M 0xFF 66162306a36Sopenharmony_ci#define T6_ETH_HDR_LEN_V(x) ((x) << T6_ETH_HDR_LEN_S) 66262306a36Sopenharmony_ci#define T6_ETH_HDR_LEN_G(x) (((x) >> T6_ETH_HDR_LEN_S) & T6_ETH_HDR_LEN_M) 66362306a36Sopenharmony_ci 66462306a36Sopenharmony_cistruct cpl_act_establish { 66562306a36Sopenharmony_ci union opcode_tid ot; 66662306a36Sopenharmony_ci __be32 rsvd; 66762306a36Sopenharmony_ci __be32 tos_atid; 66862306a36Sopenharmony_ci __be16 mac_idx; 66962306a36Sopenharmony_ci __be16 tcp_opt; 67062306a36Sopenharmony_ci __be32 snd_isn; 67162306a36Sopenharmony_ci __be32 rcv_isn; 67262306a36Sopenharmony_ci}; 67362306a36Sopenharmony_ci 67462306a36Sopenharmony_cistruct cpl_get_tcb { 67562306a36Sopenharmony_ci WR_HDR; 67662306a36Sopenharmony_ci union opcode_tid ot; 67762306a36Sopenharmony_ci __be16 reply_ctrl; 67862306a36Sopenharmony_ci __be16 cookie; 67962306a36Sopenharmony_ci}; 68062306a36Sopenharmony_ci 68162306a36Sopenharmony_ci/* cpl_get_tcb.reply_ctrl fields */ 68262306a36Sopenharmony_ci#define QUEUENO_S 0 68362306a36Sopenharmony_ci#define QUEUENO_V(x) ((x) << QUEUENO_S) 68462306a36Sopenharmony_ci 68562306a36Sopenharmony_ci#define REPLY_CHAN_S 14 68662306a36Sopenharmony_ci#define REPLY_CHAN_V(x) ((x) << REPLY_CHAN_S) 68762306a36Sopenharmony_ci#define REPLY_CHAN_F REPLY_CHAN_V(1U) 68862306a36Sopenharmony_ci 68962306a36Sopenharmony_ci#define NO_REPLY_S 15 69062306a36Sopenharmony_ci#define NO_REPLY_V(x) ((x) << NO_REPLY_S) 69162306a36Sopenharmony_ci#define NO_REPLY_F NO_REPLY_V(1U) 69262306a36Sopenharmony_ci 69362306a36Sopenharmony_cistruct cpl_get_tcb_rpl { 69462306a36Sopenharmony_ci union opcode_tid ot; 69562306a36Sopenharmony_ci __u8 cookie; 69662306a36Sopenharmony_ci __u8 status; 69762306a36Sopenharmony_ci __be16 len; 69862306a36Sopenharmony_ci}; 69962306a36Sopenharmony_ci 70062306a36Sopenharmony_cistruct cpl_set_tcb_field { 70162306a36Sopenharmony_ci WR_HDR; 70262306a36Sopenharmony_ci union opcode_tid ot; 70362306a36Sopenharmony_ci __be16 reply_ctrl; 70462306a36Sopenharmony_ci __be16 word_cookie; 70562306a36Sopenharmony_ci __be64 mask; 70662306a36Sopenharmony_ci __be64 val; 70762306a36Sopenharmony_ci}; 70862306a36Sopenharmony_ci 70962306a36Sopenharmony_cistruct cpl_set_tcb_field_core { 71062306a36Sopenharmony_ci union opcode_tid ot; 71162306a36Sopenharmony_ci __be16 reply_ctrl; 71262306a36Sopenharmony_ci __be16 word_cookie; 71362306a36Sopenharmony_ci __be64 mask; 71462306a36Sopenharmony_ci __be64 val; 71562306a36Sopenharmony_ci}; 71662306a36Sopenharmony_ci 71762306a36Sopenharmony_ci/* cpl_set_tcb_field.word_cookie fields */ 71862306a36Sopenharmony_ci#define TCB_WORD_S 0 71962306a36Sopenharmony_ci#define TCB_WORD_V(x) ((x) << TCB_WORD_S) 72062306a36Sopenharmony_ci 72162306a36Sopenharmony_ci#define TCB_COOKIE_S 5 72262306a36Sopenharmony_ci#define TCB_COOKIE_M 0x7 72362306a36Sopenharmony_ci#define TCB_COOKIE_V(x) ((x) << TCB_COOKIE_S) 72462306a36Sopenharmony_ci#define TCB_COOKIE_G(x) (((x) >> TCB_COOKIE_S) & TCB_COOKIE_M) 72562306a36Sopenharmony_ci 72662306a36Sopenharmony_cistruct cpl_set_tcb_rpl { 72762306a36Sopenharmony_ci union opcode_tid ot; 72862306a36Sopenharmony_ci __be16 rsvd; 72962306a36Sopenharmony_ci u8 cookie; 73062306a36Sopenharmony_ci u8 status; 73162306a36Sopenharmony_ci __be64 oldval; 73262306a36Sopenharmony_ci}; 73362306a36Sopenharmony_ci 73462306a36Sopenharmony_cistruct cpl_close_con_req { 73562306a36Sopenharmony_ci WR_HDR; 73662306a36Sopenharmony_ci union opcode_tid ot; 73762306a36Sopenharmony_ci __be32 rsvd; 73862306a36Sopenharmony_ci}; 73962306a36Sopenharmony_ci 74062306a36Sopenharmony_cistruct cpl_close_con_rpl { 74162306a36Sopenharmony_ci union opcode_tid ot; 74262306a36Sopenharmony_ci u8 rsvd[3]; 74362306a36Sopenharmony_ci u8 status; 74462306a36Sopenharmony_ci __be32 snd_nxt; 74562306a36Sopenharmony_ci __be32 rcv_nxt; 74662306a36Sopenharmony_ci}; 74762306a36Sopenharmony_ci 74862306a36Sopenharmony_cistruct cpl_close_listsvr_req { 74962306a36Sopenharmony_ci WR_HDR; 75062306a36Sopenharmony_ci union opcode_tid ot; 75162306a36Sopenharmony_ci __be16 reply_ctrl; 75262306a36Sopenharmony_ci __be16 rsvd; 75362306a36Sopenharmony_ci}; 75462306a36Sopenharmony_ci 75562306a36Sopenharmony_ci/* additional cpl_close_listsvr_req.reply_ctrl field */ 75662306a36Sopenharmony_ci#define LISTSVR_IPV6_S 14 75762306a36Sopenharmony_ci#define LISTSVR_IPV6_V(x) ((x) << LISTSVR_IPV6_S) 75862306a36Sopenharmony_ci#define LISTSVR_IPV6_F LISTSVR_IPV6_V(1U) 75962306a36Sopenharmony_ci 76062306a36Sopenharmony_cistruct cpl_close_listsvr_rpl { 76162306a36Sopenharmony_ci union opcode_tid ot; 76262306a36Sopenharmony_ci u8 rsvd[3]; 76362306a36Sopenharmony_ci u8 status; 76462306a36Sopenharmony_ci}; 76562306a36Sopenharmony_ci 76662306a36Sopenharmony_cistruct cpl_abort_req_rss { 76762306a36Sopenharmony_ci union opcode_tid ot; 76862306a36Sopenharmony_ci u8 rsvd[3]; 76962306a36Sopenharmony_ci u8 status; 77062306a36Sopenharmony_ci}; 77162306a36Sopenharmony_ci 77262306a36Sopenharmony_cistruct cpl_abort_req_rss6 { 77362306a36Sopenharmony_ci union opcode_tid ot; 77462306a36Sopenharmony_ci __be32 srqidx_status; 77562306a36Sopenharmony_ci}; 77662306a36Sopenharmony_ci 77762306a36Sopenharmony_ci#define ABORT_RSS_STATUS_S 0 77862306a36Sopenharmony_ci#define ABORT_RSS_STATUS_M 0xff 77962306a36Sopenharmony_ci#define ABORT_RSS_STATUS_V(x) ((x) << ABORT_RSS_STATUS_S) 78062306a36Sopenharmony_ci#define ABORT_RSS_STATUS_G(x) (((x) >> ABORT_RSS_STATUS_S) & ABORT_RSS_STATUS_M) 78162306a36Sopenharmony_ci 78262306a36Sopenharmony_ci#define ABORT_RSS_SRQIDX_S 8 78362306a36Sopenharmony_ci#define ABORT_RSS_SRQIDX_M 0xffffff 78462306a36Sopenharmony_ci#define ABORT_RSS_SRQIDX_V(x) ((x) << ABORT_RSS_SRQIDX_S) 78562306a36Sopenharmony_ci#define ABORT_RSS_SRQIDX_G(x) (((x) >> ABORT_RSS_SRQIDX_S) & ABORT_RSS_SRQIDX_M) 78662306a36Sopenharmony_ci 78762306a36Sopenharmony_cistruct cpl_abort_req { 78862306a36Sopenharmony_ci WR_HDR; 78962306a36Sopenharmony_ci union opcode_tid ot; 79062306a36Sopenharmony_ci __be32 rsvd0; 79162306a36Sopenharmony_ci u8 rsvd1; 79262306a36Sopenharmony_ci u8 cmd; 79362306a36Sopenharmony_ci u8 rsvd2[6]; 79462306a36Sopenharmony_ci}; 79562306a36Sopenharmony_ci 79662306a36Sopenharmony_cistruct cpl_abort_rpl_rss { 79762306a36Sopenharmony_ci union opcode_tid ot; 79862306a36Sopenharmony_ci u8 rsvd[3]; 79962306a36Sopenharmony_ci u8 status; 80062306a36Sopenharmony_ci}; 80162306a36Sopenharmony_ci 80262306a36Sopenharmony_cistruct cpl_abort_rpl_rss6 { 80362306a36Sopenharmony_ci union opcode_tid ot; 80462306a36Sopenharmony_ci __be32 srqidx_status; 80562306a36Sopenharmony_ci}; 80662306a36Sopenharmony_ci 80762306a36Sopenharmony_cistruct cpl_abort_rpl { 80862306a36Sopenharmony_ci WR_HDR; 80962306a36Sopenharmony_ci union opcode_tid ot; 81062306a36Sopenharmony_ci __be32 rsvd0; 81162306a36Sopenharmony_ci u8 rsvd1; 81262306a36Sopenharmony_ci u8 cmd; 81362306a36Sopenharmony_ci u8 rsvd2[6]; 81462306a36Sopenharmony_ci}; 81562306a36Sopenharmony_ci 81662306a36Sopenharmony_cistruct cpl_peer_close { 81762306a36Sopenharmony_ci union opcode_tid ot; 81862306a36Sopenharmony_ci __be32 rcv_nxt; 81962306a36Sopenharmony_ci}; 82062306a36Sopenharmony_ci 82162306a36Sopenharmony_cistruct cpl_tid_release { 82262306a36Sopenharmony_ci WR_HDR; 82362306a36Sopenharmony_ci union opcode_tid ot; 82462306a36Sopenharmony_ci __be32 rsvd; 82562306a36Sopenharmony_ci}; 82662306a36Sopenharmony_ci 82762306a36Sopenharmony_cistruct cpl_tx_pkt_core { 82862306a36Sopenharmony_ci __be32 ctrl0; 82962306a36Sopenharmony_ci __be16 pack; 83062306a36Sopenharmony_ci __be16 len; 83162306a36Sopenharmony_ci __be64 ctrl1; 83262306a36Sopenharmony_ci}; 83362306a36Sopenharmony_ci 83462306a36Sopenharmony_cistruct cpl_tx_pkt { 83562306a36Sopenharmony_ci WR_HDR; 83662306a36Sopenharmony_ci struct cpl_tx_pkt_core c; 83762306a36Sopenharmony_ci}; 83862306a36Sopenharmony_ci 83962306a36Sopenharmony_ci#define cpl_tx_pkt_xt cpl_tx_pkt 84062306a36Sopenharmony_ci 84162306a36Sopenharmony_ci/* cpl_tx_pkt_core.ctrl0 fields */ 84262306a36Sopenharmony_ci#define TXPKT_VF_S 0 84362306a36Sopenharmony_ci#define TXPKT_VF_V(x) ((x) << TXPKT_VF_S) 84462306a36Sopenharmony_ci 84562306a36Sopenharmony_ci#define TXPKT_PF_S 8 84662306a36Sopenharmony_ci#define TXPKT_PF_V(x) ((x) << TXPKT_PF_S) 84762306a36Sopenharmony_ci 84862306a36Sopenharmony_ci#define TXPKT_VF_VLD_S 11 84962306a36Sopenharmony_ci#define TXPKT_VF_VLD_V(x) ((x) << TXPKT_VF_VLD_S) 85062306a36Sopenharmony_ci#define TXPKT_VF_VLD_F TXPKT_VF_VLD_V(1U) 85162306a36Sopenharmony_ci 85262306a36Sopenharmony_ci#define TXPKT_OVLAN_IDX_S 12 85362306a36Sopenharmony_ci#define TXPKT_OVLAN_IDX_V(x) ((x) << TXPKT_OVLAN_IDX_S) 85462306a36Sopenharmony_ci 85562306a36Sopenharmony_ci#define TXPKT_T5_OVLAN_IDX_S 12 85662306a36Sopenharmony_ci#define TXPKT_T5_OVLAN_IDX_V(x) ((x) << TXPKT_T5_OVLAN_IDX_S) 85762306a36Sopenharmony_ci 85862306a36Sopenharmony_ci#define TXPKT_INTF_S 16 85962306a36Sopenharmony_ci#define TXPKT_INTF_V(x) ((x) << TXPKT_INTF_S) 86062306a36Sopenharmony_ci 86162306a36Sopenharmony_ci#define TXPKT_INS_OVLAN_S 21 86262306a36Sopenharmony_ci#define TXPKT_INS_OVLAN_V(x) ((x) << TXPKT_INS_OVLAN_S) 86362306a36Sopenharmony_ci#define TXPKT_INS_OVLAN_F TXPKT_INS_OVLAN_V(1U) 86462306a36Sopenharmony_ci 86562306a36Sopenharmony_ci#define TXPKT_TSTAMP_S 23 86662306a36Sopenharmony_ci#define TXPKT_TSTAMP_V(x) ((x) << TXPKT_TSTAMP_S) 86762306a36Sopenharmony_ci#define TXPKT_TSTAMP_F TXPKT_TSTAMP_V(1ULL) 86862306a36Sopenharmony_ci 86962306a36Sopenharmony_ci#define TXPKT_OPCODE_S 24 87062306a36Sopenharmony_ci#define TXPKT_OPCODE_V(x) ((x) << TXPKT_OPCODE_S) 87162306a36Sopenharmony_ci 87262306a36Sopenharmony_ci/* cpl_tx_pkt_core.ctrl1 fields */ 87362306a36Sopenharmony_ci#define TXPKT_CSUM_END_S 12 87462306a36Sopenharmony_ci#define TXPKT_CSUM_END_V(x) ((x) << TXPKT_CSUM_END_S) 87562306a36Sopenharmony_ci 87662306a36Sopenharmony_ci#define TXPKT_CSUM_START_S 20 87762306a36Sopenharmony_ci#define TXPKT_CSUM_START_V(x) ((x) << TXPKT_CSUM_START_S) 87862306a36Sopenharmony_ci 87962306a36Sopenharmony_ci#define TXPKT_IPHDR_LEN_S 20 88062306a36Sopenharmony_ci#define TXPKT_IPHDR_LEN_V(x) ((__u64)(x) << TXPKT_IPHDR_LEN_S) 88162306a36Sopenharmony_ci 88262306a36Sopenharmony_ci#define TXPKT_CSUM_LOC_S 30 88362306a36Sopenharmony_ci#define TXPKT_CSUM_LOC_V(x) ((__u64)(x) << TXPKT_CSUM_LOC_S) 88462306a36Sopenharmony_ci 88562306a36Sopenharmony_ci#define TXPKT_ETHHDR_LEN_S 34 88662306a36Sopenharmony_ci#define TXPKT_ETHHDR_LEN_V(x) ((__u64)(x) << TXPKT_ETHHDR_LEN_S) 88762306a36Sopenharmony_ci 88862306a36Sopenharmony_ci#define T6_TXPKT_ETHHDR_LEN_S 32 88962306a36Sopenharmony_ci#define T6_TXPKT_ETHHDR_LEN_V(x) ((__u64)(x) << T6_TXPKT_ETHHDR_LEN_S) 89062306a36Sopenharmony_ci 89162306a36Sopenharmony_ci#define TXPKT_CSUM_TYPE_S 40 89262306a36Sopenharmony_ci#define TXPKT_CSUM_TYPE_V(x) ((__u64)(x) << TXPKT_CSUM_TYPE_S) 89362306a36Sopenharmony_ci 89462306a36Sopenharmony_ci#define TXPKT_VLAN_S 44 89562306a36Sopenharmony_ci#define TXPKT_VLAN_V(x) ((__u64)(x) << TXPKT_VLAN_S) 89662306a36Sopenharmony_ci 89762306a36Sopenharmony_ci#define TXPKT_VLAN_VLD_S 60 89862306a36Sopenharmony_ci#define TXPKT_VLAN_VLD_V(x) ((__u64)(x) << TXPKT_VLAN_VLD_S) 89962306a36Sopenharmony_ci#define TXPKT_VLAN_VLD_F TXPKT_VLAN_VLD_V(1ULL) 90062306a36Sopenharmony_ci 90162306a36Sopenharmony_ci#define TXPKT_IPCSUM_DIS_S 62 90262306a36Sopenharmony_ci#define TXPKT_IPCSUM_DIS_V(x) ((__u64)(x) << TXPKT_IPCSUM_DIS_S) 90362306a36Sopenharmony_ci#define TXPKT_IPCSUM_DIS_F TXPKT_IPCSUM_DIS_V(1ULL) 90462306a36Sopenharmony_ci 90562306a36Sopenharmony_ci#define TXPKT_L4CSUM_DIS_S 63 90662306a36Sopenharmony_ci#define TXPKT_L4CSUM_DIS_V(x) ((__u64)(x) << TXPKT_L4CSUM_DIS_S) 90762306a36Sopenharmony_ci#define TXPKT_L4CSUM_DIS_F TXPKT_L4CSUM_DIS_V(1ULL) 90862306a36Sopenharmony_ci 90962306a36Sopenharmony_cistruct cpl_tx_pkt_lso_core { 91062306a36Sopenharmony_ci __be32 lso_ctrl; 91162306a36Sopenharmony_ci __be16 ipid_ofst; 91262306a36Sopenharmony_ci __be16 mss; 91362306a36Sopenharmony_ci __be32 seqno_offset; 91462306a36Sopenharmony_ci __be32 len; 91562306a36Sopenharmony_ci /* encapsulated CPL (TX_PKT, TX_PKT_XT or TX_DATA) follows here */ 91662306a36Sopenharmony_ci}; 91762306a36Sopenharmony_ci 91862306a36Sopenharmony_ci/* cpl_tx_pkt_lso_core.lso_ctrl fields */ 91962306a36Sopenharmony_ci#define LSO_TCPHDR_LEN_S 0 92062306a36Sopenharmony_ci#define LSO_TCPHDR_LEN_V(x) ((x) << LSO_TCPHDR_LEN_S) 92162306a36Sopenharmony_ci 92262306a36Sopenharmony_ci#define LSO_IPHDR_LEN_S 4 92362306a36Sopenharmony_ci#define LSO_IPHDR_LEN_V(x) ((x) << LSO_IPHDR_LEN_S) 92462306a36Sopenharmony_ci 92562306a36Sopenharmony_ci#define LSO_ETHHDR_LEN_S 16 92662306a36Sopenharmony_ci#define LSO_ETHHDR_LEN_V(x) ((x) << LSO_ETHHDR_LEN_S) 92762306a36Sopenharmony_ci 92862306a36Sopenharmony_ci#define LSO_IPV6_S 20 92962306a36Sopenharmony_ci#define LSO_IPV6_V(x) ((x) << LSO_IPV6_S) 93062306a36Sopenharmony_ci#define LSO_IPV6_F LSO_IPV6_V(1U) 93162306a36Sopenharmony_ci 93262306a36Sopenharmony_ci#define LSO_LAST_SLICE_S 22 93362306a36Sopenharmony_ci#define LSO_LAST_SLICE_V(x) ((x) << LSO_LAST_SLICE_S) 93462306a36Sopenharmony_ci#define LSO_LAST_SLICE_F LSO_LAST_SLICE_V(1U) 93562306a36Sopenharmony_ci 93662306a36Sopenharmony_ci#define LSO_FIRST_SLICE_S 23 93762306a36Sopenharmony_ci#define LSO_FIRST_SLICE_V(x) ((x) << LSO_FIRST_SLICE_S) 93862306a36Sopenharmony_ci#define LSO_FIRST_SLICE_F LSO_FIRST_SLICE_V(1U) 93962306a36Sopenharmony_ci 94062306a36Sopenharmony_ci#define LSO_OPCODE_S 24 94162306a36Sopenharmony_ci#define LSO_OPCODE_V(x) ((x) << LSO_OPCODE_S) 94262306a36Sopenharmony_ci 94362306a36Sopenharmony_ci#define LSO_T5_XFER_SIZE_S 0 94462306a36Sopenharmony_ci#define LSO_T5_XFER_SIZE_V(x) ((x) << LSO_T5_XFER_SIZE_S) 94562306a36Sopenharmony_ci 94662306a36Sopenharmony_cistruct cpl_tx_pkt_lso { 94762306a36Sopenharmony_ci WR_HDR; 94862306a36Sopenharmony_ci struct cpl_tx_pkt_lso_core c; 94962306a36Sopenharmony_ci /* encapsulated CPL (TX_PKT, TX_PKT_XT or TX_DATA) follows here */ 95062306a36Sopenharmony_ci}; 95162306a36Sopenharmony_ci 95262306a36Sopenharmony_cistruct cpl_iscsi_hdr { 95362306a36Sopenharmony_ci union opcode_tid ot; 95462306a36Sopenharmony_ci __be16 pdu_len_ddp; 95562306a36Sopenharmony_ci __be16 len; 95662306a36Sopenharmony_ci __be32 seq; 95762306a36Sopenharmony_ci __be16 urg; 95862306a36Sopenharmony_ci u8 rsvd; 95962306a36Sopenharmony_ci u8 status; 96062306a36Sopenharmony_ci}; 96162306a36Sopenharmony_ci 96262306a36Sopenharmony_ci/* cpl_iscsi_hdr.pdu_len_ddp fields */ 96362306a36Sopenharmony_ci#define ISCSI_PDU_LEN_S 0 96462306a36Sopenharmony_ci#define ISCSI_PDU_LEN_M 0x7FFF 96562306a36Sopenharmony_ci#define ISCSI_PDU_LEN_V(x) ((x) << ISCSI_PDU_LEN_S) 96662306a36Sopenharmony_ci#define ISCSI_PDU_LEN_G(x) (((x) >> ISCSI_PDU_LEN_S) & ISCSI_PDU_LEN_M) 96762306a36Sopenharmony_ci 96862306a36Sopenharmony_ci#define ISCSI_DDP_S 15 96962306a36Sopenharmony_ci#define ISCSI_DDP_V(x) ((x) << ISCSI_DDP_S) 97062306a36Sopenharmony_ci#define ISCSI_DDP_F ISCSI_DDP_V(1U) 97162306a36Sopenharmony_ci 97262306a36Sopenharmony_cistruct cpl_rx_data_ddp { 97362306a36Sopenharmony_ci union opcode_tid ot; 97462306a36Sopenharmony_ci __be16 urg; 97562306a36Sopenharmony_ci __be16 len; 97662306a36Sopenharmony_ci __be32 seq; 97762306a36Sopenharmony_ci union { 97862306a36Sopenharmony_ci __be32 nxt_seq; 97962306a36Sopenharmony_ci __be32 ddp_report; 98062306a36Sopenharmony_ci }; 98162306a36Sopenharmony_ci __be32 ulp_crc; 98262306a36Sopenharmony_ci __be32 ddpvld; 98362306a36Sopenharmony_ci}; 98462306a36Sopenharmony_ci 98562306a36Sopenharmony_ci#define cpl_rx_iscsi_ddp cpl_rx_data_ddp 98662306a36Sopenharmony_ci 98762306a36Sopenharmony_cistruct cpl_iscsi_data { 98862306a36Sopenharmony_ci union opcode_tid ot; 98962306a36Sopenharmony_ci __u8 rsvd0[2]; 99062306a36Sopenharmony_ci __be16 len; 99162306a36Sopenharmony_ci __be32 seq; 99262306a36Sopenharmony_ci __be16 urg; 99362306a36Sopenharmony_ci __u8 rsvd1; 99462306a36Sopenharmony_ci __u8 status; 99562306a36Sopenharmony_ci}; 99662306a36Sopenharmony_ci 99762306a36Sopenharmony_cistruct cpl_rx_iscsi_cmp { 99862306a36Sopenharmony_ci union opcode_tid ot; 99962306a36Sopenharmony_ci __be16 pdu_len_ddp; 100062306a36Sopenharmony_ci __be16 len; 100162306a36Sopenharmony_ci __be32 seq; 100262306a36Sopenharmony_ci __be16 urg; 100362306a36Sopenharmony_ci __u8 rsvd; 100462306a36Sopenharmony_ci __u8 status; 100562306a36Sopenharmony_ci __be32 ulp_crc; 100662306a36Sopenharmony_ci __be32 ddpvld; 100762306a36Sopenharmony_ci}; 100862306a36Sopenharmony_ci 100962306a36Sopenharmony_cistruct cpl_tx_data_iso { 101062306a36Sopenharmony_ci __be32 op_to_scsi; 101162306a36Sopenharmony_ci __u8 reserved1; 101262306a36Sopenharmony_ci __u8 ahs_len; 101362306a36Sopenharmony_ci __be16 mpdu; 101462306a36Sopenharmony_ci __be32 burst_size; 101562306a36Sopenharmony_ci __be32 len; 101662306a36Sopenharmony_ci __be32 reserved2_seglen_offset; 101762306a36Sopenharmony_ci __be32 datasn_offset; 101862306a36Sopenharmony_ci __be32 buffer_offset; 101962306a36Sopenharmony_ci __be32 reserved3; 102062306a36Sopenharmony_ci 102162306a36Sopenharmony_ci /* encapsulated CPL_TX_DATA follows here */ 102262306a36Sopenharmony_ci}; 102362306a36Sopenharmony_ci 102462306a36Sopenharmony_ci/* cpl_tx_data_iso.op_to_scsi fields */ 102562306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_OP_S 24 102662306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_OP_M 0xff 102762306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_OP_V(x) ((x) << CPL_TX_DATA_ISO_OP_S) 102862306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_OP_G(x) \ 102962306a36Sopenharmony_ci (((x) >> CPL_TX_DATA_ISO_OP_S) & CPL_TX_DATA_ISO_OP_M) 103062306a36Sopenharmony_ci 103162306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_FIRST_S 23 103262306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_FIRST_M 0x1 103362306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_FIRST_V(x) ((x) << CPL_TX_DATA_ISO_FIRST_S) 103462306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_FIRST_G(x) \ 103562306a36Sopenharmony_ci (((x) >> CPL_TX_DATA_ISO_FIRST_S) & CPL_TX_DATA_ISO_FIRST_M) 103662306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_FIRST_F CPL_TX_DATA_ISO_FIRST_V(1U) 103762306a36Sopenharmony_ci 103862306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_LAST_S 22 103962306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_LAST_M 0x1 104062306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_LAST_V(x) ((x) << CPL_TX_DATA_ISO_LAST_S) 104162306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_LAST_G(x) \ 104262306a36Sopenharmony_ci (((x) >> CPL_TX_DATA_ISO_LAST_S) & CPL_TX_DATA_ISO_LAST_M) 104362306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_LAST_F CPL_TX_DATA_ISO_LAST_V(1U) 104462306a36Sopenharmony_ci 104562306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_CPLHDRLEN_S 21 104662306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_CPLHDRLEN_M 0x1 104762306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_CPLHDRLEN_V(x) ((x) << CPL_TX_DATA_ISO_CPLHDRLEN_S) 104862306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_CPLHDRLEN_G(x) \ 104962306a36Sopenharmony_ci (((x) >> CPL_TX_DATA_ISO_CPLHDRLEN_S) & CPL_TX_DATA_ISO_CPLHDRLEN_M) 105062306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_CPLHDRLEN_F CPL_TX_DATA_ISO_CPLHDRLEN_V(1U) 105162306a36Sopenharmony_ci 105262306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_HDRCRC_S 20 105362306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_HDRCRC_M 0x1 105462306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_HDRCRC_V(x) ((x) << CPL_TX_DATA_ISO_HDRCRC_S) 105562306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_HDRCRC_G(x) \ 105662306a36Sopenharmony_ci (((x) >> CPL_TX_DATA_ISO_HDRCRC_S) & CPL_TX_DATA_ISO_HDRCRC_M) 105762306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_HDRCRC_F CPL_TX_DATA_ISO_HDRCRC_V(1U) 105862306a36Sopenharmony_ci 105962306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_PLDCRC_S 19 106062306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_PLDCRC_M 0x1 106162306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_PLDCRC_V(x) ((x) << CPL_TX_DATA_ISO_PLDCRC_S) 106262306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_PLDCRC_G(x) \ 106362306a36Sopenharmony_ci (((x) >> CPL_TX_DATA_ISO_PLDCRC_S) & CPL_TX_DATA_ISO_PLDCRC_M) 106462306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_PLDCRC_F CPL_TX_DATA_ISO_PLDCRC_V(1U) 106562306a36Sopenharmony_ci 106662306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_IMMEDIATE_S 18 106762306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_IMMEDIATE_M 0x1 106862306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_IMMEDIATE_V(x) ((x) << CPL_TX_DATA_ISO_IMMEDIATE_S) 106962306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_IMMEDIATE_G(x) \ 107062306a36Sopenharmony_ci (((x) >> CPL_TX_DATA_ISO_IMMEDIATE_S) & CPL_TX_DATA_ISO_IMMEDIATE_M) 107162306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_IMMEDIATE_F CPL_TX_DATA_ISO_IMMEDIATE_V(1U) 107262306a36Sopenharmony_ci 107362306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_SCSI_S 16 107462306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_SCSI_M 0x3 107562306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_SCSI_V(x) ((x) << CPL_TX_DATA_ISO_SCSI_S) 107662306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_SCSI_G(x) \ 107762306a36Sopenharmony_ci (((x) >> CPL_TX_DATA_ISO_SCSI_S) & CPL_TX_DATA_ISO_SCSI_M) 107862306a36Sopenharmony_ci 107962306a36Sopenharmony_ci/* cpl_tx_data_iso.reserved2_seglen_offset fields */ 108062306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_SEGLEN_OFFSET_S 0 108162306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_SEGLEN_OFFSET_M 0xffffff 108262306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_SEGLEN_OFFSET_V(x) \ 108362306a36Sopenharmony_ci ((x) << CPL_TX_DATA_ISO_SEGLEN_OFFSET_S) 108462306a36Sopenharmony_ci#define CPL_TX_DATA_ISO_SEGLEN_OFFSET_G(x) \ 108562306a36Sopenharmony_ci (((x) >> CPL_TX_DATA_ISO_SEGLEN_OFFSET_S) & \ 108662306a36Sopenharmony_ci CPL_TX_DATA_ISO_SEGLEN_OFFSET_M) 108762306a36Sopenharmony_ci 108862306a36Sopenharmony_cistruct cpl_rx_data { 108962306a36Sopenharmony_ci union opcode_tid ot; 109062306a36Sopenharmony_ci __be16 rsvd; 109162306a36Sopenharmony_ci __be16 len; 109262306a36Sopenharmony_ci __be32 seq; 109362306a36Sopenharmony_ci __be16 urg; 109462306a36Sopenharmony_ci#if defined(__LITTLE_ENDIAN_BITFIELD) 109562306a36Sopenharmony_ci u8 dack_mode:2; 109662306a36Sopenharmony_ci u8 psh:1; 109762306a36Sopenharmony_ci u8 heartbeat:1; 109862306a36Sopenharmony_ci u8 ddp_off:1; 109962306a36Sopenharmony_ci u8 :3; 110062306a36Sopenharmony_ci#else 110162306a36Sopenharmony_ci u8 :3; 110262306a36Sopenharmony_ci u8 ddp_off:1; 110362306a36Sopenharmony_ci u8 heartbeat:1; 110462306a36Sopenharmony_ci u8 psh:1; 110562306a36Sopenharmony_ci u8 dack_mode:2; 110662306a36Sopenharmony_ci#endif 110762306a36Sopenharmony_ci u8 status; 110862306a36Sopenharmony_ci}; 110962306a36Sopenharmony_ci 111062306a36Sopenharmony_cistruct cpl_rx_data_ack { 111162306a36Sopenharmony_ci WR_HDR; 111262306a36Sopenharmony_ci union opcode_tid ot; 111362306a36Sopenharmony_ci __be32 credit_dack; 111462306a36Sopenharmony_ci}; 111562306a36Sopenharmony_ci 111662306a36Sopenharmony_ci/* cpl_rx_data_ack.ack_seq fields */ 111762306a36Sopenharmony_ci#define RX_CREDITS_S 0 111862306a36Sopenharmony_ci#define RX_CREDITS_V(x) ((x) << RX_CREDITS_S) 111962306a36Sopenharmony_ci 112062306a36Sopenharmony_ci#define RX_FORCE_ACK_S 28 112162306a36Sopenharmony_ci#define RX_FORCE_ACK_V(x) ((x) << RX_FORCE_ACK_S) 112262306a36Sopenharmony_ci#define RX_FORCE_ACK_F RX_FORCE_ACK_V(1U) 112362306a36Sopenharmony_ci 112462306a36Sopenharmony_ci#define RX_DACK_MODE_S 29 112562306a36Sopenharmony_ci#define RX_DACK_MODE_M 0x3 112662306a36Sopenharmony_ci#define RX_DACK_MODE_V(x) ((x) << RX_DACK_MODE_S) 112762306a36Sopenharmony_ci#define RX_DACK_MODE_G(x) (((x) >> RX_DACK_MODE_S) & RX_DACK_MODE_M) 112862306a36Sopenharmony_ci 112962306a36Sopenharmony_ci#define RX_DACK_CHANGE_S 31 113062306a36Sopenharmony_ci#define RX_DACK_CHANGE_V(x) ((x) << RX_DACK_CHANGE_S) 113162306a36Sopenharmony_ci#define RX_DACK_CHANGE_F RX_DACK_CHANGE_V(1U) 113262306a36Sopenharmony_ci 113362306a36Sopenharmony_cistruct cpl_rx_pkt { 113462306a36Sopenharmony_ci struct rss_header rsshdr; 113562306a36Sopenharmony_ci u8 opcode; 113662306a36Sopenharmony_ci#if defined(__LITTLE_ENDIAN_BITFIELD) 113762306a36Sopenharmony_ci u8 iff:4; 113862306a36Sopenharmony_ci u8 csum_calc:1; 113962306a36Sopenharmony_ci u8 ipmi_pkt:1; 114062306a36Sopenharmony_ci u8 vlan_ex:1; 114162306a36Sopenharmony_ci u8 ip_frag:1; 114262306a36Sopenharmony_ci#else 114362306a36Sopenharmony_ci u8 ip_frag:1; 114462306a36Sopenharmony_ci u8 vlan_ex:1; 114562306a36Sopenharmony_ci u8 ipmi_pkt:1; 114662306a36Sopenharmony_ci u8 csum_calc:1; 114762306a36Sopenharmony_ci u8 iff:4; 114862306a36Sopenharmony_ci#endif 114962306a36Sopenharmony_ci __be16 csum; 115062306a36Sopenharmony_ci __be16 vlan; 115162306a36Sopenharmony_ci __be16 len; 115262306a36Sopenharmony_ci __be32 l2info; 115362306a36Sopenharmony_ci __be16 hdr_len; 115462306a36Sopenharmony_ci __be16 err_vec; 115562306a36Sopenharmony_ci}; 115662306a36Sopenharmony_ci 115762306a36Sopenharmony_ci#define RX_T6_ETHHDR_LEN_M 0xFF 115862306a36Sopenharmony_ci#define RX_T6_ETHHDR_LEN_G(x) (((x) >> RX_ETHHDR_LEN_S) & RX_T6_ETHHDR_LEN_M) 115962306a36Sopenharmony_ci 116062306a36Sopenharmony_ci#define RXF_PSH_S 20 116162306a36Sopenharmony_ci#define RXF_PSH_V(x) ((x) << RXF_PSH_S) 116262306a36Sopenharmony_ci#define RXF_PSH_F RXF_PSH_V(1U) 116362306a36Sopenharmony_ci 116462306a36Sopenharmony_ci#define RXF_SYN_S 21 116562306a36Sopenharmony_ci#define RXF_SYN_V(x) ((x) << RXF_SYN_S) 116662306a36Sopenharmony_ci#define RXF_SYN_F RXF_SYN_V(1U) 116762306a36Sopenharmony_ci 116862306a36Sopenharmony_ci#define RXF_UDP_S 22 116962306a36Sopenharmony_ci#define RXF_UDP_V(x) ((x) << RXF_UDP_S) 117062306a36Sopenharmony_ci#define RXF_UDP_F RXF_UDP_V(1U) 117162306a36Sopenharmony_ci 117262306a36Sopenharmony_ci#define RXF_TCP_S 23 117362306a36Sopenharmony_ci#define RXF_TCP_V(x) ((x) << RXF_TCP_S) 117462306a36Sopenharmony_ci#define RXF_TCP_F RXF_TCP_V(1U) 117562306a36Sopenharmony_ci 117662306a36Sopenharmony_ci#define RXF_IP_S 24 117762306a36Sopenharmony_ci#define RXF_IP_V(x) ((x) << RXF_IP_S) 117862306a36Sopenharmony_ci#define RXF_IP_F RXF_IP_V(1U) 117962306a36Sopenharmony_ci 118062306a36Sopenharmony_ci#define RXF_IP6_S 25 118162306a36Sopenharmony_ci#define RXF_IP6_V(x) ((x) << RXF_IP6_S) 118262306a36Sopenharmony_ci#define RXF_IP6_F RXF_IP6_V(1U) 118362306a36Sopenharmony_ci 118462306a36Sopenharmony_ci#define RXF_SYN_COOKIE_S 26 118562306a36Sopenharmony_ci#define RXF_SYN_COOKIE_V(x) ((x) << RXF_SYN_COOKIE_S) 118662306a36Sopenharmony_ci#define RXF_SYN_COOKIE_F RXF_SYN_COOKIE_V(1U) 118762306a36Sopenharmony_ci 118862306a36Sopenharmony_ci#define RXF_FCOE_S 26 118962306a36Sopenharmony_ci#define RXF_FCOE_V(x) ((x) << RXF_FCOE_S) 119062306a36Sopenharmony_ci#define RXF_FCOE_F RXF_FCOE_V(1U) 119162306a36Sopenharmony_ci 119262306a36Sopenharmony_ci#define RXF_LRO_S 27 119362306a36Sopenharmony_ci#define RXF_LRO_V(x) ((x) << RXF_LRO_S) 119462306a36Sopenharmony_ci#define RXF_LRO_F RXF_LRO_V(1U) 119562306a36Sopenharmony_ci 119662306a36Sopenharmony_ci/* rx_pkt.l2info fields */ 119762306a36Sopenharmony_ci#define RX_ETHHDR_LEN_S 0 119862306a36Sopenharmony_ci#define RX_ETHHDR_LEN_M 0x1F 119962306a36Sopenharmony_ci#define RX_ETHHDR_LEN_V(x) ((x) << RX_ETHHDR_LEN_S) 120062306a36Sopenharmony_ci#define RX_ETHHDR_LEN_G(x) (((x) >> RX_ETHHDR_LEN_S) & RX_ETHHDR_LEN_M) 120162306a36Sopenharmony_ci 120262306a36Sopenharmony_ci#define RX_T5_ETHHDR_LEN_S 0 120362306a36Sopenharmony_ci#define RX_T5_ETHHDR_LEN_M 0x3F 120462306a36Sopenharmony_ci#define RX_T5_ETHHDR_LEN_V(x) ((x) << RX_T5_ETHHDR_LEN_S) 120562306a36Sopenharmony_ci#define RX_T5_ETHHDR_LEN_G(x) (((x) >> RX_T5_ETHHDR_LEN_S) & RX_T5_ETHHDR_LEN_M) 120662306a36Sopenharmony_ci 120762306a36Sopenharmony_ci#define RX_MACIDX_S 8 120862306a36Sopenharmony_ci#define RX_MACIDX_M 0x1FF 120962306a36Sopenharmony_ci#define RX_MACIDX_V(x) ((x) << RX_MACIDX_S) 121062306a36Sopenharmony_ci#define RX_MACIDX_G(x) (((x) >> RX_MACIDX_S) & RX_MACIDX_M) 121162306a36Sopenharmony_ci 121262306a36Sopenharmony_ci#define RXF_SYN_S 21 121362306a36Sopenharmony_ci#define RXF_SYN_V(x) ((x) << RXF_SYN_S) 121462306a36Sopenharmony_ci#define RXF_SYN_F RXF_SYN_V(1U) 121562306a36Sopenharmony_ci 121662306a36Sopenharmony_ci#define RX_CHAN_S 28 121762306a36Sopenharmony_ci#define RX_CHAN_M 0xF 121862306a36Sopenharmony_ci#define RX_CHAN_V(x) ((x) << RX_CHAN_S) 121962306a36Sopenharmony_ci#define RX_CHAN_G(x) (((x) >> RX_CHAN_S) & RX_CHAN_M) 122062306a36Sopenharmony_ci 122162306a36Sopenharmony_ci/* rx_pkt.hdr_len fields */ 122262306a36Sopenharmony_ci#define RX_TCPHDR_LEN_S 0 122362306a36Sopenharmony_ci#define RX_TCPHDR_LEN_M 0x3F 122462306a36Sopenharmony_ci#define RX_TCPHDR_LEN_V(x) ((x) << RX_TCPHDR_LEN_S) 122562306a36Sopenharmony_ci#define RX_TCPHDR_LEN_G(x) (((x) >> RX_TCPHDR_LEN_S) & RX_TCPHDR_LEN_M) 122662306a36Sopenharmony_ci 122762306a36Sopenharmony_ci#define RX_IPHDR_LEN_S 6 122862306a36Sopenharmony_ci#define RX_IPHDR_LEN_M 0x3FF 122962306a36Sopenharmony_ci#define RX_IPHDR_LEN_V(x) ((x) << RX_IPHDR_LEN_S) 123062306a36Sopenharmony_ci#define RX_IPHDR_LEN_G(x) (((x) >> RX_IPHDR_LEN_S) & RX_IPHDR_LEN_M) 123162306a36Sopenharmony_ci 123262306a36Sopenharmony_ci/* rx_pkt.err_vec fields */ 123362306a36Sopenharmony_ci#define RXERR_CSUM_S 13 123462306a36Sopenharmony_ci#define RXERR_CSUM_V(x) ((x) << RXERR_CSUM_S) 123562306a36Sopenharmony_ci#define RXERR_CSUM_F RXERR_CSUM_V(1U) 123662306a36Sopenharmony_ci 123762306a36Sopenharmony_ci#define T6_COMPR_RXERR_LEN_S 1 123862306a36Sopenharmony_ci#define T6_COMPR_RXERR_LEN_V(x) ((x) << T6_COMPR_RXERR_LEN_S) 123962306a36Sopenharmony_ci#define T6_COMPR_RXERR_LEN_F T6_COMPR_RXERR_LEN_V(1U) 124062306a36Sopenharmony_ci 124162306a36Sopenharmony_ci#define T6_COMPR_RXERR_VEC_S 0 124262306a36Sopenharmony_ci#define T6_COMPR_RXERR_VEC_M 0x3F 124362306a36Sopenharmony_ci#define T6_COMPR_RXERR_VEC_V(x) ((x) << T6_COMPR_RXERR_LEN_S) 124462306a36Sopenharmony_ci#define T6_COMPR_RXERR_VEC_G(x) \ 124562306a36Sopenharmony_ci (((x) >> T6_COMPR_RXERR_VEC_S) & T6_COMPR_RXERR_VEC_M) 124662306a36Sopenharmony_ci 124762306a36Sopenharmony_ci/* Logical OR of RX_ERROR_CSUM, RX_ERROR_CSIP */ 124862306a36Sopenharmony_ci#define T6_COMPR_RXERR_SUM_S 4 124962306a36Sopenharmony_ci#define T6_COMPR_RXERR_SUM_V(x) ((x) << T6_COMPR_RXERR_SUM_S) 125062306a36Sopenharmony_ci#define T6_COMPR_RXERR_SUM_F T6_COMPR_RXERR_SUM_V(1U) 125162306a36Sopenharmony_ci 125262306a36Sopenharmony_ci#define T6_RX_TNLHDR_LEN_S 8 125362306a36Sopenharmony_ci#define T6_RX_TNLHDR_LEN_M 0xFF 125462306a36Sopenharmony_ci#define T6_RX_TNLHDR_LEN_V(x) ((x) << T6_RX_TNLHDR_LEN_S) 125562306a36Sopenharmony_ci#define T6_RX_TNLHDR_LEN_G(x) (((x) >> T6_RX_TNLHDR_LEN_S) & T6_RX_TNLHDR_LEN_M) 125662306a36Sopenharmony_ci 125762306a36Sopenharmony_cistruct cpl_trace_pkt { 125862306a36Sopenharmony_ci u8 opcode; 125962306a36Sopenharmony_ci u8 intf; 126062306a36Sopenharmony_ci#if defined(__LITTLE_ENDIAN_BITFIELD) 126162306a36Sopenharmony_ci u8 runt:4; 126262306a36Sopenharmony_ci u8 filter_hit:4; 126362306a36Sopenharmony_ci u8 :6; 126462306a36Sopenharmony_ci u8 err:1; 126562306a36Sopenharmony_ci u8 trunc:1; 126662306a36Sopenharmony_ci#else 126762306a36Sopenharmony_ci u8 filter_hit:4; 126862306a36Sopenharmony_ci u8 runt:4; 126962306a36Sopenharmony_ci u8 trunc:1; 127062306a36Sopenharmony_ci u8 err:1; 127162306a36Sopenharmony_ci u8 :6; 127262306a36Sopenharmony_ci#endif 127362306a36Sopenharmony_ci __be16 rsvd; 127462306a36Sopenharmony_ci __be16 len; 127562306a36Sopenharmony_ci __be64 tstamp; 127662306a36Sopenharmony_ci}; 127762306a36Sopenharmony_ci 127862306a36Sopenharmony_cistruct cpl_t5_trace_pkt { 127962306a36Sopenharmony_ci __u8 opcode; 128062306a36Sopenharmony_ci __u8 intf; 128162306a36Sopenharmony_ci#if defined(__LITTLE_ENDIAN_BITFIELD) 128262306a36Sopenharmony_ci __u8 runt:4; 128362306a36Sopenharmony_ci __u8 filter_hit:4; 128462306a36Sopenharmony_ci __u8:6; 128562306a36Sopenharmony_ci __u8 err:1; 128662306a36Sopenharmony_ci __u8 trunc:1; 128762306a36Sopenharmony_ci#else 128862306a36Sopenharmony_ci __u8 filter_hit:4; 128962306a36Sopenharmony_ci __u8 runt:4; 129062306a36Sopenharmony_ci __u8 trunc:1; 129162306a36Sopenharmony_ci __u8 err:1; 129262306a36Sopenharmony_ci __u8:6; 129362306a36Sopenharmony_ci#endif 129462306a36Sopenharmony_ci __be16 rsvd; 129562306a36Sopenharmony_ci __be16 len; 129662306a36Sopenharmony_ci __be64 tstamp; 129762306a36Sopenharmony_ci __be64 rsvd1; 129862306a36Sopenharmony_ci}; 129962306a36Sopenharmony_ci 130062306a36Sopenharmony_cistruct cpl_l2t_write_req { 130162306a36Sopenharmony_ci WR_HDR; 130262306a36Sopenharmony_ci union opcode_tid ot; 130362306a36Sopenharmony_ci __be16 params; 130462306a36Sopenharmony_ci __be16 l2t_idx; 130562306a36Sopenharmony_ci __be16 vlan; 130662306a36Sopenharmony_ci u8 dst_mac[6]; 130762306a36Sopenharmony_ci}; 130862306a36Sopenharmony_ci 130962306a36Sopenharmony_ci/* cpl_l2t_write_req.params fields */ 131062306a36Sopenharmony_ci#define L2T_W_INFO_S 2 131162306a36Sopenharmony_ci#define L2T_W_INFO_V(x) ((x) << L2T_W_INFO_S) 131262306a36Sopenharmony_ci 131362306a36Sopenharmony_ci#define L2T_W_PORT_S 8 131462306a36Sopenharmony_ci#define L2T_W_PORT_V(x) ((x) << L2T_W_PORT_S) 131562306a36Sopenharmony_ci 131662306a36Sopenharmony_ci#define L2T_W_NOREPLY_S 15 131762306a36Sopenharmony_ci#define L2T_W_NOREPLY_V(x) ((x) << L2T_W_NOREPLY_S) 131862306a36Sopenharmony_ci#define L2T_W_NOREPLY_F L2T_W_NOREPLY_V(1U) 131962306a36Sopenharmony_ci 132062306a36Sopenharmony_ci#define CPL_L2T_VLAN_NONE 0xfff 132162306a36Sopenharmony_ci 132262306a36Sopenharmony_cistruct cpl_l2t_write_rpl { 132362306a36Sopenharmony_ci union opcode_tid ot; 132462306a36Sopenharmony_ci u8 status; 132562306a36Sopenharmony_ci u8 rsvd[3]; 132662306a36Sopenharmony_ci}; 132762306a36Sopenharmony_ci 132862306a36Sopenharmony_cistruct cpl_smt_write_req { 132962306a36Sopenharmony_ci WR_HDR; 133062306a36Sopenharmony_ci union opcode_tid ot; 133162306a36Sopenharmony_ci __be32 params; 133262306a36Sopenharmony_ci __be16 pfvf1; 133362306a36Sopenharmony_ci u8 src_mac1[6]; 133462306a36Sopenharmony_ci __be16 pfvf0; 133562306a36Sopenharmony_ci u8 src_mac0[6]; 133662306a36Sopenharmony_ci}; 133762306a36Sopenharmony_ci 133862306a36Sopenharmony_cistruct cpl_t6_smt_write_req { 133962306a36Sopenharmony_ci WR_HDR; 134062306a36Sopenharmony_ci union opcode_tid ot; 134162306a36Sopenharmony_ci __be32 params; 134262306a36Sopenharmony_ci __be64 tag; 134362306a36Sopenharmony_ci __be16 pfvf0; 134462306a36Sopenharmony_ci u8 src_mac0[6]; 134562306a36Sopenharmony_ci __be32 local_ip; 134662306a36Sopenharmony_ci __be32 rsvd; 134762306a36Sopenharmony_ci}; 134862306a36Sopenharmony_ci 134962306a36Sopenharmony_cistruct cpl_smt_write_rpl { 135062306a36Sopenharmony_ci union opcode_tid ot; 135162306a36Sopenharmony_ci u8 status; 135262306a36Sopenharmony_ci u8 rsvd[3]; 135362306a36Sopenharmony_ci}; 135462306a36Sopenharmony_ci 135562306a36Sopenharmony_ci/* cpl_smt_{read,write}_req.params fields */ 135662306a36Sopenharmony_ci#define SMTW_OVLAN_IDX_S 16 135762306a36Sopenharmony_ci#define SMTW_OVLAN_IDX_V(x) ((x) << SMTW_OVLAN_IDX_S) 135862306a36Sopenharmony_ci 135962306a36Sopenharmony_ci#define SMTW_IDX_S 20 136062306a36Sopenharmony_ci#define SMTW_IDX_V(x) ((x) << SMTW_IDX_S) 136162306a36Sopenharmony_ci 136262306a36Sopenharmony_ci#define SMTW_NORPL_S 31 136362306a36Sopenharmony_ci#define SMTW_NORPL_V(x) ((x) << SMTW_NORPL_S) 136462306a36Sopenharmony_ci#define SMTW_NORPL_F SMTW_NORPL_V(1U) 136562306a36Sopenharmony_ci 136662306a36Sopenharmony_cistruct cpl_rdma_terminate { 136762306a36Sopenharmony_ci union opcode_tid ot; 136862306a36Sopenharmony_ci __be16 rsvd; 136962306a36Sopenharmony_ci __be16 len; 137062306a36Sopenharmony_ci}; 137162306a36Sopenharmony_ci 137262306a36Sopenharmony_cistruct cpl_sge_egr_update { 137362306a36Sopenharmony_ci __be32 opcode_qid; 137462306a36Sopenharmony_ci __be16 cidx; 137562306a36Sopenharmony_ci __be16 pidx; 137662306a36Sopenharmony_ci}; 137762306a36Sopenharmony_ci 137862306a36Sopenharmony_ci/* cpl_sge_egr_update.ot fields */ 137962306a36Sopenharmony_ci#define EGR_QID_S 0 138062306a36Sopenharmony_ci#define EGR_QID_M 0x1FFFF 138162306a36Sopenharmony_ci#define EGR_QID_G(x) (((x) >> EGR_QID_S) & EGR_QID_M) 138262306a36Sopenharmony_ci 138362306a36Sopenharmony_ci/* cpl_fw*.type values */ 138462306a36Sopenharmony_cienum { 138562306a36Sopenharmony_ci FW_TYPE_CMD_RPL = 0, 138662306a36Sopenharmony_ci FW_TYPE_WR_RPL = 1, 138762306a36Sopenharmony_ci FW_TYPE_CQE = 2, 138862306a36Sopenharmony_ci FW_TYPE_OFLD_CONNECTION_WR_RPL = 3, 138962306a36Sopenharmony_ci FW_TYPE_RSSCPL = 4, 139062306a36Sopenharmony_ci}; 139162306a36Sopenharmony_ci 139262306a36Sopenharmony_cistruct cpl_fw4_pld { 139362306a36Sopenharmony_ci u8 opcode; 139462306a36Sopenharmony_ci u8 rsvd0[3]; 139562306a36Sopenharmony_ci u8 type; 139662306a36Sopenharmony_ci u8 rsvd1; 139762306a36Sopenharmony_ci __be16 len; 139862306a36Sopenharmony_ci __be64 data; 139962306a36Sopenharmony_ci __be64 rsvd2; 140062306a36Sopenharmony_ci}; 140162306a36Sopenharmony_ci 140262306a36Sopenharmony_cistruct cpl_fw6_pld { 140362306a36Sopenharmony_ci u8 opcode; 140462306a36Sopenharmony_ci u8 rsvd[5]; 140562306a36Sopenharmony_ci __be16 len; 140662306a36Sopenharmony_ci __be64 data[4]; 140762306a36Sopenharmony_ci}; 140862306a36Sopenharmony_ci 140962306a36Sopenharmony_cistruct cpl_fw4_msg { 141062306a36Sopenharmony_ci u8 opcode; 141162306a36Sopenharmony_ci u8 type; 141262306a36Sopenharmony_ci __be16 rsvd0; 141362306a36Sopenharmony_ci __be32 rsvd1; 141462306a36Sopenharmony_ci __be64 data[2]; 141562306a36Sopenharmony_ci}; 141662306a36Sopenharmony_ci 141762306a36Sopenharmony_cistruct cpl_fw4_ack { 141862306a36Sopenharmony_ci union opcode_tid ot; 141962306a36Sopenharmony_ci u8 credits; 142062306a36Sopenharmony_ci u8 rsvd0[2]; 142162306a36Sopenharmony_ci u8 seq_vld; 142262306a36Sopenharmony_ci __be32 snd_nxt; 142362306a36Sopenharmony_ci __be32 snd_una; 142462306a36Sopenharmony_ci __be64 rsvd1; 142562306a36Sopenharmony_ci}; 142662306a36Sopenharmony_ci 142762306a36Sopenharmony_cienum { 142862306a36Sopenharmony_ci CPL_FW4_ACK_FLAGS_SEQVAL = 0x1, /* seqn valid */ 142962306a36Sopenharmony_ci CPL_FW4_ACK_FLAGS_CH = 0x2, /* channel change complete */ 143062306a36Sopenharmony_ci CPL_FW4_ACK_FLAGS_FLOWC = 0x4, /* fw_flowc_wr complete */ 143162306a36Sopenharmony_ci}; 143262306a36Sopenharmony_ci 143362306a36Sopenharmony_ci#define CPL_FW4_ACK_FLOWID_S 0 143462306a36Sopenharmony_ci#define CPL_FW4_ACK_FLOWID_M 0xffffff 143562306a36Sopenharmony_ci#define CPL_FW4_ACK_FLOWID_G(x) \ 143662306a36Sopenharmony_ci (((x) >> CPL_FW4_ACK_FLOWID_S) & CPL_FW4_ACK_FLOWID_M) 143762306a36Sopenharmony_ci 143862306a36Sopenharmony_cistruct cpl_fw6_msg { 143962306a36Sopenharmony_ci u8 opcode; 144062306a36Sopenharmony_ci u8 type; 144162306a36Sopenharmony_ci __be16 rsvd0; 144262306a36Sopenharmony_ci __be32 rsvd1; 144362306a36Sopenharmony_ci __be64 data[4]; 144462306a36Sopenharmony_ci}; 144562306a36Sopenharmony_ci 144662306a36Sopenharmony_ci/* cpl_fw6_msg.type values */ 144762306a36Sopenharmony_cienum { 144862306a36Sopenharmony_ci FW6_TYPE_CMD_RPL = 0, 144962306a36Sopenharmony_ci FW6_TYPE_WR_RPL = 1, 145062306a36Sopenharmony_ci FW6_TYPE_CQE = 2, 145162306a36Sopenharmony_ci FW6_TYPE_OFLD_CONNECTION_WR_RPL = 3, 145262306a36Sopenharmony_ci FW6_TYPE_RSSCPL = FW_TYPE_RSSCPL, 145362306a36Sopenharmony_ci}; 145462306a36Sopenharmony_ci 145562306a36Sopenharmony_cistruct cpl_fw6_msg_ofld_connection_wr_rpl { 145662306a36Sopenharmony_ci __u64 cookie; 145762306a36Sopenharmony_ci __be32 tid; /* or atid in case of active failure */ 145862306a36Sopenharmony_ci __u8 t_state; 145962306a36Sopenharmony_ci __u8 retval; 146062306a36Sopenharmony_ci __u8 rsvd[2]; 146162306a36Sopenharmony_ci}; 146262306a36Sopenharmony_ci 146362306a36Sopenharmony_cistruct cpl_tx_data { 146462306a36Sopenharmony_ci union opcode_tid ot; 146562306a36Sopenharmony_ci __be32 len; 146662306a36Sopenharmony_ci __be32 rsvd; 146762306a36Sopenharmony_ci __be32 flags; 146862306a36Sopenharmony_ci}; 146962306a36Sopenharmony_ci 147062306a36Sopenharmony_ci/* cpl_tx_data.flags field */ 147162306a36Sopenharmony_ci#define TX_FORCE_S 13 147262306a36Sopenharmony_ci#define TX_FORCE_V(x) ((x) << TX_FORCE_S) 147362306a36Sopenharmony_ci 147462306a36Sopenharmony_ci#define TX_DATA_MSS_S 16 147562306a36Sopenharmony_ci#define TX_DATA_MSS_M 0xFFFF 147662306a36Sopenharmony_ci#define TX_DATA_MSS_V(x) ((x) << TX_DATA_MSS_S) 147762306a36Sopenharmony_ci#define TX_DATA_MSS_G(x) (((x) >> TX_DATA_MSS_S) & TX_DATA_MSS_M) 147862306a36Sopenharmony_ci 147962306a36Sopenharmony_ci#define TX_LENGTH_S 0 148062306a36Sopenharmony_ci#define TX_LENGTH_M 0xFFFF 148162306a36Sopenharmony_ci#define TX_LENGTH_V(x) ((x) << TX_LENGTH_S) 148262306a36Sopenharmony_ci#define TX_LENGTH_G(x) (((x) >> TX_LENGTH_S) & TX_LENGTH_M) 148362306a36Sopenharmony_ci 148462306a36Sopenharmony_ci#define T6_TX_FORCE_S 20 148562306a36Sopenharmony_ci#define T6_TX_FORCE_V(x) ((x) << T6_TX_FORCE_S) 148662306a36Sopenharmony_ci#define T6_TX_FORCE_F T6_TX_FORCE_V(1U) 148762306a36Sopenharmony_ci 148862306a36Sopenharmony_ci#define TX_URG_S 16 148962306a36Sopenharmony_ci#define TX_URG_V(x) ((x) << TX_URG_S) 149062306a36Sopenharmony_ci 149162306a36Sopenharmony_ci#define TX_SHOVE_S 14 149262306a36Sopenharmony_ci#define TX_SHOVE_V(x) ((x) << TX_SHOVE_S) 149362306a36Sopenharmony_ci#define TX_SHOVE_F TX_SHOVE_V(1U) 149462306a36Sopenharmony_ci 149562306a36Sopenharmony_ci#define TX_BYPASS_S 21 149662306a36Sopenharmony_ci#define TX_BYPASS_V(x) ((x) << TX_BYPASS_S) 149762306a36Sopenharmony_ci#define TX_BYPASS_F TX_BYPASS_V(1U) 149862306a36Sopenharmony_ci 149962306a36Sopenharmony_ci#define TX_PUSH_S 22 150062306a36Sopenharmony_ci#define TX_PUSH_V(x) ((x) << TX_PUSH_S) 150162306a36Sopenharmony_ci#define TX_PUSH_F TX_PUSH_V(1U) 150262306a36Sopenharmony_ci 150362306a36Sopenharmony_ci#define TX_ULP_MODE_S 10 150462306a36Sopenharmony_ci#define TX_ULP_MODE_M 0x7 150562306a36Sopenharmony_ci#define TX_ULP_MODE_V(x) ((x) << TX_ULP_MODE_S) 150662306a36Sopenharmony_ci#define TX_ULP_MODE_G(x) (((x) >> TX_ULP_MODE_S) & TX_ULP_MODE_M) 150762306a36Sopenharmony_ci 150862306a36Sopenharmony_cienum { 150962306a36Sopenharmony_ci ULP_TX_MEM_READ = 2, 151062306a36Sopenharmony_ci ULP_TX_MEM_WRITE = 3, 151162306a36Sopenharmony_ci ULP_TX_PKT = 4 151262306a36Sopenharmony_ci}; 151362306a36Sopenharmony_ci 151462306a36Sopenharmony_cienum { 151562306a36Sopenharmony_ci ULP_TX_SC_NOOP = 0x80, 151662306a36Sopenharmony_ci ULP_TX_SC_IMM = 0x81, 151762306a36Sopenharmony_ci ULP_TX_SC_DSGL = 0x82, 151862306a36Sopenharmony_ci ULP_TX_SC_ISGL = 0x83, 151962306a36Sopenharmony_ci ULP_TX_SC_MEMRD = 0x86 152062306a36Sopenharmony_ci}; 152162306a36Sopenharmony_ci 152262306a36Sopenharmony_ci#define ULPTX_CMD_S 24 152362306a36Sopenharmony_ci#define ULPTX_CMD_V(x) ((x) << ULPTX_CMD_S) 152462306a36Sopenharmony_ci 152562306a36Sopenharmony_ci#define ULPTX_LEN16_S 0 152662306a36Sopenharmony_ci#define ULPTX_LEN16_M 0xFF 152762306a36Sopenharmony_ci#define ULPTX_LEN16_V(x) ((x) << ULPTX_LEN16_S) 152862306a36Sopenharmony_ci 152962306a36Sopenharmony_ci#define ULP_TX_SC_MORE_S 23 153062306a36Sopenharmony_ci#define ULP_TX_SC_MORE_V(x) ((x) << ULP_TX_SC_MORE_S) 153162306a36Sopenharmony_ci#define ULP_TX_SC_MORE_F ULP_TX_SC_MORE_V(1U) 153262306a36Sopenharmony_ci 153362306a36Sopenharmony_cistruct ulptx_sge_pair { 153462306a36Sopenharmony_ci __be32 len[2]; 153562306a36Sopenharmony_ci __be64 addr[2]; 153662306a36Sopenharmony_ci}; 153762306a36Sopenharmony_ci 153862306a36Sopenharmony_cistruct ulptx_sgl { 153962306a36Sopenharmony_ci __be32 cmd_nsge; 154062306a36Sopenharmony_ci __be32 len0; 154162306a36Sopenharmony_ci __be64 addr0; 154262306a36Sopenharmony_ci struct ulptx_sge_pair sge[]; 154362306a36Sopenharmony_ci}; 154462306a36Sopenharmony_ci 154562306a36Sopenharmony_cistruct ulptx_idata { 154662306a36Sopenharmony_ci __be32 cmd_more; 154762306a36Sopenharmony_ci __be32 len; 154862306a36Sopenharmony_ci}; 154962306a36Sopenharmony_ci 155062306a36Sopenharmony_cistruct ulp_txpkt { 155162306a36Sopenharmony_ci __be32 cmd_dest; 155262306a36Sopenharmony_ci __be32 len; 155362306a36Sopenharmony_ci}; 155462306a36Sopenharmony_ci 155562306a36Sopenharmony_ci#define ULPTX_CMD_S 24 155662306a36Sopenharmony_ci#define ULPTX_CMD_M 0xFF 155762306a36Sopenharmony_ci#define ULPTX_CMD_V(x) ((x) << ULPTX_CMD_S) 155862306a36Sopenharmony_ci 155962306a36Sopenharmony_ci#define ULPTX_NSGE_S 0 156062306a36Sopenharmony_ci#define ULPTX_NSGE_V(x) ((x) << ULPTX_NSGE_S) 156162306a36Sopenharmony_ci 156262306a36Sopenharmony_ci#define ULPTX_MORE_S 23 156362306a36Sopenharmony_ci#define ULPTX_MORE_V(x) ((x) << ULPTX_MORE_S) 156462306a36Sopenharmony_ci#define ULPTX_MORE_F ULPTX_MORE_V(1U) 156562306a36Sopenharmony_ci 156662306a36Sopenharmony_ci#define ULP_TXPKT_DEST_S 16 156762306a36Sopenharmony_ci#define ULP_TXPKT_DEST_M 0x3 156862306a36Sopenharmony_ci#define ULP_TXPKT_DEST_V(x) ((x) << ULP_TXPKT_DEST_S) 156962306a36Sopenharmony_ci 157062306a36Sopenharmony_ci#define ULP_TXPKT_FID_S 4 157162306a36Sopenharmony_ci#define ULP_TXPKT_FID_M 0x7ff 157262306a36Sopenharmony_ci#define ULP_TXPKT_FID_V(x) ((x) << ULP_TXPKT_FID_S) 157362306a36Sopenharmony_ci 157462306a36Sopenharmony_ci#define ULP_TXPKT_RO_S 3 157562306a36Sopenharmony_ci#define ULP_TXPKT_RO_V(x) ((x) << ULP_TXPKT_RO_S) 157662306a36Sopenharmony_ci#define ULP_TXPKT_RO_F ULP_TXPKT_RO_V(1U) 157762306a36Sopenharmony_ci 157862306a36Sopenharmony_cienum cpl_tx_tnl_lso_type { 157962306a36Sopenharmony_ci TX_TNL_TYPE_OPAQUE, 158062306a36Sopenharmony_ci TX_TNL_TYPE_NVGRE, 158162306a36Sopenharmony_ci TX_TNL_TYPE_VXLAN, 158262306a36Sopenharmony_ci TX_TNL_TYPE_GENEVE, 158362306a36Sopenharmony_ci}; 158462306a36Sopenharmony_ci 158562306a36Sopenharmony_cistruct cpl_tx_tnl_lso { 158662306a36Sopenharmony_ci __be32 op_to_IpIdSplitOut; 158762306a36Sopenharmony_ci __be16 IpIdOffsetOut; 158862306a36Sopenharmony_ci __be16 UdpLenSetOut_to_TnlHdrLen; 158962306a36Sopenharmony_ci __be64 r1; 159062306a36Sopenharmony_ci __be32 Flow_to_TcpHdrLen; 159162306a36Sopenharmony_ci __be16 IpIdOffset; 159262306a36Sopenharmony_ci __be16 IpIdSplit_to_Mss; 159362306a36Sopenharmony_ci __be32 TCPSeqOffset; 159462306a36Sopenharmony_ci __be32 EthLenOffset_Size; 159562306a36Sopenharmony_ci /* encapsulated CPL (TX_PKT_XT) follows here */ 159662306a36Sopenharmony_ci}; 159762306a36Sopenharmony_ci 159862306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_OPCODE_S 24 159962306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_OPCODE_M 0xff 160062306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_OPCODE_V(x) ((x) << CPL_TX_TNL_LSO_OPCODE_S) 160162306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_OPCODE_G(x) \ 160262306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_OPCODE_S) & CPL_TX_TNL_LSO_OPCODE_M) 160362306a36Sopenharmony_ci 160462306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_FIRST_S 23 160562306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_FIRST_M 0x1 160662306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_FIRST_V(x) ((x) << CPL_TX_TNL_LSO_FIRST_S) 160762306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_FIRST_G(x) \ 160862306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_FIRST_S) & CPL_TX_TNL_LSO_FIRST_M) 160962306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_FIRST_F CPL_TX_TNL_LSO_FIRST_V(1U) 161062306a36Sopenharmony_ci 161162306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_LAST_S 22 161262306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_LAST_M 0x1 161362306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_LAST_V(x) ((x) << CPL_TX_TNL_LSO_LAST_S) 161462306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_LAST_G(x) \ 161562306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_LAST_S) & CPL_TX_TNL_LSO_LAST_M) 161662306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_LAST_F CPL_TX_TNL_LSO_LAST_V(1U) 161762306a36Sopenharmony_ci 161862306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_ETHHDRLENXOUT_S 21 161962306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_ETHHDRLENXOUT_M 0x1 162062306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_ETHHDRLENXOUT_V(x) \ 162162306a36Sopenharmony_ci ((x) << CPL_TX_TNL_LSO_ETHHDRLENXOUT_S) 162262306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_ETHHDRLENXOUT_G(x) \ 162362306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_ETHHDRLENXOUT_S) & \ 162462306a36Sopenharmony_ci CPL_TX_TNL_LSO_ETHHDRLENXOUT_M) 162562306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_ETHHDRLENXOUT_F CPL_TX_TNL_LSO_ETHHDRLENXOUT_V(1U) 162662306a36Sopenharmony_ci 162762306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPV6OUT_S 20 162862306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPV6OUT_M 0x1 162962306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPV6OUT_V(x) ((x) << CPL_TX_TNL_LSO_IPV6OUT_S) 163062306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPV6OUT_G(x) \ 163162306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_IPV6OUT_S) & CPL_TX_TNL_LSO_IPV6OUT_M) 163262306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPV6OUT_F CPL_TX_TNL_LSO_IPV6OUT_V(1U) 163362306a36Sopenharmony_ci 163462306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_ETHHDRLEN_S 16 163562306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_ETHHDRLEN_M 0xf 163662306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_ETHHDRLEN_V(x) ((x) << CPL_TX_TNL_LSO_ETHHDRLEN_S) 163762306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_ETHHDRLEN_G(x) \ 163862306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_ETHHDRLEN_S) & CPL_TX_TNL_LSO_ETHHDRLEN_M) 163962306a36Sopenharmony_ci 164062306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPHDRLEN_S 4 164162306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPHDRLEN_M 0xfff 164262306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPHDRLEN_V(x) ((x) << CPL_TX_TNL_LSO_IPHDRLEN_S) 164362306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPHDRLEN_G(x) \ 164462306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_IPHDRLEN_S) & CPL_TX_TNL_LSO_IPHDRLEN_M) 164562306a36Sopenharmony_ci 164662306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_TCPHDRLEN_S 0 164762306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_TCPHDRLEN_M 0xf 164862306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_TCPHDRLEN_V(x) ((x) << CPL_TX_TNL_LSO_TCPHDRLEN_S) 164962306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_TCPHDRLEN_G(x) \ 165062306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_TCPHDRLEN_S) & CPL_TX_TNL_LSO_TCPHDRLEN_M) 165162306a36Sopenharmony_ci 165262306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_MSS_S 0 165362306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_MSS_M 0x3fff 165462306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_MSS_V(x) ((x) << CPL_TX_TNL_LSO_MSS_S) 165562306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_MSS_G(x) \ 165662306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_MSS_S) & CPL_TX_TNL_LSO_MSS_M) 165762306a36Sopenharmony_ci 165862306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_SIZE_S 0 165962306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_SIZE_M 0xfffffff 166062306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_SIZE_V(x) ((x) << CPL_TX_TNL_LSO_SIZE_S) 166162306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_SIZE_G(x) \ 166262306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_SIZE_S) & CPL_TX_TNL_LSO_SIZE_M) 166362306a36Sopenharmony_ci 166462306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_ETHHDRLENOUT_S 16 166562306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_ETHHDRLENOUT_M 0xf 166662306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_ETHHDRLENOUT_V(x) \ 166762306a36Sopenharmony_ci ((x) << CPL_TX_TNL_LSO_ETHHDRLENOUT_S) 166862306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_ETHHDRLENOUT_G(x) \ 166962306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_ETHHDRLENOUT_S) & CPL_TX_TNL_LSO_ETHHDRLENOUT_M) 167062306a36Sopenharmony_ci 167162306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPHDRLENOUT_S 4 167262306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPHDRLENOUT_M 0xfff 167362306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPHDRLENOUT_V(x) ((x) << CPL_TX_TNL_LSO_IPHDRLENOUT_S) 167462306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPHDRLENOUT_G(x) \ 167562306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_IPHDRLENOUT_S) & CPL_TX_TNL_LSO_IPHDRLENOUT_M) 167662306a36Sopenharmony_ci 167762306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPHDRCHKOUT_S 3 167862306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPHDRCHKOUT_M 0x1 167962306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPHDRCHKOUT_V(x) ((x) << CPL_TX_TNL_LSO_IPHDRCHKOUT_S) 168062306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPHDRCHKOUT_G(x) \ 168162306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_IPHDRCHKOUT_S) & CPL_TX_TNL_LSO_IPHDRCHKOUT_M) 168262306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPHDRCHKOUT_F CPL_TX_TNL_LSO_IPHDRCHKOUT_V(1U) 168362306a36Sopenharmony_ci 168462306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPLENSETOUT_S 2 168562306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPLENSETOUT_M 0x1 168662306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPLENSETOUT_V(x) ((x) << CPL_TX_TNL_LSO_IPLENSETOUT_S) 168762306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPLENSETOUT_G(x) \ 168862306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_IPLENSETOUT_S) & CPL_TX_TNL_LSO_IPLENSETOUT_M) 168962306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPLENSETOUT_F CPL_TX_TNL_LSO_IPLENSETOUT_V(1U) 169062306a36Sopenharmony_ci 169162306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPIDINCOUT_S 1 169262306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPIDINCOUT_M 0x1 169362306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPIDINCOUT_V(x) ((x) << CPL_TX_TNL_LSO_IPIDINCOUT_S) 169462306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPIDINCOUT_G(x) \ 169562306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_IPIDINCOUT_S) & CPL_TX_TNL_LSO_IPIDINCOUT_M) 169662306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPIDINCOUT_F CPL_TX_TNL_LSO_IPIDINCOUT_V(1U) 169762306a36Sopenharmony_ci 169862306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_UDPCHKCLROUT_S 14 169962306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_UDPCHKCLROUT_M 0x1 170062306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_UDPCHKCLROUT_V(x) \ 170162306a36Sopenharmony_ci ((x) << CPL_TX_TNL_LSO_UDPCHKCLROUT_S) 170262306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_UDPCHKCLROUT_G(x) \ 170362306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_UDPCHKCLROUT_S) & \ 170462306a36Sopenharmony_ci CPL_TX_TNL_LSO_UDPCHKCLROUT_M) 170562306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_UDPCHKCLROUT_F CPL_TX_TNL_LSO_UDPCHKCLROUT_V(1U) 170662306a36Sopenharmony_ci 170762306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_UDPLENSETOUT_S 15 170862306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_UDPLENSETOUT_M 0x1 170962306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_UDPLENSETOUT_V(x) \ 171062306a36Sopenharmony_ci ((x) << CPL_TX_TNL_LSO_UDPLENSETOUT_S) 171162306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_UDPLENSETOUT_G(x) \ 171262306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_UDPLENSETOUT_S) & \ 171362306a36Sopenharmony_ci CPL_TX_TNL_LSO_UDPLENSETOUT_M) 171462306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_UDPLENSETOUT_F CPL_TX_TNL_LSO_UDPLENSETOUT_V(1U) 171562306a36Sopenharmony_ci 171662306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_TNLTYPE_S 12 171762306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_TNLTYPE_M 0x3 171862306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_TNLTYPE_V(x) ((x) << CPL_TX_TNL_LSO_TNLTYPE_S) 171962306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_TNLTYPE_G(x) \ 172062306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_TNLTYPE_S) & CPL_TX_TNL_LSO_TNLTYPE_M) 172162306a36Sopenharmony_ci 172262306a36Sopenharmony_ci#define S_CPL_TX_TNL_LSO_ETHHDRLEN 16 172362306a36Sopenharmony_ci#define M_CPL_TX_TNL_LSO_ETHHDRLEN 0xf 172462306a36Sopenharmony_ci#define V_CPL_TX_TNL_LSO_ETHHDRLEN(x) ((x) << S_CPL_TX_TNL_LSO_ETHHDRLEN) 172562306a36Sopenharmony_ci#define G_CPL_TX_TNL_LSO_ETHHDRLEN(x) \ 172662306a36Sopenharmony_ci (((x) >> S_CPL_TX_TNL_LSO_ETHHDRLEN) & M_CPL_TX_TNL_LSO_ETHHDRLEN) 172762306a36Sopenharmony_ci 172862306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_TNLHDRLEN_S 0 172962306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_TNLHDRLEN_M 0xfff 173062306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_TNLHDRLEN_V(x) ((x) << CPL_TX_TNL_LSO_TNLHDRLEN_S) 173162306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_TNLHDRLEN_G(x) \ 173262306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_TNLHDRLEN_S) & CPL_TX_TNL_LSO_TNLHDRLEN_M) 173362306a36Sopenharmony_ci 173462306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPV6_S 20 173562306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPV6_M 0x1 173662306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPV6_V(x) ((x) << CPL_TX_TNL_LSO_IPV6_S) 173762306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPV6_G(x) \ 173862306a36Sopenharmony_ci (((x) >> CPL_TX_TNL_LSO_IPV6_S) & CPL_TX_TNL_LSO_IPV6_M) 173962306a36Sopenharmony_ci#define CPL_TX_TNL_LSO_IPV6_F CPL_TX_TNL_LSO_IPV6_V(1U) 174062306a36Sopenharmony_ci 174162306a36Sopenharmony_ci#define ULP_TX_SC_MORE_S 23 174262306a36Sopenharmony_ci#define ULP_TX_SC_MORE_V(x) ((x) << ULP_TX_SC_MORE_S) 174362306a36Sopenharmony_ci#define ULP_TX_SC_MORE_F ULP_TX_SC_MORE_V(1U) 174462306a36Sopenharmony_ci 174562306a36Sopenharmony_cistruct ulp_mem_io { 174662306a36Sopenharmony_ci WR_HDR; 174762306a36Sopenharmony_ci __be32 cmd; 174862306a36Sopenharmony_ci __be32 len16; /* command length */ 174962306a36Sopenharmony_ci __be32 dlen; /* data length in 32-byte units */ 175062306a36Sopenharmony_ci __be32 lock_addr; 175162306a36Sopenharmony_ci}; 175262306a36Sopenharmony_ci 175362306a36Sopenharmony_ci#define ULP_MEMIO_LOCK_S 31 175462306a36Sopenharmony_ci#define ULP_MEMIO_LOCK_V(x) ((x) << ULP_MEMIO_LOCK_S) 175562306a36Sopenharmony_ci#define ULP_MEMIO_LOCK_F ULP_MEMIO_LOCK_V(1U) 175662306a36Sopenharmony_ci 175762306a36Sopenharmony_ci/* additional ulp_mem_io.cmd fields */ 175862306a36Sopenharmony_ci#define ULP_MEMIO_ORDER_S 23 175962306a36Sopenharmony_ci#define ULP_MEMIO_ORDER_V(x) ((x) << ULP_MEMIO_ORDER_S) 176062306a36Sopenharmony_ci#define ULP_MEMIO_ORDER_F ULP_MEMIO_ORDER_V(1U) 176162306a36Sopenharmony_ci 176262306a36Sopenharmony_ci#define T5_ULP_MEMIO_IMM_S 23 176362306a36Sopenharmony_ci#define T5_ULP_MEMIO_IMM_V(x) ((x) << T5_ULP_MEMIO_IMM_S) 176462306a36Sopenharmony_ci#define T5_ULP_MEMIO_IMM_F T5_ULP_MEMIO_IMM_V(1U) 176562306a36Sopenharmony_ci 176662306a36Sopenharmony_ci#define T5_ULP_MEMIO_ORDER_S 22 176762306a36Sopenharmony_ci#define T5_ULP_MEMIO_ORDER_V(x) ((x) << T5_ULP_MEMIO_ORDER_S) 176862306a36Sopenharmony_ci#define T5_ULP_MEMIO_ORDER_F T5_ULP_MEMIO_ORDER_V(1U) 176962306a36Sopenharmony_ci 177062306a36Sopenharmony_ci#define T5_ULP_MEMIO_FID_S 4 177162306a36Sopenharmony_ci#define T5_ULP_MEMIO_FID_M 0x7ff 177262306a36Sopenharmony_ci#define T5_ULP_MEMIO_FID_V(x) ((x) << T5_ULP_MEMIO_FID_S) 177362306a36Sopenharmony_ci 177462306a36Sopenharmony_ci/* ulp_mem_io.lock_addr fields */ 177562306a36Sopenharmony_ci#define ULP_MEMIO_ADDR_S 0 177662306a36Sopenharmony_ci#define ULP_MEMIO_ADDR_V(x) ((x) << ULP_MEMIO_ADDR_S) 177762306a36Sopenharmony_ci 177862306a36Sopenharmony_ci/* ulp_mem_io.dlen fields */ 177962306a36Sopenharmony_ci#define ULP_MEMIO_DATA_LEN_S 0 178062306a36Sopenharmony_ci#define ULP_MEMIO_DATA_LEN_V(x) ((x) << ULP_MEMIO_DATA_LEN_S) 178162306a36Sopenharmony_ci 178262306a36Sopenharmony_ci#define ULPTX_NSGE_S 0 178362306a36Sopenharmony_ci#define ULPTX_NSGE_M 0xFFFF 178462306a36Sopenharmony_ci#define ULPTX_NSGE_V(x) ((x) << ULPTX_NSGE_S) 178562306a36Sopenharmony_ci#define ULPTX_NSGE_G(x) (((x) >> ULPTX_NSGE_S) & ULPTX_NSGE_M) 178662306a36Sopenharmony_ci 178762306a36Sopenharmony_cistruct ulptx_sc_memrd { 178862306a36Sopenharmony_ci __be32 cmd_to_len; 178962306a36Sopenharmony_ci __be32 addr; 179062306a36Sopenharmony_ci}; 179162306a36Sopenharmony_ci 179262306a36Sopenharmony_ci#define ULP_TXPKT_DATAMODIFY_S 23 179362306a36Sopenharmony_ci#define ULP_TXPKT_DATAMODIFY_M 0x1 179462306a36Sopenharmony_ci#define ULP_TXPKT_DATAMODIFY_V(x) ((x) << ULP_TXPKT_DATAMODIFY_S) 179562306a36Sopenharmony_ci#define ULP_TXPKT_DATAMODIFY_G(x) \ 179662306a36Sopenharmony_ci (((x) >> ULP_TXPKT_DATAMODIFY_S) & ULP_TXPKT_DATAMODIFY__M) 179762306a36Sopenharmony_ci#define ULP_TXPKT_DATAMODIFY_F ULP_TXPKT_DATAMODIFY_V(1U) 179862306a36Sopenharmony_ci 179962306a36Sopenharmony_ci#define ULP_TXPKT_CHANNELID_S 22 180062306a36Sopenharmony_ci#define ULP_TXPKT_CHANNELID_M 0x1 180162306a36Sopenharmony_ci#define ULP_TXPKT_CHANNELID_V(x) ((x) << ULP_TXPKT_CHANNELID_S) 180262306a36Sopenharmony_ci#define ULP_TXPKT_CHANNELID_G(x) \ 180362306a36Sopenharmony_ci (((x) >> ULP_TXPKT_CHANNELID_S) & ULP_TXPKT_CHANNELID_M) 180462306a36Sopenharmony_ci#define ULP_TXPKT_CHANNELID_F ULP_TXPKT_CHANNELID_V(1U) 180562306a36Sopenharmony_ci 180662306a36Sopenharmony_ci#define SCMD_SEQ_NO_CTRL_S 29 180762306a36Sopenharmony_ci#define SCMD_SEQ_NO_CTRL_M 0x3 180862306a36Sopenharmony_ci#define SCMD_SEQ_NO_CTRL_V(x) ((x) << SCMD_SEQ_NO_CTRL_S) 180962306a36Sopenharmony_ci#define SCMD_SEQ_NO_CTRL_G(x) \ 181062306a36Sopenharmony_ci (((x) >> SCMD_SEQ_NO_CTRL_S) & SCMD_SEQ_NO_CTRL_M) 181162306a36Sopenharmony_ci 181262306a36Sopenharmony_ci/* StsFieldPrsnt- Status field at the end of the TLS PDU */ 181362306a36Sopenharmony_ci#define SCMD_STATUS_PRESENT_S 28 181462306a36Sopenharmony_ci#define SCMD_STATUS_PRESENT_M 0x1 181562306a36Sopenharmony_ci#define SCMD_STATUS_PRESENT_V(x) ((x) << SCMD_STATUS_PRESENT_S) 181662306a36Sopenharmony_ci#define SCMD_STATUS_PRESENT_G(x) \ 181762306a36Sopenharmony_ci (((x) >> SCMD_STATUS_PRESENT_S) & SCMD_STATUS_PRESENT_M) 181862306a36Sopenharmony_ci#define SCMD_STATUS_PRESENT_F SCMD_STATUS_PRESENT_V(1U) 181962306a36Sopenharmony_ci 182062306a36Sopenharmony_ci/* ProtoVersion - Protocol Version 0: 1.2, 1:1.1, 2:DTLS, 3:Generic, 182162306a36Sopenharmony_ci * 3-15: Reserved. 182262306a36Sopenharmony_ci */ 182362306a36Sopenharmony_ci#define SCMD_PROTO_VERSION_S 24 182462306a36Sopenharmony_ci#define SCMD_PROTO_VERSION_M 0xf 182562306a36Sopenharmony_ci#define SCMD_PROTO_VERSION_V(x) ((x) << SCMD_PROTO_VERSION_S) 182662306a36Sopenharmony_ci#define SCMD_PROTO_VERSION_G(x) \ 182762306a36Sopenharmony_ci (((x) >> SCMD_PROTO_VERSION_S) & SCMD_PROTO_VERSION_M) 182862306a36Sopenharmony_ci 182962306a36Sopenharmony_ci/* EncDecCtrl - Encryption/Decryption Control. 0: Encrypt, 1: Decrypt */ 183062306a36Sopenharmony_ci#define SCMD_ENC_DEC_CTRL_S 23 183162306a36Sopenharmony_ci#define SCMD_ENC_DEC_CTRL_M 0x1 183262306a36Sopenharmony_ci#define SCMD_ENC_DEC_CTRL_V(x) ((x) << SCMD_ENC_DEC_CTRL_S) 183362306a36Sopenharmony_ci#define SCMD_ENC_DEC_CTRL_G(x) \ 183462306a36Sopenharmony_ci (((x) >> SCMD_ENC_DEC_CTRL_S) & SCMD_ENC_DEC_CTRL_M) 183562306a36Sopenharmony_ci#define SCMD_ENC_DEC_CTRL_F SCMD_ENC_DEC_CTRL_V(1U) 183662306a36Sopenharmony_ci 183762306a36Sopenharmony_ci/* CipherAuthSeqCtrl - Cipher Authentication Sequence Control. */ 183862306a36Sopenharmony_ci#define SCMD_CIPH_AUTH_SEQ_CTRL_S 22 183962306a36Sopenharmony_ci#define SCMD_CIPH_AUTH_SEQ_CTRL_M 0x1 184062306a36Sopenharmony_ci#define SCMD_CIPH_AUTH_SEQ_CTRL_V(x) \ 184162306a36Sopenharmony_ci ((x) << SCMD_CIPH_AUTH_SEQ_CTRL_S) 184262306a36Sopenharmony_ci#define SCMD_CIPH_AUTH_SEQ_CTRL_G(x) \ 184362306a36Sopenharmony_ci (((x) >> SCMD_CIPH_AUTH_SEQ_CTRL_S) & SCMD_CIPH_AUTH_SEQ_CTRL_M) 184462306a36Sopenharmony_ci#define SCMD_CIPH_AUTH_SEQ_CTRL_F SCMD_CIPH_AUTH_SEQ_CTRL_V(1U) 184562306a36Sopenharmony_ci 184662306a36Sopenharmony_ci/* CiphMode - Cipher Mode. 0: NOP, 1:AES-CBC, 2:AES-GCM, 3:AES-CTR, 184762306a36Sopenharmony_ci * 4:Generic-AES, 5-15: Reserved. 184862306a36Sopenharmony_ci */ 184962306a36Sopenharmony_ci#define SCMD_CIPH_MODE_S 18 185062306a36Sopenharmony_ci#define SCMD_CIPH_MODE_M 0xf 185162306a36Sopenharmony_ci#define SCMD_CIPH_MODE_V(x) ((x) << SCMD_CIPH_MODE_S) 185262306a36Sopenharmony_ci#define SCMD_CIPH_MODE_G(x) \ 185362306a36Sopenharmony_ci (((x) >> SCMD_CIPH_MODE_S) & SCMD_CIPH_MODE_M) 185462306a36Sopenharmony_ci 185562306a36Sopenharmony_ci/* AuthMode - Auth Mode. 0: NOP, 1:SHA1, 2:SHA2-224, 3:SHA2-256 185662306a36Sopenharmony_ci * 4-15: Reserved 185762306a36Sopenharmony_ci */ 185862306a36Sopenharmony_ci#define SCMD_AUTH_MODE_S 14 185962306a36Sopenharmony_ci#define SCMD_AUTH_MODE_M 0xf 186062306a36Sopenharmony_ci#define SCMD_AUTH_MODE_V(x) ((x) << SCMD_AUTH_MODE_S) 186162306a36Sopenharmony_ci#define SCMD_AUTH_MODE_G(x) \ 186262306a36Sopenharmony_ci (((x) >> SCMD_AUTH_MODE_S) & SCMD_AUTH_MODE_M) 186362306a36Sopenharmony_ci 186462306a36Sopenharmony_ci/* HmacCtrl - HMAC Control. 0:NOP, 1:No truncation, 2:Support HMAC Truncation 186562306a36Sopenharmony_ci * per RFC 4366, 3:IPSec 96 bits, 4-7:Reserved 186662306a36Sopenharmony_ci */ 186762306a36Sopenharmony_ci#define SCMD_HMAC_CTRL_S 11 186862306a36Sopenharmony_ci#define SCMD_HMAC_CTRL_M 0x7 186962306a36Sopenharmony_ci#define SCMD_HMAC_CTRL_V(x) ((x) << SCMD_HMAC_CTRL_S) 187062306a36Sopenharmony_ci#define SCMD_HMAC_CTRL_G(x) \ 187162306a36Sopenharmony_ci (((x) >> SCMD_HMAC_CTRL_S) & SCMD_HMAC_CTRL_M) 187262306a36Sopenharmony_ci 187362306a36Sopenharmony_ci/* IvSize - IV size in units of 2 bytes */ 187462306a36Sopenharmony_ci#define SCMD_IV_SIZE_S 7 187562306a36Sopenharmony_ci#define SCMD_IV_SIZE_M 0xf 187662306a36Sopenharmony_ci#define SCMD_IV_SIZE_V(x) ((x) << SCMD_IV_SIZE_S) 187762306a36Sopenharmony_ci#define SCMD_IV_SIZE_G(x) \ 187862306a36Sopenharmony_ci (((x) >> SCMD_IV_SIZE_S) & SCMD_IV_SIZE_M) 187962306a36Sopenharmony_ci 188062306a36Sopenharmony_ci/* NumIVs - Number of IVs */ 188162306a36Sopenharmony_ci#define SCMD_NUM_IVS_S 0 188262306a36Sopenharmony_ci#define SCMD_NUM_IVS_M 0x7f 188362306a36Sopenharmony_ci#define SCMD_NUM_IVS_V(x) ((x) << SCMD_NUM_IVS_S) 188462306a36Sopenharmony_ci#define SCMD_NUM_IVS_G(x) \ 188562306a36Sopenharmony_ci (((x) >> SCMD_NUM_IVS_S) & SCMD_NUM_IVS_M) 188662306a36Sopenharmony_ci 188762306a36Sopenharmony_ci/* EnbDbgId - If this is enabled upper 20 (63:44) bits if SeqNumber 188862306a36Sopenharmony_ci * (below) are used as Cid (connection id for debug status), these 188962306a36Sopenharmony_ci * bits are padded to zero for forming the 64 bit 189062306a36Sopenharmony_ci * sequence number for TLS 189162306a36Sopenharmony_ci */ 189262306a36Sopenharmony_ci#define SCMD_ENB_DBGID_S 31 189362306a36Sopenharmony_ci#define SCMD_ENB_DBGID_M 0x1 189462306a36Sopenharmony_ci#define SCMD_ENB_DBGID_V(x) ((x) << SCMD_ENB_DBGID_S) 189562306a36Sopenharmony_ci#define SCMD_ENB_DBGID_G(x) \ 189662306a36Sopenharmony_ci (((x) >> SCMD_ENB_DBGID_S) & SCMD_ENB_DBGID_M) 189762306a36Sopenharmony_ci 189862306a36Sopenharmony_ci/* IV generation in SW. */ 189962306a36Sopenharmony_ci#define SCMD_IV_GEN_CTRL_S 30 190062306a36Sopenharmony_ci#define SCMD_IV_GEN_CTRL_M 0x1 190162306a36Sopenharmony_ci#define SCMD_IV_GEN_CTRL_V(x) ((x) << SCMD_IV_GEN_CTRL_S) 190262306a36Sopenharmony_ci#define SCMD_IV_GEN_CTRL_G(x) \ 190362306a36Sopenharmony_ci (((x) >> SCMD_IV_GEN_CTRL_S) & SCMD_IV_GEN_CTRL_M) 190462306a36Sopenharmony_ci#define SCMD_IV_GEN_CTRL_F SCMD_IV_GEN_CTRL_V(1U) 190562306a36Sopenharmony_ci 190662306a36Sopenharmony_ci/* More frags */ 190762306a36Sopenharmony_ci#define SCMD_MORE_FRAGS_S 20 190862306a36Sopenharmony_ci#define SCMD_MORE_FRAGS_M 0x1 190962306a36Sopenharmony_ci#define SCMD_MORE_FRAGS_V(x) ((x) << SCMD_MORE_FRAGS_S) 191062306a36Sopenharmony_ci#define SCMD_MORE_FRAGS_G(x) (((x) >> SCMD_MORE_FRAGS_S) & SCMD_MORE_FRAGS_M) 191162306a36Sopenharmony_ci 191262306a36Sopenharmony_ci/*last frag */ 191362306a36Sopenharmony_ci#define SCMD_LAST_FRAG_S 19 191462306a36Sopenharmony_ci#define SCMD_LAST_FRAG_M 0x1 191562306a36Sopenharmony_ci#define SCMD_LAST_FRAG_V(x) ((x) << SCMD_LAST_FRAG_S) 191662306a36Sopenharmony_ci#define SCMD_LAST_FRAG_G(x) (((x) >> SCMD_LAST_FRAG_S) & SCMD_LAST_FRAG_M) 191762306a36Sopenharmony_ci 191862306a36Sopenharmony_ci/* TlsCompPdu */ 191962306a36Sopenharmony_ci#define SCMD_TLS_COMPPDU_S 18 192062306a36Sopenharmony_ci#define SCMD_TLS_COMPPDU_M 0x1 192162306a36Sopenharmony_ci#define SCMD_TLS_COMPPDU_V(x) ((x) << SCMD_TLS_COMPPDU_S) 192262306a36Sopenharmony_ci#define SCMD_TLS_COMPPDU_G(x) (((x) >> SCMD_TLS_COMPPDU_S) & SCMD_TLS_COMPPDU_M) 192362306a36Sopenharmony_ci 192462306a36Sopenharmony_ci/* KeyCntxtInline - Key context inline after the scmd OR PayloadOnly*/ 192562306a36Sopenharmony_ci#define SCMD_KEY_CTX_INLINE_S 17 192662306a36Sopenharmony_ci#define SCMD_KEY_CTX_INLINE_M 0x1 192762306a36Sopenharmony_ci#define SCMD_KEY_CTX_INLINE_V(x) ((x) << SCMD_KEY_CTX_INLINE_S) 192862306a36Sopenharmony_ci#define SCMD_KEY_CTX_INLINE_G(x) \ 192962306a36Sopenharmony_ci (((x) >> SCMD_KEY_CTX_INLINE_S) & SCMD_KEY_CTX_INLINE_M) 193062306a36Sopenharmony_ci#define SCMD_KEY_CTX_INLINE_F SCMD_KEY_CTX_INLINE_V(1U) 193162306a36Sopenharmony_ci 193262306a36Sopenharmony_ci/* TLSFragEnable - 0: Host created TLS PDUs, 1: TLS Framgmentation in ASIC */ 193362306a36Sopenharmony_ci#define SCMD_TLS_FRAG_ENABLE_S 16 193462306a36Sopenharmony_ci#define SCMD_TLS_FRAG_ENABLE_M 0x1 193562306a36Sopenharmony_ci#define SCMD_TLS_FRAG_ENABLE_V(x) ((x) << SCMD_TLS_FRAG_ENABLE_S) 193662306a36Sopenharmony_ci#define SCMD_TLS_FRAG_ENABLE_G(x) \ 193762306a36Sopenharmony_ci (((x) >> SCMD_TLS_FRAG_ENABLE_S) & SCMD_TLS_FRAG_ENABLE_M) 193862306a36Sopenharmony_ci#define SCMD_TLS_FRAG_ENABLE_F SCMD_TLS_FRAG_ENABLE_V(1U) 193962306a36Sopenharmony_ci 194062306a36Sopenharmony_ci/* MacOnly - Only send the MAC and discard PDU. This is valid for hash only 194162306a36Sopenharmony_ci * modes, in this case TLS_TX will drop the PDU and only 194262306a36Sopenharmony_ci * send back the MAC bytes. 194362306a36Sopenharmony_ci */ 194462306a36Sopenharmony_ci#define SCMD_MAC_ONLY_S 15 194562306a36Sopenharmony_ci#define SCMD_MAC_ONLY_M 0x1 194662306a36Sopenharmony_ci#define SCMD_MAC_ONLY_V(x) ((x) << SCMD_MAC_ONLY_S) 194762306a36Sopenharmony_ci#define SCMD_MAC_ONLY_G(x) \ 194862306a36Sopenharmony_ci (((x) >> SCMD_MAC_ONLY_S) & SCMD_MAC_ONLY_M) 194962306a36Sopenharmony_ci#define SCMD_MAC_ONLY_F SCMD_MAC_ONLY_V(1U) 195062306a36Sopenharmony_ci 195162306a36Sopenharmony_ci/* AadIVDrop - Drop the AAD and IV fields. Useful in protocols 195262306a36Sopenharmony_ci * which have complex AAD and IV formations Eg:AES-CCM 195362306a36Sopenharmony_ci */ 195462306a36Sopenharmony_ci#define SCMD_AADIVDROP_S 14 195562306a36Sopenharmony_ci#define SCMD_AADIVDROP_M 0x1 195662306a36Sopenharmony_ci#define SCMD_AADIVDROP_V(x) ((x) << SCMD_AADIVDROP_S) 195762306a36Sopenharmony_ci#define SCMD_AADIVDROP_G(x) \ 195862306a36Sopenharmony_ci (((x) >> SCMD_AADIVDROP_S) & SCMD_AADIVDROP_M) 195962306a36Sopenharmony_ci#define SCMD_AADIVDROP_F SCMD_AADIVDROP_V(1U) 196062306a36Sopenharmony_ci 196162306a36Sopenharmony_ci/* HdrLength - Length of all headers excluding TLS header 196262306a36Sopenharmony_ci * present before start of crypto PDU/payload. 196362306a36Sopenharmony_ci */ 196462306a36Sopenharmony_ci#define SCMD_HDR_LEN_S 0 196562306a36Sopenharmony_ci#define SCMD_HDR_LEN_M 0x3fff 196662306a36Sopenharmony_ci#define SCMD_HDR_LEN_V(x) ((x) << SCMD_HDR_LEN_S) 196762306a36Sopenharmony_ci#define SCMD_HDR_LEN_G(x) \ 196862306a36Sopenharmony_ci (((x) >> SCMD_HDR_LEN_S) & SCMD_HDR_LEN_M) 196962306a36Sopenharmony_ci 197062306a36Sopenharmony_cistruct cpl_tx_sec_pdu { 197162306a36Sopenharmony_ci __be32 op_ivinsrtofst; 197262306a36Sopenharmony_ci __be32 pldlen; 197362306a36Sopenharmony_ci __be32 aadstart_cipherstop_hi; 197462306a36Sopenharmony_ci __be32 cipherstop_lo_authinsert; 197562306a36Sopenharmony_ci __be32 seqno_numivs; 197662306a36Sopenharmony_ci __be32 ivgen_hdrlen; 197762306a36Sopenharmony_ci __be64 scmd1; 197862306a36Sopenharmony_ci}; 197962306a36Sopenharmony_ci 198062306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_OPCODE_S 24 198162306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_OPCODE_M 0xff 198262306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_OPCODE_V(x) ((x) << CPL_TX_SEC_PDU_OPCODE_S) 198362306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_OPCODE_G(x) \ 198462306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_OPCODE_S) & CPL_TX_SEC_PDU_OPCODE_M) 198562306a36Sopenharmony_ci 198662306a36Sopenharmony_ci/* RX Channel Id */ 198762306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_RXCHID_S 22 198862306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_RXCHID_M 0x1 198962306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_RXCHID_V(x) ((x) << CPL_TX_SEC_PDU_RXCHID_S) 199062306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_RXCHID_G(x) \ 199162306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_RXCHID_S) & CPL_TX_SEC_PDU_RXCHID_M) 199262306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_RXCHID_F CPL_TX_SEC_PDU_RXCHID_V(1U) 199362306a36Sopenharmony_ci 199462306a36Sopenharmony_ci/* Ack Follows */ 199562306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_ACKFOLLOWS_S 21 199662306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_ACKFOLLOWS_M 0x1 199762306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_ACKFOLLOWS_V(x) ((x) << CPL_TX_SEC_PDU_ACKFOLLOWS_S) 199862306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_ACKFOLLOWS_G(x) \ 199962306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_ACKFOLLOWS_S) & CPL_TX_SEC_PDU_ACKFOLLOWS_M) 200062306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_ACKFOLLOWS_F CPL_TX_SEC_PDU_ACKFOLLOWS_V(1U) 200162306a36Sopenharmony_ci 200262306a36Sopenharmony_ci/* Loopback bit in cpl_tx_sec_pdu */ 200362306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_ULPTXLPBK_S 20 200462306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_ULPTXLPBK_M 0x1 200562306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_ULPTXLPBK_V(x) ((x) << CPL_TX_SEC_PDU_ULPTXLPBK_S) 200662306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_ULPTXLPBK_G(x) \ 200762306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_ULPTXLPBK_S) & CPL_TX_SEC_PDU_ULPTXLPBK_M) 200862306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_ULPTXLPBK_F CPL_TX_SEC_PDU_ULPTXLPBK_V(1U) 200962306a36Sopenharmony_ci 201062306a36Sopenharmony_ci/* Length of cpl header encapsulated */ 201162306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CPLLEN_S 16 201262306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CPLLEN_M 0xf 201362306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CPLLEN_V(x) ((x) << CPL_TX_SEC_PDU_CPLLEN_S) 201462306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CPLLEN_G(x) \ 201562306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_CPLLEN_S) & CPL_TX_SEC_PDU_CPLLEN_M) 201662306a36Sopenharmony_ci 201762306a36Sopenharmony_ci/* PlaceHolder */ 201862306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_PLACEHOLDER_S 10 201962306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_PLACEHOLDER_M 0x1 202062306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_PLACEHOLDER_V(x) ((x) << CPL_TX_SEC_PDU_PLACEHOLDER_S) 202162306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_PLACEHOLDER_G(x) \ 202262306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_PLACEHOLDER_S) & \ 202362306a36Sopenharmony_ci CPL_TX_SEC_PDU_PLACEHOLDER_M) 202462306a36Sopenharmony_ci 202562306a36Sopenharmony_ci/* IvInsrtOffset: Insertion location for IV */ 202662306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_IVINSRTOFST_S 0 202762306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_IVINSRTOFST_M 0x3ff 202862306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_IVINSRTOFST_V(x) ((x) << CPL_TX_SEC_PDU_IVINSRTOFST_S) 202962306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_IVINSRTOFST_G(x) \ 203062306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_IVINSRTOFST_S) & \ 203162306a36Sopenharmony_ci CPL_TX_SEC_PDU_IVINSRTOFST_M) 203262306a36Sopenharmony_ci 203362306a36Sopenharmony_ci/* AadStartOffset: Offset in bytes for AAD start from 203462306a36Sopenharmony_ci * the first byte following the pkt headers (0-255 bytes) 203562306a36Sopenharmony_ci */ 203662306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AADSTART_S 24 203762306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AADSTART_M 0xff 203862306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AADSTART_V(x) ((x) << CPL_TX_SEC_PDU_AADSTART_S) 203962306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AADSTART_G(x) \ 204062306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_AADSTART_S) & \ 204162306a36Sopenharmony_ci CPL_TX_SEC_PDU_AADSTART_M) 204262306a36Sopenharmony_ci 204362306a36Sopenharmony_ci/* AadStopOffset: offset in bytes for AAD stop/end from the first byte following 204462306a36Sopenharmony_ci * the pkt headers (0-511 bytes) 204562306a36Sopenharmony_ci */ 204662306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AADSTOP_S 15 204762306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AADSTOP_M 0x1ff 204862306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AADSTOP_V(x) ((x) << CPL_TX_SEC_PDU_AADSTOP_S) 204962306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AADSTOP_G(x) \ 205062306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_AADSTOP_S) & CPL_TX_SEC_PDU_AADSTOP_M) 205162306a36Sopenharmony_ci 205262306a36Sopenharmony_ci/* CipherStartOffset: offset in bytes for encryption/decryption start from the 205362306a36Sopenharmony_ci * first byte following the pkt headers (0-1023 bytes) 205462306a36Sopenharmony_ci */ 205562306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CIPHERSTART_S 5 205662306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CIPHERSTART_M 0x3ff 205762306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CIPHERSTART_V(x) ((x) << CPL_TX_SEC_PDU_CIPHERSTART_S) 205862306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CIPHERSTART_G(x) \ 205962306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_CIPHERSTART_S) & \ 206062306a36Sopenharmony_ci CPL_TX_SEC_PDU_CIPHERSTART_M) 206162306a36Sopenharmony_ci 206262306a36Sopenharmony_ci/* CipherStopOffset: offset in bytes for encryption/decryption end 206362306a36Sopenharmony_ci * from end of the payload of this command (0-511 bytes) 206462306a36Sopenharmony_ci */ 206562306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CIPHERSTOP_HI_S 0 206662306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CIPHERSTOP_HI_M 0x1f 206762306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CIPHERSTOP_HI_V(x) \ 206862306a36Sopenharmony_ci ((x) << CPL_TX_SEC_PDU_CIPHERSTOP_HI_S) 206962306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CIPHERSTOP_HI_G(x) \ 207062306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_CIPHERSTOP_HI_S) & \ 207162306a36Sopenharmony_ci CPL_TX_SEC_PDU_CIPHERSTOP_HI_M) 207262306a36Sopenharmony_ci 207362306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CIPHERSTOP_LO_S 28 207462306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CIPHERSTOP_LO_M 0xf 207562306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CIPHERSTOP_LO_V(x) \ 207662306a36Sopenharmony_ci ((x) << CPL_TX_SEC_PDU_CIPHERSTOP_LO_S) 207762306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_CIPHERSTOP_LO_G(x) \ 207862306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_CIPHERSTOP_LO_S) & \ 207962306a36Sopenharmony_ci CPL_TX_SEC_PDU_CIPHERSTOP_LO_M) 208062306a36Sopenharmony_ci 208162306a36Sopenharmony_ci/* AuthStartOffset: offset in bytes for authentication start from 208262306a36Sopenharmony_ci * the first byte following the pkt headers (0-1023) 208362306a36Sopenharmony_ci */ 208462306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AUTHSTART_S 18 208562306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AUTHSTART_M 0x3ff 208662306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AUTHSTART_V(x) ((x) << CPL_TX_SEC_PDU_AUTHSTART_S) 208762306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AUTHSTART_G(x) \ 208862306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_AUTHSTART_S) & \ 208962306a36Sopenharmony_ci CPL_TX_SEC_PDU_AUTHSTART_M) 209062306a36Sopenharmony_ci 209162306a36Sopenharmony_ci/* AuthStopOffset: offset in bytes for authentication 209262306a36Sopenharmony_ci * end from end of the payload of this command (0-511 Bytes) 209362306a36Sopenharmony_ci */ 209462306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AUTHSTOP_S 9 209562306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AUTHSTOP_M 0x1ff 209662306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AUTHSTOP_V(x) ((x) << CPL_TX_SEC_PDU_AUTHSTOP_S) 209762306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AUTHSTOP_G(x) \ 209862306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_AUTHSTOP_S) & \ 209962306a36Sopenharmony_ci CPL_TX_SEC_PDU_AUTHSTOP_M) 210062306a36Sopenharmony_ci 210162306a36Sopenharmony_ci/* AuthInsrtOffset: offset in bytes for authentication insertion 210262306a36Sopenharmony_ci * from end of the payload of this command (0-511 bytes) 210362306a36Sopenharmony_ci */ 210462306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AUTHINSERT_S 0 210562306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AUTHINSERT_M 0x1ff 210662306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AUTHINSERT_V(x) ((x) << CPL_TX_SEC_PDU_AUTHINSERT_S) 210762306a36Sopenharmony_ci#define CPL_TX_SEC_PDU_AUTHINSERT_G(x) \ 210862306a36Sopenharmony_ci (((x) >> CPL_TX_SEC_PDU_AUTHINSERT_S) & \ 210962306a36Sopenharmony_ci CPL_TX_SEC_PDU_AUTHINSERT_M) 211062306a36Sopenharmony_ci 211162306a36Sopenharmony_cistruct cpl_rx_phys_dsgl { 211262306a36Sopenharmony_ci __be32 op_to_tid; 211362306a36Sopenharmony_ci __be32 pcirlxorder_to_noofsgentr; 211462306a36Sopenharmony_ci struct rss_header rss_hdr_int; 211562306a36Sopenharmony_ci}; 211662306a36Sopenharmony_ci 211762306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_OPCODE_S 24 211862306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_OPCODE_M 0xff 211962306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_OPCODE_V(x) ((x) << CPL_RX_PHYS_DSGL_OPCODE_S) 212062306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_OPCODE_G(x) \ 212162306a36Sopenharmony_ci (((x) >> CPL_RX_PHYS_DSGL_OPCODE_S) & CPL_RX_PHYS_DSGL_OPCODE_M) 212262306a36Sopenharmony_ci 212362306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_ISRDMA_S 23 212462306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_ISRDMA_M 0x1 212562306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_ISRDMA_V(x) ((x) << CPL_RX_PHYS_DSGL_ISRDMA_S) 212662306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_ISRDMA_G(x) \ 212762306a36Sopenharmony_ci (((x) >> CPL_RX_PHYS_DSGL_ISRDMA_S) & CPL_RX_PHYS_DSGL_ISRDMA_M) 212862306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_ISRDMA_F CPL_RX_PHYS_DSGL_ISRDMA_V(1U) 212962306a36Sopenharmony_ci 213062306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_RSVD1_S 20 213162306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_RSVD1_M 0x7 213262306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_RSVD1_V(x) ((x) << CPL_RX_PHYS_DSGL_RSVD1_S) 213362306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_RSVD1_G(x) \ 213462306a36Sopenharmony_ci (((x) >> CPL_RX_PHYS_DSGL_RSVD1_S) & \ 213562306a36Sopenharmony_ci CPL_RX_PHYS_DSGL_RSVD1_M) 213662306a36Sopenharmony_ci 213762306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCIRLXORDER_S 31 213862306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCIRLXORDER_M 0x1 213962306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCIRLXORDER_V(x) \ 214062306a36Sopenharmony_ci ((x) << CPL_RX_PHYS_DSGL_PCIRLXORDER_S) 214162306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCIRLXORDER_G(x) \ 214262306a36Sopenharmony_ci (((x) >> CPL_RX_PHYS_DSGL_PCIRLXORDER_S) & \ 214362306a36Sopenharmony_ci CPL_RX_PHYS_DSGL_PCIRLXORDER_M) 214462306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCIRLXORDER_F CPL_RX_PHYS_DSGL_PCIRLXORDER_V(1U) 214562306a36Sopenharmony_ci 214662306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCINOSNOOP_S 30 214762306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCINOSNOOP_M 0x1 214862306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCINOSNOOP_V(x) \ 214962306a36Sopenharmony_ci ((x) << CPL_RX_PHYS_DSGL_PCINOSNOOP_S) 215062306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCINOSNOOP_G(x) \ 215162306a36Sopenharmony_ci (((x) >> CPL_RX_PHYS_DSGL_PCINOSNOOP_S) & \ 215262306a36Sopenharmony_ci CPL_RX_PHYS_DSGL_PCINOSNOOP_M) 215362306a36Sopenharmony_ci 215462306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCINOSNOOP_F CPL_RX_PHYS_DSGL_PCINOSNOOP_V(1U) 215562306a36Sopenharmony_ci 215662306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCITPHNTENB_S 29 215762306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCITPHNTENB_M 0x1 215862306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCITPHNTENB_V(x) \ 215962306a36Sopenharmony_ci ((x) << CPL_RX_PHYS_DSGL_PCITPHNTENB_S) 216062306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCITPHNTENB_G(x) \ 216162306a36Sopenharmony_ci (((x) >> CPL_RX_PHYS_DSGL_PCITPHNTENB_S) & \ 216262306a36Sopenharmony_ci CPL_RX_PHYS_DSGL_PCITPHNTENB_M) 216362306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCITPHNTENB_F CPL_RX_PHYS_DSGL_PCITPHNTENB_V(1U) 216462306a36Sopenharmony_ci 216562306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCITPHNT_S 27 216662306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCITPHNT_M 0x3 216762306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCITPHNT_V(x) ((x) << CPL_RX_PHYS_DSGL_PCITPHNT_S) 216862306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_PCITPHNT_G(x) \ 216962306a36Sopenharmony_ci (((x) >> CPL_RX_PHYS_DSGL_PCITPHNT_S) & \ 217062306a36Sopenharmony_ci CPL_RX_PHYS_DSGL_PCITPHNT_M) 217162306a36Sopenharmony_ci 217262306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_DCAID_S 16 217362306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_DCAID_M 0x7ff 217462306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_DCAID_V(x) ((x) << CPL_RX_PHYS_DSGL_DCAID_S) 217562306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_DCAID_G(x) \ 217662306a36Sopenharmony_ci (((x) >> CPL_RX_PHYS_DSGL_DCAID_S) & \ 217762306a36Sopenharmony_ci CPL_RX_PHYS_DSGL_DCAID_M) 217862306a36Sopenharmony_ci 217962306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_NOOFSGENTR_S 0 218062306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_NOOFSGENTR_M 0xffff 218162306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_NOOFSGENTR_V(x) \ 218262306a36Sopenharmony_ci ((x) << CPL_RX_PHYS_DSGL_NOOFSGENTR_S) 218362306a36Sopenharmony_ci#define CPL_RX_PHYS_DSGL_NOOFSGENTR_G(x) \ 218462306a36Sopenharmony_ci (((x) >> CPL_RX_PHYS_DSGL_NOOFSGENTR_S) & \ 218562306a36Sopenharmony_ci CPL_RX_PHYS_DSGL_NOOFSGENTR_M) 218662306a36Sopenharmony_ci 218762306a36Sopenharmony_cistruct cpl_rx_mps_pkt { 218862306a36Sopenharmony_ci __be32 op_to_r1_hi; 218962306a36Sopenharmony_ci __be32 r1_lo_length; 219062306a36Sopenharmony_ci}; 219162306a36Sopenharmony_ci 219262306a36Sopenharmony_ci#define CPL_RX_MPS_PKT_OP_S 24 219362306a36Sopenharmony_ci#define CPL_RX_MPS_PKT_OP_M 0xff 219462306a36Sopenharmony_ci#define CPL_RX_MPS_PKT_OP_V(x) ((x) << CPL_RX_MPS_PKT_OP_S) 219562306a36Sopenharmony_ci#define CPL_RX_MPS_PKT_OP_G(x) \ 219662306a36Sopenharmony_ci (((x) >> CPL_RX_MPS_PKT_OP_S) & CPL_RX_MPS_PKT_OP_M) 219762306a36Sopenharmony_ci 219862306a36Sopenharmony_ci#define CPL_RX_MPS_PKT_TYPE_S 20 219962306a36Sopenharmony_ci#define CPL_RX_MPS_PKT_TYPE_M 0xf 220062306a36Sopenharmony_ci#define CPL_RX_MPS_PKT_TYPE_V(x) ((x) << CPL_RX_MPS_PKT_TYPE_S) 220162306a36Sopenharmony_ci#define CPL_RX_MPS_PKT_TYPE_G(x) \ 220262306a36Sopenharmony_ci (((x) >> CPL_RX_MPS_PKT_TYPE_S) & CPL_RX_MPS_PKT_TYPE_M) 220362306a36Sopenharmony_ci 220462306a36Sopenharmony_cienum { 220562306a36Sopenharmony_ci X_CPL_RX_MPS_PKT_TYPE_PAUSE = 1 << 0, 220662306a36Sopenharmony_ci X_CPL_RX_MPS_PKT_TYPE_PPP = 1 << 1, 220762306a36Sopenharmony_ci X_CPL_RX_MPS_PKT_TYPE_QFC = 1 << 2, 220862306a36Sopenharmony_ci X_CPL_RX_MPS_PKT_TYPE_PTP = 1 << 3 220962306a36Sopenharmony_ci}; 221062306a36Sopenharmony_ci 221162306a36Sopenharmony_cistruct cpl_srq_table_req { 221262306a36Sopenharmony_ci WR_HDR; 221362306a36Sopenharmony_ci union opcode_tid ot; 221462306a36Sopenharmony_ci __u8 status; 221562306a36Sopenharmony_ci __u8 rsvd[2]; 221662306a36Sopenharmony_ci __u8 idx; 221762306a36Sopenharmony_ci __be64 rsvd_pdid; 221862306a36Sopenharmony_ci __be32 qlen_qbase; 221962306a36Sopenharmony_ci __be16 cur_msn; 222062306a36Sopenharmony_ci __be16 max_msn; 222162306a36Sopenharmony_ci}; 222262306a36Sopenharmony_ci 222362306a36Sopenharmony_cistruct cpl_srq_table_rpl { 222462306a36Sopenharmony_ci union opcode_tid ot; 222562306a36Sopenharmony_ci __u8 status; 222662306a36Sopenharmony_ci __u8 rsvd[2]; 222762306a36Sopenharmony_ci __u8 idx; 222862306a36Sopenharmony_ci __be64 rsvd_pdid; 222962306a36Sopenharmony_ci __be32 qlen_qbase; 223062306a36Sopenharmony_ci __be16 cur_msn; 223162306a36Sopenharmony_ci __be16 max_msn; 223262306a36Sopenharmony_ci}; 223362306a36Sopenharmony_ci 223462306a36Sopenharmony_ci/* cpl_srq_table_{req,rpl}.params fields */ 223562306a36Sopenharmony_ci#define SRQT_QLEN_S 28 223662306a36Sopenharmony_ci#define SRQT_QLEN_M 0xF 223762306a36Sopenharmony_ci#define SRQT_QLEN_V(x) ((x) << SRQT_QLEN_S) 223862306a36Sopenharmony_ci#define SRQT_QLEN_G(x) (((x) >> SRQT_QLEN_S) & SRQT_QLEN_M) 223962306a36Sopenharmony_ci 224062306a36Sopenharmony_ci#define SRQT_QBASE_S 0 224162306a36Sopenharmony_ci#define SRQT_QBASE_M 0x3FFFFFF 224262306a36Sopenharmony_ci#define SRQT_QBASE_V(x) ((x) << SRQT_QBASE_S) 224362306a36Sopenharmony_ci#define SRQT_QBASE_G(x) (((x) >> SRQT_QBASE_S) & SRQT_QBASE_M) 224462306a36Sopenharmony_ci 224562306a36Sopenharmony_ci#define SRQT_PDID_S 0 224662306a36Sopenharmony_ci#define SRQT_PDID_M 0xFF 224762306a36Sopenharmony_ci#define SRQT_PDID_V(x) ((x) << SRQT_PDID_S) 224862306a36Sopenharmony_ci#define SRQT_PDID_G(x) (((x) >> SRQT_PDID_S) & SRQT_PDID_M) 224962306a36Sopenharmony_ci 225062306a36Sopenharmony_ci#define SRQT_IDX_S 0 225162306a36Sopenharmony_ci#define SRQT_IDX_M 0xF 225262306a36Sopenharmony_ci#define SRQT_IDX_V(x) ((x) << SRQT_IDX_S) 225362306a36Sopenharmony_ci#define SRQT_IDX_G(x) (((x) >> SRQT_IDX_S) & SRQT_IDX_M) 225462306a36Sopenharmony_ci 225562306a36Sopenharmony_cistruct cpl_tx_tls_sfo { 225662306a36Sopenharmony_ci __be32 op_to_seg_len; 225762306a36Sopenharmony_ci __be32 pld_len; 225862306a36Sopenharmony_ci __be32 type_protover; 225962306a36Sopenharmony_ci __be32 r1_lo; 226062306a36Sopenharmony_ci __be32 seqno_numivs; 226162306a36Sopenharmony_ci __be32 ivgen_hdrlen; 226262306a36Sopenharmony_ci __be64 scmd1; 226362306a36Sopenharmony_ci}; 226462306a36Sopenharmony_ci 226562306a36Sopenharmony_ci/* cpl_tx_tls_sfo macros */ 226662306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_OPCODE_S 24 226762306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_OPCODE_V(x) ((x) << CPL_TX_TLS_SFO_OPCODE_S) 226862306a36Sopenharmony_ci 226962306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_DATA_TYPE_S 20 227062306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_DATA_TYPE_V(x) ((x) << CPL_TX_TLS_SFO_DATA_TYPE_S) 227162306a36Sopenharmony_ci 227262306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_CPL_LEN_S 16 227362306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_CPL_LEN_V(x) ((x) << CPL_TX_TLS_SFO_CPL_LEN_S) 227462306a36Sopenharmony_ci 227562306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_SEG_LEN_S 0 227662306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_SEG_LEN_M 0xffff 227762306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_SEG_LEN_V(x) ((x) << CPL_TX_TLS_SFO_SEG_LEN_S) 227862306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_SEG_LEN_G(x) \ 227962306a36Sopenharmony_ci (((x) >> CPL_TX_TLS_SFO_SEG_LEN_S) & CPL_TX_TLS_SFO_SEG_LEN_M) 228062306a36Sopenharmony_ci 228162306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_TYPE_S 24 228262306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_TYPE_M 0xff 228362306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_TYPE_V(x) ((x) << CPL_TX_TLS_SFO_TYPE_S) 228462306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_TYPE_G(x) \ 228562306a36Sopenharmony_ci (((x) >> CPL_TX_TLS_SFO_TYPE_S) & CPL_TX_TLS_SFO_TYPE_M) 228662306a36Sopenharmony_ci 228762306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_PROTOVER_S 8 228862306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_PROTOVER_M 0xffff 228962306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_PROTOVER_V(x) ((x) << CPL_TX_TLS_SFO_PROTOVER_S) 229062306a36Sopenharmony_ci#define CPL_TX_TLS_SFO_PROTOVER_G(x) \ 229162306a36Sopenharmony_ci (((x) >> CPL_TX_TLS_SFO_PROTOVER_S) & CPL_TX_TLS_SFO_PROTOVER_M) 229262306a36Sopenharmony_ci 229362306a36Sopenharmony_cistruct cpl_tls_data { 229462306a36Sopenharmony_ci struct rss_header rsshdr; 229562306a36Sopenharmony_ci union opcode_tid ot; 229662306a36Sopenharmony_ci __be32 length_pkd; 229762306a36Sopenharmony_ci __be32 seq; 229862306a36Sopenharmony_ci __be32 r1; 229962306a36Sopenharmony_ci}; 230062306a36Sopenharmony_ci 230162306a36Sopenharmony_ci#define CPL_TLS_DATA_OPCODE_S 24 230262306a36Sopenharmony_ci#define CPL_TLS_DATA_OPCODE_M 0xff 230362306a36Sopenharmony_ci#define CPL_TLS_DATA_OPCODE_V(x) ((x) << CPL_TLS_DATA_OPCODE_S) 230462306a36Sopenharmony_ci#define CPL_TLS_DATA_OPCODE_G(x) \ 230562306a36Sopenharmony_ci (((x) >> CPL_TLS_DATA_OPCODE_S) & CPL_TLS_DATA_OPCODE_M) 230662306a36Sopenharmony_ci 230762306a36Sopenharmony_ci#define CPL_TLS_DATA_TID_S 0 230862306a36Sopenharmony_ci#define CPL_TLS_DATA_TID_M 0xffffff 230962306a36Sopenharmony_ci#define CPL_TLS_DATA_TID_V(x) ((x) << CPL_TLS_DATA_TID_S) 231062306a36Sopenharmony_ci#define CPL_TLS_DATA_TID_G(x) \ 231162306a36Sopenharmony_ci (((x) >> CPL_TLS_DATA_TID_S) & CPL_TLS_DATA_TID_M) 231262306a36Sopenharmony_ci 231362306a36Sopenharmony_ci#define CPL_TLS_DATA_LENGTH_S 0 231462306a36Sopenharmony_ci#define CPL_TLS_DATA_LENGTH_M 0xffff 231562306a36Sopenharmony_ci#define CPL_TLS_DATA_LENGTH_V(x) ((x) << CPL_TLS_DATA_LENGTH_S) 231662306a36Sopenharmony_ci#define CPL_TLS_DATA_LENGTH_G(x) \ 231762306a36Sopenharmony_ci (((x) >> CPL_TLS_DATA_LENGTH_S) & CPL_TLS_DATA_LENGTH_M) 231862306a36Sopenharmony_ci 231962306a36Sopenharmony_cistruct cpl_rx_tls_cmp { 232062306a36Sopenharmony_ci struct rss_header rsshdr; 232162306a36Sopenharmony_ci union opcode_tid ot; 232262306a36Sopenharmony_ci __be32 pdulength_length; 232362306a36Sopenharmony_ci __be32 seq; 232462306a36Sopenharmony_ci __be32 ddp_report; 232562306a36Sopenharmony_ci __be32 r; 232662306a36Sopenharmony_ci __be32 ddp_valid; 232762306a36Sopenharmony_ci}; 232862306a36Sopenharmony_ci 232962306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_OPCODE_S 24 233062306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_OPCODE_M 0xff 233162306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_OPCODE_V(x) ((x) << CPL_RX_TLS_CMP_OPCODE_S) 233262306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_OPCODE_G(x) \ 233362306a36Sopenharmony_ci (((x) >> CPL_RX_TLS_CMP_OPCODE_S) & CPL_RX_TLS_CMP_OPCODE_M) 233462306a36Sopenharmony_ci 233562306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_TID_S 0 233662306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_TID_M 0xffffff 233762306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_TID_V(x) ((x) << CPL_RX_TLS_CMP_TID_S) 233862306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_TID_G(x) \ 233962306a36Sopenharmony_ci (((x) >> CPL_RX_TLS_CMP_TID_S) & CPL_RX_TLS_CMP_TID_M) 234062306a36Sopenharmony_ci 234162306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_PDULENGTH_S 16 234262306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_PDULENGTH_M 0xffff 234362306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_PDULENGTH_V(x) ((x) << CPL_RX_TLS_CMP_PDULENGTH_S) 234462306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_PDULENGTH_G(x) \ 234562306a36Sopenharmony_ci (((x) >> CPL_RX_TLS_CMP_PDULENGTH_S) & CPL_RX_TLS_CMP_PDULENGTH_M) 234662306a36Sopenharmony_ci 234762306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_LENGTH_S 0 234862306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_LENGTH_M 0xffff 234962306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_LENGTH_V(x) ((x) << CPL_RX_TLS_CMP_LENGTH_S) 235062306a36Sopenharmony_ci#define CPL_RX_TLS_CMP_LENGTH_G(x) \ 235162306a36Sopenharmony_ci (((x) >> CPL_RX_TLS_CMP_LENGTH_S) & CPL_RX_TLS_CMP_LENGTH_M) 235262306a36Sopenharmony_ci#endif /* __T4_MSG_H */ 2353