Lines Matching refs:tcp

698 __hal_lro_check_for_session_match(lro_t *lro, tcplro_t *tcp, iplro_t *ip)
710 if ((lro->tcp_hdr->source != tcp->source))
714 if ((lro->tcp_hdr->dest != tcp->dest))
721 * __hal_tcp_seg_len: Find the tcp seg len.
723 * @tcp: tcp header.
727 __hal_tcp_seg_len(iplro_t *ip, tcplro_t *tcp)
733 ((tcp->doff_res)>>2));
774 * __hal_tcp_lro_capable: Finds whether tcp is lro capable.
776 * @tcp: tcp header.
779 __hal_tcp_lro_capable(iplro_t *ip, tcplro_t *tcp, lro_t *lro, int *ts_off)
788 ch = ntohs(*((u8 *)((u8 *)tcp + i)) );
793 if ((TCP_FAST_PATH_HDR_MASK2 != tcp->ctrl) &&
794 (TCP_FAST_PATH_HDR_MASK3 != tcp->ctrl))
798 if (TCP_FAST_PATH_HDR_MASK1 != tcp->doff_res) {
799 u16 tcp_hdr_len = tcp->doff_res >> 2; /* TCP header len */
800 u16 off = 20; /* Start of tcp options */
816 while (((u8 *)tcp)[off] == 0x1)
820 if (((u8 *)tcp)[off] != 0x8) {
841 xge_debug_ring(XGE_ERR, "Pkt received with time stamp after session opened with no time stamp : %02x %02x", tcp->doff_res, tcp->ctrl);
852 off += ((u8 *)tcp)[off+1];
858 xge_debug_ring(XGE_ERR, "tcphdr not fastpth : pkt received with tcp options in addition to time stamp after the session is opened %02x %02x ", tcp->doff_res, tcp->ctrl);
863 u8 byte = ((u8 *)tcp)[off+i];
868 xge_debug_ring(XGE_ERR, "tcphdr not fastpth : pkt received with tcp options in addition to time stamp after the session is opened %02x %02x ", tcp->doff_res, tcp->ctrl);
876 (char *)((char *)tcp + (*ts_off) + 2), 8);
882 xge_debug_ring(XGE_TRACE, "tcphdr not fastpth %02x %02x", tcp->doff_res, tcp->ctrl);
891 * @tcp: tcp frame.
897 tcplro_t **tcp,
943 /* Grab ip, tcp headers */
949 *tcp = (tcplro_t *)((char *)*ip + ip_length);
952 " tcp:"XGE_OS_LLXFMT"", (int)ip_length,
953 (unsigned long long)(ulong_t)*ip, (unsigned long long)(ulong_t)*tcp);
964 * @tcp: tcp header.
970 * @tcp_seg_len: Length of tcp segment.
974 __hal_open_lro_session (u8 *buffer, iplro_t *ip, tcplro_t *tcp, lro_t **lro,
984 lro_new->tcp_hdr = tcp;
986 tcp->seq);
987 lro_new->tcp_seq_num = tcp->seq;
988 lro_new->tcp_ack_num = tcp->ack_seq;
1022 * @tcp: tcp header.
1031 tcplro_t *tcp,
1051 tcp, ip)
1070 if (__hal_lro_check_for_session_match(lro_temp, tcp,
1085 if (lro_match->tcp_next_seq_num != xge_os_ntohl(tcp->seq)) {
1097 if (XGE_HAL_OK != __hal_tcp_lro_capable(ip, tcp, lro_match,
1102 * provided it has tcp payload
1104 tcp_seg_len = __hal_tcp_seg_len(ip, tcp);
1120 __hal_open_lro_session (eth_hdr, ip, tcp, lro_end3,
1132 if (lro_match->tcp_ack_num == tcp->ack_seq &&
1133 lro_match->tcp_seq_num == tcp->seq) {
1138 lro_match->tcp_seq_num = tcp->seq;
1139 lro_match->tcp_ack_num = tcp->ack_seq;
1140 lro_match->frags_len += __hal_tcp_seg_len(ip, tcp);
1154 if (XGE_HAL_FAIL == __hal_tcp_lro_capable(ip, tcp, NULL, &ts_off))
1162 tcp_seg_len = __hal_tcp_seg_len(ip, tcp);
1166 __hal_open_lro_session (eth_hdr, ip, tcp, lro, hldev, ring_lro, free_slot,
1175 * @tcp: tcp header.
1181 tcplro_t *tcp,
1187 if ((lro->total_length + __hal_tcp_seg_len(ip, tcp) ) >
1208 * @tcp: tcp header.
1214 tcplro_t *tcp,
1219 lro->total_length += __hal_tcp_seg_len(ip, tcp);
1228 * __hal_collapse_tcp_hdr: Collapses tcp header.
1230 * @tcp: tcp header.
1236 tcplro_t *tcp,
1240 lro->tcp_next_seq_num += __hal_tcp_seg_len(ip, tcp);
1248 * @tcp: IN tcp header, OUT tcp payload.
1249 * @seg_len: tcp payload length.
1255 tcplro_t **tcp,
1260 (void) __hal_collapse_ip_hdr(ip, *tcp, lro, hldev);
1261 (void) __hal_collapse_tcp_hdr(ip, *tcp, lro, hldev);
1264 // lro will return to ll driver tcpdata pointer, and tcp payload length.
1268 *seg_len = __hal_tcp_seg_len(ip, *tcp);
1269 *tcp = (tcplro_t *)((char *)*tcp + (((*tcp)->doff_res)>>2));
1281 * @tcp: tcp header.
1294 xge_hal_lro_process_rx(int ring, u8 *eth_hdr, u8 *ip_hdr, tcplro_t **tcp,
1304 if (XGE_HAL_OK != __hal_lro_capable(eth_hdr, &ip, (tcplro_t **)tcp,
1312 ret = __hal_get_lro_session(eth_hdr, ip, (tcplro_t *)*tcp,
1319 (tcplro_t *)*tcp, lro, hldev)) {
1320 (void) __hal_append_lro(ip,(tcplro_t **) tcp, seglen,
1353 * @tcp: tcp header.
1366 xge_hal_accumulate_large_rx(u8 *buffer, tcplro_t **tcp, u32 *seglen,
1371 return xge_hal_lro_process_rx(ring, buffer, NULL, tcp, seglen, p_lro,