Lines Matching defs:packet

771 		struct hv_netvsc_packet *packet
773 u32 send_index = packet->send_buf_index;
778 q_idx = packet->q_idx;
783 tx_stats->packets += packet->total_packets;
784 tx_stats->bytes += packet->total_bytes;
787 netvsc_dma_unmap(ndev_ctx->device_ctx, packet);
842 /* Ensure packet is big enough to read header fields */
935 struct hv_netvsc_packet *packet,
945 u32 page_count = packet->cp_partial ? packet->rmsg_pgcnt :
946 packet->page_buf_cnt;
950 remain = packet->total_data_buflen & (net_device->pkt_align - 1);
954 packet->total_data_buflen += padding;
971 struct hv_netvsc_packet *packet)
978 if (!packet->dma_range)
981 for (i = 0; i < packet->page_buf_cnt; i++)
982 dma_unmap_single(&hv_dev->device, packet->dma_range[i].dma,
983 packet->dma_range[i].mapping_size,
986 kfree(packet->dma_range);
990 * packet sent by vmbus_sendpacket_pagebuffer() in the Isolation
1008 struct hv_netvsc_packet *packet,
1011 u32 page_count = packet->page_buf_cnt;
1018 packet->dma_range = kcalloc(page_count,
1019 sizeof(*packet->dma_range),
1021 if (!packet->dma_range)
1032 kfree(packet->dma_range);
1039 packet->dma_range[i].dma = dma;
1040 packet->dma_range[i].mapping_size = len;
1049 struct hv_netvsc_packet *packet,
1058 &net_device->chan_table[packet->q_idx];
1062 struct netdev_queue *txq = netdev_get_tx_queue(ndev, packet->q_idx);
1074 rpkt->send_buf_section_index = packet->send_buf_index;
1075 if (packet->send_buf_index == NETVSC_INVALID_INDEX)
1078 rpkt->send_buf_section_size = packet->total_data_buflen;
1087 packet->dma_range = NULL;
1088 if (packet->page_buf_cnt) {
1089 if (packet->cp_partial)
1090 pb += packet->rmsg_pgcnt;
1092 ret = netvsc_dma_map(ndev_ctx->device_ctx, packet, pb);
1099 pb, packet->page_buf_cnt,
1104 netvsc_dma_unmap(ndev_ctx->device_ctx, packet);
1125 "Unable to send packet pages %u len %u, ret %d\n",
1126 packet->page_buf_cnt, packet->total_data_buflen,
1142 /* Move packet out of multi send data (msd), and clear msd */
1158 * For small, non-LSO packets we copy the packet to a send buffer
1160 * hypervisor to avoid remapping the aperture to access the packet
1166 * buffer with space for the RNDIS descriptor but not the packet, copy
1167 * the RNDIS descriptor to the buffer, keeping the packet in place.
1169 * If we do batching and send more than one packet using a single
1171 * last packet. This is done to streamline the handling of the case
1172 * where the last packet only had the RNDIS descriptor copied to the
1176 struct hv_netvsc_packet *packet,
1188 u32 pktlen = packet->total_data_buflen, msd_len = 0;
1195 /* If device is rescinded, return error and packet will get dropped. */
1199 nvchan = &net_device->chan_table[packet->q_idx];
1200 packet->send_buf_index = NETVSC_INVALID_INDEX;
1201 packet->cp_partial = false;
1203 /* Send a control message or XDP packet directly without accessing
1204 * msd (Multi-Send Data) field which may be changed during data packet
1208 return netvsc_send_pkt(device, packet, net_device, pb, skb);
1220 } else if (try_batch && msd_len + packet->rmsg_size <
1223 packet->cp_partial = true;
1240 !packet->cp_partial &&
1241 !netif_xmit_stopped(netdev_get_tx_queue(ndev, packet->q_idx));
1246 packet, rndis_msg, pb, xmit_more);
1248 packet->send_buf_index = section_index;
1250 if (packet->cp_partial) {
1251 packet->page_buf_cnt -= packet->rmsg_pgcnt;
1252 packet->total_data_buflen = msd_len + packet->rmsg_size;
1254 packet->page_buf_cnt = 0;
1255 packet->total_data_buflen += msd_len;
1259 packet->total_packets += msdp->pkt->total_packets;
1260 packet->total_bytes += msdp->pkt->total_bytes;
1268 msdp->pkt = packet;
1271 cur_send = packet;
1278 cur_send = packet;
1404 /* Ensure packet is big enough to read header fields */
1412 /* Make sure this is a valid nvsp packet */
1415 "Unknown nvsp packet type received %u\n",
1464 /* We're going to copy (sections of) the packet into nvchan->recv_buf;
1465 * make sure that nvchan->recv_buf is large enough to hold the packet.
1488 /* Drop incomplete packet */
1509 /* Ensure packet is big enough to read send_table fields */
1552 /* Ensure packet is big enough to read its fields */
1577 /* Ensure packet is big enough to read header fields */
1622 netdev_err(ndev, "unhandled packet type %d, tid %llx\n",