Mercurial > archived > louis > epitech > mq > rathaxes
annotate rathaxes_samples_e1000_use_the_dma_abstraction_in_socket.patch @ 113:b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
author | Louis Opter <louis@lse.epita.fr> |
---|---|
date | Sat, 20 Jul 2013 20:45:39 -0700 |
parents | bfe10def90e3 |
children | 8eac160e5f1c |
rev | line source |
---|---|
111
b072f682823d
Start a new series to refactor e1000::set_up_device
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
1 # HG changeset patch |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
2 # Parent 05460906d5aba5d3671969d9ac53182d0ac91649 |
111
b072f682823d
Start a new series to refactor e1000::set_up_device
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
3 Replace Linux specific code in Socket by DMA calls |
b072f682823d
Start a new series to refactor e1000::set_up_device
Louis Opter <louis@lse.epita.fr>
parents:
diff
changeset
|
4 |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
5 diff --git a/rathaxes/samples/e1000/dma.blt b/rathaxes/samples/e1000/dma.blt |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
6 --- a/rathaxes/samples/e1000/dma.blt |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
7 +++ b/rathaxes/samples/e1000/dma.blt |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
8 @@ -14,7 +14,7 @@ |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
9 |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
10 map |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
11 { |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
12 - k_dma_handle: ((dma_addr_t *)${self}); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
13 + k_dma_handle: ((dma_addr_t)${self}); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
14 } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
15 } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
16 |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
17 @@ -51,7 +51,7 @@ |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
18 { |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
19 chunk ::CALL() |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
20 { |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
21 - dma_map_single(${dev.k_device}, ${buf}, ${size}, ${dir.dma_direction}); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
22 + ((${DMA::AbstractDMAHandle})dma_map_single(${dev.k_device}, ${buf}, ${size}, ${dir.dma_direction})); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
23 } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
24 } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
25 |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
26 @@ -63,11 +63,19 @@ |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
27 } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
28 } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
29 |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
30 + template sequence mapping_error(Device::AbstractDevice dev, AbstractDMAHandle handle) |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
31 + { |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
32 + chunk ::CALL() |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
33 + { |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
34 + dma_mapping_error(${dev.k_device}, ${handle.k_dma_handle}); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
35 + } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
36 + } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
37 + |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
38 template sequence alloc_coherent(Device::AbstractDevice dev, Builtin::number size, AbstractDMAHandle handle) |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
39 { |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
40 chunk ::CALL() |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
41 { |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
42 - dma_alloc_coherent(${dev.k_device}, ${size}, ${handle.k_dma_handle}, GFP_KERNEL); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
43 + dma_alloc_coherent(${dev.k_device}, ${size}, &${handle.k_dma_handle}, GFP_KERNEL); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
44 } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
45 } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
46 |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
47 diff --git a/rathaxes/samples/e1000/dma.rti b/rathaxes/samples/e1000/dma.rti |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
48 --- a/rathaxes/samples/e1000/dma.rti |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
49 +++ b/rathaxes/samples/e1000/dma.rti |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
50 @@ -29,6 +29,12 @@ |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
51 provided chunk ::CALL(); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
52 } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
53 |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
54 + /* XXX: Until we have a real error handling mechanism: */ |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
55 + provided sequence mapping_error(Device::AbstractDevice, AbstractDMAHandle) |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
56 + { |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
57 + provided chunk ::CALL(); /* -> != 0 if the mapping failed */ |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
58 + } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
59 + |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
60 provided sequence alloc_coherent(Device::AbstractDevice, Builtin::number, AbstractDMAHandle) |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
61 { |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
62 /* return the addr and the handle via the AbstractDMAHandle ptr: */ |
112 | 63 diff --git a/rathaxes/samples/e1000/socket.blt b/rathaxes/samples/e1000/socket.blt |
64 --- a/rathaxes/samples/e1000/socket.blt | |
65 +++ b/rathaxes/samples/e1000/socket.blt | |
66 @@ -1,4 +1,4 @@ | |
67 -with Socket, LKM, Device, Ethernet | |
68 +with Socket, LKM, Device, DMA, Ethernet | |
69 { | |
70 template type Socket::AbstractSKBuff() | |
71 { | |
72 @@ -22,15 +22,15 @@ | |
73 { | |
74 decl data_types() | |
75 { | |
76 - ${Socket::AbstractSKBuff.ref} skbuff; | |
77 - dma_addr_t dma_handle; | |
78 + ${Socket::AbstractSKBuff.ref} skbuff; | |
79 + ${DMA::AbstractDMAHandle.scalar} dma_handle; | |
80 } | |
81 | |
82 chunk LKM::prototypes() | |
83 { | |
84 static void rtx_socket_skbuff_dump_infos(${Socket::SKBuff.ref}); | |
85 - static int rtx_socket_skbuff_map(${Socket::SKBuff.ref}, struct device *, enum dma_data_direction); | |
86 - static void rtx_socket_skbuff_unmap_and_free(${Socket::SKBuff.ref}, struct device *, enum dma_data_direction); | |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
87 + static int rtx_socket_skbuff_map(${Socket::SKBuff.ref}, ${Device::AbstractDevice.ref}, ${DMA::DMADirection.scalar}); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
88 + static void rtx_socket_skbuff_unmap_and_free(${Socket::SKBuff.ref}, struct device *, ${DMA::DMADirection.scalar}); |
112 | 89 } |
90 | |
91 chunk LKM::code() | |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
92 @@ -65,23 +65,21 @@ |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
93 } |
112 | 94 |
95 static int rtx_socket_skbuff_map(${Socket::SKBuff.ref} self, | |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
96 - struct device *dev, |
112 | 97 - enum dma_data_direction direction) |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
98 + ${Device::AbstractDevice.ref} dev, |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
99 + ${DMA::DMADirection.scalar} direction) |
112 | 100 { |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
101 - ${Socket::AbstractSKBuff.ref} skb = self->skbuff; |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
102 - |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
103 - WARN_ON(!${local.skb.k_sk_buff}); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
104 - WARN_ON(self->dma_handle); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
105 + WARN_ON(!${local.self.k_sk_buff}); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
106 + WARN_ON(${local.self.k_dma_handle}); |
112 | 107 |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
108 self->dma_handle = dma_map_single( |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
109 - dev, |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
110 + ${dev.k_device}, |
112 | 111 ${local.skb.k_sk_buff}, |
112 skb_headlen(${local.skb.k_sk_buff}), | |
113 - direction); | |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
114 - int err = dma_mapping_error(dev, self->dma_handle); |
112 | 115 + ${local.direction.dma_direction}); |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
116 + int err = ${DMA::mapping_error(local.dev, local.self.k_dma_handle)}; |
112 | 117 if (err) |
118 { | |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
119 - self->dma_handle = 0; |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
120 + ${local.self.k_dma_handle} = 0; |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
121 return err; |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
122 } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
123 return 0; |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
124 @@ -89,7 +87,7 @@ |
112 | 125 |
126 static void rtx_socket_skbuff_unmap_and_free(${Socket::SKBuff.ref} self, | |
127 struct device *dev, | |
128 - enum dma_data_direction direction) | |
129 + ${DMA::DMADirection} direction) | |
130 { | |
131 ${Socket::AbstractSKBuff.ref} skb = self->skbuff; | |
132 | |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
133 @@ -100,7 +98,7 @@ |
112 | 134 dma_unmap_single(dev, |
135 self->dma_handle, | |
136 skb_headlen(${local.skb.k_sk_buff}), | |
137 - direction); | |
138 + ${local.direction.dma_direction}); | |
139 self->dma_handle = 0; | |
140 } | |
141 dev_kfree_skb_any(${local.skb.k_sk_buff}); | |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
142 @@ -126,30 +124,32 @@ |
112 | 143 |
144 method map_to(Device::AbstractDevice dev) | |
145 { | |
146 - rtx_socket_skbuff_map(${self}, ${dev.k_device}, DMA_TO_DEVICE); | |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
147 + rtx_socket_skbuff_map(${self}, ${dev}, RTX_DMA_TO_DEVICE); |
112 | 148 } |
149 | |
150 method map_from(Device::AbstractDevice dev) | |
151 { | |
152 - rtx_socket_skbuff_map(${self}, ${dev.k_device}, DMA_FROM_DEVICE); | |
153 + rtx_socket_skbuff_map(${self}, ${dev.k_device}, RTX_DMA_FROM_DEVICE); | |
154 } | |
155 | |
156 method unmap_to_and_free(Device::AbstractDevice dev) | |
157 { | |
158 - rtx_socket_skbuff_unmap_and_free(${self}, ${dev.k_device}, DMA_TO_DEVICE); | |
159 + rtx_socket_skbuff_unmap_and_free(${self}, ${dev.k_device}, RTX_DMA_TO_DEVICE); | |
160 } | |
161 | |
162 method unmap_from_and_free(Device::AbstractDevice dev) | |
163 { | |
164 - rtx_socket_skbuff_unmap_and_free(${self}, ${dev.k_device}, DMA_FROM_DEVICE); | |
165 + rtx_socket_skbuff_unmap_and_free(${self}, ${dev.k_device}, RTX_DMA_FROM_DEVICE); | |
166 } | |
167 | |
168 map | |
113
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
169 { |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
170 - // some work may have to be done here in order |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
171 - // to access to some field of the sk_buff. |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
172 - // We should determine if all the sk_buff management |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
173 - // can be abstracted from the user. |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
174 + // Some work may have to be done here in order to access to some |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
175 + // field of the sk_buff. We should determine if all the sk_buff |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
176 + // management can be abstracted from the user. But this is at least |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
177 + // useful for internal use: |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
178 + k_sk_buff: ((struct skbuff *)(${self}->skbuff)); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
179 + k_dma_handle: ((dma_addr_t)(${self}->dma_handle)); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
180 } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
181 } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
182 } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
183 diff --git a/rathaxes/samples/e1000/socket.rti b/rathaxes/samples/e1000/socket.rti |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
184 --- a/rathaxes/samples/e1000/socket.rti |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
185 +++ b/rathaxes/samples/e1000/socket.rti |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
186 @@ -1,4 +1,4 @@ |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
187 -interface Socket : LKM, Device |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
188 +interface Socket : LKM, Device, DMA |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
189 { |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
190 /* The SKBuff type from the kernel */ |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
191 provided type AbstractSKBuff |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
192 @@ -19,5 +19,8 @@ |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
193 method map_from(Device::AbstractDevice); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
194 method unmap_to_and_free(Device::AbstractDevice); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
195 method unmap_from_and_free(Device::AbstractDevice); |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
196 + |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
197 + attribute Socket::AbstractSKBuff.ref k_sk_buff; |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
198 + attribute DMA::AbstractDMAHandle.scalar k_dma_handle; |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
199 } |
b22983cb9e3a
WIP, thanks joa for some fixes on the compiler
Louis Opter <louis@lse.epita.fr>
parents:
112
diff
changeset
|
200 } |