Lines Matching refs:fpdu

1824 		      struct qed_iwarp_fpdu *fpdu,
1829 struct qed_iwarp_fpdu *fpdu, in qed_iwarp_mpa_classify() argument
1835 if (fpdu->incomplete_bytes) { in qed_iwarp_mpa_classify()
1844 fpdu->fpdu_length = *mpa_data << BITS_PER_BYTE; in qed_iwarp_mpa_classify()
1850 fpdu->fpdu_length = QED_IWARP_FPDU_LEN_WITH_PAD(mpa_len); in qed_iwarp_mpa_classify()
1852 if (fpdu->fpdu_length <= tcp_payload_len) in qed_iwarp_mpa_classify()
1860 pkt_type_str[pkt_type], fpdu->fpdu_length, tcp_payload_len); in qed_iwarp_mpa_classify()
1867 struct qed_iwarp_fpdu *fpdu, in qed_iwarp_init_fpdu() argument
1871 fpdu->mpa_buf = buf; in qed_iwarp_init_fpdu()
1872 fpdu->pkt_hdr = buf->data_phys_addr + placement_offset; in qed_iwarp_init_fpdu()
1873 fpdu->pkt_hdr_size = pkt_data->tcp_payload_offset; in qed_iwarp_init_fpdu()
1874 fpdu->mpa_frag = buf->data_phys_addr + pkt_data->first_mpa_offset; in qed_iwarp_init_fpdu()
1875 fpdu->mpa_frag_virt = (u8 *)(buf->data) + pkt_data->first_mpa_offset; in qed_iwarp_init_fpdu()
1878 fpdu->incomplete_bytes = QED_IWARP_INVALID_FPDU_LENGTH; in qed_iwarp_init_fpdu()
1879 else if (tcp_payload_size < fpdu->fpdu_length) in qed_iwarp_init_fpdu()
1880 fpdu->incomplete_bytes = fpdu->fpdu_length - tcp_payload_size; in qed_iwarp_init_fpdu()
1882 fpdu->incomplete_bytes = 0; /* complete fpdu */ in qed_iwarp_init_fpdu()
1884 fpdu->mpa_frag_len = fpdu->fpdu_length - fpdu->incomplete_bytes; in qed_iwarp_init_fpdu()
1889 struct qed_iwarp_fpdu *fpdu, in qed_iwarp_cp_pkt() argument
1902 if ((fpdu->mpa_frag_len + tcp_payload_size) > (u16)buf->buff_size) { in qed_iwarp_cp_pkt()
1905 buf->buff_size, fpdu->mpa_frag_len, in qed_iwarp_cp_pkt()
1906 tcp_payload_size, fpdu->incomplete_bytes); in qed_iwarp_cp_pkt()
1912 fpdu->mpa_frag_virt, fpdu->mpa_frag_len, in qed_iwarp_cp_pkt()
1916 memcpy(tmp_buf, fpdu->mpa_frag_virt, fpdu->mpa_frag_len); in qed_iwarp_cp_pkt()
1917 memcpy(tmp_buf + fpdu->mpa_frag_len, in qed_iwarp_cp_pkt()
1921 rc = qed_iwarp_recycle_pkt(p_hwfn, fpdu, fpdu->mpa_buf); in qed_iwarp_cp_pkt()
1929 fpdu->mpa_frag_len + tcp_payload_size); in qed_iwarp_cp_pkt()
1931 fpdu->mpa_buf = buf; in qed_iwarp_cp_pkt()
1934 fpdu->mpa_frag = buf->data_phys_addr; in qed_iwarp_cp_pkt()
1935 fpdu->mpa_frag_virt = buf->data; in qed_iwarp_cp_pkt()
1936 fpdu->mpa_frag_len += tcp_payload_size; in qed_iwarp_cp_pkt()
1938 fpdu->incomplete_bytes -= tcp_payload_size; in qed_iwarp_cp_pkt()
1943 buf->buff_size, fpdu->mpa_frag_len, tcp_payload_size, in qed_iwarp_cp_pkt()
1944 fpdu->incomplete_bytes); in qed_iwarp_cp_pkt()
1951 struct qed_iwarp_fpdu *fpdu, u8 *mpa_data) in qed_iwarp_update_fpdu_length() argument
1956 if (fpdu->incomplete_bytes == QED_IWARP_INVALID_FPDU_LENGTH) { in qed_iwarp_update_fpdu_length()
1958 mpa_len = fpdu->fpdu_length | *mpa_data; in qed_iwarp_update_fpdu_length()
1959 fpdu->fpdu_length = QED_IWARP_FPDU_LEN_WITH_PAD(mpa_len); in qed_iwarp_update_fpdu_length()
1961 fpdu->mpa_frag_len = 1; in qed_iwarp_update_fpdu_length()
1962 fpdu->incomplete_bytes = fpdu->fpdu_length - 1; in qed_iwarp_update_fpdu_length()
1966 mpa_len, fpdu->fpdu_length, fpdu->incomplete_bytes); in qed_iwarp_update_fpdu_length()
1986 struct qed_iwarp_fpdu *fpdu, in qed_iwarp_recycle_pkt() argument
1996 tx_pkt.l4_hdr_offset_w = fpdu->pkt_hdr_size >> 2; in qed_iwarp_recycle_pkt()
1997 tx_pkt.first_frag = fpdu->pkt_hdr; in qed_iwarp_recycle_pkt()
1998 tx_pkt.first_frag_len = fpdu->pkt_hdr_size; in qed_iwarp_recycle_pkt()
2019 qed_iwarp_win_right_edge(struct qed_hwfn *p_hwfn, struct qed_iwarp_fpdu *fpdu) in qed_iwarp_win_right_edge() argument
2028 tx_pkt.l4_hdr_offset_w = fpdu->pkt_hdr_size >> 2; in qed_iwarp_win_right_edge()
2030 tx_pkt.first_frag = fpdu->pkt_hdr; in qed_iwarp_win_right_edge()
2031 tx_pkt.first_frag_len = fpdu->pkt_hdr_size; in qed_iwarp_win_right_edge()
2056 struct qed_iwarp_fpdu *fpdu, in qed_iwarp_send_fpdu() argument
2075 tx_pkt.l4_hdr_offset_w = fpdu->pkt_hdr_size >> 2; /* offset in words */ in qed_iwarp_send_fpdu()
2079 tcp_payload_size <= fpdu->fpdu_length) in qed_iwarp_send_fpdu()
2080 tx_pkt.cookie = fpdu->mpa_buf; in qed_iwarp_send_fpdu()
2082 tx_pkt.first_frag = fpdu->pkt_hdr; in qed_iwarp_send_fpdu()
2083 tx_pkt.first_frag_len = fpdu->pkt_hdr_size; in qed_iwarp_send_fpdu()
2093 if (tcp_payload_size == fpdu->incomplete_bytes) in qed_iwarp_send_fpdu()
2094 fpdu->mpa_buf->piggy_buf = buf; in qed_iwarp_send_fpdu()
2105 fpdu->mpa_frag, in qed_iwarp_send_fpdu()
2106 fpdu->mpa_frag_len); in qed_iwarp_send_fpdu()
2110 if (!fpdu->incomplete_bytes) in qed_iwarp_send_fpdu()
2118 fpdu->incomplete_bytes); in qed_iwarp_send_fpdu()
2125 fpdu->mpa_frag_len, in qed_iwarp_send_fpdu()
2126 fpdu->incomplete_bytes, rc); in qed_iwarp_send_fpdu()
2157 struct qed_iwarp_fpdu *fpdu; in qed_iwarp_process_mpa_pkt() local
2161 fpdu = qed_iwarp_get_curr_fpdu(p_hwfn, curr_pkt->cid & 0xffff); in qed_iwarp_process_mpa_pkt()
2162 if (!fpdu) { /* something corrupt with cid, post rx back */ in qed_iwarp_process_mpa_pkt()
2171 pkt_type = qed_iwarp_mpa_classify(p_hwfn, fpdu, in qed_iwarp_process_mpa_pkt()
2177 qed_iwarp_init_fpdu(buf, fpdu, in qed_iwarp_process_mpa_pkt()
2187 rc = qed_iwarp_win_right_edge(p_hwfn, fpdu); in qed_iwarp_process_mpa_pkt()
2192 memset(fpdu, 0, sizeof(*fpdu)); in qed_iwarp_process_mpa_pkt()
2199 qed_iwarp_init_fpdu(buf, fpdu, in qed_iwarp_process_mpa_pkt()
2204 rc = qed_iwarp_send_fpdu(p_hwfn, fpdu, curr_pkt, buf, in qed_iwarp_process_mpa_pkt()
2210 memset(fpdu, 0, sizeof(*fpdu)); in qed_iwarp_process_mpa_pkt()
2214 mpa_buf->tcp_payload_len -= fpdu->fpdu_length; in qed_iwarp_process_mpa_pkt()
2215 curr_pkt->first_mpa_offset += fpdu->fpdu_length; in qed_iwarp_process_mpa_pkt()
2218 qed_iwarp_update_fpdu_length(p_hwfn, fpdu, mpa_data); in qed_iwarp_process_mpa_pkt()
2219 if (mpa_buf->tcp_payload_len < fpdu->incomplete_bytes) { in qed_iwarp_process_mpa_pkt()
2225 fpdu); in qed_iwarp_process_mpa_pkt()
2231 rc = qed_iwarp_cp_pkt(p_hwfn, fpdu, curr_pkt, in qed_iwarp_process_mpa_pkt()
2241 rc = qed_iwarp_send_fpdu(p_hwfn, fpdu, curr_pkt, buf, in qed_iwarp_process_mpa_pkt()
2253 mpa_buf->tcp_payload_len -= fpdu->incomplete_bytes; in qed_iwarp_process_mpa_pkt()
2254 curr_pkt->first_mpa_offset += fpdu->incomplete_bytes; in qed_iwarp_process_mpa_pkt()
2256 fpdu->incomplete_bytes = 0; in qed_iwarp_process_mpa_pkt()
2526 struct qed_iwarp_fpdu *fpdu; in qed_iwarp_ll2_slowpath() local
2534 fpdu = qed_iwarp_get_curr_fpdu(p_hwfn, (u16)unalign_data.cid); in qed_iwarp_ll2_slowpath()
2535 if (fpdu) in qed_iwarp_ll2_slowpath()
2536 memset(fpdu, 0, sizeof(*fpdu)); in qed_iwarp_ll2_slowpath()