diff options
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 98 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/mem.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 16 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/l2t.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/sge.c | 9 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 367 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 6 | ||||
-rw-r--r-- | drivers/scsi/csiostor/csio_lnode.c | 2 | ||||
-rw-r--r-- | drivers/scsi/csiostor/csio_scsi.c | 4 | ||||
-rw-r--r-- | drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 18 |
11 files changed, 356 insertions, 176 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 9edc200b311d..694e03075b4b 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
@@ -235,19 +235,19 @@ static void release_tid(struct c4iw_rdev *rdev, u32 hwtid, struct sk_buff *skb) | |||
235 | 235 | ||
236 | static void set_emss(struct c4iw_ep *ep, u16 opt) | 236 | static void set_emss(struct c4iw_ep *ep, u16 opt) |
237 | { | 237 | { |
238 | ep->emss = ep->com.dev->rdev.lldi.mtus[GET_TCPOPT_MSS(opt)] - | 238 | ep->emss = ep->com.dev->rdev.lldi.mtus[TCPOPT_MSS_G(opt)] - |
239 | ((AF_INET == ep->com.remote_addr.ss_family) ? | 239 | ((AF_INET == ep->com.remote_addr.ss_family) ? |
240 | sizeof(struct iphdr) : sizeof(struct ipv6hdr)) - | 240 | sizeof(struct iphdr) : sizeof(struct ipv6hdr)) - |
241 | sizeof(struct tcphdr); | 241 | sizeof(struct tcphdr); |
242 | ep->mss = ep->emss; | 242 | ep->mss = ep->emss; |
243 | if (GET_TCPOPT_TSTAMP(opt)) | 243 | if (TCPOPT_TSTAMP_G(opt)) |
244 | ep->emss -= round_up(TCPOLEN_TIMESTAMP, 4); | 244 | ep->emss -= round_up(TCPOLEN_TIMESTAMP, 4); |
245 | if (ep->emss < 128) | 245 | if (ep->emss < 128) |
246 | ep->emss = 128; | 246 | ep->emss = 128; |
247 | if (ep->emss & 7) | 247 | if (ep->emss & 7) |
248 | PDBG("Warning: misaligned mtu idx %u mss %u emss=%u\n", | 248 | PDBG("Warning: misaligned mtu idx %u mss %u emss=%u\n", |
249 | GET_TCPOPT_MSS(opt), ep->mss, ep->emss); | 249 | TCPOPT_MSS_G(opt), ep->mss, ep->emss); |
250 | PDBG("%s mss_idx %u mss %u emss=%u\n", __func__, GET_TCPOPT_MSS(opt), | 250 | PDBG("%s mss_idx %u mss %u emss=%u\n", __func__, TCPOPT_MSS_G(opt), |
251 | ep->mss, ep->emss); | 251 | ep->mss, ep->emss); |
252 | } | 252 | } |
253 | 253 | ||
@@ -652,24 +652,24 @@ static int send_connect(struct c4iw_ep *ep) | |||
652 | if (win > RCV_BUFSIZ_M) | 652 | if (win > RCV_BUFSIZ_M) |
653 | win = RCV_BUFSIZ_M; | 653 | win = RCV_BUFSIZ_M; |
654 | 654 | ||
655 | opt0 = (nocong ? NO_CONG(1) : 0) | | 655 | opt0 = (nocong ? NO_CONG_F : 0) | |
656 | KEEP_ALIVE_F | | 656 | KEEP_ALIVE_F | |
657 | DELACK(1) | | 657 | DELACK_F | |
658 | WND_SCALE_V(wscale) | | 658 | WND_SCALE_V(wscale) | |
659 | MSS_IDX_V(mtu_idx) | | 659 | MSS_IDX_V(mtu_idx) | |
660 | L2T_IDX_V(ep->l2t->idx) | | 660 | L2T_IDX_V(ep->l2t->idx) | |
661 | TX_CHAN_V(ep->tx_chan) | | 661 | TX_CHAN_V(ep->tx_chan) | |
662 | SMAC_SEL_V(ep->smac_idx) | | 662 | SMAC_SEL_V(ep->smac_idx) | |
663 | DSCP(ep->tos) | | 663 | DSCP_V(ep->tos) | |
664 | ULP_MODE_V(ULP_MODE_TCPDDP) | | 664 | ULP_MODE_V(ULP_MODE_TCPDDP) | |
665 | RCV_BUFSIZ_V(win); | 665 | RCV_BUFSIZ_V(win); |
666 | opt2 = RX_CHANNEL_V(0) | | 666 | opt2 = RX_CHANNEL_V(0) | |
667 | CCTRL_ECN(enable_ecn) | | 667 | CCTRL_ECN_V(enable_ecn) | |
668 | RSS_QUEUE_VALID_F | RSS_QUEUE_V(ep->rss_qid); | 668 | RSS_QUEUE_VALID_F | RSS_QUEUE_V(ep->rss_qid); |
669 | if (enable_tcp_timestamps) | 669 | if (enable_tcp_timestamps) |
670 | opt2 |= TSTAMPS_EN(1); | 670 | opt2 |= TSTAMPS_EN_F; |
671 | if (enable_tcp_sack) | 671 | if (enable_tcp_sack) |
672 | opt2 |= SACK_EN(1); | 672 | opt2 |= SACK_EN_F; |
673 | if (wscale && enable_tcp_window_scaling) | 673 | if (wscale && enable_tcp_window_scaling) |
674 | opt2 |= WND_SCALE_EN_F; | 674 | opt2 |= WND_SCALE_EN_F; |
675 | if (is_t5(ep->com.dev->rdev.lldi.adapter_type)) { | 675 | if (is_t5(ep->com.dev->rdev.lldi.adapter_type)) { |
@@ -1042,7 +1042,7 @@ static int act_establish(struct c4iw_dev *dev, struct sk_buff *skb) | |||
1042 | struct c4iw_ep *ep; | 1042 | struct c4iw_ep *ep; |
1043 | struct cpl_act_establish *req = cplhdr(skb); | 1043 | struct cpl_act_establish *req = cplhdr(skb); |
1044 | unsigned int tid = GET_TID(req); | 1044 | unsigned int tid = GET_TID(req); |
1045 | unsigned int atid = GET_TID_TID(ntohl(req->tos_atid)); | 1045 | unsigned int atid = TID_TID_G(ntohl(req->tos_atid)); |
1046 | struct tid_info *t = dev->rdev.lldi.tids; | 1046 | struct tid_info *t = dev->rdev.lldi.tids; |
1047 | 1047 | ||
1048 | ep = lookup_atid(t, atid); | 1048 | ep = lookup_atid(t, atid); |
@@ -1751,7 +1751,7 @@ static void send_fw_act_open_req(struct c4iw_ep *ep, unsigned int atid) | |||
1751 | skb = get_skb(NULL, sizeof(*req), GFP_KERNEL); | 1751 | skb = get_skb(NULL, sizeof(*req), GFP_KERNEL); |
1752 | req = (struct fw_ofld_connection_wr *)__skb_put(skb, sizeof(*req)); | 1752 | req = (struct fw_ofld_connection_wr *)__skb_put(skb, sizeof(*req)); |
1753 | memset(req, 0, sizeof(*req)); | 1753 | memset(req, 0, sizeof(*req)); |
1754 | req->op_compl = htonl(V_WR_OP(FW_OFLD_CONNECTION_WR)); | 1754 | req->op_compl = htonl(WR_OP_V(FW_OFLD_CONNECTION_WR)); |
1755 | req->len16_pkd = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(sizeof(*req), 16))); | 1755 | req->len16_pkd = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(sizeof(*req), 16))); |
1756 | req->le.filter = cpu_to_be32(cxgb4_select_ntuple( | 1756 | req->le.filter = cpu_to_be32(cxgb4_select_ntuple( |
1757 | ep->com.dev->rdev.lldi.ports[0], | 1757 | ep->com.dev->rdev.lldi.ports[0], |
@@ -1782,27 +1782,27 @@ static void send_fw_act_open_req(struct c4iw_ep *ep, unsigned int atid) | |||
1782 | if (win > RCV_BUFSIZ_M) | 1782 | if (win > RCV_BUFSIZ_M) |
1783 | win = RCV_BUFSIZ_M; | 1783 | win = RCV_BUFSIZ_M; |
1784 | 1784 | ||
1785 | req->tcb.opt0 = (__force __be64) (TCAM_BYPASS(1) | | 1785 | req->tcb.opt0 = (__force __be64) (TCAM_BYPASS_F | |
1786 | (nocong ? NO_CONG(1) : 0) | | 1786 | (nocong ? NO_CONG_F : 0) | |
1787 | KEEP_ALIVE_F | | 1787 | KEEP_ALIVE_F | |
1788 | DELACK(1) | | 1788 | DELACK_F | |
1789 | WND_SCALE_V(wscale) | | 1789 | WND_SCALE_V(wscale) | |
1790 | MSS_IDX_V(mtu_idx) | | 1790 | MSS_IDX_V(mtu_idx) | |
1791 | L2T_IDX_V(ep->l2t->idx) | | 1791 | L2T_IDX_V(ep->l2t->idx) | |
1792 | TX_CHAN_V(ep->tx_chan) | | 1792 | TX_CHAN_V(ep->tx_chan) | |
1793 | SMAC_SEL_V(ep->smac_idx) | | 1793 | SMAC_SEL_V(ep->smac_idx) | |
1794 | DSCP(ep->tos) | | 1794 | DSCP_V(ep->tos) | |
1795 | ULP_MODE_V(ULP_MODE_TCPDDP) | | 1795 | ULP_MODE_V(ULP_MODE_TCPDDP) | |
1796 | RCV_BUFSIZ_V(win)); | 1796 | RCV_BUFSIZ_V(win)); |
1797 | req->tcb.opt2 = (__force __be32) (PACE(1) | | 1797 | req->tcb.opt2 = (__force __be32) (PACE_V(1) | |
1798 | TX_QUEUE(ep->com.dev->rdev.lldi.tx_modq[ep->tx_chan]) | | 1798 | TX_QUEUE_V(ep->com.dev->rdev.lldi.tx_modq[ep->tx_chan]) | |
1799 | RX_CHANNEL_V(0) | | 1799 | RX_CHANNEL_V(0) | |
1800 | CCTRL_ECN(enable_ecn) | | 1800 | CCTRL_ECN_V(enable_ecn) | |
1801 | RSS_QUEUE_VALID_F | RSS_QUEUE_V(ep->rss_qid)); | 1801 | RSS_QUEUE_VALID_F | RSS_QUEUE_V(ep->rss_qid)); |
1802 | if (enable_tcp_timestamps) | 1802 | if (enable_tcp_timestamps) |
1803 | req->tcb.opt2 |= (__force __be32)TSTAMPS_EN(1); | 1803 | req->tcb.opt2 |= (__force __be32)TSTAMPS_EN_F; |
1804 | if (enable_tcp_sack) | 1804 | if (enable_tcp_sack) |
1805 | req->tcb.opt2 |= (__force __be32)SACK_EN(1); | 1805 | req->tcb.opt2 |= (__force __be32)SACK_EN_F; |
1806 | if (wscale && enable_tcp_window_scaling) | 1806 | if (wscale && enable_tcp_window_scaling) |
1807 | req->tcb.opt2 |= (__force __be32)WND_SCALE_EN_F; | 1807 | req->tcb.opt2 |= (__force __be32)WND_SCALE_EN_F; |
1808 | req->tcb.opt0 = cpu_to_be64((__force u64)req->tcb.opt0); | 1808 | req->tcb.opt0 = cpu_to_be64((__force u64)req->tcb.opt0); |
@@ -2023,10 +2023,10 @@ static int act_open_rpl(struct c4iw_dev *dev, struct sk_buff *skb) | |||
2023 | { | 2023 | { |
2024 | struct c4iw_ep *ep; | 2024 | struct c4iw_ep *ep; |
2025 | struct cpl_act_open_rpl *rpl = cplhdr(skb); | 2025 | struct cpl_act_open_rpl *rpl = cplhdr(skb); |
2026 | unsigned int atid = GET_TID_TID(GET_AOPEN_ATID( | 2026 | unsigned int atid = TID_TID_G(AOPEN_ATID_G( |
2027 | ntohl(rpl->atid_status))); | 2027 | ntohl(rpl->atid_status))); |
2028 | struct tid_info *t = dev->rdev.lldi.tids; | 2028 | struct tid_info *t = dev->rdev.lldi.tids; |
2029 | int status = GET_AOPEN_STATUS(ntohl(rpl->atid_status)); | 2029 | int status = AOPEN_STATUS_G(ntohl(rpl->atid_status)); |
2030 | struct sockaddr_in *la; | 2030 | struct sockaddr_in *la; |
2031 | struct sockaddr_in *ra; | 2031 | struct sockaddr_in *ra; |
2032 | struct sockaddr_in6 *la6; | 2032 | struct sockaddr_in6 *la6; |
@@ -2064,7 +2064,7 @@ static int act_open_rpl(struct c4iw_dev *dev, struct sk_buff *skb) | |||
2064 | if (ep->com.local_addr.ss_family == AF_INET && | 2064 | if (ep->com.local_addr.ss_family == AF_INET && |
2065 | dev->rdev.lldi.enable_fw_ofld_conn) { | 2065 | dev->rdev.lldi.enable_fw_ofld_conn) { |
2066 | send_fw_act_open_req(ep, | 2066 | send_fw_act_open_req(ep, |
2067 | GET_TID_TID(GET_AOPEN_ATID( | 2067 | TID_TID_G(AOPEN_ATID_G( |
2068 | ntohl(rpl->atid_status)))); | 2068 | ntohl(rpl->atid_status)))); |
2069 | return 0; | 2069 | return 0; |
2070 | } | 2070 | } |
@@ -2181,24 +2181,24 @@ static void accept_cr(struct c4iw_ep *ep, struct sk_buff *skb, | |||
2181 | win = ep->rcv_win >> 10; | 2181 | win = ep->rcv_win >> 10; |
2182 | if (win > RCV_BUFSIZ_M) | 2182 | if (win > RCV_BUFSIZ_M) |
2183 | win = RCV_BUFSIZ_M; | 2183 | win = RCV_BUFSIZ_M; |
2184 | opt0 = (nocong ? NO_CONG(1) : 0) | | 2184 | opt0 = (nocong ? NO_CONG_F : 0) | |
2185 | KEEP_ALIVE_F | | 2185 | KEEP_ALIVE_F | |
2186 | DELACK(1) | | 2186 | DELACK_F | |
2187 | WND_SCALE_V(wscale) | | 2187 | WND_SCALE_V(wscale) | |
2188 | MSS_IDX_V(mtu_idx) | | 2188 | MSS_IDX_V(mtu_idx) | |
2189 | L2T_IDX_V(ep->l2t->idx) | | 2189 | L2T_IDX_V(ep->l2t->idx) | |
2190 | TX_CHAN_V(ep->tx_chan) | | 2190 | TX_CHAN_V(ep->tx_chan) | |
2191 | SMAC_SEL_V(ep->smac_idx) | | 2191 | SMAC_SEL_V(ep->smac_idx) | |
2192 | DSCP(ep->tos >> 2) | | 2192 | DSCP_V(ep->tos >> 2) | |
2193 | ULP_MODE_V(ULP_MODE_TCPDDP) | | 2193 | ULP_MODE_V(ULP_MODE_TCPDDP) | |
2194 | RCV_BUFSIZ_V(win); | 2194 | RCV_BUFSIZ_V(win); |
2195 | opt2 = RX_CHANNEL_V(0) | | 2195 | opt2 = RX_CHANNEL_V(0) | |
2196 | RSS_QUEUE_VALID_F | RSS_QUEUE_V(ep->rss_qid); | 2196 | RSS_QUEUE_VALID_F | RSS_QUEUE_V(ep->rss_qid); |
2197 | 2197 | ||
2198 | if (enable_tcp_timestamps && req->tcpopt.tstamp) | 2198 | if (enable_tcp_timestamps && req->tcpopt.tstamp) |
2199 | opt2 |= TSTAMPS_EN(1); | 2199 | opt2 |= TSTAMPS_EN_F; |
2200 | if (enable_tcp_sack && req->tcpopt.sack) | 2200 | if (enable_tcp_sack && req->tcpopt.sack) |
2201 | opt2 |= SACK_EN(1); | 2201 | opt2 |= SACK_EN_F; |
2202 | if (wscale && enable_tcp_window_scaling) | 2202 | if (wscale && enable_tcp_window_scaling) |
2203 | opt2 |= WND_SCALE_EN_F; | 2203 | opt2 |= WND_SCALE_EN_F; |
2204 | if (enable_ecn) { | 2204 | if (enable_ecn) { |
@@ -2208,7 +2208,7 @@ static void accept_cr(struct c4iw_ep *ep, struct sk_buff *skb, | |||
2208 | tcph = (const void *)(req + 1) + G_ETH_HDR_LEN(hlen) + | 2208 | tcph = (const void *)(req + 1) + G_ETH_HDR_LEN(hlen) + |
2209 | G_IP_HDR_LEN(hlen); | 2209 | G_IP_HDR_LEN(hlen); |
2210 | if (tcph->ece && tcph->cwr) | 2210 | if (tcph->ece && tcph->cwr) |
2211 | opt2 |= CCTRL_ECN(1); | 2211 | opt2 |= CCTRL_ECN_V(1); |
2212 | } | 2212 | } |
2213 | if (is_t5(ep->com.dev->rdev.lldi.adapter_type)) { | 2213 | if (is_t5(ep->com.dev->rdev.lldi.adapter_type)) { |
2214 | u32 isn = (prandom_u32() & ~7UL) - 1; | 2214 | u32 isn = (prandom_u32() & ~7UL) - 1; |
@@ -2277,7 +2277,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb) | |||
2277 | { | 2277 | { |
2278 | struct c4iw_ep *child_ep = NULL, *parent_ep; | 2278 | struct c4iw_ep *child_ep = NULL, *parent_ep; |
2279 | struct cpl_pass_accept_req *req = cplhdr(skb); | 2279 | struct cpl_pass_accept_req *req = cplhdr(skb); |
2280 | unsigned int stid = GET_POPEN_TID(ntohl(req->tos_stid)); | 2280 | unsigned int stid = PASS_OPEN_TID_G(ntohl(req->tos_stid)); |
2281 | struct tid_info *t = dev->rdev.lldi.tids; | 2281 | struct tid_info *t = dev->rdev.lldi.tids; |
2282 | unsigned int hwtid = GET_TID(req); | 2282 | unsigned int hwtid = GET_TID(req); |
2283 | struct dst_entry *dst; | 2283 | struct dst_entry *dst; |
@@ -2310,14 +2310,14 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb) | |||
2310 | ntohs(peer_port), peer_mss); | 2310 | ntohs(peer_port), peer_mss); |
2311 | dst = find_route(dev, *(__be32 *)local_ip, *(__be32 *)peer_ip, | 2311 | dst = find_route(dev, *(__be32 *)local_ip, *(__be32 *)peer_ip, |
2312 | local_port, peer_port, | 2312 | local_port, peer_port, |
2313 | GET_POPEN_TOS(ntohl(req->tos_stid))); | 2313 | PASS_OPEN_TOS_G(ntohl(req->tos_stid))); |
2314 | } else { | 2314 | } else { |
2315 | PDBG("%s parent ep %p hwtid %u laddr %pI6 raddr %pI6 lport %d rport %d peer_mss %d\n" | 2315 | PDBG("%s parent ep %p hwtid %u laddr %pI6 raddr %pI6 lport %d rport %d peer_mss %d\n" |
2316 | , __func__, parent_ep, hwtid, | 2316 | , __func__, parent_ep, hwtid, |
2317 | local_ip, peer_ip, ntohs(local_port), | 2317 | local_ip, peer_ip, ntohs(local_port), |
2318 | ntohs(peer_port), peer_mss); | 2318 | ntohs(peer_port), peer_mss); |
2319 | dst = find_route6(dev, local_ip, peer_ip, local_port, peer_port, | 2319 | dst = find_route6(dev, local_ip, peer_ip, local_port, peer_port, |
2320 | PASS_OPEN_TOS(ntohl(req->tos_stid)), | 2320 | PASS_OPEN_TOS_G(ntohl(req->tos_stid)), |
2321 | ((struct sockaddr_in6 *) | 2321 | ((struct sockaddr_in6 *) |
2322 | &parent_ep->com.local_addr)->sin6_scope_id); | 2322 | &parent_ep->com.local_addr)->sin6_scope_id); |
2323 | } | 2323 | } |
@@ -2375,7 +2375,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb) | |||
2375 | } | 2375 | } |
2376 | c4iw_get_ep(&parent_ep->com); | 2376 | c4iw_get_ep(&parent_ep->com); |
2377 | child_ep->parent_ep = parent_ep; | 2377 | child_ep->parent_ep = parent_ep; |
2378 | child_ep->tos = GET_POPEN_TOS(ntohl(req->tos_stid)); | 2378 | child_ep->tos = PASS_OPEN_TOS_G(ntohl(req->tos_stid)); |
2379 | child_ep->dst = dst; | 2379 | child_ep->dst = dst; |
2380 | child_ep->hwtid = hwtid; | 2380 | child_ep->hwtid = hwtid; |
2381 | 2381 | ||
@@ -3501,23 +3501,23 @@ static void build_cpl_pass_accept_req(struct sk_buff *skb, int stid , u8 tos) | |||
3501 | req = (struct cpl_pass_accept_req *)__skb_push(skb, sizeof(*req)); | 3501 | req = (struct cpl_pass_accept_req *)__skb_push(skb, sizeof(*req)); |
3502 | memset(req, 0, sizeof(*req)); | 3502 | memset(req, 0, sizeof(*req)); |
3503 | req->l2info = cpu_to_be16(V_SYN_INTF(intf) | | 3503 | req->l2info = cpu_to_be16(V_SYN_INTF(intf) | |
3504 | V_SYN_MAC_IDX(G_RX_MACIDX( | 3504 | V_SYN_MAC_IDX(RX_MACIDX_G( |
3505 | (__force int) htonl(l2info))) | | 3505 | (__force int) htonl(l2info))) | |
3506 | F_SYN_XACT_MATCH); | 3506 | F_SYN_XACT_MATCH); |
3507 | eth_hdr_len = is_t4(dev->rdev.lldi.adapter_type) ? | 3507 | eth_hdr_len = is_t4(dev->rdev.lldi.adapter_type) ? |
3508 | G_RX_ETHHDR_LEN((__force int) htonl(l2info)) : | 3508 | RX_ETHHDR_LEN_G((__force int)htonl(l2info)) : |
3509 | G_RX_T5_ETHHDR_LEN((__force int) htonl(l2info)); | 3509 | RX_T5_ETHHDR_LEN_G((__force int)htonl(l2info)); |
3510 | req->hdr_len = cpu_to_be32(V_SYN_RX_CHAN(G_RX_CHAN( | 3510 | req->hdr_len = cpu_to_be32(V_SYN_RX_CHAN(RX_CHAN_G( |
3511 | (__force int) htonl(l2info))) | | 3511 | (__force int) htonl(l2info))) | |
3512 | V_TCP_HDR_LEN(G_RX_TCPHDR_LEN( | 3512 | V_TCP_HDR_LEN(RX_TCPHDR_LEN_G( |
3513 | (__force int) htons(hdr_len))) | | 3513 | (__force int) htons(hdr_len))) | |
3514 | V_IP_HDR_LEN(G_RX_IPHDR_LEN( | 3514 | V_IP_HDR_LEN(RX_IPHDR_LEN_G( |
3515 | (__force int) htons(hdr_len))) | | 3515 | (__force int) htons(hdr_len))) | |
3516 | V_ETH_HDR_LEN(G_RX_ETHHDR_LEN(eth_hdr_len))); | 3516 | V_ETH_HDR_LEN(RX_ETHHDR_LEN_G(eth_hdr_len))); |
3517 | req->vlan = (__force __be16) vlantag; | 3517 | req->vlan = (__force __be16) vlantag; |
3518 | req->len = (__force __be16) len; | 3518 | req->len = (__force __be16) len; |
3519 | req->tos_stid = cpu_to_be32(PASS_OPEN_TID(stid) | | 3519 | req->tos_stid = cpu_to_be32(PASS_OPEN_TID_V(stid) | |
3520 | PASS_OPEN_TOS(tos)); | 3520 | PASS_OPEN_TOS_V(tos)); |
3521 | req->tcpopt.mss = htons(tmp_opt.mss_clamp); | 3521 | req->tcpopt.mss = htons(tmp_opt.mss_clamp); |
3522 | if (tmp_opt.wscale_ok) | 3522 | if (tmp_opt.wscale_ok) |
3523 | req->tcpopt.wsf = tmp_opt.snd_wscale; | 3523 | req->tcpopt.wsf = tmp_opt.snd_wscale; |
@@ -3542,7 +3542,7 @@ static void send_fw_pass_open_req(struct c4iw_dev *dev, struct sk_buff *skb, | |||
3542 | req_skb = alloc_skb(sizeof(struct fw_ofld_connection_wr), GFP_KERNEL); | 3542 | req_skb = alloc_skb(sizeof(struct fw_ofld_connection_wr), GFP_KERNEL); |
3543 | req = (struct fw_ofld_connection_wr *)__skb_put(req_skb, sizeof(*req)); | 3543 | req = (struct fw_ofld_connection_wr *)__skb_put(req_skb, sizeof(*req)); |
3544 | memset(req, 0, sizeof(*req)); | 3544 | memset(req, 0, sizeof(*req)); |
3545 | req->op_compl = htonl(V_WR_OP(FW_OFLD_CONNECTION_WR) | FW_WR_COMPL_F); | 3545 | req->op_compl = htonl(WR_OP_V(FW_OFLD_CONNECTION_WR) | FW_WR_COMPL_F); |
3546 | req->len16_pkd = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(sizeof(*req), 16))); | 3546 | req->len16_pkd = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(sizeof(*req), 16))); |
3547 | req->le.version_cpl = htonl(FW_OFLD_CONNECTION_WR_CPL_F); | 3547 | req->le.version_cpl = htonl(FW_OFLD_CONNECTION_WR_CPL_F); |
3548 | req->le.filter = (__force __be32) filter; | 3548 | req->le.filter = (__force __be32) filter; |
@@ -3556,7 +3556,7 @@ static void send_fw_pass_open_req(struct c4iw_dev *dev, struct sk_buff *skb, | |||
3556 | htonl(FW_OFLD_CONNECTION_WR_T_STATE_V(TCP_SYN_RECV) | | 3556 | htonl(FW_OFLD_CONNECTION_WR_T_STATE_V(TCP_SYN_RECV) | |
3557 | FW_OFLD_CONNECTION_WR_RCV_SCALE_V(cpl->tcpopt.wsf) | | 3557 | FW_OFLD_CONNECTION_WR_RCV_SCALE_V(cpl->tcpopt.wsf) | |
3558 | FW_OFLD_CONNECTION_WR_ASTID_V( | 3558 | FW_OFLD_CONNECTION_WR_ASTID_V( |
3559 | GET_PASS_OPEN_TID(ntohl(cpl->tos_stid)))); | 3559 | PASS_OPEN_TID_G(ntohl(cpl->tos_stid)))); |
3560 | 3560 | ||
3561 | /* | 3561 | /* |
3562 | * We store the qid in opt2 which will be used by the firmware | 3562 | * We store the qid in opt2 which will be used by the firmware |
@@ -3613,7 +3613,7 @@ static int rx_pkt(struct c4iw_dev *dev, struct sk_buff *skb) | |||
3613 | struct neighbour *neigh; | 3613 | struct neighbour *neigh; |
3614 | 3614 | ||
3615 | /* Drop all non-SYN packets */ | 3615 | /* Drop all non-SYN packets */ |
3616 | if (!(cpl->l2info & cpu_to_be32(F_RXF_SYN))) | 3616 | if (!(cpl->l2info & cpu_to_be32(RXF_SYN_F))) |
3617 | goto reject; | 3617 | goto reject; |
3618 | 3618 | ||
3619 | /* | 3619 | /* |
@@ -3635,8 +3635,8 @@ static int rx_pkt(struct c4iw_dev *dev, struct sk_buff *skb) | |||
3635 | } | 3635 | } |
3636 | 3636 | ||
3637 | eth_hdr_len = is_t4(dev->rdev.lldi.adapter_type) ? | 3637 | eth_hdr_len = is_t4(dev->rdev.lldi.adapter_type) ? |
3638 | G_RX_ETHHDR_LEN(htonl(cpl->l2info)) : | 3638 | RX_ETHHDR_LEN_G(htonl(cpl->l2info)) : |
3639 | G_RX_T5_ETHHDR_LEN(htonl(cpl->l2info)); | 3639 | RX_T5_ETHHDR_LEN_G(htonl(cpl->l2info)); |
3640 | if (eth_hdr_len == ETH_HLEN) { | 3640 | if (eth_hdr_len == ETH_HLEN) { |
3641 | eh = (struct ethhdr *)(req + 1); | 3641 | eh = (struct ethhdr *)(req + 1); |
3642 | iph = (struct iphdr *)(eh + 1); | 3642 | iph = (struct iphdr *)(eh + 1); |
diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c index cb43c2299ac0..b9dc9fc6be66 100644 --- a/drivers/infiniband/hw/cxgb4/mem.c +++ b/drivers/infiniband/hw/cxgb4/mem.c | |||
@@ -86,14 +86,14 @@ static int _c4iw_write_mem_dma_aligned(struct c4iw_rdev *rdev, u32 addr, | |||
86 | req->wr.wr_lo = wait ? (__force __be64)(unsigned long) &wr_wait : 0L; | 86 | req->wr.wr_lo = wait ? (__force __be64)(unsigned long) &wr_wait : 0L; |
87 | req->wr.wr_mid = cpu_to_be32(FW_WR_LEN16_V(DIV_ROUND_UP(wr_len, 16))); | 87 | req->wr.wr_mid = cpu_to_be32(FW_WR_LEN16_V(DIV_ROUND_UP(wr_len, 16))); |
88 | req->cmd = cpu_to_be32(ULPTX_CMD_V(ULP_TX_MEM_WRITE)); | 88 | req->cmd = cpu_to_be32(ULPTX_CMD_V(ULP_TX_MEM_WRITE)); |
89 | req->cmd |= cpu_to_be32(V_T5_ULP_MEMIO_ORDER(1)); | 89 | req->cmd |= cpu_to_be32(T5_ULP_MEMIO_ORDER_V(1)); |
90 | req->dlen = cpu_to_be32(ULP_MEMIO_DATA_LEN_V(len>>5)); | 90 | req->dlen = cpu_to_be32(ULP_MEMIO_DATA_LEN_V(len>>5)); |
91 | req->len16 = cpu_to_be32(DIV_ROUND_UP(wr_len-sizeof(req->wr), 16)); | 91 | req->len16 = cpu_to_be32(DIV_ROUND_UP(wr_len-sizeof(req->wr), 16)); |
92 | req->lock_addr = cpu_to_be32(ULP_MEMIO_ADDR_V(addr)); | 92 | req->lock_addr = cpu_to_be32(ULP_MEMIO_ADDR_V(addr)); |
93 | 93 | ||
94 | sgl = (struct ulptx_sgl *)(req + 1); | 94 | sgl = (struct ulptx_sgl *)(req + 1); |
95 | sgl->cmd_nsge = cpu_to_be32(ULPTX_CMD_V(ULP_TX_SC_DSGL) | | 95 | sgl->cmd_nsge = cpu_to_be32(ULPTX_CMD_V(ULP_TX_SC_DSGL) | |
96 | ULPTX_NSGE(1)); | 96 | ULPTX_NSGE_V(1)); |
97 | sgl->len0 = cpu_to_be32(len); | 97 | sgl->len0 = cpu_to_be32(len); |
98 | sgl->addr0 = cpu_to_be64(data); | 98 | sgl->addr0 = cpu_to_be64(data); |
99 | 99 | ||
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 6de41cc6687e..23ae0b7a9019 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | |||
@@ -672,7 +672,7 @@ static void filter_rpl(struct adapter *adap, const struct cpl_set_tcb_rpl *rpl) | |||
672 | if (idx >= adap->tids.ftid_base && nidx < | 672 | if (idx >= adap->tids.ftid_base && nidx < |
673 | (adap->tids.nftids + adap->tids.nsftids)) { | 673 | (adap->tids.nftids + adap->tids.nsftids)) { |
674 | idx = nidx; | 674 | idx = nidx; |
675 | ret = GET_TCB_COOKIE(rpl->cookie); | 675 | ret = TCB_COOKIE_G(rpl->cookie); |
676 | f = &adap->tids.ftid_tab[idx]; | 676 | f = &adap->tids.ftid_tab[idx]; |
677 | 677 | ||
678 | if (ret == FW_FILTER_WR_FLT_DELETED) { | 678 | if (ret == FW_FILTER_WR_FLT_DELETED) { |
@@ -724,7 +724,7 @@ static int fwevtq_handler(struct sge_rspq *q, const __be64 *rsp, | |||
724 | 724 | ||
725 | if (likely(opcode == CPL_SGE_EGR_UPDATE)) { | 725 | if (likely(opcode == CPL_SGE_EGR_UPDATE)) { |
726 | const struct cpl_sge_egr_update *p = (void *)rsp; | 726 | const struct cpl_sge_egr_update *p = (void *)rsp; |
727 | unsigned int qid = EGR_QID(ntohl(p->opcode_qid)); | 727 | unsigned int qid = EGR_QID_G(ntohl(p->opcode_qid)); |
728 | struct sge_txq *txq; | 728 | struct sge_txq *txq; |
729 | 729 | ||
730 | txq = q->adap->sge.egr_map[qid - q->adap->sge.egr_start]; | 730 | txq = q->adap->sge.egr_map[qid - q->adap->sge.egr_start]; |
@@ -3416,8 +3416,8 @@ int cxgb4_create_server(const struct net_device *dev, unsigned int stid, | |||
3416 | req->peer_ip = htonl(0); | 3416 | req->peer_ip = htonl(0); |
3417 | chan = rxq_to_chan(&adap->sge, queue); | 3417 | chan = rxq_to_chan(&adap->sge, queue); |
3418 | req->opt0 = cpu_to_be64(TX_CHAN_V(chan)); | 3418 | req->opt0 = cpu_to_be64(TX_CHAN_V(chan)); |
3419 | req->opt1 = cpu_to_be64(CONN_POLICY_ASK | | 3419 | req->opt1 = cpu_to_be64(CONN_POLICY_V(CPL_CONN_POLICY_ASK) | |
3420 | SYN_RSS_ENABLE | SYN_RSS_QUEUE(queue)); | 3420 | SYN_RSS_ENABLE_F | SYN_RSS_QUEUE_V(queue)); |
3421 | ret = t4_mgmt_tx(adap, skb); | 3421 | ret = t4_mgmt_tx(adap, skb); |
3422 | return net_xmit_eval(ret); | 3422 | return net_xmit_eval(ret); |
3423 | } | 3423 | } |
@@ -3459,8 +3459,8 @@ int cxgb4_create_server6(const struct net_device *dev, unsigned int stid, | |||
3459 | req->peer_ip_lo = cpu_to_be64(0); | 3459 | req->peer_ip_lo = cpu_to_be64(0); |
3460 | chan = rxq_to_chan(&adap->sge, queue); | 3460 | chan = rxq_to_chan(&adap->sge, queue); |
3461 | req->opt0 = cpu_to_be64(TX_CHAN_V(chan)); | 3461 | req->opt0 = cpu_to_be64(TX_CHAN_V(chan)); |
3462 | req->opt1 = cpu_to_be64(CONN_POLICY_ASK | | 3462 | req->opt1 = cpu_to_be64(CONN_POLICY_V(CPL_CONN_POLICY_ASK) | |
3463 | SYN_RSS_ENABLE | SYN_RSS_QUEUE(queue)); | 3463 | SYN_RSS_ENABLE_F | SYN_RSS_QUEUE_V(queue)); |
3464 | ret = t4_mgmt_tx(adap, skb); | 3464 | ret = t4_mgmt_tx(adap, skb); |
3465 | return net_xmit_eval(ret); | 3465 | return net_xmit_eval(ret); |
3466 | } | 3466 | } |
@@ -3483,8 +3483,8 @@ int cxgb4_remove_server(const struct net_device *dev, unsigned int stid, | |||
3483 | req = (struct cpl_close_listsvr_req *)__skb_put(skb, sizeof(*req)); | 3483 | req = (struct cpl_close_listsvr_req *)__skb_put(skb, sizeof(*req)); |
3484 | INIT_TP_WR(req, 0); | 3484 | INIT_TP_WR(req, 0); |
3485 | OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_CLOSE_LISTSRV_REQ, stid)); | 3485 | OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_CLOSE_LISTSRV_REQ, stid)); |
3486 | req->reply_ctrl = htons(NO_REPLY(0) | (ipv6 ? LISTSVR_IPV6(1) : | 3486 | req->reply_ctrl = htons(NO_REPLY_V(0) | (ipv6 ? LISTSVR_IPV6_V(1) : |
3487 | LISTSVR_IPV6(0)) | QUEUENO(queue)); | 3487 | LISTSVR_IPV6_V(0)) | QUEUENO_V(queue)); |
3488 | ret = t4_mgmt_tx(adap, skb); | 3488 | ret = t4_mgmt_tx(adap, skb); |
3489 | return net_xmit_eval(ret); | 3489 | return net_xmit_eval(ret); |
3490 | } | 3490 | } |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/l2t.c b/drivers/net/ethernet/chelsio/cxgb4/l2t.c index 5ae14451c3a4..252efc29321f 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/l2t.c +++ b/drivers/net/ethernet/chelsio/cxgb4/l2t.c | |||
@@ -151,8 +151,8 @@ static int write_l2e(struct adapter *adap, struct l2t_entry *e, int sync) | |||
151 | 151 | ||
152 | OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, | 152 | OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, |
153 | e->idx | (sync ? F_SYNC_WR : 0) | | 153 | e->idx | (sync ? F_SYNC_WR : 0) | |
154 | TID_QID(adap->sge.fw_evtq.abs_id))); | 154 | TID_QID_V(adap->sge.fw_evtq.abs_id))); |
155 | req->params = htons(L2T_W_PORT(e->lport) | L2T_W_NOREPLY(!sync)); | 155 | req->params = htons(L2T_W_PORT_V(e->lport) | L2T_W_NOREPLY_V(!sync)); |
156 | req->l2t_idx = htons(e->idx); | 156 | req->l2t_idx = htons(e->idx); |
157 | req->vlan = htons(e->vlan); | 157 | req->vlan = htons(e->vlan); |
158 | if (e->neigh && !(e->neigh->dev->flags & IFF_LOOPBACK)) | 158 | if (e->neigh && !(e->neigh->dev->flags & IFF_LOOPBACK)) |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c index d7c301c77060..a79fa6a0f5c5 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c | |||
@@ -821,7 +821,8 @@ static void write_sgl(const struct sk_buff *skb, struct sge_txq *q, | |||
821 | sgl->addr0 = cpu_to_be64(addr[1]); | 821 | sgl->addr0 = cpu_to_be64(addr[1]); |
822 | } | 822 | } |
823 | 823 | ||
824 | sgl->cmd_nsge = htonl(ULPTX_CMD_V(ULP_TX_SC_DSGL) | ULPTX_NSGE(nfrags)); | 824 | sgl->cmd_nsge = htonl(ULPTX_CMD_V(ULP_TX_SC_DSGL) | |
825 | ULPTX_NSGE_V(nfrags)); | ||
825 | if (likely(--nfrags == 0)) | 826 | if (likely(--nfrags == 0)) |
826 | return; | 827 | return; |
827 | /* | 828 | /* |
@@ -1761,7 +1762,7 @@ int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp, | |||
1761 | pkt = (const struct cpl_rx_pkt *)rsp; | 1762 | pkt = (const struct cpl_rx_pkt *)rsp; |
1762 | csum_ok = pkt->csum_calc && !pkt->err_vec && | 1763 | csum_ok = pkt->csum_calc && !pkt->err_vec && |
1763 | (q->netdev->features & NETIF_F_RXCSUM); | 1764 | (q->netdev->features & NETIF_F_RXCSUM); |
1764 | if ((pkt->l2info & htonl(RXF_TCP)) && | 1765 | if ((pkt->l2info & htonl(RXF_TCP_F)) && |
1765 | (q->netdev->features & NETIF_F_GRO) && csum_ok && !pkt->ip_frag) { | 1766 | (q->netdev->features & NETIF_F_GRO) && csum_ok && !pkt->ip_frag) { |
1766 | do_gro(rxq, si, pkt); | 1767 | do_gro(rxq, si, pkt); |
1767 | return 0; | 1768 | return 0; |
@@ -1783,11 +1784,11 @@ int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp, | |||
1783 | 1784 | ||
1784 | rxq->stats.pkts++; | 1785 | rxq->stats.pkts++; |
1785 | 1786 | ||
1786 | if (csum_ok && (pkt->l2info & htonl(RXF_UDP | RXF_TCP))) { | 1787 | if (csum_ok && (pkt->l2info & htonl(RXF_UDP_F | RXF_TCP_F))) { |
1787 | if (!pkt->ip_frag) { | 1788 | if (!pkt->ip_frag) { |
1788 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 1789 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
1789 | rxq->stats.rx_cso++; | 1790 | rxq->stats.rx_cso++; |
1790 | } else if (pkt->l2info & htonl(RXF_IP)) { | 1791 | } else if (pkt->l2info & htonl(RXF_IP_F)) { |
1791 | __sum16 c = (__force __sum16)pkt->csum; | 1792 | __sum16 c = (__force __sum16)pkt->csum; |
1792 | skb->csum = csum_unfold(c); | 1793 | skb->csum = csum_unfold(c); |
1793 | skb->ip_summed = CHECKSUM_COMPLETE; | 1794 | skb->ip_summed = CHECKSUM_COMPLETE; |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h b/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h index 0f89f68948ab..0fb975e258b3 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | |||
@@ -124,6 +124,13 @@ enum CPL_error { | |||
124 | }; | 124 | }; |
125 | 125 | ||
126 | enum { | 126 | enum { |
127 | CPL_CONN_POLICY_AUTO = 0, | ||
128 | CPL_CONN_POLICY_ASK = 1, | ||
129 | CPL_CONN_POLICY_FILTER = 2, | ||
130 | CPL_CONN_POLICY_DENY = 3 | ||
131 | }; | ||
132 | |||
133 | enum { | ||
127 | ULP_MODE_NONE = 0, | 134 | ULP_MODE_NONE = 0, |
128 | ULP_MODE_ISCSI = 2, | 135 | ULP_MODE_ISCSI = 2, |
129 | ULP_MODE_RDMA = 4, | 136 | ULP_MODE_RDMA = 4, |
@@ -160,16 +167,28 @@ union opcode_tid { | |||
160 | u8 opcode; | 167 | u8 opcode; |
161 | }; | 168 | }; |
162 | 169 | ||
163 | #define CPL_OPCODE(x) ((x) << 24) | 170 | #define CPL_OPCODE_S 24 |
164 | #define G_CPL_OPCODE(x) (((x) >> 24) & 0xFF) | 171 | #define CPL_OPCODE_V(x) ((x) << CPL_OPCODE_S) |
165 | #define MK_OPCODE_TID(opcode, tid) (CPL_OPCODE(opcode) | (tid)) | 172 | #define CPL_OPCODE_G(x) (((x) >> CPL_OPCODE_S) & 0xFF) |
173 | #define TID_G(x) ((x) & 0xFFFFFF) | ||
174 | |||
175 | /* tid is assumed to be 24-bits */ | ||
176 | #define MK_OPCODE_TID(opcode, tid) (CPL_OPCODE_V(opcode) | (tid)) | ||
177 | |||
166 | #define OPCODE_TID(cmd) ((cmd)->ot.opcode_tid) | 178 | #define OPCODE_TID(cmd) ((cmd)->ot.opcode_tid) |
167 | #define GET_TID(cmd) (ntohl(OPCODE_TID(cmd)) & 0xFFFFFF) | 179 | |
180 | /* extract the TID from a CPL command */ | ||
181 | #define GET_TID(cmd) (TID_G(be32_to_cpu(OPCODE_TID(cmd)))) | ||
168 | 182 | ||
169 | /* partitioning of TID fields that also carry a queue id */ | 183 | /* partitioning of TID fields that also carry a queue id */ |
170 | #define GET_TID_TID(x) ((x) & 0x3fff) | 184 | #define TID_TID_S 0 |
171 | #define GET_TID_QID(x) (((x) >> 14) & 0x3ff) | 185 | #define TID_TID_M 0x3fff |
172 | #define TID_QID(x) ((x) << 14) | 186 | #define TID_TID_G(x) (((x) >> TID_TID_S) & TID_TID_M) |
187 | |||
188 | #define TID_QID_S 14 | ||
189 | #define TID_QID_M 0x3ff | ||
190 | #define TID_QID_V(x) ((x) << TID_QID_S) | ||
191 | #define TID_QID_G(x) (((x) >> TID_QID_S) & TID_QID_M) | ||
173 | 192 | ||
174 | struct rss_header { | 193 | struct rss_header { |
175 | u8 opcode; | 194 | u8 opcode; |
@@ -199,8 +218,8 @@ struct work_request_hdr { | |||
199 | }; | 218 | }; |
200 | 219 | ||
201 | /* wr_hi fields */ | 220 | /* wr_hi fields */ |
202 | #define S_WR_OP 24 | 221 | #define WR_OP_S 24 |
203 | #define V_WR_OP(x) ((__u64)(x) << S_WR_OP) | 222 | #define WR_OP_V(x) ((__u64)(x) << WR_OP_S) |
204 | 223 | ||
205 | #define WR_HDR struct work_request_hdr wr | 224 | #define WR_HDR struct work_request_hdr wr |
206 | 225 | ||
@@ -270,17 +289,42 @@ struct cpl_pass_open_req { | |||
270 | __be32 local_ip; | 289 | __be32 local_ip; |
271 | __be32 peer_ip; | 290 | __be32 peer_ip; |
272 | __be64 opt0; | 291 | __be64 opt0; |
273 | #define NO_CONG(x) ((x) << 4) | ||
274 | #define DELACK(x) ((x) << 5) | ||
275 | #define DSCP(x) ((x) << 22) | ||
276 | #define TCAM_BYPASS(x) ((u64)(x) << 48) | ||
277 | #define NAGLE(x) ((u64)(x) << 49) | ||
278 | __be64 opt1; | 292 | __be64 opt1; |
279 | #define SYN_RSS_ENABLE (1 << 0) | ||
280 | #define SYN_RSS_QUEUE(x) ((x) << 2) | ||
281 | #define CONN_POLICY_ASK (1 << 22) | ||
282 | }; | 293 | }; |
283 | 294 | ||
295 | /* option 0 fields */ | ||
296 | #define NO_CONG_S 4 | ||
297 | #define NO_CONG_V(x) ((x) << NO_CONG_S) | ||
298 | #define NO_CONG_F NO_CONG_V(1U) | ||
299 | |||
300 | #define DELACK_S 5 | ||
301 | #define DELACK_V(x) ((x) << DELACK_S) | ||
302 | #define DELACK_F DELACK_V(1U) | ||
303 | |||
304 | #define DSCP_S 22 | ||
305 | #define DSCP_M 0x3F | ||
306 | #define DSCP_V(x) ((x) << DSCP_S) | ||
307 | #define DSCP_G(x) (((x) >> DSCP_S) & DSCP_M) | ||
308 | |||
309 | #define TCAM_BYPASS_S 48 | ||
310 | #define TCAM_BYPASS_V(x) ((__u64)(x) << TCAM_BYPASS_S) | ||
311 | #define TCAM_BYPASS_F TCAM_BYPASS_V(1ULL) | ||
312 | |||
313 | #define NAGLE_S 49 | ||
314 | #define NAGLE_V(x) ((__u64)(x) << NAGLE_S) | ||
315 | #define NAGLE_F NAGLE_V(1ULL) | ||
316 | |||
317 | /* option 1 fields */ | ||
318 | #define SYN_RSS_ENABLE_S 0 | ||
319 | #define SYN_RSS_ENABLE_V(x) ((x) << SYN_RSS_ENABLE_S) | ||
320 | #define SYN_RSS_ENABLE_F SYN_RSS_ENABLE_V(1U) | ||
321 | |||
322 | #define SYN_RSS_QUEUE_S 2 | ||
323 | #define SYN_RSS_QUEUE_V(x) ((x) << SYN_RSS_QUEUE_S) | ||
324 | |||
325 | #define CONN_POLICY_S 22 | ||
326 | #define CONN_POLICY_V(x) ((x) << CONN_POLICY_S) | ||
327 | |||
284 | struct cpl_pass_open_req6 { | 328 | struct cpl_pass_open_req6 { |
285 | WR_HDR; | 329 | WR_HDR; |
286 | union opcode_tid ot; | 330 | union opcode_tid ot; |
@@ -304,16 +348,37 @@ struct cpl_pass_accept_rpl { | |||
304 | WR_HDR; | 348 | WR_HDR; |
305 | union opcode_tid ot; | 349 | union opcode_tid ot; |
306 | __be32 opt2; | 350 | __be32 opt2; |
307 | #define RX_COALESCE_VALID(x) ((x) << 11) | ||
308 | #define RX_COALESCE(x) ((x) << 12) | ||
309 | #define PACE(x) ((x) << 16) | ||
310 | #define TX_QUEUE(x) ((x) << 23) | ||
311 | #define CCTRL_ECN(x) ((x) << 27) | ||
312 | #define TSTAMPS_EN(x) ((x) << 29) | ||
313 | #define SACK_EN(x) ((x) << 30) | ||
314 | __be64 opt0; | 351 | __be64 opt0; |
315 | }; | 352 | }; |
316 | 353 | ||
354 | /* option 2 fields */ | ||
355 | #define RX_COALESCE_VALID_S 11 | ||
356 | #define RX_COALESCE_VALID_V(x) ((x) << RX_COALESCE_VALID_S) | ||
357 | #define RX_COALESCE_VALID_F RX_COALESCE_VALID_V(1U) | ||
358 | |||
359 | #define RX_COALESCE_S 12 | ||
360 | #define RX_COALESCE_V(x) ((x) << RX_COALESCE_S) | ||
361 | |||
362 | #define PACE_S 16 | ||
363 | #define PACE_V(x) ((x) << PACE_S) | ||
364 | |||
365 | #define TX_QUEUE_S 23 | ||
366 | #define TX_QUEUE_M 0x7 | ||
367 | #define TX_QUEUE_V(x) ((x) << TX_QUEUE_S) | ||
368 | #define TX_QUEUE_G(x) (((x) >> TX_QUEUE_S) & TX_QUEUE_M) | ||
369 | |||
370 | #define CCTRL_ECN_S 27 | ||
371 | #define CCTRL_ECN_V(x) ((x) << CCTRL_ECN_S) | ||
372 | #define CCTRL_ECN_F CCTRL_ECN_V(1U) | ||
373 | |||
374 | #define TSTAMPS_EN_S 29 | ||
375 | #define TSTAMPS_EN_V(x) ((x) << TSTAMPS_EN_S) | ||
376 | #define TSTAMPS_EN_F TSTAMPS_EN_V(1U) | ||
377 | |||
378 | #define SACK_EN_S 30 | ||
379 | #define SACK_EN_V(x) ((x) << SACK_EN_S) | ||
380 | #define SACK_EN_F SACK_EN_V(1U) | ||
381 | |||
317 | struct cpl_t5_pass_accept_rpl { | 382 | struct cpl_t5_pass_accept_rpl { |
318 | WR_HDR; | 383 | WR_HDR; |
319 | union opcode_tid ot; | 384 | union opcode_tid ot; |
@@ -384,30 +449,61 @@ struct cpl_t5_act_open_req6 { | |||
384 | struct cpl_act_open_rpl { | 449 | struct cpl_act_open_rpl { |
385 | union opcode_tid ot; | 450 | union opcode_tid ot; |
386 | __be32 atid_status; | 451 | __be32 atid_status; |
387 | #define GET_AOPEN_STATUS(x) ((x) & 0xff) | ||
388 | #define GET_AOPEN_ATID(x) (((x) >> 8) & 0xffffff) | ||
389 | }; | 452 | }; |
390 | 453 | ||
454 | /* cpl_act_open_rpl.atid_status fields */ | ||
455 | #define AOPEN_STATUS_S 0 | ||
456 | #define AOPEN_STATUS_M 0xFF | ||
457 | #define AOPEN_STATUS_G(x) (((x) >> AOPEN_STATUS_S) & AOPEN_STATUS_M) | ||
458 | |||
459 | #define AOPEN_ATID_S 8 | ||
460 | #define AOPEN_ATID_M 0xFFFFFF | ||
461 | #define AOPEN_ATID_G(x) (((x) >> AOPEN_ATID_S) & AOPEN_ATID_M) | ||
462 | |||
391 | struct cpl_pass_establish { | 463 | struct cpl_pass_establish { |
392 | union opcode_tid ot; | 464 | union opcode_tid ot; |
393 | __be32 rsvd; | 465 | __be32 rsvd; |
394 | __be32 tos_stid; | 466 | __be32 tos_stid; |
395 | #define PASS_OPEN_TID(x) ((x) << 0) | ||
396 | #define PASS_OPEN_TOS(x) ((x) << 24) | ||
397 | #define GET_PASS_OPEN_TID(x) (((x) >> 0) & 0xFFFFFF) | ||
398 | #define GET_POPEN_TID(x) ((x) & 0xffffff) | ||
399 | #define GET_POPEN_TOS(x) (((x) >> 24) & 0xff) | ||
400 | __be16 mac_idx; | 467 | __be16 mac_idx; |
401 | __be16 tcp_opt; | 468 | __be16 tcp_opt; |
402 | #define GET_TCPOPT_WSCALE_OK(x) (((x) >> 5) & 1) | ||
403 | #define GET_TCPOPT_SACK(x) (((x) >> 6) & 1) | ||
404 | #define GET_TCPOPT_TSTAMP(x) (((x) >> 7) & 1) | ||
405 | #define GET_TCPOPT_SND_WSCALE(x) (((x) >> 8) & 0xf) | ||
406 | #define GET_TCPOPT_MSS(x) (((x) >> 12) & 0xf) | ||
407 | __be32 snd_isn; | 469 | __be32 snd_isn; |
408 | __be32 rcv_isn; | 470 | __be32 rcv_isn; |
409 | }; | 471 | }; |
410 | 472 | ||
473 | /* cpl_pass_establish.tos_stid fields */ | ||
474 | #define PASS_OPEN_TID_S 0 | ||
475 | #define PASS_OPEN_TID_M 0xFFFFFF | ||
476 | #define PASS_OPEN_TID_V(x) ((x) << PASS_OPEN_TID_S) | ||
477 | #define PASS_OPEN_TID_G(x) (((x) >> PASS_OPEN_TID_S) & PASS_OPEN_TID_M) | ||
478 | |||
479 | #define PASS_OPEN_TOS_S 24 | ||
480 | #define PASS_OPEN_TOS_M 0xFF | ||
481 | #define PASS_OPEN_TOS_V(x) ((x) << PASS_OPEN_TOS_S) | ||
482 | #define PASS_OPEN_TOS_G(x) (((x) >> PASS_OPEN_TOS_S) & PASS_OPEN_TOS_M) | ||
483 | |||
484 | /* cpl_pass_establish.tcp_opt fields (also applies to act_open_establish) */ | ||
485 | #define TCPOPT_WSCALE_OK_S 5 | ||
486 | #define TCPOPT_WSCALE_OK_M 0x1 | ||
487 | #define TCPOPT_WSCALE_OK_G(x) \ | ||
488 | (((x) >> TCPOPT_WSCALE_OK_S) & TCPOPT_WSCALE_OK_M) | ||
489 | |||
490 | #define TCPOPT_SACK_S 6 | ||
491 | #define TCPOPT_SACK_M 0x1 | ||
492 | #define TCPOPT_SACK_G(x) (((x) >> TCPOPT_SACK_S) & TCPOPT_SACK_M) | ||
493 | |||
494 | #define TCPOPT_TSTAMP_S 7 | ||
495 | #define TCPOPT_TSTAMP_M 0x1 | ||
496 | #define TCPOPT_TSTAMP_G(x) (((x) >> TCPOPT_TSTAMP_S) & TCPOPT_TSTAMP_M) | ||
497 | |||
498 | #define TCPOPT_SND_WSCALE_S 8 | ||
499 | #define TCPOPT_SND_WSCALE_M 0xF | ||
500 | #define TCPOPT_SND_WSCALE_G(x) \ | ||
501 | (((x) >> TCPOPT_SND_WSCALE_S) & TCPOPT_SND_WSCALE_M) | ||
502 | |||
503 | #define TCPOPT_MSS_S 12 | ||
504 | #define TCPOPT_MSS_M 0xF | ||
505 | #define TCPOPT_MSS_G(x) (((x) >> TCPOPT_MSS_S) & TCPOPT_MSS_M) | ||
506 | |||
411 | struct cpl_act_establish { | 507 | struct cpl_act_establish { |
412 | union opcode_tid ot; | 508 | union opcode_tid ot; |
413 | __be32 rsvd; | 509 | __be32 rsvd; |
@@ -422,24 +518,39 @@ struct cpl_get_tcb { | |||
422 | WR_HDR; | 518 | WR_HDR; |
423 | union opcode_tid ot; | 519 | union opcode_tid ot; |
424 | __be16 reply_ctrl; | 520 | __be16 reply_ctrl; |
425 | #define QUEUENO(x) ((x) << 0) | ||
426 | #define REPLY_CHAN(x) ((x) << 14) | ||
427 | #define NO_REPLY(x) ((x) << 15) | ||
428 | __be16 cookie; | 521 | __be16 cookie; |
429 | }; | 522 | }; |
430 | 523 | ||
524 | /* cpl_get_tcb.reply_ctrl fields */ | ||
525 | #define QUEUENO_S 0 | ||
526 | #define QUEUENO_V(x) ((x) << QUEUENO_S) | ||
527 | |||
528 | #define REPLY_CHAN_S 14 | ||
529 | #define REPLY_CHAN_V(x) ((x) << REPLY_CHAN_S) | ||
530 | #define REPLY_CHAN_F REPLY_CHAN_V(1U) | ||
531 | |||
532 | #define NO_REPLY_S 15 | ||
533 | #define NO_REPLY_V(x) ((x) << NO_REPLY_S) | ||
534 | #define NO_REPLY_F NO_REPLY_V(1U) | ||
535 | |||
431 | struct cpl_set_tcb_field { | 536 | struct cpl_set_tcb_field { |
432 | WR_HDR; | 537 | WR_HDR; |
433 | union opcode_tid ot; | 538 | union opcode_tid ot; |
434 | __be16 reply_ctrl; | 539 | __be16 reply_ctrl; |
435 | __be16 word_cookie; | 540 | __be16 word_cookie; |
436 | #define TCB_WORD(x) ((x) << 0) | ||
437 | #define TCB_COOKIE(x) ((x) << 5) | ||
438 | #define GET_TCB_COOKIE(x) (((x) >> 5) & 7) | ||
439 | __be64 mask; | 541 | __be64 mask; |
440 | __be64 val; | 542 | __be64 val; |
441 | }; | 543 | }; |
442 | 544 | ||
545 | /* cpl_set_tcb_field.word_cookie fields */ | ||
546 | #define TCB_WORD_S 0 | ||
547 | #define TCB_WORD(x) ((x) << TCB_WORD_S) | ||
548 | |||
549 | #define TCB_COOKIE_S 5 | ||
550 | #define TCB_COOKIE_M 0x7 | ||
551 | #define TCB_COOKIE_V(x) ((x) << TCB_COOKIE_S) | ||
552 | #define TCB_COOKIE_G(x) (((x) >> TCB_COOKIE_S) & TCB_COOKIE_M) | ||
553 | |||
443 | struct cpl_set_tcb_rpl { | 554 | struct cpl_set_tcb_rpl { |
444 | union opcode_tid ot; | 555 | union opcode_tid ot; |
445 | __be16 rsvd; | 556 | __be16 rsvd; |
@@ -466,10 +577,14 @@ struct cpl_close_listsvr_req { | |||
466 | WR_HDR; | 577 | WR_HDR; |
467 | union opcode_tid ot; | 578 | union opcode_tid ot; |
468 | __be16 reply_ctrl; | 579 | __be16 reply_ctrl; |
469 | #define LISTSVR_IPV6(x) ((x) << 14) | ||
470 | __be16 rsvd; | 580 | __be16 rsvd; |
471 | }; | 581 | }; |
472 | 582 | ||
583 | /* additional cpl_close_listsvr_req.reply_ctrl field */ | ||
584 | #define LISTSVR_IPV6_S 14 | ||
585 | #define LISTSVR_IPV6_V(x) ((x) << LISTSVR_IPV6_S) | ||
586 | #define LISTSVR_IPV6_F LISTSVR_IPV6_V(1U) | ||
587 | |||
473 | struct cpl_close_listsvr_rpl { | 588 | struct cpl_close_listsvr_rpl { |
474 | union opcode_tid ot; | 589 | union opcode_tid ot; |
475 | u8 rsvd[3]; | 590 | u8 rsvd[3]; |
@@ -565,6 +680,34 @@ struct cpl_tx_pkt_lso_core { | |||
565 | /* encapsulated CPL (TX_PKT, TX_PKT_XT or TX_DATA) follows here */ | 680 | /* encapsulated CPL (TX_PKT, TX_PKT_XT or TX_DATA) follows here */ |
566 | }; | 681 | }; |
567 | 682 | ||
683 | /* cpl_tx_pkt_lso_core.lso_ctrl fields */ | ||
684 | #define LSO_TCPHDR_LEN_S 0 | ||
685 | #define LSO_TCPHDR_LEN_V(x) ((x) << LSO_TCPHDR_LEN_S) | ||
686 | |||
687 | #define LSO_IPHDR_LEN_S 4 | ||
688 | #define LSO_IPHDR_LEN_V(x) ((x) << LSO_IPHDR_LEN_S) | ||
689 | |||
690 | #define LSO_ETHHDR_LEN_S 16 | ||
691 | #define LSO_ETHHDR_LEN_V(x) ((x) << LSO_ETHHDR_LEN_S) | ||
692 | |||
693 | #define LSO_IPV6_S 20 | ||
694 | #define LSO_IPV6_V(x) ((x) << LSO_IPV6_S) | ||
695 | #define LSO_IPV6_F LSO_IPV6_V(1U) | ||
696 | |||
697 | #define LSO_LAST_SLICE_S 22 | ||
698 | #define LSO_LAST_SLICE_V(x) ((x) << LSO_LAST_SLICE_S) | ||
699 | #define LSO_LAST_SLICE_F LSO_LAST_SLICE_V(1U) | ||
700 | |||
701 | #define LSO_FIRST_SLICE_S 23 | ||
702 | #define LSO_FIRST_SLICE_V(x) ((x) << LSO_FIRST_SLICE_S) | ||
703 | #define LSO_FIRST_SLICE_F LSO_FIRST_SLICE_V(1U) | ||
704 | |||
705 | #define LSO_OPCODE_S 24 | ||
706 | #define LSO_OPCODE_V(x) ((x) << LSO_OPCODE_S) | ||
707 | |||
708 | #define LSO_T5_XFER_SIZE_S 0 | ||
709 | #define LSO_T5_XFER_SIZE_V(x) ((x) << LSO_T5_XFER_SIZE_S) | ||
710 | |||
568 | struct cpl_tx_pkt_lso { | 711 | struct cpl_tx_pkt_lso { |
569 | WR_HDR; | 712 | WR_HDR; |
570 | struct cpl_tx_pkt_lso_core c; | 713 | struct cpl_tx_pkt_lso_core c; |
@@ -574,8 +717,6 @@ struct cpl_tx_pkt_lso { | |||
574 | struct cpl_iscsi_hdr { | 717 | struct cpl_iscsi_hdr { |
575 | union opcode_tid ot; | 718 | union opcode_tid ot; |
576 | __be16 pdu_len_ddp; | 719 | __be16 pdu_len_ddp; |
577 | #define ISCSI_PDU_LEN(x) ((x) & 0x7FFF) | ||
578 | #define ISCSI_DDP (1 << 15) | ||
579 | __be16 len; | 720 | __be16 len; |
580 | __be32 seq; | 721 | __be32 seq; |
581 | __be16 urg; | 722 | __be16 urg; |
@@ -583,6 +724,16 @@ struct cpl_iscsi_hdr { | |||
583 | u8 status; | 724 | u8 status; |
584 | }; | 725 | }; |
585 | 726 | ||
727 | /* cpl_iscsi_hdr.pdu_len_ddp fields */ | ||
728 | #define ISCSI_PDU_LEN_S 0 | ||
729 | #define ISCSI_PDU_LEN_M 0x7FFF | ||
730 | #define ISCSI_PDU_LEN_V(x) ((x) << ISCSI_PDU_LEN_S) | ||
731 | #define ISCSI_PDU_LEN_G(x) (((x) >> ISCSI_PDU_LEN_S) & ISCSI_PDU_LEN_M) | ||
732 | |||
733 | #define ISCSI_DDP_S 15 | ||
734 | #define ISCSI_DDP_V(x) ((x) << ISCSI_DDP_S) | ||
735 | #define ISCSI_DDP_F ISCSI_DDP_V(1U) | ||
736 | |||
586 | struct cpl_rx_data { | 737 | struct cpl_rx_data { |
587 | union opcode_tid ot; | 738 | union opcode_tid ot; |
588 | __be16 rsvd; | 739 | __be16 rsvd; |
@@ -639,49 +790,61 @@ struct cpl_rx_pkt { | |||
639 | __be16 vlan; | 790 | __be16 vlan; |
640 | __be16 len; | 791 | __be16 len; |
641 | __be32 l2info; | 792 | __be32 l2info; |
642 | #define RXF_UDP (1 << 22) | ||
643 | #define RXF_TCP (1 << 23) | ||
644 | #define RXF_IP (1 << 24) | ||
645 | #define RXF_IP6 (1 << 25) | ||
646 | __be16 hdr_len; | 793 | __be16 hdr_len; |
647 | __be16 err_vec; | 794 | __be16 err_vec; |
648 | }; | 795 | }; |
649 | 796 | ||
797 | #define RXF_UDP_S 22 | ||
798 | #define RXF_UDP_V(x) ((x) << RXF_UDP_S) | ||
799 | #define RXF_UDP_F RXF_UDP_V(1U) | ||
800 | |||
801 | #define RXF_TCP_S 23 | ||
802 | #define RXF_TCP_V(x) ((x) << RXF_TCP_S) | ||
803 | #define RXF_TCP_F RXF_TCP_V(1U) | ||
804 | |||
805 | #define RXF_IP_S 24 | ||
806 | #define RXF_IP_V(x) ((x) << RXF_IP_S) | ||
807 | #define RXF_IP_F RXF_IP_V(1U) | ||
808 | |||
809 | #define RXF_IP6_S 25 | ||
810 | #define RXF_IP6_V(x) ((x) << RXF_IP6_S) | ||
811 | #define RXF_IP6_F RXF_IP6_V(1U) | ||
812 | |||
650 | /* rx_pkt.l2info fields */ | 813 | /* rx_pkt.l2info fields */ |
651 | #define S_RX_ETHHDR_LEN 0 | 814 | #define RX_ETHHDR_LEN_S 0 |
652 | #define M_RX_ETHHDR_LEN 0x1F | 815 | #define RX_ETHHDR_LEN_M 0x1F |
653 | #define V_RX_ETHHDR_LEN(x) ((x) << S_RX_ETHHDR_LEN) | 816 | #define RX_ETHHDR_LEN_V(x) ((x) << RX_ETHHDR_LEN_S) |
654 | #define G_RX_ETHHDR_LEN(x) (((x) >> S_RX_ETHHDR_LEN) & M_RX_ETHHDR_LEN) | 817 | #define RX_ETHHDR_LEN_G(x) (((x) >> RX_ETHHDR_LEN_S) & RX_ETHHDR_LEN_M) |
655 | 818 | ||
656 | #define S_RX_T5_ETHHDR_LEN 0 | 819 | #define RX_T5_ETHHDR_LEN_S 0 |
657 | #define M_RX_T5_ETHHDR_LEN 0x3F | 820 | #define RX_T5_ETHHDR_LEN_M 0x3F |
658 | #define V_RX_T5_ETHHDR_LEN(x) ((x) << S_RX_T5_ETHHDR_LEN) | 821 | #define RX_T5_ETHHDR_LEN_V(x) ((x) << RX_T5_ETHHDR_LEN_S) |
659 | #define G_RX_T5_ETHHDR_LEN(x) (((x) >> S_RX_T5_ETHHDR_LEN) & M_RX_T5_ETHHDR_LEN) | 822 | #define RX_T5_ETHHDR_LEN_G(x) (((x) >> RX_T5_ETHHDR_LEN_S) & RX_T5_ETHHDR_LEN_M) |
660 | 823 | ||
661 | #define S_RX_MACIDX 8 | 824 | #define RX_MACIDX_S 8 |
662 | #define M_RX_MACIDX 0x1FF | 825 | #define RX_MACIDX_M 0x1FF |
663 | #define V_RX_MACIDX(x) ((x) << S_RX_MACIDX) | 826 | #define RX_MACIDX_V(x) ((x) << RX_MACIDX_S) |
664 | #define G_RX_MACIDX(x) (((x) >> S_RX_MACIDX) & M_RX_MACIDX) | 827 | #define RX_MACIDX_G(x) (((x) >> RX_MACIDX_S) & RX_MACIDX_M) |
665 | 828 | ||
666 | #define S_RXF_SYN 21 | 829 | #define RXF_SYN_S 21 |
667 | #define V_RXF_SYN(x) ((x) << S_RXF_SYN) | 830 | #define RXF_SYN_V(x) ((x) << RXF_SYN_S) |
668 | #define F_RXF_SYN V_RXF_SYN(1U) | 831 | #define RXF_SYN_F RXF_SYN_V(1U) |
669 | 832 | ||
670 | #define S_RX_CHAN 28 | 833 | #define RX_CHAN_S 28 |
671 | #define M_RX_CHAN 0xF | 834 | #define RX_CHAN_M 0xF |
672 | #define V_RX_CHAN(x) ((x) << S_RX_CHAN) | 835 | #define RX_CHAN_V(x) ((x) << RX_CHAN_S) |
673 | #define G_RX_CHAN(x) (((x) >> S_RX_CHAN) & M_RX_CHAN) | 836 | #define RX_CHAN_G(x) (((x) >> RX_CHAN_S) & RX_CHAN_M) |
674 | 837 | ||
675 | /* rx_pkt.hdr_len fields */ | 838 | /* rx_pkt.hdr_len fields */ |
676 | #define S_RX_TCPHDR_LEN 0 | 839 | #define RX_TCPHDR_LEN_S 0 |
677 | #define M_RX_TCPHDR_LEN 0x3F | 840 | #define RX_TCPHDR_LEN_M 0x3F |
678 | #define V_RX_TCPHDR_LEN(x) ((x) << S_RX_TCPHDR_LEN) | 841 | #define RX_TCPHDR_LEN_V(x) ((x) << RX_TCPHDR_LEN_S) |
679 | #define G_RX_TCPHDR_LEN(x) (((x) >> S_RX_TCPHDR_LEN) & M_RX_TCPHDR_LEN) | 842 | #define RX_TCPHDR_LEN_G(x) (((x) >> RX_TCPHDR_LEN_S) & RX_TCPHDR_LEN_M) |
680 | 843 | ||
681 | #define S_RX_IPHDR_LEN 6 | 844 | #define RX_IPHDR_LEN_S 6 |
682 | #define M_RX_IPHDR_LEN 0x3FF | 845 | #define RX_IPHDR_LEN_M 0x3FF |
683 | #define V_RX_IPHDR_LEN(x) ((x) << S_RX_IPHDR_LEN) | 846 | #define RX_IPHDR_LEN_V(x) ((x) << RX_IPHDR_LEN_S) |
684 | #define G_RX_IPHDR_LEN(x) (((x) >> S_RX_IPHDR_LEN) & M_RX_IPHDR_LEN) | 847 | #define RX_IPHDR_LEN_G(x) (((x) >> RX_IPHDR_LEN_S) & RX_IPHDR_LEN_M) |
685 | 848 | ||
686 | struct cpl_trace_pkt { | 849 | struct cpl_trace_pkt { |
687 | u8 opcode; | 850 | u8 opcode; |
@@ -730,14 +893,22 @@ struct cpl_l2t_write_req { | |||
730 | WR_HDR; | 893 | WR_HDR; |
731 | union opcode_tid ot; | 894 | union opcode_tid ot; |
732 | __be16 params; | 895 | __be16 params; |
733 | #define L2T_W_INFO(x) ((x) << 2) | ||
734 | #define L2T_W_PORT(x) ((x) << 8) | ||
735 | #define L2T_W_NOREPLY(x) ((x) << 15) | ||
736 | __be16 l2t_idx; | 896 | __be16 l2t_idx; |
737 | __be16 vlan; | 897 | __be16 vlan; |
738 | u8 dst_mac[6]; | 898 | u8 dst_mac[6]; |
739 | }; | 899 | }; |
740 | 900 | ||
901 | /* cpl_l2t_write_req.params fields */ | ||
902 | #define L2T_W_INFO_S 2 | ||
903 | #define L2T_W_INFO_V(x) ((x) << L2T_W_INFO_S) | ||
904 | |||
905 | #define L2T_W_PORT_S 8 | ||
906 | #define L2T_W_PORT_V(x) ((x) << L2T_W_PORT_S) | ||
907 | |||
908 | #define L2T_W_NOREPLY_S 15 | ||
909 | #define L2T_W_NOREPLY_V(x) ((x) << L2T_W_NOREPLY_S) | ||
910 | #define L2T_W_NOREPLY_F L2T_W_NOREPLY_V(1U) | ||
911 | |||
741 | struct cpl_l2t_write_rpl { | 912 | struct cpl_l2t_write_rpl { |
742 | union opcode_tid ot; | 913 | union opcode_tid ot; |
743 | u8 status; | 914 | u8 status; |
@@ -752,11 +923,15 @@ struct cpl_rdma_terminate { | |||
752 | 923 | ||
753 | struct cpl_sge_egr_update { | 924 | struct cpl_sge_egr_update { |
754 | __be32 opcode_qid; | 925 | __be32 opcode_qid; |
755 | #define EGR_QID(x) ((x) & 0x1FFFF) | ||
756 | __be16 cidx; | 926 | __be16 cidx; |
757 | __be16 pidx; | 927 | __be16 pidx; |
758 | }; | 928 | }; |
759 | 929 | ||
930 | /* cpl_sge_egr_update.ot fields */ | ||
931 | #define EGR_QID_S 0 | ||
932 | #define EGR_QID_M 0x1FFFF | ||
933 | #define EGR_QID_G(x) (((x) >> EGR_QID_S) & EGR_QID_M) | ||
934 | |||
760 | /* cpl_fw*.type values */ | 935 | /* cpl_fw*.type values */ |
761 | enum { | 936 | enum { |
762 | FW_TYPE_CMD_RPL = 0, | 937 | FW_TYPE_CMD_RPL = 0, |
@@ -849,22 +1024,30 @@ struct ulptx_sge_pair { | |||
849 | 1024 | ||
850 | struct ulptx_sgl { | 1025 | struct ulptx_sgl { |
851 | __be32 cmd_nsge; | 1026 | __be32 cmd_nsge; |
852 | #define ULPTX_NSGE(x) ((x) << 0) | ||
853 | #define ULPTX_MORE (1U << 23) | ||
854 | __be32 len0; | 1027 | __be32 len0; |
855 | __be64 addr0; | 1028 | __be64 addr0; |
856 | struct ulptx_sge_pair sge[0]; | 1029 | struct ulptx_sge_pair sge[0]; |
857 | }; | 1030 | }; |
858 | 1031 | ||
1032 | #define ULPTX_NSGE_S 0 | ||
1033 | #define ULPTX_NSGE_V(x) ((x) << ULPTX_NSGE_S) | ||
1034 | |||
1035 | #define ULPTX_MORE_S 23 | ||
1036 | #define ULPTX_MORE_V(x) ((x) << ULPTX_MORE_S) | ||
1037 | #define ULPTX_MORE_F ULPTX_MORE_V(1U) | ||
1038 | |||
859 | struct ulp_mem_io { | 1039 | struct ulp_mem_io { |
860 | WR_HDR; | 1040 | WR_HDR; |
861 | __be32 cmd; | 1041 | __be32 cmd; |
862 | __be32 len16; /* command length */ | 1042 | __be32 len16; /* command length */ |
863 | __be32 dlen; /* data length in 32-byte units */ | 1043 | __be32 dlen; /* data length in 32-byte units */ |
864 | __be32 lock_addr; | 1044 | __be32 lock_addr; |
865 | #define ULP_MEMIO_LOCK(x) ((x) << 31) | ||
866 | }; | 1045 | }; |
867 | 1046 | ||
1047 | #define ULP_MEMIO_LOCK_S 31 | ||
1048 | #define ULP_MEMIO_LOCK_V(x) ((x) << ULP_MEMIO_LOCK_S) | ||
1049 | #define ULP_MEMIO_LOCK_F ULP_MEMIO_LOCK_V(1U) | ||
1050 | |||
868 | /* additional ulp_mem_io.cmd fields */ | 1051 | /* additional ulp_mem_io.cmd fields */ |
869 | #define ULP_MEMIO_ORDER_S 23 | 1052 | #define ULP_MEMIO_ORDER_S 23 |
870 | #define ULP_MEMIO_ORDER_V(x) ((x) << ULP_MEMIO_ORDER_S) | 1053 | #define ULP_MEMIO_ORDER_V(x) ((x) << ULP_MEMIO_ORDER_S) |
@@ -874,13 +1057,9 @@ struct ulp_mem_io { | |||
874 | #define T5_ULP_MEMIO_IMM_V(x) ((x) << T5_ULP_MEMIO_IMM_S) | 1057 | #define T5_ULP_MEMIO_IMM_V(x) ((x) << T5_ULP_MEMIO_IMM_S) |
875 | #define T5_ULP_MEMIO_IMM_F T5_ULP_MEMIO_IMM_V(1U) | 1058 | #define T5_ULP_MEMIO_IMM_F T5_ULP_MEMIO_IMM_V(1U) |
876 | 1059 | ||
877 | #define S_T5_ULP_MEMIO_IMM 23 | 1060 | #define T5_ULP_MEMIO_ORDER_S 22 |
878 | #define V_T5_ULP_MEMIO_IMM(x) ((x) << S_T5_ULP_MEMIO_IMM) | 1061 | #define T5_ULP_MEMIO_ORDER_V(x) ((x) << T5_ULP_MEMIO_ORDER_S) |
879 | #define F_T5_ULP_MEMIO_IMM V_T5_ULP_MEMIO_IMM(1U) | 1062 | #define T5_ULP_MEMIO_ORDER_F T5_ULP_MEMIO_ORDER_V(1U) |
880 | |||
881 | #define S_T5_ULP_MEMIO_ORDER 22 | ||
882 | #define V_T5_ULP_MEMIO_ORDER(x) ((x) << S_T5_ULP_MEMIO_ORDER) | ||
883 | #define F_T5_ULP_MEMIO_ORDER V_T5_ULP_MEMIO_ORDER(1U) | ||
884 | 1063 | ||
885 | /* ulp_mem_io.lock_addr fields */ | 1064 | /* ulp_mem_io.lock_addr fields */ |
886 | #define ULP_MEMIO_ADDR_S 0 | 1065 | #define ULP_MEMIO_ADDR_S 0 |
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c index 7bfbacd63f7a..710e5e2bac9f 100644 --- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | |||
@@ -450,7 +450,7 @@ static int fwevtq_handler(struct sge_rspq *rspq, const __be64 *rsp, | |||
450 | /* FW can send EGR_UPDATEs encapsulated in a CPL_FW4_MSG. | 450 | /* FW can send EGR_UPDATEs encapsulated in a CPL_FW4_MSG. |
451 | */ | 451 | */ |
452 | const struct cpl_sge_egr_update *p = (void *)(rsp + 3); | 452 | const struct cpl_sge_egr_update *p = (void *)(rsp + 3); |
453 | opcode = G_CPL_OPCODE(ntohl(p->opcode_qid)); | 453 | opcode = CPL_OPCODE_G(ntohl(p->opcode_qid)); |
454 | if (opcode != CPL_SGE_EGR_UPDATE) { | 454 | if (opcode != CPL_SGE_EGR_UPDATE) { |
455 | dev_err(adapter->pdev_dev, "unexpected FW4/CPL %#x on FW event queue\n" | 455 | dev_err(adapter->pdev_dev, "unexpected FW4/CPL %#x on FW event queue\n" |
456 | , opcode); | 456 | , opcode); |
@@ -471,7 +471,7 @@ static int fwevtq_handler(struct sge_rspq *rspq, const __be64 *rsp, | |||
471 | * free TX Queue Descriptors ... | 471 | * free TX Queue Descriptors ... |
472 | */ | 472 | */ |
473 | const struct cpl_sge_egr_update *p = cpl; | 473 | const struct cpl_sge_egr_update *p = cpl; |
474 | unsigned int qid = EGR_QID(be32_to_cpu(p->opcode_qid)); | 474 | unsigned int qid = EGR_QID_G(be32_to_cpu(p->opcode_qid)); |
475 | struct sge *s = &adapter->sge; | 475 | struct sge *s = &adapter->sge; |
476 | struct sge_txq *tq; | 476 | struct sge_txq *tq; |
477 | struct sge_eth_txq *txq; | 477 | struct sge_eth_txq *txq; |
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c index ef4da3e1829b..4424277a7e4d 100644 --- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c | |||
@@ -926,7 +926,7 @@ static void write_sgl(const struct sk_buff *skb, struct sge_txq *tq, | |||
926 | } | 926 | } |
927 | 927 | ||
928 | sgl->cmd_nsge = htonl(ULPTX_CMD_V(ULP_TX_SC_DSGL) | | 928 | sgl->cmd_nsge = htonl(ULPTX_CMD_V(ULP_TX_SC_DSGL) | |
929 | ULPTX_NSGE(nfrags)); | 929 | ULPTX_NSGE_V(nfrags)); |
930 | if (likely(--nfrags == 0)) | 930 | if (likely(--nfrags == 0)) |
931 | return; | 931 | return; |
932 | /* | 932 | /* |
@@ -1604,7 +1604,7 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp, | |||
1604 | * If this is a good TCP packet and we have Generic Receive Offload | 1604 | * If this is a good TCP packet and we have Generic Receive Offload |
1605 | * enabled, handle the packet in the GRO path. | 1605 | * enabled, handle the packet in the GRO path. |
1606 | */ | 1606 | */ |
1607 | if ((pkt->l2info & cpu_to_be32(RXF_TCP)) && | 1607 | if ((pkt->l2info & cpu_to_be32(RXF_TCP_F)) && |
1608 | (rspq->netdev->features & NETIF_F_GRO) && csum_ok && | 1608 | (rspq->netdev->features & NETIF_F_GRO) && csum_ok && |
1609 | !pkt->ip_frag) { | 1609 | !pkt->ip_frag) { |
1610 | do_gro(rxq, gl, pkt); | 1610 | do_gro(rxq, gl, pkt); |
@@ -1626,7 +1626,7 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp, | |||
1626 | rxq->stats.pkts++; | 1626 | rxq->stats.pkts++; |
1627 | 1627 | ||
1628 | if (csum_ok && !pkt->err_vec && | 1628 | if (csum_ok && !pkt->err_vec && |
1629 | (be32_to_cpu(pkt->l2info) & (RXF_UDP|RXF_TCP))) { | 1629 | (be32_to_cpu(pkt->l2info) & (RXF_UDP_F | RXF_TCP_F))) { |
1630 | if (!pkt->ip_frag) | 1630 | if (!pkt->ip_frag) |
1631 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 1631 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
1632 | else { | 1632 | else { |
diff --git a/drivers/scsi/csiostor/csio_lnode.c b/drivers/scsi/csiostor/csio_lnode.c index 87f9280d9b43..c00b2ff72b55 100644 --- a/drivers/scsi/csiostor/csio_lnode.c +++ b/drivers/scsi/csiostor/csio_lnode.c | |||
@@ -1758,7 +1758,7 @@ csio_ln_mgmt_submit_wr(struct csio_mgmtm *mgmtm, struct csio_ioreq *io_req, | |||
1758 | else { | 1758 | else { |
1759 | /* Program DSGL to dma payload */ | 1759 | /* Program DSGL to dma payload */ |
1760 | dsgl.cmd_nsge = htonl(ULPTX_CMD_V(ULP_TX_SC_DSGL) | | 1760 | dsgl.cmd_nsge = htonl(ULPTX_CMD_V(ULP_TX_SC_DSGL) | |
1761 | ULPTX_MORE | ULPTX_NSGE(1)); | 1761 | ULPTX_MORE_F | ULPTX_NSGE_V(1)); |
1762 | dsgl.len0 = cpu_to_be32(pld_len); | 1762 | dsgl.len0 = cpu_to_be32(pld_len); |
1763 | dsgl.addr0 = cpu_to_be64(pld->paddr); | 1763 | dsgl.addr0 = cpu_to_be64(pld->paddr); |
1764 | csio_wr_copy_to_wrp(&dsgl, &wrp, ALIGN(wr_off, 8), | 1764 | csio_wr_copy_to_wrp(&dsgl, &wrp, ALIGN(wr_off, 8), |
diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c index 3987284e0d2a..2c4562d82dc0 100644 --- a/drivers/scsi/csiostor/csio_scsi.c +++ b/drivers/scsi/csiostor/csio_scsi.c | |||
@@ -298,8 +298,8 @@ csio_scsi_init_ultptx_dsgl(struct csio_hw *hw, struct csio_ioreq *req, | |||
298 | struct csio_dma_buf *dma_buf; | 298 | struct csio_dma_buf *dma_buf; |
299 | struct scsi_cmnd *scmnd = csio_scsi_cmnd(req); | 299 | struct scsi_cmnd *scmnd = csio_scsi_cmnd(req); |
300 | 300 | ||
301 | sgl->cmd_nsge = htonl(ULPTX_CMD_V(ULP_TX_SC_DSGL) | ULPTX_MORE | | 301 | sgl->cmd_nsge = htonl(ULPTX_CMD_V(ULP_TX_SC_DSGL) | ULPTX_MORE_F | |
302 | ULPTX_NSGE(req->nsge)); | 302 | ULPTX_NSGE_V(req->nsge)); |
303 | /* Now add the data SGLs */ | 303 | /* Now add the data SGLs */ |
304 | if (likely(!req->dcopy)) { | 304 | if (likely(!req->dcopy)) { |
305 | scsi_for_each_sg(scmnd, sgel, req->nsge, i) { | 305 | scsi_for_each_sg(scmnd, sgel, req->nsge, i) { |
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c index a83d2ceded83..37d7191a3c38 100644 --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | |||
@@ -704,7 +704,7 @@ static void do_act_establish(struct cxgbi_device *cdev, struct sk_buff *skb) | |||
704 | struct cpl_act_establish *req = (struct cpl_act_establish *)skb->data; | 704 | struct cpl_act_establish *req = (struct cpl_act_establish *)skb->data; |
705 | unsigned short tcp_opt = ntohs(req->tcp_opt); | 705 | unsigned short tcp_opt = ntohs(req->tcp_opt); |
706 | unsigned int tid = GET_TID(req); | 706 | unsigned int tid = GET_TID(req); |
707 | unsigned int atid = GET_TID_TID(ntohl(req->tos_atid)); | 707 | unsigned int atid = TID_TID_G(ntohl(req->tos_atid)); |
708 | struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); | 708 | struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); |
709 | struct tid_info *t = lldi->tids; | 709 | struct tid_info *t = lldi->tids; |
710 | u32 rcv_isn = be32_to_cpu(req->rcv_isn); | 710 | u32 rcv_isn = be32_to_cpu(req->rcv_isn); |
@@ -752,15 +752,15 @@ static void do_act_establish(struct cxgbi_device *cdev, struct sk_buff *skb) | |||
752 | if (cxgb4i_rcv_win > (RCV_BUFSIZ_MASK << 10)) | 752 | if (cxgb4i_rcv_win > (RCV_BUFSIZ_MASK << 10)) |
753 | csk->rcv_wup -= cxgb4i_rcv_win - (RCV_BUFSIZ_MASK << 10); | 753 | csk->rcv_wup -= cxgb4i_rcv_win - (RCV_BUFSIZ_MASK << 10); |
754 | 754 | ||
755 | csk->advmss = lldi->mtus[GET_TCPOPT_MSS(tcp_opt)] - 40; | 755 | csk->advmss = lldi->mtus[TCPOPT_MSS_G(tcp_opt)] - 40; |
756 | if (GET_TCPOPT_TSTAMP(tcp_opt)) | 756 | if (TCPOPT_TSTAMP_G(tcp_opt)) |
757 | csk->advmss -= 12; | 757 | csk->advmss -= 12; |
758 | if (csk->advmss < 128) | 758 | if (csk->advmss < 128) |
759 | csk->advmss = 128; | 759 | csk->advmss = 128; |
760 | 760 | ||
761 | log_debug(1 << CXGBI_DBG_TOE | 1 << CXGBI_DBG_SOCK, | 761 | log_debug(1 << CXGBI_DBG_TOE | 1 << CXGBI_DBG_SOCK, |
762 | "csk 0x%p, mss_idx %u, advmss %u.\n", | 762 | "csk 0x%p, mss_idx %u, advmss %u.\n", |
763 | csk, GET_TCPOPT_MSS(tcp_opt), csk->advmss); | 763 | csk, TCPOPT_MSS_G(tcp_opt), csk->advmss); |
764 | 764 | ||
765 | cxgbi_sock_established(csk, ntohl(req->snd_isn), ntohs(req->tcp_opt)); | 765 | cxgbi_sock_established(csk, ntohl(req->snd_isn), ntohs(req->tcp_opt)); |
766 | 766 | ||
@@ -856,8 +856,8 @@ static void do_act_open_rpl(struct cxgbi_device *cdev, struct sk_buff *skb) | |||
856 | struct cpl_act_open_rpl *rpl = (struct cpl_act_open_rpl *)skb->data; | 856 | struct cpl_act_open_rpl *rpl = (struct cpl_act_open_rpl *)skb->data; |
857 | unsigned int tid = GET_TID(rpl); | 857 | unsigned int tid = GET_TID(rpl); |
858 | unsigned int atid = | 858 | unsigned int atid = |
859 | GET_TID_TID(GET_AOPEN_ATID(be32_to_cpu(rpl->atid_status))); | 859 | TID_TID_G(AOPEN_ATID_G(be32_to_cpu(rpl->atid_status))); |
860 | unsigned int status = GET_AOPEN_STATUS(be32_to_cpu(rpl->atid_status)); | 860 | unsigned int status = AOPEN_STATUS_G(be32_to_cpu(rpl->atid_status)); |
861 | struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); | 861 | struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); |
862 | struct tid_info *t = lldi->tids; | 862 | struct tid_info *t = lldi->tids; |
863 | 863 | ||
@@ -1112,7 +1112,7 @@ static void do_rx_iscsi_hdr(struct cxgbi_device *cdev, struct sk_buff *skb) | |||
1112 | hlen = ntohs(cpl->len); | 1112 | hlen = ntohs(cpl->len); |
1113 | dlen = ntohl(*(unsigned int *)(bhs + 4)) & 0xFFFFFF; | 1113 | dlen = ntohl(*(unsigned int *)(bhs + 4)) & 0xFFFFFF; |
1114 | 1114 | ||
1115 | plen = ISCSI_PDU_LEN(pdu_len_ddp); | 1115 | plen = ISCSI_PDU_LEN_G(pdu_len_ddp); |
1116 | if (is_t4(lldi->adapter_type)) | 1116 | if (is_t4(lldi->adapter_type)) |
1117 | plen -= 40; | 1117 | plen -= 40; |
1118 | 1118 | ||
@@ -1619,7 +1619,7 @@ static int ddp_setup_conn_pgidx(struct cxgbi_sock *csk, unsigned int tid, | |||
1619 | req = (struct cpl_set_tcb_field *)skb->head; | 1619 | req = (struct cpl_set_tcb_field *)skb->head; |
1620 | INIT_TP_WR(req, csk->tid); | 1620 | INIT_TP_WR(req, csk->tid); |
1621 | OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SET_TCB_FIELD, csk->tid)); | 1621 | OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SET_TCB_FIELD, csk->tid)); |
1622 | req->reply_ctrl = htons(NO_REPLY(reply) | QUEUENO(csk->rss_qid)); | 1622 | req->reply_ctrl = htons(NO_REPLY_V(reply) | QUEUENO_V(csk->rss_qid)); |
1623 | req->word_cookie = htons(0); | 1623 | req->word_cookie = htons(0); |
1624 | req->mask = cpu_to_be64(0x3 << 8); | 1624 | req->mask = cpu_to_be64(0x3 << 8); |
1625 | req->val = cpu_to_be64(pg_idx << 8); | 1625 | req->val = cpu_to_be64(pg_idx << 8); |
@@ -1651,7 +1651,7 @@ static int ddp_setup_conn_digest(struct cxgbi_sock *csk, unsigned int tid, | |||
1651 | req = (struct cpl_set_tcb_field *)skb->head; | 1651 | req = (struct cpl_set_tcb_field *)skb->head; |
1652 | INIT_TP_WR(req, tid); | 1652 | INIT_TP_WR(req, tid); |
1653 | OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SET_TCB_FIELD, tid)); | 1653 | OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SET_TCB_FIELD, tid)); |
1654 | req->reply_ctrl = htons(NO_REPLY(reply) | QUEUENO(csk->rss_qid)); | 1654 | req->reply_ctrl = htons(NO_REPLY_V(reply) | QUEUENO_V(csk->rss_qid)); |
1655 | req->word_cookie = htons(0); | 1655 | req->word_cookie = htons(0); |
1656 | req->mask = cpu_to_be64(0x3 << 4); | 1656 | req->mask = cpu_to_be64(0x3 << 4); |
1657 | req->val = cpu_to_be64(((hcrc ? ULP_CRC_HEADER : 0) | | 1657 | req->val = cpu_to_be64(((hcrc ? ULP_CRC_HEADER : 0) | |