Since vport implementations have no header files they needed to be
declared as extern before being used. They are currently declared
in vport.c but this isn't safe because the compiler will silently
accept it if the type is incorrect. This moves those declarations
into vport.h, which is included by all implementations and will
cause errors about conflicting types if there is a mismatch.
struct mutable_config *mutable;
};
struct mutable_config *mutable;
};
-struct vport_ops gre_vport_ops;
-
/* Protected by RCU. */
static struct tbl *port_table;
/* Protected by RCU. */
static struct tbl *port_table;
struct pcpu_lstats extra_stats;
};
struct pcpu_lstats extra_stats;
};
-struct vport_ops internal_vport_ops;
-
static inline struct internal_dev *internal_dev_priv(struct net_device *netdev)
{
return netdev_priv(netdev);
static inline struct internal_dev *internal_dev_priv(struct net_device *netdev)
{
return netdev_priv(netdev);
-struct vport_ops netdev_vport_ops;
-
static void netdev_port_receive(struct net_bridge_port *, struct sk_buff *);
/*
static void netdev_port_receive(struct net_bridge_port *, struct sk_buff *);
/*
struct device_config *devconf;
};
struct device_config *devconf;
};
-struct vport_ops patch_vport_ops;
-
/* Protected by RTNL lock. */
static struct hlist_head *peer_table;
#define PEER_HASH_BUCKETS 256
/* Protected by RTNL lock. */
static struct hlist_head *peer_table;
#define PEER_HASH_BUCKETS 256
#include "vport.h"
#include "vport-internal_dev.h"
#include "vport.h"
#include "vport-internal_dev.h"
-extern struct vport_ops netdev_vport_ops;
-extern struct vport_ops internal_vport_ops;
-extern struct vport_ops patch_vport_ops;
-extern struct vport_ops gre_vport_ops;
-
+/* List of statically compiled vport implementations. Don't forget to also
+ * add yours to the list at the bottom of vport.h. */
static struct vport_ops *base_vport_ops_list[] = {
&netdev_vport_ops,
&internal_vport_ops,
static struct vport_ops *base_vport_ops_list[] = {
&netdev_vport_ops,
&internal_vport_ops,
void vport_receive(struct vport *, struct sk_buff *);
void vport_record_error(struct vport *, enum vport_err_type err_type);
void vport_receive(struct vport *, struct sk_buff *);
void vport_record_error(struct vport *, enum vport_err_type err_type);
+/* List of statically compiled vport implementations. Don't forget to also
+ * add yours to the list at the top of vport.c. */
+extern struct vport_ops netdev_vport_ops;
+extern struct vport_ops internal_vport_ops;
+extern struct vport_ops patch_vport_ops;
+extern struct vport_ops gre_vport_ops;
+