2
0
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:
Justin Pettit
2012-10-17 23:11:53 -07:00
parent 11a574a737
commit 4afba28d55
5 changed files with 24 additions and 7 deletions

View File

@@ -522,7 +522,7 @@ dpif_netdev_port_query_by_number(const struct dpif *dpif, uint32_t port_no,
int error;
error = get_port_by_number(dp, port_no, &port);
if (!error) {
if (!error && dpif_port) {
answer_port_query(port, dpif_port);
}
return error;
@@ -537,7 +537,7 @@ dpif_netdev_port_query_by_name(const struct dpif *dpif, const char *devname,
int error;
error = get_port_by_name(dp, devname, &port);
if (!error) {
if (!error && dpif_port) {
answer_port_query(port, dpif_port);
}
return error;