lkml.org 
[lkml]   [1999]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Linux Kernel -Doubt on sk_buff!
    From
    Date
    jalaja@teil.soft.net (G Jalaja Devi) writes:

    > 1. When an IP packet is received from IP, do we get a chain of data ( as in
    > ifnet ) or is it a continuous buffer.

    It is a continuous buffer. I find it curious that you use ifnet as a synonym
    for BSD.

    >
    > 2. What is the use of the following fields in the sk_buff structure
    > 1. data_skb pointer.
    > 2. count.
    > 3. users.

    data_skb points to the original skb for cloned skbs.
    count it is the reference count of the data portion
    users is how many users the skbuff header has.

    [BTW in 2.2 data_skb is gone and a reference count is kept at the end of
    the data]

    >
    > 3. If we have to send a particular IP packet ( which is in sk_buff format )
    > to two diffrent destinations, do we have to duplicate the sk_buff.
    > Doesn't this reduce the performance.
    > Is there any other way to handle this case.

    skb_clone(). It only duplicates the skbuff header, but not the packet data.


    http://www.uk.linux.org/Documents/buffers.html may be helpful for more
    information.

    -Andi

    --
    This is like TV. I don't like TV.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:50    [W:0.030 / U:0.672 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site