diff options
author | Simon Wunderlich <simon@open-mesh.com> | 2013-07-29 11:56:44 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-08-28 05:31:50 -0400 |
commit | c54f38c9aa22ff65ca9f4c1bdbf2a11d017205f3 (patch) | |
tree | e12190c69088c2fee771a49e94c5ab6619ec3817 /net/batman-adv/translation-table.c | |
parent | 5b2941b18dc5f60a5c14a5c15693f9c58b0dd922 (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/translation-table.c')
-rw-r--r-- | net/batman-adv/translation-table.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 429aeef3d8b2..34510f38708f 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -1626,6 +1626,7 @@ batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn, | |||
1626 | if (!skb) | 1626 | if (!skb) |
1627 | goto out; | 1627 | goto out; |
1628 | 1628 | ||
1629 | skb->priority = TC_PRIO_CONTROL; | ||
1629 | skb_reserve(skb, ETH_HLEN); | 1630 | skb_reserve(skb, ETH_HLEN); |
1630 | tt_response = (struct batadv_tt_query_packet *)skb_put(skb, len); | 1631 | tt_response = (struct batadv_tt_query_packet *)skb_put(skb, len); |
1631 | tt_response->ttvn = ttvn; | 1632 | tt_response->ttvn = ttvn; |
@@ -1691,6 +1692,7 @@ static int batadv_send_tt_request(struct batadv_priv *bat_priv, | |||
1691 | if (!skb) | 1692 | if (!skb) |
1692 | goto out; | 1693 | goto out; |
1693 | 1694 | ||
1695 | skb->priority = TC_PRIO_CONTROL; | ||
1694 | skb_reserve(skb, ETH_HLEN); | 1696 | skb_reserve(skb, ETH_HLEN); |
1695 | 1697 | ||
1696 | tt_req_len = sizeof(*tt_request); | 1698 | tt_req_len = sizeof(*tt_request); |
@@ -1788,6 +1790,7 @@ batadv_send_other_tt_response(struct batadv_priv *bat_priv, | |||
1788 | if (!skb) | 1790 | if (!skb) |
1789 | goto unlock; | 1791 | goto unlock; |
1790 | 1792 | ||
1793 | skb->priority = TC_PRIO_CONTROL; | ||
1791 | skb_reserve(skb, ETH_HLEN); | 1794 | skb_reserve(skb, ETH_HLEN); |
1792 | packet_pos = skb_put(skb, len); | 1795 | packet_pos = skb_put(skb, len); |
1793 | tt_response = (struct batadv_tt_query_packet *)packet_pos; | 1796 | tt_response = (struct batadv_tt_query_packet *)packet_pos; |
@@ -1906,6 +1909,7 @@ batadv_send_my_tt_response(struct batadv_priv *bat_priv, | |||
1906 | if (!skb) | 1909 | if (!skb) |
1907 | goto unlock; | 1910 | goto unlock; |
1908 | 1911 | ||
1912 | skb->priority = TC_PRIO_CONTROL; | ||
1909 | skb_reserve(skb, ETH_HLEN); | 1913 | skb_reserve(skb, ETH_HLEN); |
1910 | packet_pos = skb_put(skb, len); | 1914 | packet_pos = skb_put(skb, len); |
1911 | tt_response = (struct batadv_tt_query_packet *)packet_pos; | 1915 | tt_response = (struct batadv_tt_query_packet *)packet_pos; |
@@ -2240,6 +2244,7 @@ static void batadv_send_roam_adv(struct batadv_priv *bat_priv, uint8_t *client, | |||
2240 | if (!skb) | 2244 | if (!skb) |
2241 | goto out; | 2245 | goto out; |
2242 | 2246 | ||
2247 | skb->priority = TC_PRIO_CONTROL; | ||
2243 | skb_reserve(skb, ETH_HLEN); | 2248 | skb_reserve(skb, ETH_HLEN); |
2244 | 2249 | ||
2245 | roam_adv_packet = (struct batadv_roam_adv_packet *)skb_put(skb, len); | 2250 | roam_adv_packet = (struct batadv_roam_adv_packet *)skb_put(skb, len); |