Mercurial > archived > louis > epitech > mq > rathaxes
comparison rathaxes_samples_e1000_add_ethernet_device_alloc_rx_skbuff.patch @ 121:6f600f83a763
WIP, fix Ethernet::Device::alloc_rx_skbuff
author | Louis Opter <louis@lse.epita.fr> |
---|---|
date | Sat, 27 Jul 2013 16:08:40 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
120:cbd9b9a49b63 | 121:6f600f83a763 |
---|---|
1 # HG changeset patch | |
2 # Parent 41459510ac5d22377872c977cbd635f93623c75e | |
3 rathaxes: add an alloc_rx_skbuff method to Ethernet::Device in e1000 | |
4 | |
5 This will help to hide platform dependent code from e1000::set_up_device. | |
6 | |
7 diff --git a/rathaxes/samples/e1000/ethernet.blt b/rathaxes/samples/e1000/ethernet.blt | |
8 --- a/rathaxes/samples/e1000/ethernet.blt | |
9 +++ b/rathaxes/samples/e1000/ethernet.blt | |
10 @@ -107,6 +107,11 @@ | |
11 ${self}->net_dev = ${rtx_net_dev}; | |
12 } | |
13 | |
14 + method alloc_rx_skbuff(Builtin::number size) | |
15 + { | |
16 + (${Socket::Skbuff.ref})netdev_alloc_skb(${self}, ${size}); | |
17 + } | |
18 + | |
19 map | |
20 { | |
21 /* | |
22 diff --git a/rathaxes/samples/e1000/ethernet.rti b/rathaxes/samples/e1000/ethernet.rti | |
23 --- a/rathaxes/samples/e1000/ethernet.rti | |
24 +++ b/rathaxes/samples/e1000/ethernet.rti | |
25 @@ -30,8 +30,10 @@ | |
26 { | |
27 chunk LKM::includes(); | |
28 decl data_types(); | |
29 + pointcut Ethernet::HardwareContext(); | |
30 + | |
31 method init(Ethernet::AbstractDevice, PCI::AbstractDevice); | |
32 - pointcut Ethernet::HardwareContext(); | |
33 + method alloc_rx_skbuff(Builtin::number); /* -> Socket::Skbuff.ref */ | |
34 | |
35 attribute Device::AbstractDevice.ref device; | |
36 attribute PCI::AbstractDevice.ref pci_device; |