Mercurial > archived > louis > epitech > mq > rathaxes
diff rathaxes_samples_e1000_split_set_up_device.patch @ 130:6359457dce75
wip
author | Louis Opter <louis@lse.epita.fr> |
---|---|
date | Sun, 01 Dec 2013 17:39:26 -0800 |
parents | 518d9c8ac70c |
children |
line wrap: on
line diff
--- a/rathaxes_samples_e1000_split_set_up_device.patch Mon Sep 02 22:59:30 2013 -0700 +++ b/rathaxes_samples_e1000_split_set_up_device.patch Sun Dec 01 17:39:26 2013 -0800 @@ -1,5 +1,5 @@ # HG changeset patch -# Parent 2bb3ee06ef16e410c364238ccdccf43a6a2acceb +# Parent 39b6e7f1b2937f596ed9523741dba01745e50b9d rathaxes: split and refactor e1000::set_up_device in {Rx,Tx}Ring methods diff --git a/rathaxes/samples/e1000/e1000.blt b/rathaxes/samples/e1000/e1000.blt @@ -11,7 +11,7 @@ { template type e1000::RxDescriptor() { -@@ -96,8 +96,164 @@ +@@ -96,8 +96,165 @@ { } @@ -117,7 +117,8 @@ + hw_ctx->rx_ring.base[i].buff_addr = cpu_to_le64(${local.skbuff.sk_buff}); + } + -+ ${Log::info("adapter_init_rx: skbuffs allocated")}; ++ // ${Log::info("adapter_init_rx: skbuffs allocated}; ++ pr_info("adapter_init_rx: skbuffs allocated, headlen=%d", skb_headlen((struct sk_buff *)hw_ctx->rx_ring.skbuffs[i].skbuff)); + + /* 5. Save the emplacement and the size of the ring in RDBA/RDLEN */ + rtx_e1000_register_write32(hw_ctx, E1000_RDBAL, hw_ctx->rx_ring.dma_base & 0xffffffff); @@ -176,7 +177,7 @@ } } -@@ -195,7 +351,7 @@ +@@ -195,7 +352,7 @@ E1000_TXD_CMD_RS | skb_headlen(${local.k_skb.k_sk_buff})); tx_desc->upper.data = 0; @@ -185,7 +186,7 @@ memcpy(&self->skbuffs[self->tail], ${local.k_skb.k_sk_buff}, sizeof(*${local.k_skb.k_sk_buff})); self->tail = (self->tail + 1) % ${config.tx_ring_size}; } -@@ -208,7 +364,62 @@ +@@ -208,7 +365,62 @@ } } @@ -249,7 +250,7 @@ { rtx_e1000_tx_ring_clean(${self}); } -@@ -247,9 +458,8 @@ +@@ -247,9 +459,8 @@ { int bars; unsigned char /* __iomem */ *ioaddr; @@ -261,7 +262,7 @@ } chunk Ethernet::HardwareContext() -@@ -309,10 +519,53 @@ +@@ -309,10 +520,53 @@ } } @@ -296,7 +297,7 @@ + rtx_e1000_register_write32(hw_ctx, E1000_FCAL, 0); + rtx_e1000_register_write32(hw_ctx, E1000_FCT, 0); + rtx_e1000_register_write32(hw_ctx, E1000_FCTTV, 0); -+ /* ++ /* + * XXX: Using int i clashes with another int i from the + * "parent" chunk: + */ @@ -316,7 +317,7 @@ } template type e1000::Register() -@@ -615,269 +868,6 @@ +@@ -615,269 +869,6 @@ } } @@ -586,7 +587,7 @@ /* TODO: * * Refactor into two methods (one in RxRing and one in TxRing) and make use -@@ -901,15 +891,18 @@ +@@ -901,15 +892,18 @@ */ for (int i = 0; i != ${config.rx_ring_size}; ++i) {