mirror of
https://github.com/openvswitch/ovs
synced 2025-09-05 08:45:23 +00:00
datapath: Drop datapath index and port number from Ethtool output.
I introduced this a long time ago as an efficient way for userspace to find out whether and where an internal device was attached, but I've always considered it an ugly kluge. Now that ODP_VPORT_QUERY can fetch a vport's info regardless of datapath, it is no longer necessary. This commit stops using Ethtool for this purpose and drops the feature. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "coverage.h"
|
||||
#include "dpif-linux.h"
|
||||
#include "dynamic-string.h"
|
||||
#include "fatal-signal.h"
|
||||
#include "hash.h"
|
||||
@@ -1105,22 +1106,8 @@ netdev_linux_update_is_pseudo(struct netdev_dev_linux *netdev_dev)
|
||||
const char *type = netdev_dev_get_type(&netdev_dev->netdev_dev);
|
||||
|
||||
netdev_dev->is_tap = !strcmp(type, "tap");
|
||||
netdev_dev->is_internal = false;
|
||||
if (!netdev_dev->is_tap) {
|
||||
struct ethtool_drvinfo drvinfo;
|
||||
int error;
|
||||
|
||||
memset(&drvinfo, 0, sizeof drvinfo);
|
||||
error = netdev_linux_do_ethtool(name,
|
||||
(struct ethtool_cmd *)&drvinfo,
|
||||
ETHTOOL_GDRVINFO,
|
||||
"ETHTOOL_GDRVINFO");
|
||||
|
||||
if (!error && !strcmp(drvinfo.driver, "openvswitch")) {
|
||||
netdev_dev->is_internal = true;
|
||||
}
|
||||
}
|
||||
|
||||
netdev_dev->is_internal = (!netdev_dev->is_tap
|
||||
&& dpif_linux_is_internal_device(name));
|
||||
netdev_dev->cache_valid |= VALID_IS_PSEUDO;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user