2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

netdev-tc-offloads: Add offloading of multiple outputs

Currently, we support offloading of one output port. Remove that
limitation by use of mirred mirror action for all output ports,
except that the last one is mirred redirect action.

Signed-off-by: Chris Mi <chrism@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
This commit is contained in:
Chris Mi
2018-04-10 14:18:09 +09:00
committed by Simon Horman
parent 0c70132cd2
commit 00a0a011d3
2 changed files with 12 additions and 13 deletions

View File

@@ -2081,7 +2081,6 @@ parse_flow_put(struct dpif_netlink *dpif, struct dpif_flow_put *put)
odp_port_t in_port;
const struct nlattr *nla;
size_t left;
int outputs = 0;
struct netdev *dev;
struct offload_info info;
ovs_be16 dst_port = 0;
@@ -2108,20 +2107,13 @@ parse_flow_put(struct dpif_netlink *dpif, struct dpif_flow_put *put)
return EOPNOTSUPP;
}
/* Get tunnel dst port and count outputs */
/* Get tunnel dst port */
NL_ATTR_FOR_EACH(nla, left, put->actions, put->actions_len) {
if (nl_attr_type(nla) == OVS_ACTION_ATTR_OUTPUT) {
const struct netdev_tunnel_config *tnl_cfg;
struct netdev *outdev;
odp_port_t out_port;
outputs++;
if (outputs > 1) {
VLOG_DBG_RL(&rl, "offloading multiple ports isn't supported");
err = EOPNOTSUPP;
goto out;
}
out_port = nl_attr_get_odp_port(nla);
outdev = netdev_ports_get(out_port, dpif_class);
if (!outdev) {