7#ifndef NETLINK_LINK_SRIOV_H_
8#define NETLINK_LINK_SRIOV_H_
10#include <netlink/netlink.h>
11#include <netlink/route/link.h>
17#define RTNL_VF_GUID_STR_LEN 23
26 __RTNL_LINK_VF_RATE_API_MAX,
29#define RTNL_LINK_VF_RATE_API_MAX (__RTNL_LINK_VF_RATE_API_MAX - 1)
41 __RTNL_LINK_VF_STATS_MAX,
44#define RTNL_LINK_VF_STATS_MAX (__RTNL_LINK_VF_STATS_MAX - 1)
127extern char *rtnl_link_vf_linkstate2str(uint32_t,
char *,
size_t);
128extern int rtnl_link_vf_str2linkstate(
const char *);
130extern char *rtnl_link_vf_vlanproto2str(uint16_t,
char *,
size_t);
131extern int rtnl_link_vf_str2vlanproto(
const char *);
133extern int rtnl_link_vf_str2guid(uint64_t *,
const char *);
int rtnl_link_vf_get_rss_query_en(struct rtnl_link_vf *, uint32_t *)
Get RSS Query EN value of SRIOV Virtual Function.
int rtnl_link_vf_get_index(struct rtnl_link_vf *, uint32_t *)
Get index of SRIOV Virtual Function.
void rtnl_link_vf_set_addr(struct rtnl_link_vf *, struct nl_addr *)
Set link layer address of SRIOV Virtual Function object.
void rtnl_link_vf_set_vlans(struct rtnl_link_vf *, nl_vf_vlans_t *)
Add a SRIOV VF VLANs object to the SRIOV Virtual Function Object.
int rtnl_link_vf_vlan_alloc(nl_vf_vlans_t **, int)
Allocate a SRIOV VF VLAN object.
void rtnl_link_vf_put(struct rtnl_link_vf *)
Return SRIOV VF object to the owning link object.
struct rtnl_link_vf * rtnl_link_vf_get(struct rtnl_link *, uint32_t)
Lookup SRIOV VF in link object by VF index.
struct nl_vf_vlan_info nl_vf_vlan_info_t
SRIOV VF VFLAN settings.
void rtnl_link_vf_set_ib_node_guid(struct rtnl_link_vf *, uint64_t)
Set the Infiniband node GUID for the SRIOV Virtual Function object.
void rtnl_link_vf_set_trust(struct rtnl_link_vf *, uint32_t)
Set user trust setting on SRIOV Virtual Function Object.
int rtnl_link_vf_get_addr(struct rtnl_link_vf *, struct nl_addr **)
Get link layer address of SRIOV Virtual Function.
void rtnl_link_vf_set_ib_port_guid(struct rtnl_link_vf *, uint64_t)
Set the Infiniband port GUID for the SRIOV Virtual Function object.
void rtnl_link_vf_set_rate(struct rtnl_link_vf *, struct nl_vf_rate *)
Set TX Rate Limit of SRIOV Virtual Function object.
void rtnl_link_vf_set_linkstate(struct rtnl_link_vf *, uint32_t)
Set link state of SRIOV Virtual Function object.
void rtnl_link_vf_set_rss_query_en(struct rtnl_link_vf *, uint32_t)
Set RSS configuration querying of SRIOV Virtual Function Object.
int rtnl_link_vf_get_vlans(struct rtnl_link_vf *, nl_vf_vlans_t **)
Get an array of VLANS on SRIOV Virtual Function.
int rtnl_link_vf_get_stat(struct rtnl_link_vf *, rtnl_link_vf_stats_t, uint64_t *)
Get value of stat counter for SRIOV Virtual Function.
struct nl_vf_vlans nl_vf_vlans_t
SRIOV VF VLANs information.
void rtnl_link_vf_vlan_put(nl_vf_vlans_t *)
Return SRIOV VF VLANs object to the owning SRIOV VF object.
void rtnl_link_vf_set_spoofchk(struct rtnl_link_vf *, uint32_t)
Set spoof checking value of SRIOV Virtual Function Object.
int rtnl_link_vf_get_trust(struct rtnl_link_vf *, uint32_t *)
Get trust setting of SRIOV Virtual Function.
void rtnl_link_vf_free(struct rtnl_link_vf *)
Free SRIOV VF object.
struct rtnl_link_vf * rtnl_link_vf_alloc(void)
Allocate a new SRIOV VF object.
int rtnl_link_vf_get_spoofchk(struct rtnl_link_vf *, uint32_t *)
Get spoof checking value of SRIOV Virtual Function.
void rtnl_link_vf_set_index(struct rtnl_link_vf *, uint32_t)
Set index of SRIOV Virtual Function object.
void rtnl_link_vf_vlan_free(nl_vf_vlans_t *vf_vlans)
Free an allocated SRIOV VF VLANs object.
int rtnl_link_vf_get_linkstate(struct rtnl_link_vf *, uint32_t *)
Get link state of SRIOV Virtual Function.
int rtnl_link_vf_get_rate(struct rtnl_link_vf *, struct nl_vf_rate *)
Get TX Rate Limit of SRIOV Virtual Function.
int rtnl_link_vf_add(struct rtnl_link *, struct rtnl_link_vf *)
Add a SRIOV VF object to a link object.
@ RTNL_LINK_VF_STATS_TX_BYTES
@ RTNL_LINK_VF_STATS_BROADCAST
@ RTNL_LINK_VF_STATS_RX_PACKETS
@ RTNL_LINK_VF_STATS_MULTICAST
@ RTNL_LINK_VF_STATS_RX_BYTES
@ RTNL_LINK_VF_STATS_TX_PACKETS
@ RTNL_LINK_VF_RATE_API_UNSPEC
@ RTNL_LINK_VF_RATE_API_NEW
@ RTNL_LINK_VF_RATE_API_OLD
VF Rate information structure.
SRIOV VF VLANs information.
nl_vf_vlan_info_t * vlans