Lines Matching refs:packet

1127 	p_tx_sw_packet_t packet;  in e1000g_alloc_tx_packets()  local
1149 for (j = 0, packet = tx_ring->packet_area; in e1000g_alloc_tx_packets()
1150 j < Adapter->tx_freelist_num; j++, packet++) { in e1000g_alloc_tx_packets()
1152 ASSERT(packet != NULL); in e1000g_alloc_tx_packets()
1167 &packet->tx_dma_handle); in e1000g_alloc_tx_packets()
1174 &packet->tx_dma_handle); in e1000g_alloc_tx_packets()
1181 packet->tx_dma_handle = NULL; in e1000g_alloc_tx_packets()
1194 tx_buf = packet->tx_buf; in e1000g_alloc_tx_packets()
1212 ASSERT(packet->tx_dma_handle != NULL); in e1000g_alloc_tx_packets()
1216 dvma_release(packet->tx_dma_handle); in e1000g_alloc_tx_packets()
1220 ddi_dma_free_handle(&packet->tx_dma_handle); in e1000g_alloc_tx_packets()
1226 packet->tx_dma_handle = NULL; in e1000g_alloc_tx_packets()
1232 packet->dma_type = e1000g_dma_type; in e1000g_alloc_tx_packets()
1248 p_rx_sw_packet_t packet; in e1000g_increase_rx_packets() local
1259 packet = e1000g_alloc_rx_sw_packet(rx_data, &dma_attr); in e1000g_increase_rx_packets()
1260 if (packet == NULL) in e1000g_increase_rx_packets()
1262 packet->next = cur; in e1000g_increase_rx_packets()
1263 cur = packet; in e1000g_increase_rx_packets()
1285 p_rx_sw_packet_t packet; in e1000g_alloc_rx_packets() local
1306 packet = e1000g_alloc_rx_sw_packet(rx_data, &dma_attr); in e1000g_alloc_rx_packets()
1307 if (packet == NULL) in e1000g_alloc_rx_packets()
1310 packet->next = rx_data->packet_area; in e1000g_alloc_rx_packets()
1311 rx_data->packet_area = packet; in e1000g_alloc_rx_packets()
1327 p_rx_sw_packet_t packet; in e1000g_alloc_rx_sw_packet() local
1333 packet = kmem_zalloc(sizeof (rx_sw_packet_t), KM_NOSLEEP); in e1000g_alloc_rx_sw_packet()
1334 if (packet == NULL) { in e1000g_alloc_rx_sw_packet()
1340 rx_buf = packet->rx_buf; in e1000g_alloc_rx_sw_packet()
1367 if (packet != NULL) in e1000g_alloc_rx_sw_packet()
1368 kmem_free(packet, sizeof (rx_sw_packet_t)); in e1000g_alloc_rx_sw_packet()
1379 packet->rx_data = (caddr_t)rx_data; in e1000g_alloc_rx_sw_packet()
1380 packet->free_rtn.free_func = e1000g_rxfree_func; in e1000g_alloc_rx_sw_packet()
1381 packet->free_rtn.free_arg = (char *)packet; in e1000g_alloc_rx_sw_packet()
1387 packet->mp = desballoc((unsigned char *) in e1000g_alloc_rx_sw_packet()
1390 BPRI_MED, &packet->free_rtn); in e1000g_alloc_rx_sw_packet()
1392 packet->dma_type = e1000g_dma_type; in e1000g_alloc_rx_sw_packet()
1393 packet->ref_cnt = 1; in e1000g_alloc_rx_sw_packet()
1395 return (packet); in e1000g_alloc_rx_sw_packet()
1399 e1000g_free_rx_sw_packet(p_rx_sw_packet_t packet, boolean_t full_release) in e1000g_free_rx_sw_packet() argument
1403 if (packet->mp != NULL) { in e1000g_free_rx_sw_packet()
1404 freemsg(packet->mp); in e1000g_free_rx_sw_packet()
1405 packet->mp = NULL; in e1000g_free_rx_sw_packet()
1408 rx_buf = packet->rx_buf; in e1000g_free_rx_sw_packet()
1410 switch (packet->dma_type) { in e1000g_free_rx_sw_packet()
1427 packet->dma_type = USE_NONE; in e1000g_free_rx_sw_packet()
1432 kmem_free(packet, sizeof (rx_sw_packet_t)); in e1000g_free_rx_sw_packet()
1438 p_rx_sw_packet_t packet, next_packet; in e1000g_free_rx_packets() local
1443 packet = rx_data->packet_area; in e1000g_free_rx_packets()
1444 while (packet != NULL) { in e1000g_free_rx_packets()
1445 next_packet = packet->next; in e1000g_free_rx_packets()
1447 ref_cnt = atomic_dec_32_nv(&packet->ref_cnt); in e1000g_free_rx_packets()
1452 e1000g_free_rx_sw_packet(packet, full_release); in e1000g_free_rx_packets()
1455 packet = next_packet; in e1000g_free_rx_packets()
1470 p_tx_sw_packet_t packet; in e1000g_free_tx_packets() local
1475 for (j = 0, packet = tx_ring->packet_area; in e1000g_free_tx_packets()
1476 j < Adapter->tx_freelist_num; j++, packet++) { in e1000g_free_tx_packets()
1478 if (packet == NULL) in e1000g_free_tx_packets()
1482 if (packet->tx_dma_handle != NULL) { in e1000g_free_tx_packets()
1483 switch (packet->dma_type) { in e1000g_free_tx_packets()
1486 dvma_release(packet->tx_dma_handle); in e1000g_free_tx_packets()
1490 ddi_dma_free_handle(&packet->tx_dma_handle); in e1000g_free_tx_packets()
1496 packet->tx_dma_handle = NULL; in e1000g_free_tx_packets()
1506 tx_buf = packet->tx_buf; in e1000g_free_tx_packets()
1508 switch (packet->dma_type) { in e1000g_free_tx_packets()
1522 packet->dma_type = USE_NONE; in e1000g_free_tx_packets()