356 if ((tx_ring_p->descs_pending + lso_ngathers) >= nxge_reclaim_pending) {
357 if (!nxge_txdma_reclaim(nxgep, tx_ring_p,
358 (nxge_tx_minfree + lso_ngathers))) {
359 NXGE_DEBUG_MSG((nxgep, TX_CTL,
360 "TX Descriptor ring is full: channel %d",
361 tx_ring_p->tdc));
362 NXGE_DEBUG_MSG((nxgep, TX_CTL,
363 "TX Descriptor ring is full: channel %d",
364 tx_ring_p->tdc));
365 if (is_lso) {
366 /*
367 * free the current mp and mp_chain if not FULL.
368 */
369 tdc_stats->tx_no_desc++;
370 NXGE_DEBUG_MSG((nxgep, TX_CTL,
371 "LSO packet: TX Descriptor ring is full: "
372 "channel %d",
373 tx_ring_p->tdc));
374 goto nxge_start_fail_lso;
375 } else {
376 (void) cas32((uint32_t *)&tx_ring_p->queueing,
377 0, 1);
378 tdc_stats->tx_no_desc++;
379
380 if (isLDOMservice(nxgep)) {
381 tx_ring_p->tx_ring_busy = B_FALSE;
382 if (tx_ring_p->tx_ring_offline) {
383 (void) atomic_swap_32(
384 &tx_ring_p->tx_ring_offline,
385 NXGE_TX_RING_OFFLINED);
386 }
387 }
388
389 MUTEX_EXIT(&tx_ring_p->lock);
390 status = 1;
391 goto nxge_start_fail1;
392 }
393 }
394 }
395
396 nmp = mp;
397 i = sop_index = tx_ring_p->wr_index;
|
356 if ((tx_ring_p->descs_pending + lso_ngathers) >= nxge_reclaim_pending) {
357 if (!nxge_txdma_reclaim(nxgep, tx_ring_p,
358 (nxge_tx_minfree + lso_ngathers))) {
359 NXGE_DEBUG_MSG((nxgep, TX_CTL,
360 "TX Descriptor ring is full: channel %d",
361 tx_ring_p->tdc));
362 NXGE_DEBUG_MSG((nxgep, TX_CTL,
363 "TX Descriptor ring is full: channel %d",
364 tx_ring_p->tdc));
365 if (is_lso) {
366 /*
367 * free the current mp and mp_chain if not FULL.
368 */
369 tdc_stats->tx_no_desc++;
370 NXGE_DEBUG_MSG((nxgep, TX_CTL,
371 "LSO packet: TX Descriptor ring is full: "
372 "channel %d",
373 tx_ring_p->tdc));
374 goto nxge_start_fail_lso;
375 } else {
376 (void) atomic_cas_32(
377 (uint32_t *)&tx_ring_p->queueing, 0, 1);
378 tdc_stats->tx_no_desc++;
379
380 if (isLDOMservice(nxgep)) {
381 tx_ring_p->tx_ring_busy = B_FALSE;
382 if (tx_ring_p->tx_ring_offline) {
383 (void) atomic_swap_32(
384 &tx_ring_p->tx_ring_offline,
385 NXGE_TX_RING_OFFLINED);
386 }
387 }
388
389 MUTEX_EXIT(&tx_ring_p->lock);
390 status = 1;
391 goto nxge_start_fail1;
392 }
393 }
394 }
395
396 nmp = mp;
397 i = sop_index = tx_ring_p->wr_index;
|