Lines Matching refs:srfp

1321 sfxge_rx_qflow_complete(sfxge_rxq_t *srp, sfxge_rx_flow_t *srfp)  in sfxge_rx_qflow_complete()  argument
1328 if (srfp->srf_mp == NULL) in sfxge_rx_qflow_complete()
1331 mp = srfp->srf_mp; in sfxge_rx_qflow_complete()
1332 etherhp = srfp->srf_etherhp; in sfxge_rx_qflow_complete()
1333 iphp = srfp->srf_iphp; in sfxge_rx_qflow_complete()
1334 thp = srfp->srf_last_thp; in sfxge_rx_qflow_complete()
1339 srfp->srf_len, ==, msgdsize(mp)); in sfxge_rx_qflow_complete()
1341 ASSERT3U(srfp->srf_len & 0xffff, ==, srfp->srf_len); in sfxge_rx_qflow_complete()
1342 iphp->ip_len = htons(srfp->srf_len); in sfxge_rx_qflow_complete()
1344 srfp->srf_first_thp->th_ack = thp->th_ack; in sfxge_rx_qflow_complete()
1345 srfp->srf_first_thp->th_win = thp->th_win; in sfxge_rx_qflow_complete()
1346 srfp->srf_first_thp->th_flags = thp->th_flags; in sfxge_rx_qflow_complete()
1348 DTRACE_PROBE2(flow_complete, uint32_t, srfp->srf_tag, in sfxge_rx_qflow_complete()
1349 size_t, srfp->srf_len); in sfxge_rx_qflow_complete()
1351 srfp->srf_mp = NULL; in sfxge_rx_qflow_complete()
1352 srfp->srf_len = 0; in sfxge_rx_qflow_complete()
1360 sfxge_rx_qflow_add(sfxge_rxq_t *srp, sfxge_rx_flow_t *srfp, in sfxge_rx_qflow_add() argument
1383 if (now - srfp->srf_lbolt > srp->sr_rto) { in sfxge_rx_qflow_add()
1384 srfp->srf_count = 1; in sfxge_rx_qflow_add()
1385 srfp->srf_seq = seq + size; in sfxge_rx_qflow_add()
1390 if (seq != srfp->srf_seq) { in sfxge_rx_qflow_add()
1391 if (srfp->srf_count > SFXGE_SLOW_START) in sfxge_rx_qflow_add()
1392 srfp->srf_count = SFXGE_SLOW_START; in sfxge_rx_qflow_add()
1394 srfp->srf_count >>= 1; in sfxge_rx_qflow_add()
1396 srfp->srf_count++; in sfxge_rx_qflow_add()
1397 srfp->srf_seq = seq + size; in sfxge_rx_qflow_add()
1403 srfp->srf_count++; in sfxge_rx_qflow_add()
1404 srfp->srf_seq = seq + size; in sfxge_rx_qflow_add()
1415 if (srfp->srf_count < SFXGE_SLOW_START) in sfxge_rx_qflow_add()
1419 ASSERT3U(srfp->srf_count, >=, SFXGE_SLOW_START); in sfxge_rx_qflow_add()
1420 shift = MIN(srfp->srf_count - SFXGE_SLOW_START + 12, 16); in sfxge_rx_qflow_add()
1421 if (srfp->srf_len + size >= (1 << shift)) in sfxge_rx_qflow_add()
1422 sfxge_rx_qflow_complete(srp, srfp); in sfxge_rx_qflow_add()
1426 if (srfp->srf_mp == NULL) { in sfxge_rx_qflow_add()
1428 srfp->srf_etherhp = etherhp; in sfxge_rx_qflow_add()
1429 srfp->srf_iphp = iphp; in sfxge_rx_qflow_add()
1430 srfp->srf_first_thp = srfp->srf_last_thp = thp; in sfxge_rx_qflow_add()
1433 srfp->srf_mp = mp; in sfxge_rx_qflow_add()
1434 srfp->srf_mpp = &(mp->b_cont); in sfxge_rx_qflow_add()
1436 srfp->srf_len = ntohs(iphp->ip_len); in sfxge_rx_qflow_add()
1442 if (srfp->srf_next == NULL && in sfxge_rx_qflow_add()
1443 srp->sr_srfpp != &(srfp->srf_next)) { in sfxge_rx_qflow_add()
1444 *(srp->sr_srfpp) = srfp; in sfxge_rx_qflow_add()
1445 srp->sr_srfpp = &(srfp->srf_next); in sfxge_rx_qflow_add()
1449 srfp->srf_last_thp = thp; in sfxge_rx_qflow_add()
1455 *(srfp->srf_mpp) = mp; in sfxge_rx_qflow_add()
1456 srfp->srf_mpp = &(mp->b_cont); in sfxge_rx_qflow_add()
1458 srfp->srf_len += size; in sfxge_rx_qflow_add()
1460 ASSERT(srfp->srf_next != NULL || in sfxge_rx_qflow_add()
1461 srp->sr_srfpp == &(srfp->srf_next)); in sfxge_rx_qflow_add()
1464 DTRACE_PROBE2(flow_add, uint32_t, srfp->srf_tag, size_t, size); in sfxge_rx_qflow_add()
1472 sfxge_rx_qflow_complete(srp, srfp); in sfxge_rx_qflow_add()
1474 srfp->srf_lbolt = now; in sfxge_rx_qflow_add()
1481 sfxge_rx_qflow_complete(srp, srfp); in sfxge_rx_qflow_add()
1483 srfp->srf_lbolt = now; in sfxge_rx_qflow_add()
1493 sfxge_rx_flow_t *srfp; in sfxge_rx_qpacket_coalesce() local
1505 srfp = *(srp->sr_srfpp); in sfxge_rx_qpacket_coalesce()
1583 if (srfp == NULL) in sfxge_rx_qpacket_coalesce()
1586 if (srfp->srf_saddr != iphp->ip_src.s_addr || in sfxge_rx_qpacket_coalesce()
1587 srfp->srf_daddr != iphp->ip_dst.s_addr) in sfxge_rx_qpacket_coalesce()
1590 if (srfp->srf_sport != thp->th_sport || in sfxge_rx_qpacket_coalesce()
1591 srfp->srf_dport != thp->th_dport) in sfxge_rx_qpacket_coalesce()
1594 if (srfp->srf_tci != ether_tci) in sfxge_rx_qpacket_coalesce()
1598 ASSERT(srfp != NULL); in sfxge_rx_qpacket_coalesce()
1609 if (!sfxge_rx_qflow_add(srp, srfp, srpp, now)) in sfxge_rx_qpacket_coalesce()
1633 srfp = &(srp->sr_flow[(hash >> 6) % SFXGE_MAX_FLOW]); in sfxge_rx_qpacket_coalesce()
1640 if (tag != srfp->srf_tag) { in sfxge_rx_qpacket_coalesce()
1641 if (srfp->srf_count != 0) { in sfxge_rx_qpacket_coalesce()
1642 if (now - srfp->srf_lbolt <= srp->sr_rto) in sfxge_rx_qpacket_coalesce()
1646 if (srfp->srf_mp != NULL) in sfxge_rx_qpacket_coalesce()
1650 ASSERT(srfp->srf_next == NULL); in sfxge_rx_qpacket_coalesce()
1652 srfp->srf_tag = tag; in sfxge_rx_qpacket_coalesce()
1654 srfp->srf_saddr = iphp->ip_src.s_addr; in sfxge_rx_qpacket_coalesce()
1655 srfp->srf_daddr = iphp->ip_dst.s_addr; in sfxge_rx_qpacket_coalesce()
1656 srfp->srf_sport = thp->th_sport; in sfxge_rx_qpacket_coalesce()
1657 srfp->srf_dport = thp->th_dport; in sfxge_rx_qpacket_coalesce()
1658 srfp->srf_tci = ether_tci; in sfxge_rx_qpacket_coalesce()
1660 srfp->srf_count = 0; in sfxge_rx_qpacket_coalesce()
1661 srfp->srf_seq = ntohl(thp->th_seq); in sfxge_rx_qpacket_coalesce()
1663 srfp->srf_lbolt = now; in sfxge_rx_qpacket_coalesce()
1671 if (srfp->srf_saddr != iphp->ip_src.s_addr || in sfxge_rx_qpacket_coalesce()
1672 srfp->srf_daddr != iphp->ip_dst.s_addr) in sfxge_rx_qpacket_coalesce()
1675 if (srfp->srf_sport != thp->th_sport || in sfxge_rx_qpacket_coalesce()
1676 srfp->srf_dport != thp->th_dport) in sfxge_rx_qpacket_coalesce()
1679 if (srfp->srf_tci != ether_tci) in sfxge_rx_qpacket_coalesce()
1842 sfxge_rx_flow_t *srfp; in sfxge_rx_qcomplete() local
1844 srfp = srp->sr_srfp; in sfxge_rx_qcomplete()
1852 next = srfp->srf_next; in sfxge_rx_qcomplete()
1853 srfp->srf_next = NULL; in sfxge_rx_qcomplete()
1855 sfxge_rx_qflow_complete(srp, srfp); in sfxge_rx_qcomplete()
1857 srfp = next; in sfxge_rx_qcomplete()
1858 } while (srfp != NULL); in sfxge_rx_qcomplete()