kemenaran / iwidarwin

Automatically exported from code.google.com/p/iwidarwin
4 stars 4 forks source link

skb functions #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
i've made a change in code.

i'm trying to use the skbbuf functions from linux

please check iwi2200.h. if whe can port the linux functions it will help

the mbuf_len is the siize of mbuf data

in linux the skb->len is the size of the entire skb

there's also the skb->data_len wich is the same as mbuf->len

the firmware error will go away if the skb functions work correctly

do you have any idea on how to bring the en1 interface up? this is a problem

Original issue reported on code.google.com by jalav...@gmail.com on 27 Jan 2007 at 5:57

Attachments:

GoogleCodeExporter commented 9 years ago
jalavoui. 

if anonymous, you can checkout from svn 
I must merge by hand at every time.
and plz attached patch file (not full source ) . sorry.

I am checking your new sources.
i will say about other issue (sk_buff,skb function, interface up issue ) after 
checking.

Original comment by kazuh...@gmail.com on 27 Jan 2007 at 6:16

GoogleCodeExporter commented 9 years ago
i re-send invitation mail of gmail . plz retry.

Original comment by kazuh...@gmail.com on 27 Jan 2007 at 6:38

GoogleCodeExporter commented 9 years ago
jalavoui.

I think that mbuf_datastart -> mbuf_data will work correctly . 

reading wrapper of skb_function.
I think that these is danger.

> the mbuf_len is the siize of mbuf data
> in linux the skb->len is the size of the entire skb

yes . but

> there's also the skb->data_len wich is the same as mbuf->len

mbuf->len is mbuf->m_len?
if so, this is wrong.

in linux system
  1 packet is 1 skb .
in bsd system
  1 packet is over 1 mbuf .

so mbuf_len() dont return entire data  size of packet. ( only 1 mbuf).

generaly, 
packet header( this is mbuf of packet header) is stored
     in first mbuf of chains( mbufs over 1 and it appear 1 packet).
so you seem that codes is no problem. becasue 
  only headers(IP/TCP/80211...) is  edited in current code.

however if data exclude its headers(IP... s ) is store next mbuf( 
mbuf_next(mbuf) ),
the data( part of mbuf_next(mbuf) )dont send.

about rx .

I seem that allocated packet(via allocatePacket) data always  have MBUF_PKTHDR 
and
MBUF_EXT.

my knowledge may be  wrong. 
jalavoui, plz replay about this.

Original comment by kazuh...@gmail.com on 27 Jan 2007 at 7:45

GoogleCodeExporter commented 9 years ago
did you see the comments in skbbuf.h from linux?. the comments help to 
understand
what the skb functions should do

we sould test the ported skb functions very well. i think that they still have 
bugs.

> so mbuf_len() dont return entire data  size of packet. ( only 1 mbuf).

are you shure? it looks like it returns the full size of mbuf_data

i'll check the code and try to fix the bugs

Original comment by jalav...@gmail.com on 29 Jan 2007 at 7:20

GoogleCodeExporter commented 9 years ago
> did you see the comments in skbbuf.h from linux?. the comments help to 
understand
> what the skb functions should do

I know good better than bsd system ( like a bsd )
because my major is linux system.

skb  system is better than mbuf . 
128 kb  is limit of normal mbuf ( without MBUF_EXT ) .....

>> so mbuf_len() dont return entire data  size of packet. ( only 1 mbuf).
> are you shure? it looks like it returns the full size of mbuf_data

yes . if the entire mbuf  is 2 mbuf , 
  size of total data is m_pkthdr.len ( can get mbuf_pkthdr_len ).

if following supposed,
  first mbuf1.
  second mbuf2.
  mbuf_len(mbuf1) == 30;
  mbuf_len(mbuf2) == 430;  
  mbuf_next(mbuf1) == mbuf2;
  mbuf_next(mbuf2) == NULL;

so 
  mbuf_len(mbuf1) == 30
  mbuf_pkthdr_len(mbuf1)  == 430.

if you have TCP/IP Illustrated volume 2. plz see Chapter2 2.1 .

finally , about skb_functions in current code.
I checked and chenge pkthdr_len and commited.

Original comment by kazuh...@gmail.com on 29 Jan 2007 at 8:04

GoogleCodeExporter commented 9 years ago

Original comment by kazuh...@gmail.com on 1 Feb 2007 at 7:20