mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
tunneling: Add support for tunnel ID.
Add a tun_id field which contains the ID of the encapsulating tunnel on which a packet was received (0 if not received on a tunnel). Also add an action which allows the tunnel ID to be set for outgoing packets. At this point there aren't any tunnel implementations so these fields don't have any effect. The matching is exposed to OpenFlow by overloading the high 32 bits of the cookie as the tunnel ID. ovs-ofctl is capable of turning on this special behavior using a new "tun-cookie" command but this command is intentially undocumented to avoid it being used without a full understanding of the consequences.
This commit is contained in:
@@ -932,7 +932,7 @@ dpif_netdev_execute(struct dpif *dpif, uint16_t in_port,
|
||||
* if we don't. */
|
||||
copy = *packet;
|
||||
}
|
||||
flow_extract(©, in_port, &flow);
|
||||
flow_extract(©, 0, in_port, &flow);
|
||||
error = dp_netdev_execute_actions(dp, ©, &flow, actions, n_actions);
|
||||
if (mutates) {
|
||||
ofpbuf_uninit(©);
|
||||
@@ -1026,7 +1026,7 @@ dp_netdev_port_input(struct dp_netdev *dp, struct dp_netdev_port *port,
|
||||
struct dp_netdev_flow *flow;
|
||||
flow_t key;
|
||||
|
||||
if (flow_extract(packet, port->port_no, &key) && dp->drop_frags) {
|
||||
if (flow_extract(packet, 0, port->port_no, &key) && dp->drop_frags) {
|
||||
dp->n_frags++;
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user