Lines Matching +full:max +full:- +full:burst +full:- +full:len

1 /*-
106 #define TT_HASH(icc, tt) (G_PPOD_TAG(tt) & (icc)->cmp_hash_mask)
119 &first_burst_length, 0, "First burst length");
122 &max_burst_length, 0, "Maximum burst length");
177 KASSERT(icp->ref_cnt != 0, ("freeing deleted PDU"));
178 MPASS(icp->icp_signature == CXGBEI_PDU_SIGNATURE);
179 MPASS(ic == ip->ip_conn);
181 m_freem(ip->ip_ahs_mbuf);
182 m_freem(ip->ip_data_mbuf);
183 m_freem(ip->ip_bhs_mbuf);
185 KASSERT(ic != NULL || icp->ref_cnt == 1,
188 if (atomic_fetchadd_int(&icp->ref_cnt, -1) != 1)
194 refcount_release(&ic->ic_outstanding_pdus);
203 MPASS(icp->icp_signature == CXGBEI_PDU_SIGNATURE);
205 if (icp->cb != NULL)
206 icp->cb(ip, icp->error);
208 if (__predict_true(ip->ip_conn != NULL))
209 refcount_release(&ip->ip_conn->ic_outstanding_pdus);
220 icp->error = error;
222 m_freem(ip->ip_ahs_mbuf);
223 ip->ip_ahs_mbuf = NULL;
224 m_freem(ip->ip_data_mbuf);
225 ip->ip_data_mbuf = NULL;
226 m_freem(ip->ip_bhs_mbuf);
227 ip->ip_bhs_mbuf = NULL;
233 if (atomic_fetchadd_int(&icp->ref_cnt, -1) == 1)
243 struct icl_cxgbei_pdu *icp = (struct icl_cxgbei_pdu *)mb->m_ext.ext_arg1;
250 icl_cxgbei_pdu_call_cb(&icp->ip);
264 icp->icp_signature = CXGBEI_PDU_SIGNATURE;
265 icp->ref_cnt = 1;
266 ip = &icp->ip;
274 ip->ip_bhs_mbuf = m;
275 ip->ip_bhs = mtod(m, struct iscsi_bhs *);
276 memset(ip->ip_bhs, 0, sizeof(*ip->ip_bhs));
277 m->m_len = sizeof(struct iscsi_bhs);
278 m->m_pkthdr.len = m->m_len;
287 ip->ip_conn = ic;
289 refcount_acquire(&ic->ic_outstanding_pdus);
312 uint32_t len = 0;
314 len += request->ip_bhs->bhs_data_segment_len[0];
315 len <<= 8;
316 len += request->ip_bhs->bhs_data_segment_len[1];
317 len <<= 8;
318 len += request->ip_bhs->bhs_data_segment_len[2];
320 return (len);
334 struct icl_pdu *ip = &icp->ip;
343 m = ip->ip_data_mbuf;
344 ulp_submode = icc->ulp_submode;
352 padding = roundup2(ip->ip_data_len, 4) - ip->ip_data_len;
355 bzero(mtod(last, uint8_t *) + last->m_len, padding);
356 last->m_len += padding;
359 MPASS(ip->ip_data_len == 0);
367 m = ip->ip_bhs_mbuf;
368 MPASS(m->m_pkthdr.len == sizeof(struct iscsi_bhs));
369 MPASS(m->m_len == sizeof(struct iscsi_bhs));
371 bhs = ip->ip_bhs;
372 data_len = ip->ip_data_len;
373 if (data_len > icc->ic.ic_max_send_data_segment_length) {
379 switch (bhs->bhs_opcode) {
387 panic("invalid opcode %#x for ISO", bhs->bhs_opcode);
389 data_len = icc->ic.ic_max_send_data_segment_length;
391 if (bhsdi->bhsdi_flags & BHSDI_FLAGS_F) {
394 * burst.
397 bhsdi->bhsdi_flags &= ~BHSDI_FLAGS_F;
404 bhs->bhs_data_segment_len[2] = data_len;
405 bhs->bhs_data_segment_len[1] = data_len >> 8;
406 bhs->bhs_data_segment_len[0] = data_len >> 16;
411 m->m_pkthdr.len += ip->ip_data_len + padding;
412 m->m_next = ip->ip_data_mbuf;
414 ip->ip_bhs_mbuf = NULL;
415 ip->ip_data_mbuf = NULL;
416 ip->ip_bhs = NULL;
420 * still be held by zero-copy PDU buffers (ICL_NOCOPY).
422 if (atomic_fetchadd_int(&icp->ref_cnt, -1) == 1)
433 struct icl_conn *ic = &icc->ic;
434 struct toepcb *toep = icc->toep;
435 struct socket *so = ic->ic_socket;
445 while (__predict_true(!ic->ic_disconnecting)) {
446 while (STAILQ_EMPTY(&icc->sent_pdus)) {
447 icc->tx_active = false;
448 mtx_sleep(&icc->tx_active, ic->ic_lock, 0, "-", 0);
449 if (__predict_false(ic->ic_disconnecting))
451 MPASS(icc->tx_active);
454 STAILQ_SWAP(&icc->sent_pdus, &tx_pdus, icl_pdu);
462 MPASS((m->m_pkthdr.len & 3) == 0);
468 if (__predict_false(ic->ic_disconnecting) ||
469 __predict_false(ic->ic_socket == NULL)) {
474 CURVNET_SET(toep->vnet);
479 if (__predict_false(inp->inp_flags & INP_DROPPED) ||
480 __predict_false((toep->flags & TPF_ATTACHED) == 0)) {
483 mbufq_concat(&toep->ulp_pduq, &mq);
484 t4_push_pdus(icc->sc, toep, 0);
502 struct icl_conn *ic = &icc->ic;
508 sb = &ic->ic_socket->so_rcv;
510 while (__predict_true(!ic->ic_disconnecting)) {
511 while (STAILQ_EMPTY(&icc->rcvd_pdus)) {
512 icc->rx_active = false;
513 mtx_sleep(&icc->rx_active, SOCKBUF_MTX(sb), 0, "-", 0);
514 if (__predict_false(ic->ic_disconnecting))
516 MPASS(icc->rx_active);
528 cantrcvmore = (sb->sb_state & SBS_CANTRCVMORE) != 0;
530 STAILQ_SWAP(&icc->rcvd_pdus, &rx_pdus, icl_pdu);
539 ic->ic_receive(ip);
551 while (!icc->rx_exiting)
552 mtx_sleep(&icc->rx_active, SOCKBUF_MTX(sb), 0, "-", 0);
571 icp = m->m_ext.ext_arg1;
572 if (atomic_fetchadd_int(&icp->ref_cnt, -1) == 1)
573 icl_cxgbei_pdu_call_cb(&icp->ip);
577 cxgbei_getm(size_t len, int flags)
584 while (len >= MJUM16BYTES) {
588 /* Fall back to non-jumbo mbufs. */
596 m_tail->m_next = m;
599 len -= MJUM16BYTES;
603 if (len != 0) {
604 m = m_getm2(NULL, len, flags, MT_DATA, 0);
612 m_tail->m_next = m;
620 struct bio *bp, size_t offset, size_t len, int flags)
629 MPASS(icp->icp_signature == CXGBEI_PDU_SIGNATURE);
630 MPASS(ic == ip->ip_conn);
631 KASSERT(len > 0, ("%s: len is %jd", __func__, (intmax_t)len));
633 m_tail = ip->ip_data_mbuf;
635 for (; m_tail->m_next != NULL; m_tail = m_tail->m_next)
638 MPASS(bp->bio_flags & BIO_UNMAPPED);
639 if (offset < PAGE_SIZE - bp->bio_ma_offset) {
640 page_offset = bp->bio_ma_offset + offset;
643 offset -= PAGE_SIZE - bp->bio_ma_offset;
645 offset -= PAGE_SIZE;
651 while (len > 0) {
657 atomic_add_int(&icp->ref_cnt, 1);
658 m->m_ext.ext_arg1 = icp;
659 m->m_epg_1st_off = page_offset;
662 todo = MIN(len, PAGE_SIZE - page_offset);
664 m->m_epg_pa[m->m_epg_npgs] =
665 VM_PAGE_TO_PHYS(bp->bio_ma[i]);
666 m->m_epg_npgs++;
667 m->m_epg_last_len = todo;
668 m->m_len += todo;
669 m->m_ext.ext_size += PAGE_SIZE;
672 if (m->m_epg_npgs == MBUF_PEXT_MAX_PGS) {
674 m_tail->m_next = m;
676 ip->ip_data_mbuf = m;
678 ip->ip_data_len += m->m_len;
683 len -= todo;
689 m_tail->m_next = m;
691 ip->ip_data_mbuf = m;
692 ip->ip_data_len += m->m_len;
697 m = cxgbei_getm(len, flags);
701 if (ip->ip_data_mbuf == NULL) {
702 ip->ip_data_mbuf = m;
703 ip->ip_data_len = len;
705 m_tail->m_next = m;
706 ip->ip_data_len += len;
709 while (len > 0) {
710 todo = MIN(len, PAGE_SIZE - page_offset);
712 mapped = pmap_map_io_transient(bp->bio_ma + i, &vaddr, 1,
716 mtodo = min(todo, M_SIZE(m) - m->m_len);
717 memcpy(mtod(m, char *) + m->m_len, (char *)vaddr +
719 m->m_len += mtodo;
720 if (m->m_len == M_SIZE(m))
721 m = m->m_next;
723 todo -= mtodo;
727 pmap_unmap_io_transient(bp->bio_ma + 1, &vaddr, 1,
731 len -= todo;
735 MPASS(ip->ip_data_len <= max(ic->ic_max_send_data_segment_length,
736 ic->ic_hw_isomax));
743 const void *addr, size_t len, int flags)
749 MPASS(icp->icp_signature == CXGBEI_PDU_SIGNATURE);
750 MPASS(ic == ip->ip_conn);
751 KASSERT(len > 0, ("%s: len is %jd", __func__, (intmax_t)len));
753 m_tail = ip->ip_data_mbuf;
755 for (; m_tail->m_next != NULL; m_tail = m_tail->m_next)
765 m->m_flags |= M_RDONLY;
766 m_extaddref(m, __DECONST(char *, addr), len, &icp->ref_cnt,
768 m->m_len = len;
769 if (ip->ip_data_mbuf == NULL) {
770 ip->ip_data_mbuf = m;
771 ip->ip_data_len = len;
773 m_tail->m_next = m;
774 m_tail = m_tail->m_next;
775 ip->ip_data_len += len;
781 m = cxgbei_getm(len, flags);
785 if (ip->ip_data_mbuf == NULL) {
786 ip->ip_data_mbuf = m;
787 ip->ip_data_len = len;
789 m_tail->m_next = m;
790 ip->ip_data_len += len;
793 for (; m != NULL; m = m->m_next) {
794 m->m_len = min(len, M_SIZE(m));
795 memcpy(mtod(m, void *), src, m->m_len);
796 src += m->m_len;
797 len -= m->m_len;
799 MPASS(len == 0);
801 MPASS(ip->ip_data_len <= max(ic->ic_max_send_data_segment_length,
802 ic->ic_hw_isomax));
809 size_t pdu_off, struct bio *bp, size_t bio_off, size_t len)
817 if (icp->icp_flags & ICPF_RX_DDP)
820 MPASS(bp->bio_flags & BIO_UNMAPPED);
821 if (bio_off < PAGE_SIZE - bp->bio_ma_offset) {
822 page_offset = bp->bio_ma_offset + bio_off;
825 bio_off -= PAGE_SIZE - bp->bio_ma_offset;
827 bio_off -= PAGE_SIZE;
831 while (len > 0) {
832 todo = MIN(len, PAGE_SIZE - page_offset);
834 mapped = pmap_map_io_transient(bp->bio_ma + i, &vaddr, 1,
836 m_copydata(ip->ip_data_mbuf, pdu_off, todo, (char *)vaddr +
839 pmap_unmap_io_transient(bp->bio_ma + 1, &vaddr, 1,
844 len -= todo;
851 size_t off, void *addr, size_t len)
855 if (icp->icp_flags & ICPF_RX_DDP)
857 m_copydata(ip->ip_data_mbuf, off, len, addr);
872 struct socket *so = ic->ic_socket;
874 MPASS(ic == ip->ip_conn);
875 MPASS(ip->ip_bhs_mbuf != NULL);
877 MPASS(ip->ip_ahs_mbuf == NULL && ip->ip_ahs_len == 0);
881 icp->cb = cb;
884 if (ic->ic_disconnecting || so == NULL || !sowriteable(so)) {
889 STAILQ_INSERT_TAIL(&icc->sent_pdus, ip, ip_next);
890 if (!icc->tx_active) {
891 icc->tx_active = true;
892 wakeup(&icc->tx_active);
906 icc->icc_signature = CXGBEI_CONN_SIGNATURE;
907 STAILQ_INIT(&icc->rcvd_pdus);
908 STAILQ_INIT(&icc->sent_pdus);
910 icc->cmp_table = hashinit(64, M_CXGBEI, &icc->cmp_hash_mask);
911 mtx_init(&icc->cmp_lock, "cxgbei_cmp", NULL, MTX_DEF);
913 ic = &icc->ic;
914 ic->ic_lock = lock;
917 refcount_init(&ic->ic_outstanding_pdus, 0);
919 ic->ic_name = name;
920 ic->ic_offload = "cxgbei";
921 ic->ic_unmapped = true;
933 MPASS(icc->icc_signature == CXGBEI_CONN_SIGNATURE);
937 mtx_destroy(&icc->cmp_lock);
938 hashdestroy(icc->cmp_table, M_CXGBEI, icc->cmp_hash_mask);
950 ss = max(sendspace, sspace);
951 rs = max(recvspace, rspace);
956 SOCKBUF_LOCK(&so->so_snd);
957 so->so_snd.sb_flags |= SB_AUTOSIZE;
958 SOCKBUF_UNLOCK(&so->so_snd);
959 SOCKBUF_LOCK(&so->so_rcv);
960 so->so_rcv.sb_flags |= SB_AUTOSIZE;
961 SOCKBUF_UNLOCK(&so->so_rcv);
998 __func__, toep->tid, ulp_submode);
1001 t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_ULP_TYPE,
1006 t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_T_FLAGS, val, val, 0, 0);
1029 MPASS(icc->icc_signature == CXGBEI_CONN_SIGNATURE);
1039 if (fp->f_type != DTYPE_SOCKET) {
1043 so = fp->f_data;
1044 if (so->so_type != SOCK_STREAM ||
1045 so->so_proto->pr_protocol != IPPROTO_TCP) {
1051 if (ic->ic_socket != NULL) {
1056 ic->ic_disconnecting = false;
1057 ic->ic_socket = so;
1058 fp->f_ops = &badfileops;
1059 fp->f_data = NULL;
1063 icc->sc = find_offload_adapter(so);
1064 if (icc->sc == NULL) {
1069 max_rx_pdu_len = ISCSI_BHS_SIZE + ic->ic_max_recv_data_segment_length;
1070 max_tx_pdu_len = ISCSI_BHS_SIZE + ic->ic_max_send_data_segment_length;
1071 if (ic->ic_header_crc32c) {
1075 if (ic->ic_data_crc32c) {
1083 if (inp->inp_flags & INP_DROPPED) {
1092 MPASS(tp->t_flags & TF_TOE);
1093 MPASS(tp->tod != NULL);
1094 MPASS(tp->t_toe != NULL);
1095 toep = tp->t_toe;
1096 MPASS(toep->vi->adapter == icc->sc);
1104 icc->toep = toep;
1106 icc->ulp_submode = 0;
1107 if (ic->ic_header_crc32c)
1108 icc->ulp_submode |= ULP_CRC_HEADER;
1109 if (ic->ic_data_crc32c)
1110 icc->ulp_submode |= ULP_CRC_DATA;
1112 if (icc->sc->tt.iso && chip_id(icc->sc) >= CHELSIO_T5 &&
1113 !is_memfree(icc->sc)) {
1115 tp->t_maxseg);
1117 ic->ic_hw_isomax = max_iso_pdus *
1118 ic->ic_max_send_data_segment_length;
1122 toep->params.ulp_mode = ULP_MODE_ISCSI;
1123 toep->ulpcb = icc;
1125 send_txdataplen_max_flowc_wr(icc->sc, toep,
1126 roundup(max_iso_pdus * max_tx_pdu_len, tp->t_maxseg));
1127 set_ulp_mode_iscsi(icc->sc, toep, icc->ulp_submode);
1130 error = kthread_add(icl_cxgbei_tx_main, icc, NULL, &icc->tx_thread, 0,
1131 0, "%stx (cxgbei)", ic->ic_name);
1135 error = kthread_add(icl_cxgbei_rx_main, icc, NULL, &icc->rx_thread, 0,
1136 0, "%srx (cxgbei)", ic->ic_name);
1155 struct toepcb *toep = icc->toep;
1157 MPASS(icc->icc_signature == CXGBEI_CONN_SIGNATURE);
1161 so = ic->ic_socket;
1162 if (ic->ic_disconnecting || so == NULL) {
1164 __func__, icc, ic->ic_disconnecting, so);
1168 ic->ic_disconnecting = true;
1171 KASSERT(ic->ic_outstanding_pdus == 0,
1173 ic->ic_outstanding_pdus));
1176 CTR3(KTR_CXGBE, "%s: tid %d, icc %p", __func__, toep ? toep->tid : -1,
1183 if (icc->tx_thread != NULL) {
1184 wakeup(&icc->tx_active);
1185 mtx_sleep(icc->tx_thread, ic->ic_lock, 0, "conclo", 0);
1189 while (!STAILQ_EMPTY(&icc->sent_pdus)) {
1190 ip = STAILQ_FIRST(&icc->sent_pdus);
1191 STAILQ_REMOVE_HEAD(&icc->sent_pdus, ip_next);
1197 sb = &so->so_rcv;
1204 if (icc->rx_thread != NULL) {
1205 icc->rx_exiting = true;
1206 wakeup(&icc->rx_active);
1207 mtx_sleep(icc->rx_thread, SOCKBUF_MTX(sb), 0, "conclo", 0);
1213 while (!STAILQ_EMPTY(&icc->rcvd_pdus)) {
1214 ip = STAILQ_FIRST(&icc->rcvd_pdus);
1215 STAILQ_REMOVE_HEAD(&icc->rcvd_pdus, ip_next);
1222 toep->ulpcb = NULL;
1225 mbufq_drain(&toep->ulp_pduq);
1229 * CPL to be received. If toep->inp is NULL, then
1233 if (toep->inp != NULL) {
1235 toep->flags |= TPF_WAITING_FOR_FINAL;
1242 ic->ic_socket = NULL;
1263 while ((toep->flags & TPF_WAITING_FOR_FINAL) != 0)
1278 cmp->tt = tt;
1280 mtx_lock(&icc->cmp_lock);
1282 LIST_FOREACH(cmp2, &icc->cmp_table[TT_HASH(icc, tt)], link) {
1283 KASSERT(cmp2->tt != tt, ("%s: duplicate cmp", __func__));
1286 LIST_INSERT_HEAD(&icc->cmp_table[TT_HASH(icc, tt)], cmp, link);
1287 mtx_unlock(&icc->cmp_lock);
1295 mtx_lock(&icc->cmp_lock);
1296 LIST_FOREACH(cmp, &icc->cmp_table[TT_HASH(icc, tt)], link) {
1297 if (cmp->tt == tt)
1300 mtx_unlock(&icc->cmp_lock);
1311 mtx_lock(&icc->cmp_lock);
1314 LIST_FOREACH(cmp2, &icc->cmp_table[TT_HASH(icc, cmp->tt)], link) {
1322 mtx_unlock(&icc->cmp_lock);
1330 struct toepcb *toep = icc->toep;
1331 struct adapter *sc = icc->sc;
1332 struct cxgbei_data *ci = sc->iscsi_ulp_softc;
1333 struct ppod_region *pr = &ci->pr;
1347 if ((csio->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_IN ||
1348 csio->dxfer_len < ci->ddp_threshold || ic->ic_disconnecting ||
1349 ic->ic_socket == NULL) {
1357 itt = V_PPOD_TAG(itt) | pr->pr_invalid_bit;
1362 toep->ofld_rxq->rx_iscsi_ddp_setup_error, 1);
1375 prsv = &ddp->prsv;
1378 switch (csio->ccb_h.flags & CAM_DATA_MASK) {
1381 (struct bio *)csio->data_ptr, prsv);
1388 (struct bio *)csio->data_ptr, &mq);
1397 rc = t4_alloc_page_pods_for_buf(pr, (vm_offset_t)csio->data_ptr,
1398 csio->dxfer_len, prsv);
1405 (vm_offset_t)csio->data_ptr, csio->dxfer_len, &mq);
1420 * Do not get inp from toep->inp as the toepcb might have
1423 inp = sotoinpcb(ic->ic_socket);
1425 if ((inp->inp_flags & INP_DROPPED) != 0) {
1432 mbufq_concat(&toep->ulp_pduq, &mq);
1435 ddp->cmp.last_datasn = -1;
1436 cxgbei_insert_cmp(icc, &ddp->cmp, prsv->prsv_tag);
1437 *ittp = htobe32(prsv->prsv_tag);
1439 counter_u64_add(toep->ofld_rxq->rx_iscsi_ddp_setup_ok, 1);
1450 cxgbei_rm_cmp(ic_to_icc(ic), &ddp->cmp);
1451 t4_free_page_pods(&ddp->prsv);
1464 if (((vm_offset_t)sg[--entries].addr & 3U) != 0)
1468 total_len += sg[entries].len;
1471 while (--entries >= 0) {
1473 (sg[entries].len % PAGE_SIZE) != 0)
1476 total_len += sg[entries].len;
1484 #define io_to_ddp_state(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND2].ptr)
1491 struct toepcb *toep = icc->toep;
1492 struct ctl_scsiio *ctsio = &io->scsiio;
1493 struct adapter *sc = icc->sc;
1494 struct cxgbei_data *ci = sc->iscsi_ulp_softc;
1495 struct ppod_region *pr = &ci->pr;
1501 int sg_entries = ctsio->kern_sg_entries;
1509 if (ctsio->ext_data_filled == 0) {
1514 MPASS(icp->icp_signature == CXGBEI_PDU_SIGNATURE);
1515 MPASS(ic == ip->ip_conn);
1516 MPASS(ip->ip_bhs_mbuf != NULL);
1522 * burst had everything and there's nothing left to transfer.
1529 xferlen = ctsio->kern_data_len;
1531 xferlen - first_burst < ci->ddp_threshold) {
1539 ttt = V_PPOD_TAG(ttt) | pr->pr_invalid_bit;
1544 toep->ofld_rxq->rx_iscsi_ddp_setup_error, 1);
1550 sgl->len = xferlen;
1551 sgl->addr = (void *)ctsio->kern_data_ptr;
1554 sgl = (void *)ctsio->kern_data_ptr;
1569 prsv = &ddp->prsv;
1588 * Do not get inp from toep->inp as the toepcb might
1592 if (ic->ic_disconnecting || ic->ic_socket == NULL) {
1599 inp = sotoinpcb(ic->ic_socket);
1602 if ((inp->inp_flags & INP_DROPPED) != 0) {
1609 mbufq_concat(&toep->ulp_pduq, &mq);
1612 ddp->cmp.next_buffer_offset = ctsio->kern_rel_offset +
1614 ddp->cmp.last_datasn = -1;
1615 cxgbei_insert_cmp(icc, &ddp->cmp, prsv->prsv_tag);
1616 *tttp = htobe32(prsv->prsv_tag);
1619 counter_u64_add(toep->ofld_rxq->rx_iscsi_ddp_setup_ok, 1);
1624 * In the middle of an I/O. A non-NULL page pod reservation indicates
1630 prsv = &ddp->prsv;
1632 alias = (prsv->prsv_tag & pr->pr_alias_mask) >> pr->pr_alias_shift;
1634 prsv->prsv_tag &= ~pr->pr_alias_mask;
1635 prsv->prsv_tag |= alias << pr->pr_alias_shift & pr->pr_alias_mask;
1637 ddp->cmp.last_datasn = -1;
1638 cxgbei_insert_cmp(icc, &ddp->cmp, prsv->prsv_tag);
1639 *tttp = htobe32(prsv->prsv_tag);
1656 cxgbei_rm_cmp(ic_to_icc(ic), &ddp->cmp);
1657 if (ctsio->kern_data_len == ctsio->ext_data_filled ||
1658 ic->ic_disconnecting) {
1659 t4_free_page_pods(&ddp->prsv);
1678 ci = sc->iscsi_ulp_softc;
1682 max_dsl = ci->max_rx_data_len;
1683 if (idl->idl_max_recv_data_segment_length > max_dsl)
1684 idl->idl_max_recv_data_segment_length = max_dsl;
1686 max_dsl = ci->max_tx_data_len;
1687 if (idl->idl_max_send_data_segment_length > max_dsl)
1688 idl->idl_max_send_data_segment_length = max_dsl;
1709 if (fp->f_type != DTYPE_SOCKET) {
1713 so = fp->f_data;
1714 if (so->so_type != SOCK_STREAM ||
1715 so->so_proto->pr_protocol != IPPROTO_TCP) {
1732 ci = sc->iscsi_ulp_softc;
1735 idl->idl_max_recv_data_segment_length = ci->max_rx_data_len;
1736 idl->idl_max_send_data_segment_length = ci->max_tx_data_len;
1750 idl->idl_max_recv_data_segment_length = (1 << 24) - 1;
1751 idl->idl_max_send_data_segment_length = (1 << 24) - 1;
1754 idl->idl_max_burst_length = max_burst_length;
1755 idl->idl_first_burst_length = first_burst_length;
1774 rc = icl_register("cxgbei", false, -100, icl_cxgbei_limits,