Repository : ssh://git@open-mesh.org/batctl
On branch : master
---------------------------------------------------------------
commit 7e3a301b51a15597a6d1b9595263ac4212929a68
Author: Andrew Lunn <andrew(a)lunn.ch>
Date: Mon May 9 20:03:36 2016 +0200
batctl: Include frame priority in fragment header
Unfragmented frames which traverse a node have their skb->priority set
by looking at the IP ToS byte, or the 802.1p header. However for
fragments this is not possible, only one of the fragments will contain
the headers. Instead, place the priority into the fragment header and
on receiving a fragment, use this information to set the skb->priority
for when the fragment is forwarded.
Signed-off-by: Andrew Lunn <andrew(a)lunn.ch>
Reviewed-by: Simon Wunderlich <sw(a)simonwunderlich.de>
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
---------------------------------------------------------------
7e3a301b51a15597a6d1b9595263ac4212929a68
packet.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/packet.h b/packet.h
index 372128d..7156779 100644
--- a/packet.h
+++ b/packet.h
@@ -420,6 +420,7 @@ struct batadv_unicast_4addr_packet {
* @dest: final destination used when routing fragments
* @orig: originator of the fragment used when merging the packet
* @no: fragment number within this sequence
+ * @priority: priority of frame, from ToS IP precedence or 802.1p
* @reserved: reserved byte for alignment
* @seqno: sequence identification
* @total_size: size of the merged packet
@@ -430,9 +431,11 @@ struct batadv_frag_packet {
u8 ttl;
#if defined(__BIG_ENDIAN_BITFIELD)
u8 no:4;
- u8 reserved:4;
+ u8 priority:3;
+ u8 reserved:1;
#elif defined(__LITTLE_ENDIAN_BITFIELD)
- u8 reserved:4;
+ u8 reserved:1;
+ u8 priority:3;
u8 no:4;
#else
#error "unknown bitfield endianness"