diff options
author | Ben Pfaff <blp@nicira.com> | 2011-09-08 16:30:20 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-09-08 16:30:20 -0700 |
commit | 18886b60bc7face9e08bc7ef06da365ee5c39e0a (patch) | |
tree | afa53c577dde76aaffb160626787ee0c1785d9b9 /datapath/flow.h | |
parent | 0fe255dfbf37fa7ddc23c2593c512c092b0f61d7 (diff) |
datapath: Allow a packet with no input port to omit OVS_KEY_ATTR_IN_PORT.
When ovs-vswitchd executes actions on a synthesized packet, that is, on a
packet that is not being forwarded from any particular port but is being
generated by ovs-vswitchd itself or by an OpenFlow controller (using a
OFPT_PACKET_OUT message with an in_port of OFPP_NONE), there is no good
choice for the in_port to pass to the kernel in the flow in the
OVS_PACKET_CMD_EXECUTE message. This commit allows ovs-vswitchd to omit
the in_port entirely in this case.
This fixes a bug in OFPT_PACKET_OUT: using an in_port of OFPP_NONE would
cause the packet to be dropped by the kernel, since that's an invalid
input port.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Reported-by: Aaron Rosen <arosen@clemson.edu>
Diffstat (limited to 'datapath/flow.h')
-rw-r--r-- | datapath/flow.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/datapath/flow.h b/datapath/flow.h index 997692c5..c7a022c9 100644 --- a/datapath/flow.h +++ b/datapath/flow.h @@ -33,7 +33,7 @@ struct sw_flow_actions { struct sw_flow_key { struct { __be64 tun_id; /* Encapsulating tunnel ID. */ - u16 in_port; /* Input switch port. */ + u16 in_port; /* Input switch port (or USHRT_MAX). */ u8 src[ETH_ALEN]; /* Ethernet source address. */ u8 dst[ETH_ALEN]; /* Ethernet destination address. */ __be16 tci; /* 0 if no VLAN, VLAN_TAG_PRESENT set otherwise. */ |