mirror of
https://github.com/openvswitch/ovs
synced 2025-09-01 14:55:18 +00:00
netdev: Rename netdev->get_status() to netdev->get_drv_info().
get_status actually returns driver information, so get_drv_info() is better name. Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
This commit is contained in:
@@ -352,7 +352,7 @@ static const struct netdev_class dummy_class = {
|
||||
NULL, /* get_in6 */
|
||||
NULL, /* add_router */
|
||||
NULL, /* get_next_hop */
|
||||
NULL, /* get_status */
|
||||
NULL, /* get_drv_info */
|
||||
NULL, /* arp_lookup */
|
||||
|
||||
netdev_dummy_update_flags,
|
||||
|
@@ -2272,7 +2272,7 @@ netdev_linux_get_next_hop(const struct in_addr *host, struct in_addr *next_hop,
|
||||
}
|
||||
|
||||
static int
|
||||
netdev_linux_get_status(const struct netdev *netdev, struct shash *sh)
|
||||
netdev_linux_get_drv_info(const struct netdev *netdev, struct shash *sh)
|
||||
{
|
||||
int error;
|
||||
struct netdev_dev_linux *netdev_dev =
|
||||
@@ -2288,7 +2288,7 @@ netdev_linux_get_status(const struct netdev *netdev, struct shash *sh)
|
||||
}
|
||||
|
||||
static int
|
||||
netdev_internal_get_status(const struct netdev *netdev OVS_UNUSED, struct shash *sh)
|
||||
netdev_internal_get_drv_info(const struct netdev *netdev OVS_UNUSED, struct shash *sh)
|
||||
{
|
||||
shash_add(sh, "driver_name", xstrdup("openvswitch"));
|
||||
return 0;
|
||||
@@ -2448,7 +2448,7 @@ const struct netdev_class netdev_linux_class =
|
||||
netdev_linux_get_stats,
|
||||
NULL, /* set_stats */
|
||||
netdev_linux_get_features,
|
||||
netdev_linux_get_status);
|
||||
netdev_linux_get_drv_info);
|
||||
|
||||
const struct netdev_class netdev_tap_class =
|
||||
NETDEV_LINUX_CLASS(
|
||||
@@ -2457,7 +2457,7 @@ const struct netdev_class netdev_tap_class =
|
||||
netdev_tap_get_stats,
|
||||
NULL, /* set_stats */
|
||||
netdev_linux_get_features,
|
||||
netdev_linux_get_status);
|
||||
netdev_linux_get_drv_info);
|
||||
|
||||
const struct netdev_class netdev_internal_class =
|
||||
NETDEV_LINUX_CLASS(
|
||||
@@ -2466,7 +2466,7 @@ const struct netdev_class netdev_internal_class =
|
||||
netdev_internal_get_stats,
|
||||
netdev_vport_set_stats,
|
||||
NULL, /* get_features */
|
||||
netdev_internal_get_status);
|
||||
netdev_internal_get_drv_info);
|
||||
|
||||
/* HTB traffic control class. */
|
||||
|
||||
|
@@ -540,10 +540,10 @@ struct netdev_class {
|
||||
int (*get_next_hop)(const struct in_addr *host, struct in_addr *next_hop,
|
||||
char **netdev_name);
|
||||
|
||||
/* Retrieves the status of the device.
|
||||
/* Retrieves driver information of the device.
|
||||
*
|
||||
* Populates 'sh' with key-value pairs representing the status of the
|
||||
* device. A device's status is a set of key-value string pairs
|
||||
* device. Driver info is a set of key-value string pairs
|
||||
* representing netdev type specific information. For more information see
|
||||
* ovs-vswitchd.conf.db(5).
|
||||
*
|
||||
@@ -552,7 +552,7 @@ struct netdev_class {
|
||||
*
|
||||
* This function may be set to null if it would always return EOPNOTSUPP
|
||||
* anyhow. */
|
||||
int (*get_status)(const struct netdev *netdev, struct shash *sh);
|
||||
int (*get_drv_info)(const struct netdev *netdev, struct shash *sh);
|
||||
|
||||
/* Looks up the ARP table entry for 'ip' on 'netdev' and stores the
|
||||
* corresponding MAC address in 'mac'. A return value of ENXIO, in
|
||||
|
@@ -458,7 +458,7 @@ netdev_vport_set_stats(struct netdev *netdev, const struct netdev_stats *stats)
|
||||
}
|
||||
|
||||
static int
|
||||
netdev_vport_get_status(const struct netdev *netdev, struct shash *sh)
|
||||
netdev_vport_get_drv_info(const struct netdev *netdev, struct shash *sh)
|
||||
{
|
||||
const char *iface = netdev_vport_get_tnl_iface(netdev);
|
||||
|
||||
@@ -952,15 +952,15 @@ netdev_vport_register(void)
|
||||
{
|
||||
static const struct vport_class vport_classes[] = {
|
||||
{ OVS_VPORT_TYPE_GRE,
|
||||
{ "gre", VPORT_FUNCTIONS(netdev_vport_get_status) },
|
||||
{ "gre", VPORT_FUNCTIONS(netdev_vport_get_drv_info) },
|
||||
parse_tunnel_config, unparse_tunnel_config },
|
||||
|
||||
{ OVS_VPORT_TYPE_GRE,
|
||||
{ "ipsec_gre", VPORT_FUNCTIONS(netdev_vport_get_status) },
|
||||
{ "ipsec_gre", VPORT_FUNCTIONS(netdev_vport_get_drv_info) },
|
||||
parse_tunnel_config, unparse_tunnel_config },
|
||||
|
||||
{ OVS_VPORT_TYPE_CAPWAP,
|
||||
{ "capwap", VPORT_FUNCTIONS(netdev_vport_get_status) },
|
||||
{ "capwap", VPORT_FUNCTIONS(netdev_vport_get_drv_info) },
|
||||
parse_tunnel_config, unparse_tunnel_config },
|
||||
|
||||
{ OVS_VPORT_TYPE_PATCH,
|
||||
|
@@ -765,12 +765,12 @@ netdev_get_next_hop(const struct netdev *netdev,
|
||||
* may be used to populate the status column of the Interface table as defined
|
||||
* in ovs-vswitchd.conf.db(5). */
|
||||
int
|
||||
netdev_get_status(const struct netdev *netdev, struct shash *sh)
|
||||
netdev_get_drv_info(const struct netdev *netdev, struct shash *sh)
|
||||
{
|
||||
struct netdev_dev *dev = netdev_get_dev(netdev);
|
||||
|
||||
return (dev->netdev_class->get_status
|
||||
? dev->netdev_class->get_status(netdev, sh)
|
||||
return (dev->netdev_class->get_drv_info
|
||||
? dev->netdev_class->get_drv_info(netdev, sh)
|
||||
: EOPNOTSUPP);
|
||||
}
|
||||
|
||||
|
@@ -159,7 +159,7 @@ int netdev_get_in6(const struct netdev *, struct in6_addr *);
|
||||
int netdev_add_router(struct netdev *, struct in_addr router);
|
||||
int netdev_get_next_hop(const struct netdev *, const struct in_addr *host,
|
||||
struct in_addr *next_hop, char **);
|
||||
int netdev_get_status(const struct netdev *, struct shash *sh);
|
||||
int netdev_get_drv_info(const struct netdev *, struct shash *sh);
|
||||
int netdev_arp_lookup(const struct netdev *, ovs_be32 ip, uint8_t mac[6]);
|
||||
|
||||
int netdev_get_flags(const struct netdev *, enum netdev_flags *);
|
||||
|
@@ -1496,7 +1496,7 @@ iface_refresh_status(struct iface *iface)
|
||||
|
||||
shash_init(&sh);
|
||||
|
||||
if (!netdev_get_status(iface->netdev, &sh)) {
|
||||
if (!netdev_get_drv_info(iface->netdev, &sh)) {
|
||||
size_t n;
|
||||
char **keys, **values;
|
||||
|
||||
|
Reference in New Issue
Block a user