Lines Matching refs:fpdu
1822 struct qed_iwarp_fpdu *fpdu,
1827 struct qed_iwarp_fpdu *fpdu, in qed_iwarp_mpa_classify() argument
1833 if (fpdu->incomplete_bytes) { in qed_iwarp_mpa_classify()
1842 fpdu->fpdu_length = *mpa_data << BITS_PER_BYTE; in qed_iwarp_mpa_classify()
1848 fpdu->fpdu_length = QED_IWARP_FPDU_LEN_WITH_PAD(mpa_len); in qed_iwarp_mpa_classify()
1850 if (fpdu->fpdu_length <= tcp_payload_len) in qed_iwarp_mpa_classify()
1858 pkt_type_str[pkt_type], fpdu->fpdu_length, tcp_payload_len); in qed_iwarp_mpa_classify()
1865 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 + first_mpa_offset; in qed_iwarp_init_fpdu()
1875 fpdu->mpa_frag_virt = (u8 *)(buf->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
1903 if ((fpdu->mpa_frag_len + tcp_payload_size) > (u16)buf->buff_size) { in qed_iwarp_cp_pkt()
1906 buf->buff_size, fpdu->mpa_frag_len, in qed_iwarp_cp_pkt()
1907 tcp_payload_size, fpdu->incomplete_bytes); in qed_iwarp_cp_pkt()
1913 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()
1920 rc = qed_iwarp_recycle_pkt(p_hwfn, fpdu, fpdu->mpa_buf); in qed_iwarp_cp_pkt()
1928 fpdu->mpa_frag_len + tcp_payload_size); in qed_iwarp_cp_pkt()
1930 fpdu->mpa_buf = buf; in qed_iwarp_cp_pkt()
1933 fpdu->mpa_frag = buf->data_phys_addr; in qed_iwarp_cp_pkt()
1934 fpdu->mpa_frag_virt = buf->data; in qed_iwarp_cp_pkt()
1935 fpdu->mpa_frag_len += tcp_payload_size; in qed_iwarp_cp_pkt()
1937 fpdu->incomplete_bytes -= tcp_payload_size; in qed_iwarp_cp_pkt()
1942 buf->buff_size, fpdu->mpa_frag_len, tcp_payload_size, in qed_iwarp_cp_pkt()
1943 fpdu->incomplete_bytes); in qed_iwarp_cp_pkt()
1950 struct qed_iwarp_fpdu *fpdu, u8 *mpa_data) in qed_iwarp_update_fpdu_length() argument
1955 if (fpdu->incomplete_bytes == QED_IWARP_INVALID_FPDU_LENGTH) { in qed_iwarp_update_fpdu_length()
1957 mpa_len = fpdu->fpdu_length | *mpa_data; in qed_iwarp_update_fpdu_length()
1958 fpdu->fpdu_length = QED_IWARP_FPDU_LEN_WITH_PAD(mpa_len); in qed_iwarp_update_fpdu_length()
1960 fpdu->mpa_frag_len = 1; in qed_iwarp_update_fpdu_length()
1961 fpdu->incomplete_bytes = fpdu->fpdu_length - 1; in qed_iwarp_update_fpdu_length()
1965 mpa_len, fpdu->fpdu_length, fpdu->incomplete_bytes); in qed_iwarp_update_fpdu_length()
1985 struct qed_iwarp_fpdu *fpdu, in qed_iwarp_recycle_pkt() argument
1995 tx_pkt.l4_hdr_offset_w = fpdu->pkt_hdr_size >> 2; in qed_iwarp_recycle_pkt()
1996 tx_pkt.first_frag = fpdu->pkt_hdr; in qed_iwarp_recycle_pkt()
1997 tx_pkt.first_frag_len = fpdu->pkt_hdr_size; in qed_iwarp_recycle_pkt()
2018 qed_iwarp_win_right_edge(struct qed_hwfn *p_hwfn, struct qed_iwarp_fpdu *fpdu) in qed_iwarp_win_right_edge() argument
2027 tx_pkt.l4_hdr_offset_w = fpdu->pkt_hdr_size >> 2; in qed_iwarp_win_right_edge()
2029 tx_pkt.first_frag = fpdu->pkt_hdr; in qed_iwarp_win_right_edge()
2030 tx_pkt.first_frag_len = fpdu->pkt_hdr_size; in qed_iwarp_win_right_edge()
2055 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()
2120 fpdu->incomplete_bytes); in qed_iwarp_send_fpdu()
2127 fpdu->mpa_frag_len, in qed_iwarp_send_fpdu()
2128 fpdu->incomplete_bytes, rc); in qed_iwarp_send_fpdu()
2159 struct qed_iwarp_fpdu *fpdu; in qed_iwarp_process_mpa_pkt() local
2166 fpdu = qed_iwarp_get_curr_fpdu(p_hwfn, (u16)cid); in qed_iwarp_process_mpa_pkt()
2167 if (!fpdu) { /* something corrupt with cid, post rx back */ in qed_iwarp_process_mpa_pkt()
2177 pkt_type = qed_iwarp_mpa_classify(p_hwfn, fpdu, in qed_iwarp_process_mpa_pkt()
2183 qed_iwarp_init_fpdu(buf, fpdu, in qed_iwarp_process_mpa_pkt()
2193 rc = qed_iwarp_win_right_edge(p_hwfn, fpdu); in qed_iwarp_process_mpa_pkt()
2198 memset(fpdu, 0, sizeof(*fpdu)); in qed_iwarp_process_mpa_pkt()
2205 qed_iwarp_init_fpdu(buf, fpdu, in qed_iwarp_process_mpa_pkt()
2210 rc = qed_iwarp_send_fpdu(p_hwfn, fpdu, curr_pkt, buf, in qed_iwarp_process_mpa_pkt()
2216 memset(fpdu, 0, sizeof(*fpdu)); in qed_iwarp_process_mpa_pkt()
2220 mpa_buf->tcp_payload_len -= fpdu->fpdu_length; in qed_iwarp_process_mpa_pkt()
2222 fpdu->fpdu_length); in qed_iwarp_process_mpa_pkt()
2225 qed_iwarp_update_fpdu_length(p_hwfn, fpdu, mpa_data); in qed_iwarp_process_mpa_pkt()
2226 if (mpa_buf->tcp_payload_len < fpdu->incomplete_bytes) { in qed_iwarp_process_mpa_pkt()
2232 fpdu); in qed_iwarp_process_mpa_pkt()
2238 rc = qed_iwarp_cp_pkt(p_hwfn, fpdu, curr_pkt, in qed_iwarp_process_mpa_pkt()
2248 rc = qed_iwarp_send_fpdu(p_hwfn, fpdu, curr_pkt, buf, in qed_iwarp_process_mpa_pkt()
2260 mpa_buf->tcp_payload_len -= fpdu->incomplete_bytes; in qed_iwarp_process_mpa_pkt()
2262 fpdu->incomplete_bytes); in qed_iwarp_process_mpa_pkt()
2265 fpdu->incomplete_bytes = 0; in qed_iwarp_process_mpa_pkt()
2540 struct qed_iwarp_fpdu *fpdu; in qed_iwarp_ll2_slowpath() local
2550 fpdu = qed_iwarp_get_curr_fpdu(p_hwfn, (u16)cid); in qed_iwarp_ll2_slowpath()
2551 if (fpdu) in qed_iwarp_ll2_slowpath()
2552 memset(fpdu, 0, sizeof(*fpdu)); in qed_iwarp_ll2_slowpath()