summaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
authorMichael Brown2007-09-14 12:10:25 +0200
committerMichael Brown2007-09-14 12:10:25 +0200
commit08e8dfd801afd35f2f006520b1df78d05de1921a (patch)
treed47a323a629f25f2a8ce377f673b44a19b5430bf /src/net
parentProof-of-concept to manually parse completion event (diff)
downloadipxe-08e8dfd801afd35f2f006520b1df78d05de1921a.tar.gz
ipxe-08e8dfd801afd35f2f006520b1df78d05de1921a.tar.xz
ipxe-08e8dfd801afd35f2f006520b1df78d05de1921a.zip
Now handling TX completions in our poll loop.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/infiniband.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/net/infiniband.c b/src/net/infiniband.c
index c7fabd0ee..52811b921 100644
--- a/src/net/infiniband.c
+++ b/src/net/infiniband.c
@@ -50,12 +50,12 @@ static int ib_tx ( struct io_buffer *iobuf, struct net_device *netdev,
struct net_protocol *net_protocol, const void *ll_dest ) {
struct ibhdr *ibhdr = iob_push ( iobuf, sizeof ( *ibhdr ) );
-
/* Build Infiniband header */
- memcpy ( ibhdr->peer, ll_dest, IB_ALEN );
ibhdr->proto = net_protocol->net_proto;
ibhdr->reserved = 0;
+ ( void ) ll_dest;
+
/* Hand off to network device */
return netdev_tx ( netdev, iobuf );
}
@@ -70,17 +70,6 @@ static int ib_tx ( struct io_buffer *iobuf, struct net_device *netdev,
* network-layer protocol.
*/
static int ib_rx ( struct io_buffer *iobuf, struct net_device *netdev ) {
-
- struct {
- uint16_t proto;
- uint16_t reserved;
- } * header = iobuf->data;
-
- iob_pull ( iobuf, sizeof ( *header ) );
- return net_rx ( iobuf, netdev, header->proto, NULL );
-
-
-
struct ibhdr *ibhdr = iobuf->data;
/* Sanity check */
@@ -95,7 +84,7 @@ static int ib_rx ( struct io_buffer *iobuf, struct net_device *netdev ) {
iob_pull ( iobuf, sizeof ( *ibhdr ) );
/* Hand off to network-layer protocol */
- return net_rx ( iobuf, netdev, ibhdr->proto, ibhdr->peer );
+ return net_rx ( iobuf, netdev, ibhdr->proto, NULL );
}
/**