net/vlan: include the shift in skb_vlan_tag_get_prio()
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Wed, 7 Nov 2018 17:07:03 +0000 (18:07 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Nov 2018 06:41:19 +0000 (22:41 -0800)
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_vlan.h
net/core/flow_dissector.c

index 941da4bf39292c11eddf5d5a43737565bbe9a45d..b14bf87999aa0df62cb4cc2abd39f5b0b4893b3b 100644 (file)
@@ -81,7 +81,7 @@ static inline bool is_vlan_dev(const struct net_device *dev)
 #define skb_vlan_tag_present(__skb)    ((__skb)->vlan_tci & VLAN_TAG_PRESENT)
 #define skb_vlan_tag_get(__skb)                ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT)
 #define skb_vlan_tag_get_id(__skb)     ((__skb)->vlan_tci & VLAN_VID_MASK)
-#define skb_vlan_tag_get_prio(__skb)   ((__skb)->vlan_tci & VLAN_PRIO_MASK)
+#define skb_vlan_tag_get_prio(__skb)   (((__skb)->vlan_tci & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT)
 
 static inline int vlan_get_rx_ctag_filter_info(struct net_device *dev)
 {
index 676f3ad629f95625422aa55f0f54157001ac477c..56d1e9b731426e718b522d2b1f568061e9b9cb3c 100644 (file)
@@ -952,8 +952,7 @@ proto_again:
 
                        if (!vlan) {
                                key_vlan->vlan_id = skb_vlan_tag_get_id(skb);
-                               key_vlan->vlan_priority =
-                                       (skb_vlan_tag_get_prio(skb) >> VLAN_PRIO_SHIFT);
+                               key_vlan->vlan_priority = skb_vlan_tag_get_prio(skb);
                        } else {
                                key_vlan->vlan_id = ntohs(vlan->h_vlan_TCI) &
                                        VLAN_VID_MASK;