mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
dpif: Add new dpif_port_exists() function.
Provide the ability to determine whether a port exists in a datapath without having to deal with a "dpif_port" structure as with dpif_port_query_by_name(). A future patch will use this function. Signed-off-by: Justin Pettit <jpettit@nicira.com>
This commit is contained in:
@@ -492,7 +492,7 @@ dpif_linux_port_query__(const struct dpif *dpif, uint32_t port_no,
|
||||
/* A query by name reported that 'port_name' is in some datapath
|
||||
* other than 'dpif', but the caller wants to know about 'dpif'. */
|
||||
error = ENODEV;
|
||||
} else {
|
||||
} else if (dpif_port) {
|
||||
dpif_port->name = xstrdup(reply.name);
|
||||
dpif_port->type = xstrdup(netdev_vport_get_netdev_type(&reply));
|
||||
dpif_port->port_no = reply.port_no;
|
||||
|
Reference in New Issue
Block a user