Searched refs:iobuf (Results 1 - 25 of 109) sorted by relevance

12345

/vbox/src/VBox/Devices/PC/ipxe/src/include/ipxe/
H A Diobuf.h65 * @v iobuf I/O buffer
69 static inline void * iob_reserve ( struct io_buffer *iobuf, size_t len ) { argument
70 iobuf->data += len;
71 iobuf->tail += len;
72 return iobuf->data;
74 #define iob_reserve( iobuf, len ) ( { \
76 __result = iob_reserve ( (iobuf), (len) ); \
77 assert ( (iobuf)->tail <= (iobuf)->end ); \
83 * @v iobuf
87 iob_push( struct io_buffer *iobuf, size_t len ) argument
104 iob_pull( struct io_buffer *iobuf, size_t len ) argument
122 iob_put( struct io_buffer *iobuf, size_t len ) argument
139 iob_unput( struct io_buffer *iobuf, size_t len ) argument
197 iob_populate( struct io_buffer *iobuf, void *data, size_t len, size_t max_len ) argument
[all...]
H A Dxferbuf.h13 #include <ipxe/iobuf.h>
28 struct io_buffer *iobuf,
H A Dndp.h8 #include <ipxe/iobuf.h>
20 int ndp_process_advert ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src,
/vbox/src/VBox/Devices/PC/ipxe/src/core/
H A Diobuf.c24 #include <ipxe/iobuf.h>
36 * @ret iobuf I/O buffer, or NULL if none available
42 struct io_buffer *iobuf = NULL; local
50 len = ( len + __alignof__( *iobuf ) - 1 ) &
51 ~( __alignof__( *iobuf ) - 1 );
54 data = malloc_dma ( len + sizeof ( *iobuf ), IOB_ALIGN );
58 iobuf = ( struct io_buffer * ) ( data + len );
59 iobuf->head = iobuf->data = iobuf
90 iob_ensure_headroom( struct io_buffer *iobuf, size_t len ) argument
[all...]
H A Dxfer.c25 #include <ipxe/iobuf.h>
155 * @ret iobuf I/O buffer
162 struct io_buffer *iobuf; local
168 iobuf = op ( object, len );
173 iobuf = alloc_iob ( len );
176 if ( ! iobuf ) {
182 return iobuf;
189 * @v iobuf Datagram I/O buffer
194 struct io_buffer *iobuf,
203 INTF_INTF_DBG ( intf, dest ), iob_len ( iobuf ) );
193 xfer_deliver( struct interface *intf, struct io_buffer *iobuf, struct xfer_metadata *meta ) argument
269 struct io_buffer *iobuf; local
351 struct io_buffer *iobuf; local
[all...]
H A Dxferbuf.c35 #include <ipxe/iobuf.h>
87 * @v iobuf I/O buffer
91 int xferbuf_deliver ( struct xfer_buffer *xferbuf, struct io_buffer *iobuf, argument
103 len = iob_len ( iobuf );
109 memcpy ( ( xferbuf->data + xferbuf->pos ), iobuf->data, len );
115 free_iob ( iobuf );
H A Dposix_io.c25 #include <ipxe/iobuf.h>
74 struct io_buffer *iobuf; local
77 list_for_each_entry_safe ( iobuf, tmp, &file->data, list ) {
78 list_del ( &iobuf->list );
79 free_iob ( iobuf );
99 * @v iobuf I/O buffer
104 struct io_buffer *iobuf,
114 if ( iob_len ( iobuf ) ) {
115 list_add_tail ( &iobuf->list, &file->data );
117 free_iob ( iobuf );
103 posix_file_xfer_deliver( struct posix_file *file, struct io_buffer *iobuf, struct xfer_metadata *meta ) argument
262 struct io_buffer *iobuf; local
[all...]
/vbox/src/VBox/Devices/PC/ipxe/src/net/
H A Diobpad.c29 #include <ipxe/iobuf.h>
34 * @v iobuf I/O buffer
44 void iob_pad ( struct io_buffer *iobuf, size_t min_len ) { argument
57 data = iobuf->data;
58 len = iob_len ( iobuf );
59 headroom = iob_headroom ( iobuf );
60 iob_push ( iobuf, headroom );
61 memmove ( iobuf->data, data, len );
62 iob_unput ( iobuf, headroom );
65 pad_len = ( min_len - iob_len ( iobuf ) );
[all...]
H A Dnetdevice.c29 #include <ipxe/iobuf.h>
174 * @v iobuf I/O buffer
180 int netdev_tx ( struct net_device *netdev, struct io_buffer *iobuf ) {
184 netdev->name, iobuf, iobuf->data, iob_len ( iobuf ) );
187 list_add_tail ( &iobuf->list, &netdev->tx_queue );
203 if ( ( rc = netdev->op->transmit ( netdev, iobuf ) ) != 0 )
209 netdev_tx_complete_err ( netdev, iobuf, rc );
217 * @v iobuf
223 netdev_tx_err( struct net_device *netdev, struct io_buffer *iobuf, int rc ) argument
249 netdev_tx_complete_err( struct net_device *netdev, struct io_buffer *iobuf, int rc ) argument
269 struct io_buffer *iobuf; local
330 netdev_rx_err( struct net_device *netdev, struct io_buffer *iobuf, int rc ) argument
368 struct io_buffer *iobuf; local
384 struct io_buffer *iobuf; local
668 net_tx( struct io_buffer *iobuf, struct net_device *netdev, struct net_protocol *net_protocol, const void *ll_dest, const void *ll_source ) argument
704 net_rx( struct io_buffer *iobuf, struct net_device *netdev, uint16_t net_proto, const void *ll_dest, const void *ll_source, unsigned int flags ) argument
730 struct io_buffer *iobuf; local
[all...]
H A Drarp.c24 #include <ipxe/iobuf.h>
37 * @v iobuf I/O buffer
46 static int rarp_rx ( struct io_buffer *iobuf, argument
51 free_iob ( iobuf );
H A Deth_slow.c25 #include <ipxe/iobuf.h>
103 * @v iobuf I/O buffer
107 static void eth_slow_lacp_dump ( struct io_buffer *iobuf, argument
110 union eth_slow_packet *eth_slow = iobuf->data;
132 DBGC2_HDA ( netdev, 0, iobuf->data, iob_len ( iobuf ) );
138 * @v iobuf I/O buffer
142 static int eth_slow_lacp_rx ( struct io_buffer *iobuf, argument
144 union eth_slow_packet *eth_slow = iobuf->data;
147 eth_slow_lacp_dump ( iobuf, netde
188 eth_slow_marker_dump( struct io_buffer *iobuf, struct net_device *netdev, const char *label ) argument
210 eth_slow_marker_rx( struct io_buffer *iobuf, struct net_device *netdev ) argument
240 eth_slow_rx( struct io_buffer *iobuf, struct net_device *netdev, const void *ll_dest __unused, const void *ll_source __unused, unsigned int flags __unused ) argument
[all...]
H A Dicmp.c23 #include <ipxe/iobuf.h>
39 * @v iobuf I/O buffer
45 static int icmp_rx ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src, argument
48 struct icmp_header *icmp = iobuf->data;
49 size_t len = iob_len ( iobuf );
86 if ( ( rc = tcpip_tx ( iob_disown ( iobuf ), &icmp_protocol, st_dest,
94 free_iob ( iobuf );
H A Dipv4.c11 #include <ipxe/iobuf.h>
145 struct iphdr *iphdr = frag->iobuf->data;
149 free_iob ( frag->iobuf );
165 frag_iphdr = frag->iobuf->data;
179 * @v iobuf I/O buffer
180 * @ret iobuf Reassembled packet, or NULL
182 static struct io_buffer * ipv4_reassemble ( struct io_buffer *iobuf ) {
183 struct iphdr *iphdr = iobuf->data;
200 ( iob_len ( iobuf ) - hdrlen ), expected_offset );
212 frag->iobuf
268 ipv4_pshdr_chksum( struct io_buffer *iobuf, uint16_t csum ) argument
297 ipv4_tx( struct io_buffer *iobuf, struct tcpip_protocol *tcpip_protocol, struct sockaddr_tcpip *st_src, struct sockaddr_tcpip *st_dest, struct net_device *netdev, uint16_t *trans_csum ) argument
454 ipv4_rx( struct io_buffer *iobuf, struct net_device *netdev, const void *ll_dest __unused, const void *ll_source __unused, unsigned int flags ) argument
[all...]
H A Dtcpip.c5 #include <ipxe/iobuf.h>
21 * @v iobuf I/O buffer
34 int tcpip_rx ( struct io_buffer *iobuf, uint8_t tcpip_proto, argument
44 return tcpip->rx ( iobuf, st_src, st_dest, pshdr_csum );
49 free_iob ( iobuf );
55 * @v iobuf I/O buffer
63 int tcpip_tx ( struct io_buffer *iobuf, struct tcpip_protocol *tcpip_protocol, argument
72 return tcpip_net->tx ( iobuf, tcpip_protocol, st_src,
78 free_iob ( iobuf );
H A Dudp.c8 #include <ipxe/iobuf.h>
187 * @v iobuf I/O buffer
193 static int udp_tx ( struct udp_connection *udp, struct io_buffer *iobuf, argument
201 if ( ( rc = iob_ensure_headroom ( iobuf,
203 free_iob ( iobuf );
214 udphdr = iob_push ( iobuf, sizeof ( *udphdr ) );
215 len = iob_len ( iobuf );
228 if ( ( rc = tcpip_tx ( iobuf, &udp_protocol, src, dest, netdev,
266 * @v iobuf I/O buffer
272 static int udp_rx ( struct io_buffer *iobuf, struc argument
364 struct io_buffer *iobuf; local
384 udp_xfer_deliver( struct udp_connection *udp, struct io_buffer *iobuf, struct xfer_metadata *meta ) argument
[all...]
H A Dethernet.c31 #include <ipxe/iobuf.h>
47 * @v iobuf I/O buffer
53 int eth_push ( struct net_device *netdev __unused, struct io_buffer *iobuf, argument
56 struct ethhdr *ethhdr = iob_push ( iobuf, sizeof ( *ethhdr ) );
70 * @v iobuf I/O buffer
77 int eth_pull ( struct net_device *netdev __unused, struct io_buffer *iobuf, argument
80 struct ethhdr *ethhdr = iobuf->data;
83 if ( iob_len ( iobuf ) < sizeof ( *ethhdr ) ) {
85 iob_len ( iobuf ) );
90 iob_pull ( iobuf, sizeo
[all...]
H A Dnullnet.c23 #include <ipxe/iobuf.h>
41 struct io_buffer *iobuf __unused ) {
H A Dtcp.c8 #include <ipxe/iobuf.h>
316 struct io_buffer *iobuf; local
334 list_for_each_entry_safe ( iobuf, tmp, &tcp->rx_queue, list ) {
335 list_del ( &iobuf->list );
336 free_iob ( iobuf );
340 list_for_each_entry_safe ( iobuf, tmp, &tcp->tx_queue, list ) {
341 list_del ( &iobuf->list );
342 free_iob ( iobuf );
431 struct io_buffer *iobuf; local
436 list_for_each_entry_safe ( iobuf, tm
469 struct io_buffer *iobuf; local
653 struct io_buffer *iobuf; local
1046 struct io_buffer *iobuf; local
1093 tcp_rx( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src, struct sockaddr_tcpip *st_dest __unused, uint16_t pshdr_csum ) argument
1245 struct io_buffer *iobuf; local
1316 tcp_xfer_deliver( struct tcp_connection *tcp, struct io_buffer *iobuf, struct xfer_metadata *meta __unused ) argument
[all...]
H A Dicmpv6.c8 #include <ipxe/iobuf.h>
32 struct io_buffer *iobuf = alloc_iob ( sizeof ( *nsolicit ) + MIN_IOB_LEN ); local
33 iob_reserve ( iobuf, MAX_HDR_LEN );
34 nsolicit = iob_put ( iobuf, sizeof ( *nsolicit ) );
61 return tcpip_tx ( iobuf, &icmp6_protocol, NULL, &st_dest.st,
68 * @v iobuf I/O buffer
72 static int icmp6_rx ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src, argument
74 struct icmp6_header *icmp6hdr = iobuf->data;
77 if ( iob_len ( iobuf ) < sizeof ( *icmp6hdr ) ) {
78 DBG ( "Packet too short (%zd bytes)\n", iob_len ( iobuf ) );
[all...]
H A Dipv6.c14 #include <ipxe/iobuf.h>
134 * @v iobuf I/O buffer
140 static uint16_t ipv6_tx_csum ( struct io_buffer *iobuf, uint16_t csum ) { argument
141 struct ip6_header *ip6hdr = iobuf->data;
148 pshdr.len = htons ( iob_len ( iobuf ) - sizeof ( *ip6hdr ) );
169 * iobuf I/O buffer
175 static int ipv6_tx ( struct io_buffer *iobuf, argument
189 struct ip6_header *ip6hdr = iob_push ( iobuf, sizeof ( *ip6hdr ) );
192 ip6hdr->payload_len = htons ( iob_len ( iobuf ) - sizeof ( *ip6hdr ) );
222 *trans_csum = ipv6_tx_csum ( iobuf, *trans_csu
263 ipv6_process_nxt_hdr( struct io_buffer *iobuf, uint8_t nxt_hdr, struct sockaddr_tcpip *src, struct sockaddr_tcpip *dest ) argument
295 ipv6_rx( struct io_buffer *iobuf, __unused struct net_device *netdev, __unused const void *ll_dest, __unused const void *ll_source, __unused unsigned int flags ) argument
[all...]
/vbox/src/VBox/Devices/PC/ipxe/src/usr/
H A Dlotest.c27 #include <ipxe/iobuf.h>
46 * @v iobuf I/O buffer
53 static int lotest_rx ( struct io_buffer *iobuf, argument
58 free_iob ( iobuf );
98 struct io_buffer *iobuf; local
116 iobuf = netdev_rx_dequeue ( receiver );
117 if ( ! iobuf )
121 if ( ( rc = ll_protocol->pull ( receiver, iobuf, &ll_dest,
126 free_iob ( iob_disown ( iobuf ) );
134 free_iob ( iob_disown ( iobuf ) );
178 struct io_buffer *iobuf; local
[all...]
/vbox/src/VBox/Devices/PC/ipxe/src/net/infiniband/
H A Dib_packet.c26 #include <ipxe/iobuf.h>
41 * @v iobuf I/O buffer to contain headers
46 int ib_push ( struct ib_device *ibdev, struct io_buffer *iobuf, argument
53 size_t orig_iob_len = iob_len ( iobuf );
69 orig_iob_len = iob_len ( iobuf );
70 deth = iob_push ( iobuf, sizeof ( *deth ) );
71 bth = iob_push ( iobuf, sizeof ( *bth ) );
72 grh_len = ( payload_len + iob_len ( iobuf ) - orig_iob_len );
74 iob_push ( iobuf, sizeof ( *grh ) ) : NULL );
75 lrh = iob_push ( iobuf, sizeo
124 ib_pull( struct ib_device *ibdev, struct io_buffer *iobuf, struct ib_queue_pair **qp, size_t *payload_len, struct ib_address_vector *av ) argument
[all...]
/vbox/src/VBox/Devices/PC/ipxe/src/drivers/net/
H A Dvirtio-net.c28 #include <ipxe/iobuf.h>
104 /** Add an iobuf to a virtqueue
108 * @v iobuf I/O buffer
110 * The virtqueue is kicked after the iobuf has been added.
113 int vq_idx, struct io_buffer *iobuf ) {
129 .addr = ( char* ) iobuf->data,
130 .length = iob_len ( iobuf ),
134 DBGC ( virtnet, "VIRTIO-NET %p enqueuing iobuf %p on vq %d\n",
135 virtnet, iobuf, vq_idx );
137 vring_add_buf ( vq, list, out, in, iobuf,
149 struct io_buffer *iobuf; local
219 struct io_buffer *iobuf; local
257 struct io_buffer *iobuf = vring_get_buf ( tx_vq, NULL ); local
276 struct io_buffer *iobuf = vring_get_buf ( rx_vq, &len ); local
[all...]
H A Dlegacy.c7 #include <ipxe/iobuf.h>
26 static int legacy_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) {
30 DBG ( "Transmitting %zd bytes\n", iob_len ( iobuf ) );
31 iob_pad ( iobuf, ETH_ZLEN );
32 ethhdr = iobuf->data;
33 iob_pull ( iobuf, sizeof ( *ethhdr ) );
36 iob_len ( iobuf ), iobuf->data );
37 netdev_tx_complete ( netdev, iobuf );
43 struct io_buffer *iobuf; local
[all...]
/vbox/src/VBox/Devices/PC/ipxe/src/net/udp/
H A Dslam.c29 #include <ipxe/iobuf.h>
202 * @v iobuf I/O buffer
211 struct io_buffer *iobuf, unsigned long value ) {
220 if ( len >= iob_tailroom ( iobuf ) ) {
232 data = iob_put ( iobuf, len );
250 struct io_buffer *iobuf; local
260 iobuf = xfer_alloc_iob ( &slam->socket, SLAM_MAX_NACK_LEN );
261 if ( ! iobuf ) {
291 if ( ( rc = slam_put_value ( slam, iobuf, first_block ) ) != 0 )
293 if ( ( rc = slam_put_value ( slam, iobuf, num_block
210 slam_put_value( struct slam_request *slam, struct io_buffer *iobuf, unsigned long value ) argument
365 slam_pull_value( struct slam_request *slam, struct io_buffer *iobuf, unsigned long *value ) argument
477 slam_mc_socket_deliver( struct slam_request *slam, struct io_buffer *iobuf, struct xfer_metadata *rx_meta __unused ) argument
557 slam_socket_deliver( struct slam_request *slam, struct io_buffer *iobuf, struct xfer_metadata *rx_meta __unused ) argument
[all...]

Completed in 123 milliseconds

12345