Packet/Bytes FIFO (pfifo/bfifo)
[Queueing Discipline Modules]

The FIFO qdisc comes in two flavours:. More...

Attribute Modification



int rtnl_qdisc_fifo_set_limit (struct rtnl_qdisc *qdisc, int limit)
 Set limit of FIFO qdisc.
int rtnl_qdisc_fifo_get_limit (struct rtnl_qdisc *qdisc)
 Get limit of a FIFO qdisc.

Detailed Description

bfifo (Byte FIFO)
Allows enqueuing until the currently queued volume in bytes exceeds the configured limit.backlog contains currently enqueued volume in bytes.
pfifo (Packet FIFO)
Allows enquueing until the currently queued number of packets exceeds the configured limit.

The configuration is exactly the same, the decision which of the two variations is going to be used is made based on the kind of the qdisc (rtnl_qdisc_set_kind()).


Function Documentation

int rtnl_qdisc_fifo_set_limit ( struct rtnl_qdisc *  qdisc,
int  limit 
)
Parameters:
qdisc FIFO qdisc to be modified.
limit New limit.
Returns:
0 on success or a negative error code.

Definition at line 145 of file fifo.c.

00146 {
00147         struct rtnl_fifo *fifo;
00148         
00149         fifo = fifo_alloc(qdisc);
00150         if (!fifo)
00151                 return nl_errno(ENOMEM);
00152                 
00153         fifo->qf_limit = limit;
00154         fifo->qf_mask |= SCH_FIFO_ATTR_LIMIT;
00155 
00156         return 0;
00157 }

int rtnl_qdisc_fifo_get_limit ( struct rtnl_qdisc *  qdisc  ) 
Parameters:
qdisc FIFO qdisc.
Returns:
Numeric limit or a negative error code.

Definition at line 164 of file fifo.c.

00165 {
00166         struct rtnl_fifo *fifo;
00167         
00168         fifo = fifo_qdisc(qdisc);
00169         if (fifo && fifo->qf_mask & SCH_FIFO_ATTR_LIMIT)
00170                 return fifo->qf_limit;
00171         else
00172                 return nl_errno(ENOMEM);
00173 }


Generated on 30 Oct 2009 for libnl by  doxygen 1.6.1