Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1645944 > unrolled thread
| Started by | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| First post | 2017-05-19 23:10 +0200 |
| Last post | 2017-05-22 21:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH net-next 16/20] net: dsa: move notifier info to private header Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-05-19 23:10 +0200
Re: [PATCH net-next 16/20] net: dsa: move notifier info to private header Florian Fainelli <f.fainelli@gmail.com> - 2017-05-22 21:40 +0200
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Date | 2017-05-19 23:10 +0200 |
| Subject | [PATCH net-next 16/20] net: dsa: move notifier info to private header |
| Message-ID | <tIXjR-7UF-45@gated-at.bofh.it> |
The DSA notifier events and info structure definitions are not meant for
DSA drivers and users, but only used internally by the DSA core files.
Move them from the public net/dsa.h file to the private dsa_priv.h file.
Also use this opportunity to turn the events into an anonymous enum,
because we don't care about the values, and this will prevent future
conflicts when adding (and sorting) new events.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
include/net/dsa.h | 10 ----------
net/dsa/dsa_priv.h | 12 ++++++++++++
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 791fed62fb16..c0e567c0c824 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -285,16 +285,6 @@ static inline u8 dsa_upstream_port(struct dsa_switch *ds)
return ds->rtable[dst->cpu_dp->ds->index];
}
-#define DSA_NOTIFIER_BRIDGE_JOIN 1
-#define DSA_NOTIFIER_BRIDGE_LEAVE 2
-
-/* DSA_NOTIFIER_BRIDGE_* */
-struct dsa_notifier_bridge_info {
- struct net_device *br;
- int sw_index;
- int port;
-};
-
struct dsa_switch_ops {
/*
* Legacy probing.
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index 16021a891095..c19241eb094b 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -16,6 +16,18 @@
#include <linux/netpoll.h>
#include <net/dsa.h>
+enum {
+ DSA_NOTIFIER_BRIDGE_JOIN,
+ DSA_NOTIFIER_BRIDGE_LEAVE,
+};
+
+/* DSA_NOTIFIER_BRIDGE_* */
+struct dsa_notifier_bridge_info {
+ struct net_device *br;
+ int sw_index;
+ int port;
+};
+
struct dsa_device_ops {
struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev);
struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev,
--
2.13.0
[toc] | [next] | [standalone]
| From | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| Date | 2017-05-22 21:40 +0200 |
| Subject | Re: [PATCH net-next 16/20] net: dsa: move notifier info to private header |
| Message-ID | <tK1lo-1kI-21@gated-at.bofh.it> |
| In reply to | #1645944 |
On 05/19/2017 02:00 PM, Vivien Didelot wrote: > The DSA notifier events and info structure definitions are not meant for > DSA drivers and users, but only used internally by the DSA core files. > > Move them from the public net/dsa.h file to the private dsa_priv.h file. > > Also use this opportunity to turn the events into an anonymous enum, > because we don't care about the values, and this will prevent future > conflicts when adding (and sorting) new events. LGTM > > Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> -- Florian
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web