pin.packet = packet->data;
pin.packet_len = packet->size;
- pin.total_len = packet->size;
pin.reason = OFPR_NO_MATCH;
pin.controller_id = 0;
pin.table_id = 0;
pin.cookie = 0;
- pin.buffer_id = 0; /* not yet known */
pin.send_len = 0; /* not used for flow table misses */
flow_get_metadata(flow, &pin.fmd);
/* Registers aren't meaningful on a miss. */
memset(pin.fmd.reg_masks, 0, sizeof pin.fmd.reg_masks);
- connmgr_send_packet_in(ofproto->up.connmgr, &pin, flow);
+ connmgr_send_packet_in(ofproto->up.connmgr, &pin);
}
static bool
pin.table_id = ctx->table_id;
pin.cookie = ctx->rule ? ctx->rule->up.flow_cookie : 0;
- pin.buffer_id = 0;
pin.send_len = len;
- pin.total_len = packet->size;
flow_get_metadata(&ctx->flow, &pin.fmd);
- connmgr_send_packet_in(ctx->ofproto->up.connmgr, &pin, &ctx->flow);
+ connmgr_send_packet_in(ctx->ofproto->up.connmgr, &pin);
ofpbuf_delete(packet);
}
return hash_2words(realdev_ofp_port, vid);
}
+/* Returns the ODP port number of the Linux VLAN device that corresponds to
+ * 'vlan_tci' on the network device with port number 'realdev_odp_port' in
+ * 'ofproto'. For example, given 'realdev_odp_port' of eth0 and 'vlan_tci' 9,
+ * it would return the port number of eth0.9.
+ *
+ * Unless VLAN splinters are enabled for port 'realdev_odp_port', this
+ * function just returns its 'realdev_odp_port' argument. */
static uint32_t
vsp_realdev_to_vlandev(const struct ofproto_dpif *ofproto,
uint32_t realdev_odp_port, ovs_be16 vlan_tci)
return NULL;
}
+/* Returns the OpenFlow port number of the "real" device underlying the Linux
+ * VLAN device with OpenFlow port number 'vlandev_ofp_port' and stores the
+ * VLAN VID of the Linux VLAN device in '*vid'. For example, given
+ * 'vlandev_ofp_port' of eth0.9, it would return the OpenFlow port number of
+ * eth0 and store 9 in '*vid'.
+ *
+ * Returns 0 and does not modify '*vid' if 'vlandev_ofp_port' is not a Linux
+ * VLAN device. Unless VLAN splinters are enabled, this is what this function
+ * always does.*/
static uint16_t
vsp_vlandev_to_realdev(const struct ofproto_dpif *ofproto,
- uint16_t vlandev_ofp_port, int *vid)
+ uint16_t vlandev_ofp_port, int *vid)
{
if (!hmap_is_empty(&ofproto->vlandev_map)) {
const struct vlan_splinter *vsp;