@@ -82,6 +82,12 @@ struct netdev_flow_api {
int (*flow_del)(struct netdev *, const ovs_u128 *ufid,
struct dpif_flow_stats *);
+ /* Recover the packet state (contents and data) for continued processing
+ * in software.
+ * Return 0 if successful, otherwise returns a positive errno value. */
+ int (*hw_miss_packet_recover)(struct netdev *, uint32_t flow_miss_ctx_id,
+ struct dp_packet *);
+
/* Initializies the netdev flow api.
* Return 0 if successful, otherwise returns a positive errno value. */
int (*init_flow_api)(struct netdev *);
@@ -255,6 +255,20 @@ netdev_flow_put(struct netdev *netdev, struct match *match,
: EOPNOTSUPP;
}
+int
+netdev_hw_miss_packet_recover(struct netdev *netdev,
+ uint32_t flow_miss_ctx_id,
+ struct dp_packet *packet)
+{
+ const struct netdev_flow_api *flow_api =
+ ovsrcu_get(const struct netdev_flow_api *, &netdev->flow_api);
+
+ return (flow_api && flow_api->hw_miss_packet_recover)
+ ? flow_api->hw_miss_packet_recover(netdev, flow_miss_ctx_id,
+ packet)
+ : EOPNOTSUPP;
+}
+
int
netdev_flow_get(struct netdev *netdev, struct match *match,
struct nlattr **actions, const ovs_u128 *ufid,
@@ -87,6 +87,9 @@ bool netdev_flow_dump_next(struct netdev_flow_dump *, struct match *,
int netdev_flow_put(struct netdev *, struct match *, struct nlattr *actions,
size_t actions_len, const ovs_u128 *,
struct offload_info *, struct dpif_flow_stats *);
+int netdev_hw_miss_packet_recover(struct netdev *netdev,
+ uint32_t flow_miss_ctx_id,
+ struct dp_packet *packet);
int netdev_flow_get(struct netdev *, struct match *, struct nlattr **actions,
const ovs_u128 *, struct dpif_flow_stats *,
struct dpif_flow_attrs *, struct ofpbuf *wbuffer);