@@ -2416,7 +2416,7 @@ dp_netdev_flow_offload_put(struct dp_flow_offload_item *offload)
/* Taking a global 'port_mutex' to fulfill thread safety restrictions for
* the netdev-offload-dpdk module. */
ovs_mutex_lock(&pmd->dp->port_mutex);
- ret = netdev_flow_put(port, &offload->match,
+ ret = netdev_flow_put(NULL, port, &offload->match,
CONST_CAST(struct nlattr *, offload->actions),
offload->actions_len, &flow->mega_ufid, &info,
NULL);
@@ -2044,7 +2044,7 @@ parse_flow_put(struct dpif_netlink *dpif, struct dpif_flow_put *put)
info.dpif_class = dpif_class;
info.tp_dst_port = dst_port;
info.tunnel_csum_on = csum_on;
- err = netdev_flow_put(dev, &match,
+ err = netdev_flow_put(NULL, dev, &match,
CONST_CAST(struct nlattr *, put->actions),
put->actions_len,
CONST_CAST(ovs_u128 *, put->ufid),
@@ -1430,10 +1430,10 @@ find_offloaded_flow(const struct hmap *offloaded_flows, const ovs_u128 *ufid)
}
static int
-netdev_dummy_flow_put(struct netdev *netdev, struct match *match,
- struct nlattr *actions OVS_UNUSED,
- size_t actions_len OVS_UNUSED,
- const ovs_u128 *ufid, struct offload_info *info,
+netdev_dummy_flow_put(struct dpif *dpif OVS_UNUSED, struct netdev *netdev,
+ struct match *match, struct nlattr *actions OVS_UNUSED,
+ size_t actions_len OVS_UNUSED, const ovs_u128 *ufid,
+ struct offload_info *info,
struct dpif_flow_stats *stats)
{
struct netdev_dummy *dev = netdev_dummy_cast(netdev);
@@ -707,9 +707,10 @@ netdev_offload_dpdk_destroy_flow(struct netdev *netdev,
}
static int
-netdev_offload_dpdk_flow_put(struct netdev *netdev, struct match *match,
- struct nlattr *actions, size_t actions_len,
- const ovs_u128 *ufid, struct offload_info *info,
+netdev_offload_dpdk_flow_put(struct dpif *dpif OVS_UNUSED, struct netdev *netdev,
+ struct match *match, struct nlattr *actions,
+ size_t actions_len, const ovs_u128 *ufid,
+ struct offload_info *info,
struct dpif_flow_stats *stats)
{
struct rte_flow *rte_flow;
@@ -63,9 +63,10 @@ struct netdev_flow_api {
* 'stats' is populated according to the rules set out in the description
* above 'struct dpif_flow_put'.
* Return 0 if successful, otherwise returns a positive errno value. */
- int (*flow_put)(struct netdev *, struct match *, struct nlattr *actions,
- size_t actions_len, const ovs_u128 *ufid,
- struct offload_info *info, struct dpif_flow_stats *);
+ int (*flow_put)(struct dpif *, struct netdev *, struct match *,
+ struct nlattr *actions, size_t actions_len,
+ const ovs_u128 *ufid, struct offload_info *info,
+ struct dpif_flow_stats *);
/* Queries a flow specified by ufid on netdev.
* Fills output buffer as 'wbuffer' in flow_dump_next, which
@@ -1141,9 +1141,10 @@ flower_match_to_tun_opt(struct tc_flower *flower, const struct flow_tnl *tnl,
}
static int
-netdev_tc_flow_put(struct netdev *netdev, struct match *match,
- struct nlattr *actions, size_t actions_len,
- const ovs_u128 *ufid, struct offload_info *info,
+netdev_tc_flow_put(struct dpif *dpif OVS_UNUSED, struct netdev *netdev,
+ struct match *match, struct nlattr *actions,
+ size_t actions_len, const ovs_u128 *ufid,
+ struct offload_info *info,
struct dpif_flow_stats *stats)
{
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
@@ -226,17 +226,18 @@ netdev_flow_dump_next(struct netdev_flow_dump *dump, struct match *match,
}
int
-netdev_flow_put(struct netdev *netdev, struct match *match,
- struct nlattr *actions, size_t act_len,
- const ovs_u128 *ufid, struct offload_info *info,
+netdev_flow_put(struct dpif *dpif, struct netdev *netdev,
+ struct match *match, struct nlattr *actions,
+ size_t act_len, const ovs_u128 *ufid,
+ struct offload_info *info,
struct dpif_flow_stats *stats)
{
const struct netdev_flow_api *flow_api =
ovsrcu_get(const struct netdev_flow_api *, &netdev->flow_api);
return (flow_api && flow_api->flow_put)
- ? flow_api->flow_put(netdev, match, actions, act_len, ufid,
- info, stats)
+ ? flow_api->flow_put(dpif, netdev, match, actions,
+ act_len, ufid, info, stats)
: EOPNOTSUPP;
}
@@ -20,6 +20,7 @@
#include "openvswitch/netdev.h"
#include "openvswitch/types.h"
+#include "dpif-provider.h"
#include "packets.h"
#include "flow.h"
@@ -80,7 +81,8 @@ bool netdev_flow_dump_next(struct netdev_flow_dump *, struct match *,
struct nlattr **actions, struct dpif_flow_stats *,
struct dpif_flow_attrs *, ovs_u128 *ufid,
struct ofpbuf *rbuffer, struct ofpbuf *wbuffer);
-int netdev_flow_put(struct netdev *, struct match *, struct nlattr *actions,
+int netdev_flow_put(struct dpif *, struct netdev *,
+ struct match *, struct nlattr *actions,
size_t actions_len, const ovs_u128 *,
struct offload_info *, struct dpif_flow_stats *);
int netdev_flow_get(struct netdev *, struct match *, struct nlattr **actions,