git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sFlow: Genericize/simplify kernel sFlow implementation
[sliver-openvswitch.git]
/
lib
/
dpif-netdev.c
diff --git
a/lib/dpif-netdev.c
b/lib/dpif-netdev.c
index
5b91b7f
..
926464e
100644
(file)
--- a/
lib/dpif-netdev.c
+++ b/
lib/dpif-netdev.c
@@
-336,7
+336,7
@@
do_add_port(struct dp_netdev *dp, const char *devname, const char *type,
int error;
/* XXX reject devices already in some dp_netdev. */
int error;
/* XXX reject devices already in some dp_netdev. */
- if (type[0] == '\0' || !strcmp(type, "system")) {
+ if (type[0] == '\0' || !strcmp(type, "system")
|| !strcmp(type, "dummy")
) {
internal = false;
} else if (!strcmp(type, "internal")) {
internal = true;
internal = false;
} else if (!strcmp(type, "internal")) {
internal = true;
@@
-378,8
+378,8
@@
do_add_port(struct dp_netdev *dp, const char *devname, const char *type,
port->netdev = netdev;
port->internal = internal;
port->netdev = netdev;
port->internal = internal;
- netdev_get_mtu(netdev, &mtu);
- if (
mtu != INT_MAX && mtu > max_mtu
) {
+
error =
netdev_get_mtu(netdev, &mtu);
+ if (
!error
) {
max_mtu = mtu;
}
max_mtu = mtu;
}
@@
-718,7
+718,7
@@
dpif_netdev_validate_actions(const struct nlattr *actions,
case OVS_ACTION_ATTR_USERSPACE:
break;
case OVS_ACTION_ATTR_USERSPACE:
break;
- case OVS_ACTION_ATTR_
SET_DL_TCI
:
+ case OVS_ACTION_ATTR_
PUSH_VLAN
:
*mutates = true;
if (nl_attr_get_be16(a) & htons(VLAN_CFI)) {
return EINVAL;
*mutates = true;
if (nl_attr_get_be16(a) & htons(VLAN_CFI)) {
return EINVAL;
@@
-732,7
+732,7
@@
dpif_netdev_validate_actions(const struct nlattr *actions,
}
break;
}
break;
- case OVS_ACTION_ATTR_
STRI
P_VLAN:
+ case OVS_ACTION_ATTR_
PO
P_VLAN:
case OVS_ACTION_ATTR_SET_DL_SRC:
case OVS_ACTION_ATTR_SET_DL_DST:
case OVS_ACTION_ATTR_SET_NW_SRC:
case OVS_ACTION_ATTR_SET_DL_SRC:
case OVS_ACTION_ATTR_SET_DL_DST:
case OVS_ACTION_ATTR_SET_NW_SRC:
@@
-1142,7
+1142,7
@@
dpif_netdev_wait(struct dpif *dpif)
}
static void
}
static void
-dp_netdev_
stri
p_vlan(struct ofpbuf *packet)
+dp_netdev_
po
p_vlan(struct ofpbuf *packet)
{
struct vlan_eth_header *veh = packet->l2;
if (packet->size >= sizeof *veh
{
struct vlan_eth_header *veh = packet->l2;
if (packet->size >= sizeof *veh
@@
-1314,12
+1314,12
@@
dp_netdev_execute_actions(struct dp_netdev *dp,
key, nl_attr_get_u64(a));
break;
key, nl_attr_get_u64(a));
break;
- case OVS_ACTION_ATTR_
SET_DL_TCI
:
- eth_
set_vlan_tci
(packet, nl_attr_get_be16(a));
+ case OVS_ACTION_ATTR_
PUSH_VLAN
:
+ eth_
push_vlan
(packet, nl_attr_get_be16(a));
break;
break;
- case OVS_ACTION_ATTR_
STRI
P_VLAN:
- dp_netdev_
stri
p_vlan(packet);
+ case OVS_ACTION_ATTR_
PO
P_VLAN:
+ dp_netdev_
po
p_vlan(packet);
break;
case OVS_ACTION_ATTR_SET_DL_SRC:
break;
case OVS_ACTION_ATTR_SET_DL_SRC:
@@
-1379,8
+1379,6
@@
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 */
NULL, /* queue_to_priority */
dpif_netdev_recv,
dpif_netdev_recv_wait,
NULL, /* queue_to_priority */
dpif_netdev_recv,
dpif_netdev_recv_wait,