Home | History | Annotate | Download | only in net

Lines Matching refs:iobuf

28 #include <gpxe/iobuf.h>
119 * @v iobuf I/O buffer
125 int netdev_tx ( struct net_device *netdev, struct io_buffer *iobuf ) {
129 netdev, iobuf, iobuf->data, iob_len ( iobuf ) );
131 list_add_tail ( &iobuf->list, &netdev->tx_queue );
138 if ( ( rc = netdev->op->transmit ( netdev, iobuf ) ) != 0 )
144 netdev_tx_complete_err ( netdev, iobuf, rc );
152 * @v iobuf I/O buffer
158 struct io_buffer *iobuf, int rc ) {
164 netdev, iobuf );
167 netdev, iobuf, strerror ( rc ) );
171 assert ( iobuf->list.next != NULL );
172 assert ( iobuf->list.prev != NULL );
175 list_del ( &iobuf->list );
176 free_iob ( iobuf );
188 struct io_buffer *iobuf;
190 list_for_each_entry ( iobuf, &netdev->tx_queue, list ) {
191 netdev_tx_complete_err ( netdev, iobuf, rc );
213 * @v iobuf I/O buffer, or NULL
218 void netdev_rx ( struct net_device *netdev, struct io_buffer *iobuf ) {
221 netdev, iobuf, iobuf->data, iob_len ( iobuf ) );
224 list_add_tail ( &iobuf->list, &netdev->rx_queue );
234 * @v iobuf I/O buffer, or NULL
238 * takes ownership of the I/O buffer. @c iobuf may be NULL if, for
243 struct io_buffer *iobuf, int rc ) {
246 netdev, iobuf, strerror ( rc ) );
249 free_iob ( iobuf );
274 * @ret iobuf I/O buffer, or NULL
280 struct io_buffer *iobuf;
282 list_for_each_entry ( iobuf, &netdev->rx_queue, list ) {
283 list_del ( &iobuf->list );
284 return iobuf;
295 struct io_buffer *iobuf;
298 while ( ( iobuf = netdev_rx_dequeue ( netdev ) ) ) {
299 netdev_rx_err ( netdev, iobuf, -ECANCELED );
522 * @v iobuf I/O buffer
532 int net_tx ( struct io_buffer *iobuf, struct net_device *netdev,
545 if ( ( rc = ll_protocol->push ( netdev, iobuf, ll_dest, netdev->ll_addr,
547 free_iob ( iobuf );
552 return netdev_tx ( netdev, iobuf );
558 * @v iobuf I/O buffer
564 int net_rx ( struct io_buffer *iobuf, struct net_device *netdev,
571 return net_protocol->rx ( iobuf, netdev, ll_source );
576 free_iob ( iobuf );
590 struct io_buffer *iobuf;
609 if ( ( iobuf = netdev_rx_dequeue ( netdev ) ) ) {
612 netdev, iobuf, iobuf->data,
613 iob_len ( iobuf ) );
617 if ( ( rc = ll_protocol->pull ( netdev, iobuf,
620 free_iob ( iobuf );
624 net_rx ( iobuf, netdev, net_proto, ll_source );