netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: netdev@vger.kernel.org
Cc: Patrick McHardy <kaber@trash.net>
Subject: [RFC VLAN 08/10]: Use 32 bit value for skb->priority mapping
Date: Tue,  5 Jun 2007 16:37:02 +0200 (MEST)	[thread overview]
Message-ID: <20070605143701.23717.93656.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20070605143650.23717.91261.sendpatchset@localhost.localdomain>

[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>

---
commit 3151f6fdca072a91c2184192dc1d431a4d9248b7
tree 21f76dd1682e385f7d958d5d5ebb66c3585ed2ca
parent f2eb0828c4cfaf4d4aed225b55ca65b052109657
author Patrick McHardy <kaber@trash.net> Tue, 05 Jun 2007 16:33:45 +0200
committer Patrick McHardy <kaber@trash.net> Tue, 05 Jun 2007 16:33:45 +0200

 include/linux/if_vlan.h |    4 ++--
 net/8021q/vlanproc.c    |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 81e9bc9..aeddb49 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -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. */
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index d216a64..8693b21 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -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;
 		}

  parent reply	other threads:[~2007-06-05 14:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-05 14:36 [RFC VLAN 00/10]: VLAN netlink support try 2 Patrick McHardy
2007-06-05 14:36 ` [RFC VLAN 01/10]: Fix off-by-ones in VLAN ID checks Patrick McHardy
2007-06-05 16:16   ` Ben Greear
2007-06-05 18:16     ` Patrick McHardy
2007-06-05 14:36 ` [RFC VLAN 02/10]: Convert name-based configuration functions to struct netdevice * Patrick McHardy
2007-06-05 14:36 ` [RFC VLAN 03/10]: Move some device intialization code to dev->init callback Patrick McHardy
2007-06-05 14:36 ` [RFC VLAN 04/10]: Move vlan_group allocation to seperate function Patrick McHardy
2007-06-05 14:36 ` [RFC VLAN 05/10]: Split up device checks Patrick McHardy
2007-06-05 14:36 ` [RFC VLAN 06/10]: Move device registation to seperate function Patrick McHardy
2007-06-05 14:37 ` [RFC VLAN 07/10]: Return proper error codes in register_vlan_device Patrick McHardy
2007-06-05 14:37 ` Patrick McHardy [this message]
2007-06-05 14:37 ` [RFC VLAN 09/10]: Keep track of number of QoS mappings Patrick McHardy
2007-06-05 14:37 ` [RFC VLAN 10/10]: Use rtnl_link API Patrick McHardy
2007-06-05 21:31   ` Ben Greear
2007-06-05 21:58     ` Patrick McHardy
2007-06-05 22:03       ` Ben Greear
2007-06-05 16:25 ` [RFC VLAN 00/10]: VLAN netlink support try 2 Ben Greear
2007-06-05 18:28   ` Patrick McHardy
2007-06-05 20:08     ` Ben Greear
2007-06-05 21:12       ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070605143701.23717.93656.sendpatchset@localhost.localdomain \
    --to=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).