How can I set network priority for packets sent via TAP interface?

140 views Asked by At

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?

0

There are 0 answers