Properly set in_port in skb for Flow Mod messages.
[sliver-openvswitch.git] / datapath / datapath.h
index 1e1f2bf..f5225e1 100644 (file)
 #define OFP_SUPPORTED_CAPABILITIES ( OFPC_FLOW_STATS \
                | OFPC_TABLE_STATS \
                | OFPC_PORT_STATS \
-               | OFPC_STP \
                | OFPC_MULTI_PHY_TX )
 
 /* Actions supported by this implementation. */
 #define OFP_SUPPORTED_ACTIONS ( (1 << OFPAT_OUTPUT) \
-               | (1 << OFPAT_SET_DL_VLAN) \
+               | (1 << OFPAT_SET_VLAN_VID) \
+               | (1 << OFPAT_SET_VLAN_PCP) \
+               | (1 << OFPAT_STRIP_VLAN) \
                | (1 << OFPAT_SET_DL_SRC) \
                | (1 << OFPAT_SET_DL_DST) \
                | (1 << OFPAT_SET_NW_SRC) \
@@ -70,13 +71,10 @@ struct sender {
        uint32_t seq;           /* Netlink sequence ID of request. */
 };
 
-#define PORT_STATUS_BITS (OFPPFL_PORT_DOWN | OFPPFL_LINK_DOWN)
-#define PORT_FLAG_BITS (~PORT_STATUS_BITS)
-
 struct net_bridge_port {
        u16     port_no;
-       u32 flags;              /* Some subset of PORT_FLAG_BITS. */
-       u32 status;             /* Some subset of PORT_STATUS_BITS. */
+       u32 config;             /* Some subset of OFPPC_* flags. */
+       u32 state;              /* Some subset of OFPPS_* flags. */
        spinlock_t lock;
        struct work_struct port_task;
        struct datapath *dp;
@@ -85,7 +83,9 @@ struct net_bridge_port {
 };
 
 extern struct mutex dp_mutex;
+extern struct notifier_block dp_device_notifier;
 
+int dp_del_switch_port(struct net_bridge_port *);
 int dp_output_port(struct datapath *, struct sk_buff *, int out_port,
                   int ignore_no_fwd);
 int dp_output_control(struct datapath *, struct sk_buff *, uint32_t, 
@@ -93,6 +93,7 @@ int dp_output_control(struct datapath *, struct sk_buff *, uint32_t,
 int dp_set_origin(struct datapath *, uint16_t, struct sk_buff *);
 int dp_send_features_reply(struct datapath *, const struct sender *);
 int dp_send_config_reply(struct datapath *, const struct sender *);
+int dp_send_port_status(struct net_bridge_port *p, uint8_t status);
 int dp_send_flow_expired(struct datapath *, struct sw_flow *,
                         enum ofp_flow_expired_reason);
 int dp_send_error_msg(struct datapath *, const struct sender *, 
@@ -100,6 +101,8 @@ int dp_send_error_msg(struct datapath *, const struct sender *,
 int dp_update_port_flags(struct datapath *dp, const struct ofp_port_mod *opm);
 int dp_send_echo_reply(struct datapath *, const struct sender *,
                       const struct ofp_header *);
+int dp_send_hello(struct datapath *, const struct sender *,
+                 const struct ofp_header *);
 
 /* Should hold at least RCU read lock when calling */
 struct datapath *dp_get(int dp_idx);