summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/unicast.c
diff options
context:
space:
mode:
authorSimon Wunderlich <simon@open-mesh.com>2013-07-29 17:56:44 +0200
committerAntonio Quartulli <ordex@autistici.org>2013-08-28 11:31:50 +0200
commitc54f38c9aa22ff65ca9f4c1bdbf2a11d017205f3 (patch)
treee12190c69088c2fee771a49e94c5ab6619ec3817 /net/batman-adv/unicast.c
parent5b2941b18dc5f60a5c14a5c15693f9c58b0dd922 (diff)
batman-adv: set skb priority according to content
The skb priority field may help the wireless driver to choose the right queue (e.g. WMM queues). This should be set in batman-adv, as this information is only available here. This patch adds support for IPv4/IPv6 DS fields and VLAN PCP. Note that only VLAN PCP is used if a VLAN header is present. Also initially set TC_PRIO_CONTROL only for self-generated packets, and keep the priority set by higher layers. Signed-off-by: Simon Wunderlich <simon@open-mesh.com> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/unicast.c')
-rw-r--r--net/batman-adv/unicast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c
index 857e1b8349e..48b31d33ce6 100644
--- a/net/batman-adv/unicast.c
+++ b/net/batman-adv/unicast.c
@@ -242,6 +242,8 @@ int batadv_frag_send_skb(struct sk_buff *skb, struct batadv_priv *bat_priv,
frag_skb = dev_alloc_skb(data_len - (data_len / 2) + ucf_hdr_len);
if (!frag_skb)
goto dropped;
+
+ skb->priority = TC_PRIO_CONTROL;
skb_reserve(frag_skb, ucf_hdr_len);
unicast_packet = (struct batadv_unicast_packet *)skb->data;