[VLAN]: Use 32 bit value for skb->priority mapping
authorPatrick McHardy <kaber@trash.net>
Wed, 13 Jun 2007 19:07:07 +0000 (12:07 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 11 Jul 2007 05:15:00 +0000 (22:15 -0700)
skb->priority has only 32 bits and even VLAN uses 32 bit values in its API.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_vlan.h
net/8021q/vlanproc.c

index 81e9bc93569b5e0a849b19a06987b53c983d4074..aeddb49193f9b42f41af2889400bd1a3d5e51389 100644 (file)
@@ -99,7 +99,7 @@ static inline void vlan_group_set_device(struct vlan_group *vg, int vlan_id,
 }
 
 struct vlan_priority_tci_mapping {
-       unsigned long priority;
+       u32 priority;
        unsigned short vlan_qos; /* This should be shifted when first set, so we only do it
                                  * at provisioning time.
                                  * ((skb->priority << 13) & 0xE000)
@@ -112,7 +112,7 @@ struct vlan_dev_info {
        /** This will be the mapping that correlates skb->priority to
         * 3 bits of VLAN QOS tags...
         */
-       unsigned long ingress_priority_map[8];
+       u32 ingress_priority_map[8];
        struct vlan_priority_tci_mapping *egress_priority_map[16]; /* hash table */
 
        unsigned short vlan_id;        /*  The VLAN Identifier for this interface. */
index d216a64421cd83eb19eeb021ae58b601ce3f63d0..8693b21b3caae070e25bbf5031fe7866ea3222b2 100644 (file)
@@ -342,7 +342,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
        seq_printf(seq, "Device: %s", dev_info->real_dev->name);
        /* now show all PRIORITY mappings relating to this VLAN */
        seq_printf(seq,
-                      "\nINGRESS priority mappings: 0:%lu  1:%lu  2:%lu  3:%lu  4:%lu  5:%lu  6:%lu 7:%lu\n",
+                      "\nINGRESS priority mappings: 0:%u  1:%u  2:%u  3:%u  4:%u  5:%u  6:%u 7:%u\n",
                       dev_info->ingress_priority_map[0],
                       dev_info->ingress_priority_map[1],
                       dev_info->ingress_priority_map[2],
@@ -357,7 +357,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
                const struct vlan_priority_tci_mapping *mp
                        = dev_info->egress_priority_map[i];
                while (mp) {
-                       seq_printf(seq, "%lu:%hu ",
+                       seq_printf(seq, "%u:%hu ",
                                   mp->priority, ((mp->vlan_qos >> 13) & 0x7));
                        mp = mp->next;
                }