[ovs-dev] [PATCH v4 1/3] userspace: add support for pop_eth and push_eth actions
Thomas Graf
tgraf at noironetworks.com
Wed Jul 9 13:50:54 UTC 2014
On 06/27/14 at 04:21pm, Lorand Jakab wrote:
> diff --git a/lib/odp-execute.c b/lib/odp-execute.c
> index cb89e72..b5add78 100644
> --- a/lib/odp-execute.c
> +++ b/lib/odp-execute.c
> @@ -260,6 +260,25 @@ odp_execute_actions__(void *dp, struct dpif_packet **packets, int cnt,
> break;
> }
>
> + case OVS_ACTION_ATTR_PUSH_ETH: {
> + const struct ovs_action_push_eth *eth = nl_attr_get(a);
> +
> + for (i = 0; i < cnt; i++) {
> + struct ofpbuf *ofp = &packets[i]->ofpbuf;
> +
> + push_eth(ofp, eth->addresses.eth_dst, eth->addresses.eth_src,
> + eth->eth_type);
> + }
> + break;
> + }
> +
> + case OVS_ACTION_ATTR_POP_ETH: {
> + for (i = 0; i < cnt; i++) {
> + pop_eth(&packets[i]->ofpbuf);
> + }
> + break;
> + }
> +
> case OVS_ACTION_ATTR_PUSH_VLAN: {
> const struct ovs_action_push_vlan *vlan = nl_attr_get(a);
LGTM in general. You might want to fix up the indentation issues
above in your rebase.
More information about the dev
mailing list