- ofpbuf_delete(buf); /* Pointers inside 'dp' are now invalid! */
-
- /* Look up local port. */
- dpif_linux_vport_init(&vport_request);
- vport_request.cmd = ODP_VPORT_CMD_GET;
- vport_request.dp_idx = dp.dp_idx;
- vport_request.port_no = ODPP_LOCAL;
- vport_request.name = dp_idx < 0 ? name : NULL;
- error = dpif_linux_vport_transact(&vport_request, &vport, &buf);
- if (error) {
- return error;
- } else if (vport.port_no != ODPP_LOCAL) {
- /* This is an Open vSwitch device but not the local port. We
- * intentionally support only using the name of the local port as the
- * name of a datapath; otherwise, it would be too difficult to
- * enumerate all the names of a datapath. */
- error = EOPNOTSUPP;
- } else {
- error = open_dpif(&dp, &vport, dpifp);
- }