END_RCV_RTN_CALL hangs - VxWorks

This is a discussion on END_RCV_RTN_CALL hangs - VxWorks ; Hi, I am writing a n/w driver and am stuck when i transfer the Recv packet to the MUX layer. The Call to END_RCV_RTN_CALL just hangs and ive tried to debug and analysed that the pDrvCtrl->offset is the one which ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: END_RCV_RTN_CALL hangs

  1. END_RCV_RTN_CALL hangs


    Hi,

    I am writing a n/w driver and am stuck when i transfer the Recv packet
    to the MUX layer. The Call to END_RCV_RTN_CALL just hangs and ive
    tried to debug and analysed that the pDrvCtrl->offset is the one which
    when changed the END_RCV_RTN_CALL executes but the packet is not sent
    to the network. (ive traced using the Ethereal).

    Can anyone tell me how to decide on the IP header offset...I am
    totally stuck.. please support.


    pMblk->mBlkHdr.mFlags |= M_PKTHDR;
    pMblk->mBlkHdr.mLen = len;
    pMblk->mBlkPktHdr.len = len;
    pMblk->mBlkHdr.mData += pDrvCtrl->offset;
    pMblk->mBlkHdr.mNext = NULL;
    pMblk->mBlkHdr.mNextPkt = NULL;

    /* record received packet */
    END_ERR_ADD (&pDrvCtrl->endObj, MIB2_IN_UCAST, +1);

    /* Call the upper layer's receive routine. */
    END_RCV_RTN_CALL (&pDrvCtrl->endObj, pMblk);


    Thanks in Advance,
    Gromer

  2. Re: END_RCV_RTN_CALL hangs

    On Apr 21, 1:54*pm, Gromer wrote:
    > Hi,
    >
    > I am writing a n/w driver and am stuck when i transfer the Recv packet
    > to the MUX layer. The Call to END_RCV_RTN_CALL just hangs and ive
    > tried to debug and analysed that the pDrvCtrl->offset is the one which
    > when changed the END_RCV_RTN_CALL executes but the packet is not sent
    > to the network. (ive traced using the Ethereal).
    >
    > Can anyone tell me how to decide on the IP header offset...I am
    > totally stuck.. please support.
    >
    > * * * * pMblk->mBlkHdr.mFlags |= M_PKTHDR;
    > * * * * pMblk->mBlkHdr.mLen * *= len;
    > * * * * pMblk->mBlkPktHdr.len *= len;
    > * * * * pMblk->mBlkHdr.mData * += pDrvCtrl->offset;
    > * * * * pMblk->mBlkHdr.mNext * *= NULL;
    > * * * * pMblk->mBlkHdr.mNextPkt = NULL;
    >
    > * * * * /* record received packet */
    > * * * * END_ERR_ADD (&pDrvCtrl->endObj, MIB2_IN_UCAST, +1);
    >
    > * * * * /* Call the upper layer's receive routine. */
    > * * * * END_RCV_RTN_CALL (&pDrvCtrl->endObj, pMblk);
    >
    > Thanks in Advance,
    > Gromer


    Hi, Gromer.

    First of all, I hope that you successfully solved the problem already
    and my response is late.
    Otherwise, please provide additional information - which architecture
    you are working on and driver for what device you are debugging ?

    Additionally:
    1. Please ensure that device's function table (start/stop/recv/send/
    ioctl) is properly initialized;
    2. Please ensure that the device is properly attached to the MUX (use
    muxShow)
    3. Please notice, that END_RCV_RTN_CALL does not cause the Ethernet
    frame to be sent to network directly, but puts the frame to TCP/IP
    stack higher layers.
    4. Offset to IPv4 packet you can calculate as follows: assuming you
    are working with 802.3 Ethernet, the refers to an Ethernet
    frame. In simplest scenario, if the ether_type set to 0x0800 (for
    IPv4) or 0x86dd (for IPv6), then the IP packet header starts at offset
    14 bytes from start of frame.
    5. Please use Show() routines (like ipstatShow()) at regular intervals
    of time to track packet counters.

    HTH.
    maximb

+ Reply to Thread