Linux Kernel
3.7.1
|
#include <linux/list.h>
#include <linux/netlink.h>
#include <linux/openvswitch.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <linux/u64_stats_sync.h>
#include "datapath.h"
Go to the source code of this file.
Data Structures | |
struct | vport_percpu_stats |
struct | vport_err_stats |
struct | vport |
struct | vport_parms |
struct | vport_ops |
Functions | |
int | ovs_vport_init (void) |
void | ovs_vport_exit (void) |
struct vport * | ovs_vport_add (const struct vport_parms *) |
void | ovs_vport_del (struct vport *) |
struct vport * | ovs_vport_locate (struct net *net, const char *name) |
void | ovs_vport_get_stats (struct vport *, struct ovs_vport_stats *) |
int | ovs_vport_set_options (struct vport *, struct nlattr *options) |
int | ovs_vport_get_options (const struct vport *, struct sk_buff *) |
int | ovs_vport_send (struct vport *, struct sk_buff *) |
: New vport's name. | |
struct vport_parms - parameters for creating a new vport : New vport's type. : OVS_VPORT_ATTR_OPTIONS attribute from Netlink message, NULL if none was supplied. : New vport's datapath. : New vport's port number. | |
#define | VPORT_ALIGN 8 |
enum | vport_err_type { VPORT_E_RX_DROPPED, VPORT_E_RX_ERROR, VPORT_E_TX_DROPPED, VPORT_E_TX_ERROR } |
struct vport_ops | ovs_netdev_vport_ops |
struct vport_ops | ovs_internal_vport_ops |
struct vport * | ovs_vport_alloc (int priv_size, const struct vport_ops *, const struct vport_parms *) |
void | ovs_vport_free (struct vport *) |
void | ovs_vport_receive (struct vport *, struct sk_buff *) |
void | ovs_vport_record_error (struct vport *, enum vport_err_type err_type) |
enum vport_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 | ||
) |
Definition at line 234 of file vport-internal_dev.c.
Definition at line 191 of file vport-netdev.c.