2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

odp-execute: Add set skb_mark, set_priority, tunnel support.

The motivation for this is to allow such actions to be honoured
if they are encountered; by the user-space datapath before recirculation;
or by internal processing of actions by ovs-vswitchd before recirculation.
Recirculation will be added by a subsequent patch.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Simon Horman
2013-06-05 14:28:49 +09:00
committed by Ben Pfaff
parent 617e10e71c
commit 6c13071b37
2 changed files with 28 additions and 6 deletions

View File

@@ -159,6 +159,10 @@ static void dp_netdev_execute_actions(struct dp_netdev *,
struct ofpbuf *, struct flow *,
const struct nlattr *actions,
size_t actions_len);
static void dp_netdev_port_input(struct dp_netdev *dp,
struct dp_netdev_port *port,
struct ofpbuf *packet, uint32_t skb_priority,
uint32_t skb_mark, const struct flow_tnl *tnl);
static struct dpif_netdev *
dpif_netdev_cast(const struct dpif *dpif)
@@ -1032,7 +1036,8 @@ dp_netdev_flow_used(struct dp_netdev_flow *flow, const struct ofpbuf *packet)
static void
dp_netdev_port_input(struct dp_netdev *dp, struct dp_netdev_port *port,
struct ofpbuf *packet)
struct ofpbuf *packet, uint32_t skb_priority,
uint32_t skb_mark, const struct flow_tnl *tnl)
{
struct dp_netdev_flow *flow;
struct flow key;
@@ -1040,7 +1045,7 @@ dp_netdev_port_input(struct dp_netdev *dp, struct dp_netdev_port *port,
if (packet->size < ETH_HEADER_LEN) {
return;
}
flow_extract(packet, 0, 0, NULL, port->port_no, &key);
flow_extract(packet, skb_priority, skb_mark, tnl, port->port_no, &key);
flow = dp_netdev_lookup_flow(dp, &key);
if (flow) {
dp_netdev_flow_used(flow, packet);
@@ -1071,7 +1076,7 @@ dpif_netdev_run(struct dpif *dpif)
error = port->rx ? netdev_rx_recv(port->rx, &packet) : EOPNOTSUPP;
if (!error) {
dp_netdev_port_input(dp, port, &packet);
dp_netdev_port_input(dp, port, &packet, 0, 0, NULL);
} else if (error != EAGAIN && error != EOPNOTSUPP) {
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
VLOG_ERR_RL(&rl, "error receiving data from %s: %s",