netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] 8021q: make vlan_pcpu_stats visible without CONFIG_VLAN_8021Q
@ 2014-01-06  0:41 Hannes Frederic Sowa
  2014-01-06  1:19 ` RongQing Li
  2014-01-06  1:28 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Hannes Frederic Sowa @ 2014-01-06  0:41 UTC (permalink / raw)
  To: netdev; +Cc: roy.qing.li

macvlan needs vlan_pcpu_stats so make it visible even if compiling
without VLAN_8021Q support. Otherwise a very long compiler error happens.

Fixes: cdf3e274cf1b36 ("macvlan: unify macvlan_pcpu_stats and vlan_pcpu_stats")
Cc: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
 include/linux/if_vlan.h | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index f252deb..bbedfb5 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -82,25 +82,6 @@ static inline int is_vlan_dev(struct net_device *dev)
 #define vlan_tx_tag_get(__skb)		((__skb)->vlan_tci & ~VLAN_TAG_PRESENT)
 #define vlan_tx_tag_get_id(__skb)	((__skb)->vlan_tci & VLAN_VID_MASK)
 
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
-
-extern struct net_device *__vlan_find_dev_deep(struct net_device *real_dev,
-					       __be16 vlan_proto, u16 vlan_id);
-extern struct net_device *vlan_dev_real_dev(const struct net_device *dev);
-extern u16 vlan_dev_vlan_id(const struct net_device *dev);
-
-/**
- *	struct vlan_priority_tci_mapping - vlan egress priority mappings
- *	@priority: skb priority
- *	@vlan_qos: vlan priority: (skb->priority << 13) & 0xE000
- *	@next: pointer to next struct
- */
-struct vlan_priority_tci_mapping {
-	u32					priority;
-	u16					vlan_qos;
-	struct vlan_priority_tci_mapping	*next;
-};
-
 /**
  *	struct vlan_pcpu_stats - VLAN percpu rx/tx stats
  *	@rx_packets: number of received packets
@@ -123,6 +104,25 @@ struct vlan_pcpu_stats {
 	u32			tx_dropped;
 };
 
+#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
+
+extern struct net_device *__vlan_find_dev_deep(struct net_device *real_dev,
+					       __be16 vlan_proto, u16 vlan_id);
+extern struct net_device *vlan_dev_real_dev(const struct net_device *dev);
+extern u16 vlan_dev_vlan_id(const struct net_device *dev);
+
+/**
+ *	struct vlan_priority_tci_mapping - vlan egress priority mappings
+ *	@priority: skb priority
+ *	@vlan_qos: vlan priority: (skb->priority << 13) & 0xE000
+ *	@next: pointer to next struct
+ */
+struct vlan_priority_tci_mapping {
+	u32					priority;
+	u16					vlan_qos;
+	struct vlan_priority_tci_mapping	*next;
+};
+
 struct proc_dir_entry;
 struct netpoll;
 
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] 8021q: make vlan_pcpu_stats visible without CONFIG_VLAN_8021Q
  2014-01-06  0:41 [PATCH net-next] 8021q: make vlan_pcpu_stats visible without CONFIG_VLAN_8021Q Hannes Frederic Sowa
@ 2014-01-06  1:19 ` RongQing Li
  2014-01-06  1:28 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: RongQing Li @ 2014-01-06  1:19 UTC (permalink / raw)
  To: netdev, RongQing Li

On Mon, Jan 6, 2014 at 8:41 AM, Hannes Frederic Sowa
<hannes@stressinduktion.org> wrote:
> macvlan needs vlan_pcpu_stats so make it visible even if compiling
> without VLAN_8021Q support. Otherwise a very long compiler error happens.
>
> Fixes: cdf3e274cf1b36 ("macvlan: unify macvlan_pcpu_stats and vlan_pcpu_stats")
> Cc: Li RongQing <roy.qing.li@gmail.com>
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>

Thanks for fixing this bug

Acked-By: Li RongQing <roy.qing.li@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] 8021q: make vlan_pcpu_stats visible without CONFIG_VLAN_8021Q
  2014-01-06  0:41 [PATCH net-next] 8021q: make vlan_pcpu_stats visible without CONFIG_VLAN_8021Q Hannes Frederic Sowa
  2014-01-06  1:19 ` RongQing Li
@ 2014-01-06  1:28 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-01-06  1:28 UTC (permalink / raw)
  To: hannes; +Cc: netdev, roy.qing.li

From: Hannes Frederic Sowa <hannes@stressinduktion.org>
Date: Mon, 6 Jan 2014 01:41:20 +0100

> macvlan needs vlan_pcpu_stats so make it visible even if compiling
> without VLAN_8021Q support. Otherwise a very long compiler error happens.
> 
> Fixes: cdf3e274cf1b36 ("macvlan: unify macvlan_pcpu_stats and vlan_pcpu_stats")
> Cc: Li RongQing <roy.qing.li@gmail.com>
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>

Applied, thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-06  1:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-06  0:41 [PATCH net-next] 8021q: make vlan_pcpu_stats visible without CONFIG_VLAN_8021Q Hannes Frederic Sowa
2014-01-06  1:19 ` RongQing Li
2014-01-06  1:28 ` David Miller

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).