Code Monkey home page Code Monkey logo

Comments (9)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 12, 2024
jalavoui:
the problem is caused by following ?

skb's data length is 0 initialy in linux.
but  mbuf's length is not 0 in our code.because rxb->skb's size is defined as 
3000 in
allocatePacket.

mbuf must be  set correctly packet size  in previous reason.
so i reverse this routine. 


-       //skb_reserve(rxb->skb, offsetof(struct ipw_rx_packet, u.frame.data));
+       skb_reserve(rxb->skb, offsetof(struct ipw_rx_packet, u.frame.data));
        //mbuf_setlen(rxb->skb, offsetof(struct ipw_rx_packet, u.frame.data));
        /* Set the size of the skb to the size of the frame */
-       //skb_put(rxb->skb, le16_to_cpu(pkt->u.frame.length));
+       skb_put(rxb->skb, le16_to_cpu(pkt->u.frame.length));


-       // fix me: dont data length of single mbuf, should be the whole packet s
ize
-       //           mbuf_setlen -> mbuf_pkthdr_setlen ?
-       //           but if so, may change skb->m_len in other mbuf with the sam
e chain. 
-       //           this is np.
-       // now editing kazu
-       if( mbuf_flags(rxb->skb) & MBUF_PKTHDR)
-                       mbuf_pkthdr_setlen(rxb->skb,
-                               mbuf_pkthdr_len(rxb->skb) - mbuf_len(rxb->skb) 
+  
le16_to_cpu(pkt->u.frame.length));
-       
-       mbuf_setdata(rxb->skb, 
-                             (UInt8*)mbuf_data(rxb->skb) + offsetof(struct ipw_
rx_packet, u.frame.data),
-                         le16_to_cpu(pkt->u.frame.length));
-                         
-       //mbuf_setlen(rxb->skb, le16_to_cpu(pkt->u.frame.length));



Original comment by [email protected] on 16 Feb 2007 at 7:19

from iwidarwin.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 12, 2024
if you think we should use mbuf_setdata and mbuf_setlen instead of skb_reserve 
and skb_put that's fine with 
me.

maybe both ways are wrong :)

i think skb_reserve and skb_put code is more stable. i test it and get stable 
speeds when downloading

Original comment by [email protected] on 16 Feb 2007 at 9:12

from iwidarwin.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 12, 2024
when using the ifnet_input, the pkt_header is required to have some data in it:

mbuf_pkthdr_setrcvif(m, ifp);
                mbuf_pkthdr_setheader(m, mbuf_data(m));
                MDATA_ETHER_END(m);
                ifnet_input(ifp, m, NULL)

this is not the same as setting the header size

if we use ifnet_input to improve speed how this should be fixed?

Original comment by [email protected] on 16 Feb 2007 at 9:20

from iwidarwin.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 12, 2024
if use ifnet_input directly,  performance is not to improve.
because setting mbuf_pkthdr's routine is not heavy.

performance may improve in following code. 
( i cannot test this  because currently i cannot connet to AP) 


rx low performance is caused by iligal size of mbuf.
rs's mbuf always is 3000 in corrently code.
and inputPacket copy 300 byte per calling.(real's size is supposed  90 byte)

also i worry another problem.
when allocatePacket(3000),all data is sequence ?




    // inialize data size and packet size in mbuf 
    mbuf_setlen(rxb->skb,0);

    if( mbuf_flags(rxb->skb) & MBUF_PKTHDR)
        mbuf_pkthdr_setlen(rxb->skb,0);

    /* Advance skb->data to the start of the actual payload */
    skb_reserve(rxb->skb, offsetof(struct ipw_rx_packet, u.frame.data));
    //mbuf_setlen(rxb->skb, offsetof(struct ipw_rx_packet, u.frame.data));
    /* Set the size of the skb to the size of the frame */
    skb_put(rxb->skb, le16_to_cpu(pkt->u.frame.length));

    mbuf_setlen(rxb->skb,le16_to_cpu(pkt->u.frame.length));
    if( mbuf_flags(rxb->skb) & MBUF_PKTHDR)
        mbuf_pkthdr_setlen(rxb->skb,le16_to_cpu(pkt->u.frame.length)); 



Original comment by [email protected] on 17 Feb 2007 at 3:34

from iwidarwin.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 12, 2024
I added IWI_ERR when input packet dont has mbuf's packet header.
(on rev170)
if this error is displayed ,  we should print information with this.

Original comment by [email protected] on 21 Feb 2007 at 9:39

from iwidarwin.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 12, 2024
changed Priority  to low.

Original comment by [email protected] on 21 Feb 2007 at 10:21

  • Added labels: Priority-Low
  • Removed labels: Priority-Medium

from iwidarwin.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 12, 2024
we should change IWI_ERR to not show when using no debug messages. do you agree?



Original comment by [email protected] on 21 Feb 2007 at 4:43

from iwidarwin.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 12, 2024
I think that error message  should be displayed always.

Original comment by [email protected] on 21 Feb 2007 at 6:01

from iwidarwin.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 12, 2024

Original comment by [email protected] on 9 Mar 2007 at 10:32

  • Changed state: Fixed

from iwidarwin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.