- * -EOPNOTSUPP. RTNL lock must be held.
- */
-int vport_set_stats(struct vport *vport, struct rtnl_link_stats64 *stats)
-{
- ASSERT_RTNL();
-
- if (vport->ops->flags & VPORT_F_GEN_STATS) {
- spin_lock_bh(&vport->stats_lock);
- vport->offset_stats = *stats;
- spin_unlock_bh(&vport->stats_lock);
-
- return 0;
- } else
- return -EOPNOTSUPP;
-}
-
-/**
- * vport_get_name - retrieve device name
- *
- * @vport: vport from which to retrieve the name.
- *
- * Retrieves the name of the given device. Either RTNL lock or rcu_read_lock
- * must be held for the entire duration that the name is in use.
- */
-const char *vport_get_name(const struct vport *vport)
-{
- return vport->ops->get_name(vport);
-}
-
-/**
- * vport_get_type - retrieve device type
- *
- * @vport: vport from which to retrieve the type.
- *
- * Retrieves the type of the given device. Either RTNL lock or rcu_read_lock
- * must be held.
- */
-enum odp_vport_type vport_get_type(const struct vport *vport)
-{
- return vport->ops->type;
-}
-
-/**
- * vport_get_addr - retrieve device Ethernet address (for kernel callers)
- *
- * @vport: vport from which to retrieve the Ethernet address.
- *
- * Retrieves the Ethernet address of the given device. Either RTNL lock or
- * rcu_read_lock must be held for the entire duration that the Ethernet address
- * is in use.
- */
-const unsigned char *vport_get_addr(const struct vport *vport)
-{
- return vport->ops->get_addr(vport);
-}
-
-/**
- * vport_get_kobj - retrieve associated kobj
- *
- * @vport: vport from which to retrieve the associated kobj