MQ¶
The following classes provide access to the mq
(multi queue) queueing discipline:
- class MultiQueueQDisc(handle: Handle, parent_handle: Optional[Handle])[source]¶
Bases:
QDiscThis class provides access to the multiqueue (
mq) queueing discipline of Linux- Parameters:
handle –
Handleof thisQDiscparent_handle –
Handleof the parent of thisQDisc(ifNone, this is a rootQDisc)
- qdisc_creation_args() List[str][source]¶
The
mqqdisc is automatically instantiated as the default root queuing discipline for interfaces with multiple hardware queues. An attempt to add amqqdisc as the qdisc of a queuing class of a classful qdisc failed (the error was ‘operation not supported’). Therefore this class does not support manual instantiation.An attempt to invoke this method will result in a
TcErrorexception.
- dump(outfile: TextIO, level=0, qclass_map: Optional[Mapping[Handle, QClass]] = None)¶
Recursively dump this
Qdisctooutfile.The
qclass_map, if present, is used to determine the destinationQClassobjects of traffic filters.
- get_child_count() int¶
Return number of children of this
QDisc/QClass
- get_child_iter() Iterator[QClass]¶
Returns an iterator for the
QClasschildren of thisQDisc/QClass.
- get_config() QDiscConfig¶
Returns the
QDiscConfigwhere thisQDisc/QClasshas been instantiated, orNoneif not instantiated.
- get_description() str¶
Return a string that fully describes this
QDisc
- get_handle() Handle¶
Returns the
QDisc/QClasshandle
- get_interface() Optional[str]¶
Returns the interface where this
QDisc/QClasshas been instantiated, orNoneif theQDisc/QClassis not instantiated.
- get_parent_handle() Optional[Handle]¶
Returns the handle of the parent of this
QDisc/QClass
- is_default() bool¶
Returns
Trueif thisQDiscis the default qdisc used by the kernel.
- static is_ingress() bool¶
Returns
Trueif thisQDiscis the ingress qdisc
- is_root() bool¶
Returns
Trueif this is a rootQDisc
- class MultiQueueQClass(handle: Handle, parent_handle: Handle, class_name: Optional[str] = None)[source]¶
Bases:
QClassA class of the
MultiQueueQDisc(mq) queuing discipline.- Parameters:
handle –
Handleof thisQClassparent_handle –
Handleof the parent of thisQClassclass_name – optional class name; defaults to the class handle
- dump(outfile: TextIO, level: int, qclass_map: Optional[Mapping[Handle, QClass]] = None)¶
Recursively dump this
QClasstooutfile.The
qclass_map, if present, is used to determine the destinationQClassobjects of traffic filters.
- get_class_name() str¶
Returns the class name
- get_config() QDiscConfig¶
Returns the
QDiscConfigwhere thisQDisc/QClasshas been instantiated, orNoneif not instantiated.
- get_handle() Handle¶
Returns the
QDisc/QClasshandle
- get_interface() Optional[str]¶
Returns the interface where this
QDisc/QClasshas been instantiated, orNoneif theQDisc/QClassis not instantiated.
- get_parent_handle() Optional[Handle]¶
Returns the handle of the parent of this
QDisc/QClass
- get_qdisc() Optional[QDisc]¶
Returns the
QDiscunder with thisQClass, orNoneif this is not a leaf queuing class.
- is_leaf() bool¶
Returns
Trueif this is a leaf queuing class
- set_class_name(class_name: str) None¶
Sets the class name