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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user