|
Linux Kernel
3.7.1
|
#include <linux/etherdevice.h>#include <linux/if.h>#include <linux/if_vlan.h>#include <linux/jhash.h>#include <linux/kernel.h>#include <linux/list.h>#include <linux/mutex.h>#include <linux/percpu.h>#include <linux/rcupdate.h>#include <linux/rtnetlink.h>#include <linux/compat.h>#include <net/net_namespace.h>#include "datapath.h"#include "vport.h"#include "vport-internal_dev.h"Go to the source code of this file.
Macros | |
| #define | VPORT_HASH_BUCKETS 1024 |
Functions | |
| int | ovs_vport_init (void) |
| void | ovs_vport_exit (void) |
: name of port to find | |
ovs_vport_locate - find a port that has already been created Must be called with RTNL or RCU read lock. | |
| struct vport * | ovs_vport_locate (struct net *net, const char *name) |
| struct vport * | ovs_vport_alloc (int priv_size, const struct vport_ops *ops, const struct vport_parms *parms) |
| void | ovs_vport_free (struct vport *vport) |
| struct vport * | ovs_vport_add (const struct vport_parms *parms) |
| int | ovs_vport_set_options (struct vport *vport, struct nlattr *options) |
| void | ovs_vport_del (struct vport *vport) |
| void | ovs_vport_get_stats (struct vport *vport, struct ovs_vport_stats *stats) |
| int | ovs_vport_get_options (const struct vport *vport, struct sk_buff *skb) |
| void | ovs_vport_receive (struct vport *vport, struct sk_buff *skb) |
| int | ovs_vport_send (struct vport *vport, struct sk_buff *skb) |
| void | ovs_vport_record_error (struct vport *vport, enum vport_err_type err_type) |
|
read |
|
read |
ovs_vport_alloc - allocate and initialize new vport
: Size of private data area to allocate. : vport device ops
Allocate and initialize a new vport defined by . The vport will contain a private data area of size that can be accessed using vport_priv(). vports that are no longer needed should be released with vport_free().
ovs_vport_get_options - retrieve device options
: vport from which to retrieve the options. : sk_buff where options should be appended.
Retrieves the configuration of the given device, appending an OVS_VPORT_ATTR_OPTIONS attribute that in turn contains nested vport-specific attributes to .
Returns 0 if successful, -EMSGSIZE if has insufficient room, or another negative error code if a real error occurred. If an error occurs, is left unmodified.
Must be called with RTNL lock or rcu_read_lock.
| void ovs_vport_get_stats | ( | struct vport * | vport, |
| struct ovs_vport_stats * | stats | ||
| ) |
ovs_vport_receive - pass up received packet to the datapath for processing
: vport that received the packet : skb that was received
Must be called with rcu_read_lock. The packet cannot be shared and skb->data should point to the Ethernet header. The caller must have already called compute_ip_summed() to initialize the checksumming fields.
| void ovs_vport_record_error | ( | struct vport * | vport, |
| enum vport_err_type | err_type | ||
| ) |
1.8.2