projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
xenserver: Fix VIF script to work with XenServer 5.5
[openvswitch]
/
lib
/
dpif-netdev.c
diff --git
a/lib/dpif-netdev.c
b/lib/dpif-netdev.c
index c4b5a9949fbb5561fd880d93f5b694b9307df210..1bd811255019d9e92b684ecde001cd4622f8b361 100644
(file)
--- a/
lib/dpif-netdev.c
+++ b/
lib/dpif-netdev.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009
, 2010
Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-22,8
+22,8
@@
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
-#include <net/if.h>
#include <netinet/in.h>
#include <netinet/in.h>
+#include <net/if.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
@@
-245,7
+245,7
@@
create_dp_netdev(const char *name, int dp_idx, struct dpif **dpifp)
}
static int
}
static int
-dpif_netdev_open(const char *name UNUSED, char *suffix, bool create,
+dpif_netdev_open(const char *name
OVS_
UNUSED, char *suffix, bool create,
struct dpif **dpifp)
{
if (create) {
struct dpif **dpifp)
{
if (create) {
@@
-583,7
+583,7
@@
dpif_netdev_port_list(const struct dpif *dpif, struct odp_port *ports, int n)
}
static int
}
static int
-dpif_netdev_port_poll(const struct dpif *dpif_, char **devnamep UNUSED)
+dpif_netdev_port_poll(const struct dpif *dpif_, char **devnamep
OVS_
UNUSED)
{
struct dpif_netdev *dpif = dpif_netdev_cast(dpif_);
if (dpif->dp_serial != dpif->dp->serial) {
{
struct dpif_netdev *dpif = dpif_netdev_cast(dpif_);
if (dpif->dp_serial != dpif->dp->serial) {
@@
-752,7
+752,7
@@
dpif_netdev_validate_actions(const union odp_action *actions, int n_actions,
case ODPAT_SET_VLAN_PCP:
*mutates = true;
case ODPAT_SET_VLAN_PCP:
*mutates = true;
- if (a->vlan_pcp.vlan_pcp & ~
VLAN_PCP_MASK
) {
+ if (a->vlan_pcp.vlan_pcp & ~
(VLAN_PCP_MASK >> VLAN_PCP_SHIFT)
) {
return EINVAL;
}
break;
return EINVAL;
}
break;
@@
-1273,8
+1273,9
@@
dp_netdev_execute_actions(struct dp_netdev *dp,
break;
case ODPAT_SET_VLAN_PCP:
break;
case ODPAT_SET_VLAN_PCP:
- dp_netdev_modify_vlan_tci(packet, key, a->vlan_pcp.vlan_pcp << 13,
- VLAN_PCP_MASK);
+ dp_netdev_modify_vlan_tci(
+ packet, key, a->vlan_pcp.vlan_pcp << VLAN_PCP_SHIFT,
+ VLAN_PCP_MASK);
break;
case ODPAT_STRIP_VLAN:
break;
case ODPAT_STRIP_VLAN:
@@
-1333,6
+1334,8
@@
const struct dpif_class dpif_netdev_class = {
dpif_netdev_execute,
dpif_netdev_recv_get_mask,
dpif_netdev_recv_set_mask,
dpif_netdev_execute,
dpif_netdev_recv_get_mask,
dpif_netdev_recv_set_mask,
+ NULL, /* get_sflow_probability */
+ NULL, /* set_sflow_probability */
dpif_netdev_recv,
dpif_netdev_recv_wait,
};
dpif_netdev_recv,
dpif_netdev_recv_wait,
};