]> git.proxmox.com Git - ovs.git/commitdiff
userspace: Complete Packet In handling
authorJan Scheurich <jan.scheurich@ericsson.com>
Fri, 23 Jun 2017 16:48:38 +0000 (16:48 +0000)
committerBen Pfaff <blp@ovn.org>
Tue, 27 Jun 2017 21:28:30 +0000 (17:28 -0400)
Send packet_in for non-Ethernet packets.
Include packet_type in Packet In for ptap bridges.

Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/flow.c
lib/ofp-print.c
ofproto/ofproto-dpif-xlate.c

index 6be645730f24fbb8c9147b9e84516e4a84372b8c..dbca4d03da3de60d33999bbfab6c195b9eb6e1aa 100644 (file)
@@ -994,6 +994,10 @@ flow_get_metadata(const struct flow *flow, struct match *flow_metadata)
     }
 
     match_set_in_port(flow_metadata, flow->in_port.ofp_port);
+    if (flow->packet_type != htonl(PT_ETH)) {
+        match_set_packet_type(flow_metadata, flow->packet_type);
+    }
+
     if (flow->ct_state != 0) {
         match_set_ct_state(flow_metadata, flow->ct_state);
         if (is_ct_valid(flow, NULL, NULL) && flow->ct_nw_proto != 0) {
index b1c412ea4c2176331f4753ce372a1bb15d53c619..8a6c54e1da0f4f3dc4c3d1d873b92e97f24a52af 100644 (file)
@@ -218,10 +218,9 @@ ofp_print_packet_in(struct ds *string, const struct ofp_header *oh,
     }
 
     if (verbosity > 0) {
-        /* Packet In can only carry Ethernet packets. */
-        char *packet = ofp_packet_to_string(public->packet,
-                                            public->packet_len,
-                                            htonl(PT_ETH));
+        char *packet = ofp_packet_to_string(
+            public->packet, public->packet_len,
+            public->flow_metadata.flow.packet_type);
         ds_put_cstr(string, packet);
         free(packet);
     }
index ce364b3618aae206296d650b8a35710e6be73976..1f4fe1dd6725a8315c922e6b9cd9236a684fc33d 100644 (file)
@@ -4259,11 +4259,6 @@ execute_controller_action(struct xlate_ctx *ctx, int len,
         return;
     }
 
-    if (packet->packet_type != htonl(PT_ETH)) {
-        dp_packet_delete(packet);
-        return;
-    }
-
     /* A packet sent by an action in a table-miss rule is considered an
      * explicit table miss.  OpenFlow before 1.3 doesn't have that concept so
      * it will get translated back to OFPR_ACTION for those versions. */