Lines Matching refs:length
114 static int dsa_port_send(struct udevice *pdev, void *packet, int length) in dsa_port_send() argument
125 if (length + head + tail > PKTSIZE_ALIGN) in dsa_port_send()
129 memset(dsa_packet_tmp + head + length, 0, tail); in dsa_port_send()
130 memcpy(dsa_packet_tmp + head, packet, length); in dsa_port_send()
131 length += head + tail; in dsa_port_send()
133 memcpy(packet, dsa_packet_tmp, length); in dsa_port_send()
136 err = ops->xmit(dev, port_pdata->index, packet, length); in dsa_port_send()
140 return eth_get_ops(master)->send(master, packet, length); in dsa_port_send()
152 int length, port_index, err; in dsa_port_recv() local
154 length = eth_get_ops(master)->recv(master, flags, packetp); in dsa_port_recv()
155 if (length <= 0) in dsa_port_recv()
156 return length; in dsa_port_recv()
165 err = ops->rcv(dev, &port_index, *packetp, length); in dsa_port_recv()
166 if (err || port_index != port_pdata->index || (length <= head + tail)) { in dsa_port_recv()
168 eth_get_ops(master)->free_pkt(master, *packetp, length); in dsa_port_recv()
178 return length - head - tail; in dsa_port_recv()
181 static int dsa_port_free_pkt(struct udevice *pdev, uchar *packet, int length) in dsa_port_free_pkt() argument
191 length += priv->headroom - priv->tailroom; in dsa_port_free_pkt()
193 return eth_get_ops(master)->free_pkt(master, packet, length); in dsa_port_free_pkt()