Bugzilla – Bug 897
[PATCH] API and functionality for marking TOS bytes in packets
Last modified: 2016-03-30 19:33:50 EDT
Created attachment 849 [details]
Marking API for Ipv4.
Patch attached that allows you to perform packet marking for incoming packets, in similar style to class-maps in routers. The API requires you to specify incoming IP Prefix and intended marking pattern (TOS byte), and allows you to specify transport protocol, TCP/UDP src/dst ports, and incoming NetDevice.
Example is a modified static-routing-example, where now the middle node also sets the packets to EF diffserv field.
My intended usage is that this can be used for queuing purposes. I'm intending to modify PointToPointNetDevice so that it has a strict priority queue where packets marked with EF Diffserv codepoint are sent first, however, this also opens door to anyone who wishes to do other types of class-based queues (e.g. CBWFQ).
Created attachment 850 [details]
Example code on how to use marking.
Check the pcap outputs for the center node.
Sorry for the tardy review. I think it is useful but I wonder whether it is not general enough (since it is limited to the input interface in a forwarding situation only) and will conflict with other API whenever someone gets around to finishing off the netfilter support:
(In reply to comment #2)
> Sorry for the tardy review. I think it is useful but I wonder whether it is
> not general enough (since it is limited to the input interface in a forwarding
> situation only) and will conflict with other API whenever someone gets around
> to finishing off the netfilter support:
Ok - well, this is something that I sort of needed "right now" and thought others might find it beneficial as well. If Netfilter provides better functionality (when it's finished) then great :)
need to consider this again in context of new traffic control module