1

I have an NIC with multiqueue support so that based on priority of packets different queues will be used. I want to analyze the packet flow through each of these hardware queue.

The queues are listed in

/sys/class/net/eth1/queues/

directoryI have checked in the directory /sys/class/net/eth1/queues/tx-0/ but it has information such as tx_maxrate, tx_timeout etc.

Is there any other directory where I can see the statistics of each queue? (Like number of send packets, lost packets etc)

1

What you see under /sys/class/net/*/queues/ are the driver/hardware-dependent limits, but all the decisions are made (and statistics are collected) at the network scheduling layer. This layer is managed through the rtnetlink interface, for example using the tc tool.

As you have mentioned priorities and queues, I'm assuming that you already have scheduling set up, perhaps using the mqprio scheduler. If not, the Traffic Control HOWTO will get you started. Although it's somewhat outdated, the basics are still the same.

To see the statistics for each scheduling class (mapped to a HW transmission queue), use tc -s class show dev eth1.

  • I was thinking tc tool was for traffic shaping in software and traffic shaping in hardware as a part of the NIC driver in use. – Xter Jun 1 '18 at 6:42
  • 1
    The hardware will decide from which queue to transmit the next packet. However, something needs to fill the queues first (decide which packets belong where, what traffic is high-priority …). The common scheduling layer handles this (using special schedulers mq/mqprio) and thus the same tc tool is still used to configure it. (Having different configuration mechanisms for essentially the same task doesn't make much sense). See the documentation for an introduction. – TooTea Jun 1 '18 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.