0

I have a TAP interface with multiple queues and I am trying to apply a tc taprio qdisc to the interface. For this, I need to write traffic of a specific linux network priority to the TAP interface. So for example, all traffic that goes into TAP queue 0 should have priority 0, queue 1 for priority 1 etc. Is there a way to do that in my application?

I know that for normal sockets, this can be done with setsockopt() with option SO_PRIORITY, but I am not sure for TAP interfaces. I couldn't find anything regarding an option to specify the priority of the traffic when opening the TAP interface or writing to it. Or is there maybe an option to use sockets with TAP interfaces so I could use SO_PRIORITY?

quasi
  • 1
  • 1
  • Understand that the old priorities (`0` to `7`) are now obsolete. We have had DSCP since 1998 when _[RFC 2474, Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers](https://www.rfc-editor.org/rfc/rfc2474)_ redefined the IPv4 ToS field to be the DSCP field, and the IPv6 Priority field to be the Traffic Class field. Devices that are configured to use QoS when there is congestion now look for DSCP, not the old priorities. Devices not configured for QoS (the default and those on the public Internet) simply ignore the priorities altogether. – Ron Maupin Jan 23 '23 at 13:41
  • @RonMaupin Maybe I am misunderstanding something here, but I am not sure if we are talking about the same thing. I am talking about linux networking priorities for qdiscs, as explained [here](https://stackoverflow.com/a/38000457/21065011). Is that the same thing as the priority in the IP header? In practice, I am trying to use TAPRIO as described [here](https://tsn.readthedocs.io/qdiscs.html#configuring-taprio-qdisc), which uses the linux priorities. – quasi Jan 23 '23 at 15:35

0 Answers0