MQ

The following classes provide access to the mq (multi queue) queueing discipline:


class MultiQueueQDisc(handle: Handle, parent_handle: Optional[Handle])[source]

Bases: QDisc

This class provides access to the multiqueue (mq) queueing discipline of Linux

Parameters:
  • handleHandle of this QDisc

  • parent_handleHandle of the parent of this QDisc (if None, this is a root QDisc)

qdisc_creation_args() List[str][source]

The mq qdisc is automatically instantiated as the default root queuing discipline for interfaces with multiple hardware queues. An attempt to add a mq qdisc 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 TcError exception.

dump(outfile: TextIO, level=0, qclass_map: Optional[Mapping[Handle, QClass]] = None)

Recursively dump this Qdisc to outfile.

The qclass_map, if present, is used to determine the destination QClass objects of traffic filters.

get_child(handle: Handle) Optional[QClass]

Returns the QClass with the specified handle

get_child_count() int

Return number of children of this QDisc/QClass

get_child_iter() Iterator[QClass]

Returns an iterator for the QClass children of this QDisc/QClass.

get_children() List[QClass]

Returns the children of this QDisc/QClass.

get_config() QDiscConfig

Returns the QDiscConfig where this QDisc/QClass has been instantiated, or None if not instantiated.

get_description() str

Return a string that fully describes this QDisc

get_handle() Handle

Returns the QDisc/QClass handle

get_interface() Optional[str]

Returns the interface where this QDisc/QClass has been instantiated, or None if the QDisc/QClass is not instantiated.

get_parent_handle() Optional[Handle]

Returns the handle of the parent of this QDisc/QClass

get_stats() Optional[QStats]

Returns queuing stats.

is_default() bool

Returns True if this QDisc is the default qdisc used by the kernel.

static is_ingress() bool

Returns True if this QDisc is the ingress qdisc

is_root() bool

Returns True if this is a root QDisc


class MultiQueueQClass(handle: Handle, parent_handle: Handle, class_name: Optional[str] = None)[source]

Bases: QClass

A class of the MultiQueueQDisc (mq) queuing discipline.

Parameters:
  • handleHandle of this QClass

  • parent_handleHandle of the parent of this QClass

  • class_name – optional class name; defaults to the class handle

get_description() str[source]

Returns a string describing the class and its attributes

dump(outfile: TextIO, level: int, qclass_map: Optional[Mapping[Handle, QClass]] = None)

Recursively dump this QClass to outfile.

The qclass_map, if present, is used to determine the destination QClass objects of traffic filters.

get_class_name() str

Returns the class name

get_config() QDiscConfig

Returns the QDiscConfig where this QDisc/QClass has been instantiated, or None if not instantiated.

get_handle() Handle

Returns the QDisc/QClass handle

get_interface() Optional[str]

Returns the interface where this QDisc/QClass has been instantiated, or None if the QDisc/QClass is not instantiated.

get_parent_handle() Optional[Handle]

Returns the handle of the parent of this QDisc/QClass

get_qdisc() Optional[QDisc]

Returns the QDisc under with this QClass, or None if this is not a leaf queuing class.

get_stats() Optional[QStats]

Returns queuing stats.

is_leaf() bool

Returns True if this is a leaf queuing class

set_class_name(class_name: str) None

Sets the class name

set_qdisc(qdisc: QDisc) None

Set the QDisc under with this queuing class