summaryrefslogtreecommitdiff
path: root/lib/learning-switch.c
diff options
context:
space:
mode:
authorJesse Gross <jesse@kernel.org>2016-04-19 18:36:04 -0700
committerJesse Gross <jesse@kernel.org>2016-09-19 09:52:22 -0700
commit8d8ab6c2d5743eb229a5e7c27ccd963a2c103adb (patch)
treed198a78ddf968ab119e029ca998eba2337812cd8 /lib/learning-switch.c
parent56fb20c4a1622c0f19bd2865c6688bdc78d5b40f (diff)
downloadopenvswitch-8d8ab6c2d5743eb229a5e7c27ccd963a2c103adb.tar.gz
tun-metadata: Manage tunnel TLV mapping table on a per-bridge basis.
When using tunnel TLVs (at the moment, this means Geneve options), a controller must first map the class and type onto an appropriate OXM field so that it can be used in OVS flow operations. This table is managed using OpenFlow extensions. The original code that added support for TLVs made the mapping table global as a simplification. However, this is not really logically correct as the OpenFlow management commands are operating on a per-bridge basis. This removes the original limitation to make the table per-bridge. One nice result of this change is that it is generally clearer whether the tunnel metadata is in datapath or OpenFlow format. Rather than allowing ad-hoc format changes and trying to handle both formats in the tunnel metadata functions, the format is more clearly separated by function. Datapaths (both kernel and userspace) use datapath format and it is not changed during the upcall process. At the beginning of action translation, tunnel metadata is converted to OpenFlow format and flows and wildcards are translated back at the end of the process. As an additional benefit, this change improves performance in some flow setup situations by keeping the tunnel metadata in the original packet format in more cases. This helps when copies need to be made as the amount of data touched is only what is present in the packet rather than the maximum amount of metadata supported. Co-authored-by: Madhu Challa <challa@noironetworks.com> Signed-off-by: Madhu Challa <challa@noironetworks.com> Signed-off-by: Jesse Gross <jesse@kernel.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/learning-switch.c')
-rw-r--r--lib/learning-switch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/learning-switch.c b/lib/learning-switch.c
index 82609e80c..30aab1210 100644
--- a/lib/learning-switch.c
+++ b/lib/learning-switch.c
@@ -523,7 +523,8 @@ process_packet_in(struct lswitch *sw, const struct ofp_header *oh)
struct dp_packet pkt;
struct flow flow;
- error = ofputil_decode_packet_in(oh, true, &pi, NULL, &buffer_id, NULL);
+ error = ofputil_decode_packet_in(oh, true, NULL, &pi, NULL,
+ &buffer_id, NULL);
if (error) {
VLOG_WARN_RL(&rl, "failed to decode packet-in: %s",
ofperr_to_string(error));