Skip to content

Commit 734423c

Browse files
kaberDavid S. Miller
authored andcommitted
[VLAN]: Use 32 bit value for skb->priority mapping
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>
1 parent 2ae0bf6 commit 734423c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/linux/if_vlan.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static inline void vlan_group_set_device(struct vlan_group *vg, int vlan_id,
9999
}
100100

101101
struct vlan_priority_tci_mapping {
102-
unsigned long priority;
102+
u32 priority;
103103
unsigned short vlan_qos; /* This should be shifted when first set, so we only do it
104104
* at provisioning time.
105105
* ((skb->priority << 13) & 0xE000)
@@ -112,7 +112,7 @@ struct vlan_dev_info {
112112
/** This will be the mapping that correlates skb->priority to
113113
* 3 bits of VLAN QOS tags...
114114
*/
115-
unsigned long ingress_priority_map[8];
115+
u32 ingress_priority_map[8];
116116
struct vlan_priority_tci_mapping *egress_priority_map[16]; /* hash table */
117117

118118
unsigned short vlan_id; /* The VLAN Identifier for this interface. */

net/8021q/vlanproc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
342342
seq_printf(seq, "Device: %s", dev_info->real_dev->name);
343343
/* now show all PRIORITY mappings relating to this VLAN */
344344
seq_printf(seq,
345-
"\nINGRESS priority mappings: 0:%lu 1:%lu 2:%lu 3:%lu 4:%lu 5:%lu 6:%lu 7:%lu\n",
345+
"\nINGRESS priority mappings: 0:%u 1:%u 2:%u 3:%u 4:%u 5:%u 6:%u 7:%u\n",
346346
dev_info->ingress_priority_map[0],
347347
dev_info->ingress_priority_map[1],
348348
dev_info->ingress_priority_map[2],
@@ -357,7 +357,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
357357
const struct vlan_priority_tci_mapping *mp
358358
= dev_info->egress_priority_map[i];
359359
while (mp) {
360-
seq_printf(seq, "%lu:%hu ",
360+
seq_printf(seq, "%u:%hu ",
361361
mp->priority, ((mp->vlan_qos >> 13) & 0x7));
362362
mp = mp->next;
363363
}

0 commit comments

Comments
 (0)