Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

sch_generic.c File Reference

#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/socket.h>
#include <linux/sockios.h>
#include <linux/in.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/rtnetlink.h>
#include <linux/init.h>
#include <net/sock.h>
#include <net/pkt_sched.h>

Include dependency graph for sch_generic.c:

Go to the source code of this file.

Defines

#define BUG_TRAP(x)   if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):" __FUNCTION__ "\n", __LINE__); }

Functions

int qdisc_restart (struct device *dev)
void qdisc_run_queues (void)
static void dev_do_watchdog (unsigned long dummy)
static int noop_enqueue (struct sk_buff *skb, struct Qdisc *qdisc)
static struct sk_buffnoop_dequeue (struct Qdisc *qdisc)
static int noop_requeue (struct sk_buff *skb, struct Qdisc *qdisc)
static int pfifo_fast_enqueue (struct sk_buff *skb, struct Qdisc *qdisc)
static struct sk_buffpfifo_fast_dequeue (struct Qdisc *qdisc)
static int pfifo_fast_requeue (struct sk_buff *skb, struct Qdisc *qdisc)
static void pfifo_fast_reset (struct Qdisc *qdisc)
static int pfifo_fast_init (struct Qdisc *qdisc, struct rtattr *opt)
Qdiscqdisc_create_dflt (struct device *dev, struct Qdisc_ops *ops)
void qdisc_reset (struct Qdisc *qdisc)
void qdisc_destroy (struct Qdisc *qdisc)
void dev_activate (struct device *dev)
void dev_deactivate (struct device *dev)
void dev_init_scheduler (struct device *dev)
void dev_shutdown (struct device *dev)

Variables

Qdisc_head qdisc_head = { &qdisc_head }
static struct timer_list dev_watchdog
Qdisc_ops noop_qdisc_ops
Qdisc noop_qdisc
Qdisc_ops noqueue_qdisc_ops
Qdisc noqueue_qdisc
static const u8 prio2band [TC_PRIO_MAX+1]
static struct Qdisc_ops pfifo_fast_ops


Define Documentation

#define BUG_TRAP x   )     if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):" __FUNCTION__ "\n", __LINE__); }
 

Definition at line 33 of file sch_generic.c.


Function Documentation

void dev_activate struct device *  dev  ) 
 

Definition at line 374 of file sch_generic.c.

References add_timer(), del_timer(), end_bh_atomic(), timer_list::expires, HZ, jiffies, KERN_INFO, printk, qdisc_create_dflt(), and start_bh_atomic().

Referenced by dev_graft_qdisc(), and dev_open().

Here is the call graph for this function:

void dev_deactivate struct device *  dev  ) 
 

Definition at line 406 of file sch_generic.c.

References end_bh_atomic(), Qdisc_head::forw, h, Qdisc::h, qdisc_reset(), start_bh_atomic(), and xchg.

Referenced by dev_close(), and dev_graft_qdisc().

Here is the call graph for this function:

static void dev_do_watchdog unsigned long  dummy  )  [static]
 

Definition at line 127 of file sch_generic.c.

References add_timer(), Qdisc::dev, dev, device, timer_list::expires, Qdisc_head::forw, h, HZ, jiffies, Qdisc::q, qdisc_restart(), Qdisc::tx_last, and Qdisc::tx_timeo.

Here is the call graph for this function:

void dev_init_scheduler struct device *  dev  ) 
 

Definition at line 431 of file sch_generic.c.

Referenced by __initfunc(), and register_netdevice().

void dev_shutdown struct device *  dev  ) 
 

Definition at line 438 of file sch_generic.c.

References BUG_TRAP, end_bh_atomic(), qdisc_destroy(), and start_bh_atomic().

Referenced by unregister_netdevice().

Here is the call graph for this function:

static struct sk_buff* noop_dequeue struct Qdisc qdisc  )  [static]
 

Definition at line 156 of file sch_generic.c.

References NULL.

static int noop_enqueue struct sk_buff skb,
struct Qdisc qdisc
[static]
 

Definition at line 149 of file sch_generic.c.

static int noop_requeue struct sk_buff skb,
struct Qdisc qdisc
[static]
 

Definition at line 162 of file sch_generic.c.

References sk_buff::dev, KERN_DEBUG, net_ratelimit(), and printk.

Here is the call graph for this function:

static struct sk_buff* pfifo_fast_dequeue struct Qdisc qdisc  )  [static]
 

Definition at line 241 of file sch_generic.c.

References Qdisc::data, NULL, Qdisc::q, and sk_buff_head::qlen.

static int pfifo_fast_enqueue struct sk_buff skb,
struct Qdisc qdisc
[static]
 

Definition at line 223 of file sch_generic.c.

References Qdisc::data, sk_buff::dev, tc_stats::drops, prio2band, sk_buff::priority, Qdisc::q, sk_buff_head::qlen, Qdisc::stats, and TC_PRIO_MAX.

static int pfifo_fast_init struct Qdisc qdisc,
struct rtattr opt
[static]
 

Definition at line 281 of file sch_generic.c.

References Qdisc::data, and i.

static int pfifo_fast_requeue struct sk_buff skb,
struct Qdisc qdisc
[static]
 

Definition at line 258 of file sch_generic.c.

References Qdisc::data, prio2band, Qdisc::q, sk_buff_head::qlen, and TC_PRIO_MAX.

static void pfifo_fast_reset struct Qdisc qdisc  )  [static]
 

Definition at line 271 of file sch_generic.c.

References Qdisc::data, Qdisc::q, and sk_buff_head::qlen.

struct Qdisc* qdisc_create_dflt struct device *  dev,
struct Qdisc_ops ops
 

Definition at line 310 of file sch_generic.c.

References atomic_set, Qdisc_ops::dequeue, sk_buff::dev, Qdisc_ops::enqueue, Qdisc_ops::init, kfree(), kmalloc(), memset, Qdisc_ops::priv_size, and size.

Referenced by cbq_change_class(), cbq_graft(), cbq_init(), dev_activate(), prio_init(), and prio_tune().

Here is the call graph for this function:

void qdisc_destroy struct Qdisc qdisc  ) 
 

Definition at line 342 of file sch_generic.c.

References atomic_dec_and_test, Qdisc_ops::destroy, Qdisc::dev, end_bh_atomic(), kfree(), Qdisc::next, Qdisc::ops, Qdisc::q, qdisc_kill_estimator(), Qdisc::refcnt, Qdisc_ops::reset, start_bh_atomic(), Qdisc::stats, and TCQ_F_BUILTIN.

Referenced by cbq_destroy_class(), dev_shutdown(), prio_destroy(), and prio_tune().

Here is the call graph for this function:

void qdisc_reset struct Qdisc qdisc  ) 
 

Definition at line 333 of file sch_generic.c.

References end_bh_atomic(), Qdisc::ops, Qdisc_ops::reset, and start_bh_atomic().

Referenced by cbq_graft(), cbq_reset(), csz_update(), dev_deactivate(), dev_graft_qdisc(), isdn_net_unbind_channel(), prio_reset(), and teql_destroy().

Here is the call graph for this function:

int qdisc_restart struct device *  dev  ) 
 

Definition at line 50 of file sch_generic.c.

References Qdisc::dequeue, dev_queue_xmit_nit(), jiffies, netdev_nit, NULL, Qdisc::ops, Qdisc::q, sk_buff_head::qlen, Qdisc_ops::requeue, and Qdisc::tx_last.

Referenced by dev_do_watchdog(), qdisc_run_queues(), qdisc_wakeup(), and teql_dequeue().

Here is the call graph for this function:

void qdisc_run_queues void   ) 
 

Definition at line 89 of file sch_generic.c.

References Qdisc::dev, dev, device, Qdisc_head::forw, h, NULL, Qdisc::q, qdisc_restart(), and res.

Referenced by net_bh().

Here is the call graph for this function:


Variable Documentation

struct timer_list dev_watchdog [static]
 

Initial value:

        { NULL, NULL, 0L, 0L, &dev_do_watchdog }

Definition at line 124 of file sch_generic.c.

struct Qdisc noop_qdisc
 

Initial value:

Definition at line 182 of file sch_generic.c.

Referenced by cbq_change_class(), cbq_init(), dev_graft_qdisc(), prio_destroy(), prio_graft(), prio_init(), and prio_tune().

struct Qdisc_ops noop_qdisc_ops
 

Initial value:

Definition at line 170 of file sch_generic.c.

Referenced by register_qdisc().

struct Qdisc noqueue_qdisc
 

Initial value:

Definition at line 205 of file sch_generic.c.

struct Qdisc_ops noqueue_qdisc_ops
 

Initial value:

Definition at line 192 of file sch_generic.c.

struct Qdisc_ops pfifo_fast_ops [static]
 

Initial value:

{
        NULL,
        NULL,
        "pfifo_fast",
        3 * sizeof(struct sk_buff_head),

        pfifo_fast_enqueue,
        pfifo_fast_dequeue,
        pfifo_fast_requeue,
        NULL,

        pfifo_fast_init,
        pfifo_fast_reset,
}

Definition at line 294 of file sch_generic.c.

const u8 prio2band[TC_PRIO_MAX+1] [static]
 

Initial value:

{ 1, 2, 2, 2, 1, 2, 0, 0 , 1, 1, 1, 1, 1, 1, 1, 1 }

Definition at line 215 of file sch_generic.c.

Referenced by pfifo_fast_enqueue(), pfifo_fast_requeue(), and prio_init().

struct Qdisc_head qdisc_head = { &qdisc_head }
 

Definition at line 37 of file sch_generic.c.

Referenced by net_bh(), and teql_master_xmit().