+enum { LRU_MAX_PORTS = 1024 };
+enum { LRU_MASK = LRU_MAX_PORTS - 1};
+BUILD_ASSERT_DECL(IS_POW2(LRU_MAX_PORTS));
+
+/* This ethtool flag was introduced in Linux 2.6.24, so it might be
+ * missing if we have old headers. */
+#define ETH_FLAG_LRO (1 << 15) /* LRO is enabled */
+
+struct dpif_linux_dp {
+ /* Generic Netlink header. */
+ uint8_t cmd;
+
+ /* struct ovs_header. */
+ int dp_ifindex;
+
+ /* Attributes. */
+ const char *name; /* OVS_DP_ATTR_NAME. */
+ uint32_t upcall_pid; /* OVS_DP_UPCALL_PID. */
+ struct ovs_dp_stats stats; /* OVS_DP_ATTR_STATS. */
+ enum ovs_frag_handling ipv4_frags; /* OVS_DP_ATTR_IPV4_FRAGS. */
+ const uint32_t *sampling; /* OVS_DP_ATTR_SAMPLING. */
+};
+
+static void dpif_linux_dp_init(struct dpif_linux_dp *);
+static int dpif_linux_dp_from_ofpbuf(struct dpif_linux_dp *,
+ const struct ofpbuf *);
+static void dpif_linux_dp_dump_start(struct nl_dump *);
+static int dpif_linux_dp_transact(const struct dpif_linux_dp *request,
+ struct dpif_linux_dp *reply,
+ struct ofpbuf **bufp);
+static int dpif_linux_dp_get(const struct dpif *, struct dpif_linux_dp *reply,
+ struct ofpbuf **bufp);
+
+struct dpif_linux_flow {
+ /* Generic Netlink header. */
+ uint8_t cmd;
+
+ /* struct ovs_header. */
+ unsigned int nlmsg_flags;
+ int dp_ifindex;
+
+ /* Attributes.
+ *
+ * The 'stats' and 'used' members point to 64-bit data that might only be
+ * aligned on 32-bit boundaries, so get_unaligned_u64() should be used to
+ * access their values.
+ *
+ * If 'actions' is nonnull then OVS_FLOW_ATTR_ACTIONS will be included in
+ * the Netlink version of the command, even if actions_len is zero. */
+ const struct nlattr *key; /* OVS_FLOW_ATTR_KEY. */
+ size_t key_len;
+ const struct nlattr *actions; /* OVS_FLOW_ATTR_ACTIONS. */
+ size_t actions_len;
+ uint32_t upcall_pid; /* OVS_FLOW_ATTR_UPCALL_PID. */
+ const struct ovs_flow_stats *stats; /* OVS_FLOW_ATTR_STATS. */
+ const uint8_t *tcp_flags; /* OVS_FLOW_ATTR_TCP_FLAGS. */
+ const uint64_t *used; /* OVS_FLOW_ATTR_USED. */
+ bool clear; /* OVS_FLOW_ATTR_CLEAR. */
+};
+
+static void dpif_linux_flow_init(struct dpif_linux_flow *);
+static int dpif_linux_flow_from_ofpbuf(struct dpif_linux_flow *,
+ const struct ofpbuf *);
+static void dpif_linux_flow_to_ofpbuf(const struct dpif_linux_flow *,
+ struct ofpbuf *);
+static int dpif_linux_flow_transact(const struct dpif_linux_flow *request,
+ struct dpif_linux_flow *reply,
+ struct ofpbuf **bufp);
+static void dpif_linux_flow_get_stats(const struct dpif_linux_flow *,
+ struct dpif_flow_stats *);
+