Find the answer to your Linux question:
Results 1 to 7 of 7
Hey...can someone enlight me on Queue(packets) related isuues like where is the source code info present about maintaing queues. Is it like there are different queues for Network Layer and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    17

    where is Network Queue in linux ??


    Hey...can someone enlight me on Queue(packets) related isuues like where is the source code info present about maintaing queues. Is it like there are different queues for Network Layer and Datalink layer. I wonder if my question is half wrong . Is it possible to play with emptying queues like changing .c and .h files related to queue!!

  2. #2
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,429
    You'll need Kernel Source.
    But, good luck with that.
    New Users, please read this..
    Google first, then ask..

  3. #3
    Just Joined!
    Join Date
    Oct 2007
    Posts
    17
    I have kernel version linux-2.6.20.4 (FC6)
    could you be more specific like where in kernel is the implementation of Network Queue?
    I want to find out how the Queue is emptied when it is full!!

  4. #4
    Just Joined!
    Join Date
    Oct 2007
    Posts
    17

    where is the Network Queue implemented in linux kernel??

    Can somebody tell my where is the implementation of Queue at Network Layer level in the linux kernel??
    I actually wanted to know how the packets are queued and how are they emptied when the queue is full??

  5. #5
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Not sure where to find it but the queue should be FIFO (First In First Out) if nothing else like QoS is installed and configured.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #6
    Just Joined!
    Join Date
    Oct 2007
    Posts
    17
    I found source code named ip_queue.c in
    /usr/src/kernels/linux-2.6.20.4/net/ipv4/netfilter/ip_queue.c

    and it mentions a function regarding flushing of queue, but i wonder !! , because this file is in netfilter director, and netfilter is not a default utility ( i am not sure whether i should call it a utility!!), i don't think it is the right file i'm searching for!! I am pretty sure that linux comes with complete network stack, so queue file should be some where inside kernel directory.

    do make some comments on my opinion!!

  7. #7
    Just Joined!
    Join Date
    Dec 2007
    Location
    China--shanghai
    Posts
    3
    Hi dear friend ,
    I could give you some information, but I only have version 2.4.20 .
    I do not think there will be huge change between 2.4 and 2.6 for Network part.
    Firstly , there are two concept queues : ingress and egress. Usually, we use egress queue to do something.
    Codes are under /net/core/dev.c , egress queue takes effect in function dev_queue_xmit().
    Highlight: q->enqueue(skb, q); this line enqueues packet into different queues. But enqueue is different , this callback function depends on your Qdisc for this output device.


    Usually , output device has a Qdisc; you could change the forwarding behavior by attaching a different Qdisc to output device.

    If you can speak Chinese , I could help you on the process of packet forwarding

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •