Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1708301 > unrolled thread

[PATCH net-next] net: core: fix compile error inside flow_dissector due to new dsa callback

Started byJohn Crispin <john@phrozen.org>
First post2017-08-10 10:10 +0200
Last post2017-08-10 18:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH net-next] net: core: fix compile error inside flow_dissector due to new dsa callback John Crispin <john@phrozen.org> - 2017-08-10 10:10 +0200
    Re: [PATCH net-next] net: core: fix compile error inside  flow_dissector due to new dsa callback David Miller <davem@davemloft.net> - 2017-08-10 18:20 +0200

#1708301 — [PATCH net-next] net: core: fix compile error inside flow_dissector due to new dsa callback

FromJohn Crispin <john@phrozen.org>
Date2017-08-10 10:10 +0200
Subject[PATCH net-next] net: core: fix compile error inside flow_dissector due to new dsa callback
Message-ID<ucQHv-2LF-5@gated-at.bofh.it>
The following error was introduced by
commit 43e665287f93 ("net-next: dsa: fix flow dissection")
due to a missing #if guard

net/core/flow_dissector.c: In function '__skb_flow_dissect':
net/core/flow_dissector.c:448:18: error: 'struct net_device' has no member named 'dsa_ptr'
ops = skb->dev->dsa_ptr->tag_ops;
                ^
make[3]: *** [net/core/flow_dissector.o] Error 1

Signed-off-by: John Crispin <john@phrozen.org>
---
 net/core/flow_dissector.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 5b5be9577257..79b9c06c83ad 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -441,6 +441,7 @@ bool __skb_flow_dissect(const struct sk_buff *skb,
 			 skb->vlan_proto : skb->protocol;
 		nhoff = skb_network_offset(skb);
 		hlen = skb_headlen(skb);
+#if IS_ENABLED(CONFIG_NET_DSA)
 		if (unlikely(netdev_uses_dsa(skb->dev))) {
 			const struct dsa_device_ops *ops;
 			int offset;
@@ -452,6 +453,7 @@ bool __skb_flow_dissect(const struct sk_buff *skb,
 				nhoff += offset;
 			}
 		}
+#endif
 	}
 
 	/* It is ensured by skb_flow_dissector_init() that control key will
-- 
2.11.0

[toc] | [next] | [standalone]


#1708804 — Re: [PATCH net-next] net: core: fix compile error inside flow_dissector due to new dsa callback

FromDavid Miller <davem@davemloft.net>
Date2017-08-10 18:20 +0200
SubjectRe: [PATCH net-next] net: core: fix compile error inside flow_dissector due to new dsa callback
Message-ID<ucYlI-806-35@gated-at.bofh.it>
In reply to#1708301
From: John Crispin <john@phrozen.org>
Date: Thu, 10 Aug 2017 10:09:03 +0200

> The following error was introduced by
> commit 43e665287f93 ("net-next: dsa: fix flow dissection")
> due to a missing #if guard
> 
> net/core/flow_dissector.c: In function '__skb_flow_dissect':
> net/core/flow_dissector.c:448:18: error: 'struct net_device' has no member named 'dsa_ptr'
> ops = skb->dev->dsa_ptr->tag_ops;
>                 ^
> make[3]: *** [net/core/flow_dissector.o] Error 1
> 
> Signed-off-by: John Crispin <john@phrozen.org>

Applied, thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web