2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

netdev: Send ofpbuf directly to netdev.

DPDK netdev need to access ofpbuf while sending buffer. Following
patch changes netdev_send accordingly.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Thomas Graf <tgraf@redhat.com>
This commit is contained in:
Pravin
2014-03-20 10:56:51 -07:00
committed by Pravin B Shelar
parent df1e5a3bc7
commit 40d26f04b2
7 changed files with 37 additions and 18 deletions

View File

@@ -1937,7 +1937,7 @@ dp_execute_cb(void *aux_, struct ofpbuf *packet,
case OVS_ACTION_ATTR_OUTPUT:
p = dp_netdev_lookup_port(aux->dp, u32_to_odp(nl_attr_get_u32(a)));
if (p) {
netdev_send(p->netdev, packet);
netdev_send(p->netdev, packet, may_steal);
}
break;
@@ -1951,6 +1951,10 @@ dp_execute_cb(void *aux_, struct ofpbuf *packet,
% aux->dp->n_handlers,
DPIF_UC_ACTION, aux->key,
userdata);
if (may_steal) {
ofpbuf_delete(packet);
}
break;
}
case OVS_ACTION_ATTR_PUSH_VLAN:
@@ -1964,9 +1968,6 @@ dp_execute_cb(void *aux_, struct ofpbuf *packet,
OVS_NOT_REACHED();
}
if (may_steal) {
ofpbuf_delete(packet);
}
}
static void