-#define ODP_VPORT_ADD _IOR('O', 21, struct odp_vport_add)
-#define ODP_VPORT_MOD _IOR('O', 22, struct odp_vport_mod)
-#define ODP_VPORT_DEL _IO('O', 23)
-#define ODP_VPORT_STATS_GET _IOWR('O', 24, struct odp_vport_stats_req)
-#define ODP_VPORT_ETHER_GET _IOWR('O', 25, struct odp_vport_ether)
-#define ODP_VPORT_ETHER_SET _IOW('O', 26, struct odp_vport_ether)
-#define ODP_VPORT_MTU_GET _IOWR('O', 27, struct odp_vport_mtu)
-#define ODP_VPORT_MTU_SET _IOW('O', 28, struct odp_vport_mtu)
-#define ODP_VPORT_STATS_SET _IOWR('O', 29, struct odp_vport_stats_req)
+/**
+ * struct ovs_header - header for OVS Generic Netlink messages.
+ * @dp_ifindex: ifindex of local port for datapath (0 to make a request not
+ * specific to a datapath).
+ *
+ * Attributes following the header are specific to a particular OVS Generic
+ * Netlink family, but all of the OVS families use this header.
+ */
+struct ovs_header {
+ int dp_ifindex;
+};
+\f
+/**
+ * enum ovs_datapath_attr - attributes for %OVS_DP_* commands.
+ * @OVS_DP_ATTR_NAME: Name of the network device that serves as the "local
+ * port". This is the name of the network device whose dp_ifindex is given in
+ * the &struct ovs_header. Always present in notifications. Required in
+ * %OVS_DP_NEW requests. May be used as an alternative to specifying
+ * dp_ifindex in other requests (with a dp_ifindex of 0).
+ * @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the
+ * datapath. Always present in notifications.
+ * @OVS_DP_ATTR_IPV4_FRAGS: One of %OVS_DP_FRAG_*. Always present in
+ * notifications. May be included in %OVS_DP_NEW or %OVS_DP_SET requests to
+ * change the fragment handling policy.
+ * @OVS_DP_ATTR_SAMPLING: 32-bit fraction of packets to sample with
+ * @OVS_PACKET_CMD_SAMPLE. A value of 0 samples no packets, a value of
+ * %UINT32_MAX samples all packets, and intermediate values sample intermediate
+ * fractions of packets.
+ * @OVS_DP_ATTR_MCGROUPS: Nested attributes with multicast groups. Each nested
+ * attribute has a %OVS_PACKET_CMD_* type with a 32-bit value giving the
+ * Generic Netlink multicast group number used for sending this datapath's
+ * messages with that command type up to userspace.
+ *
+ * These attributes follow the &struct ovs_header within the Generic Netlink
+ * payload for %OVS_DP_* commands.
+ */
+enum ovs_datapath_attr {
+ OVS_DP_ATTR_UNSPEC,
+ OVS_DP_ATTR_NAME, /* name of dp_ifindex netdev */
+ OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */
+ OVS_DP_ATTR_IPV4_FRAGS, /* 32-bit enum ovs_frag_handling */
+ OVS_DP_ATTR_SAMPLING, /* 32-bit fraction of packets to sample. */
+ OVS_DP_ATTR_MCGROUPS, /* Nested attributes with multicast groups. */
+ __OVS_DP_ATTR_MAX
+};