diff options
author | pravin shelar <pshelar@nicira.com> | 2011-07-28 09:05:25 -0700 |
---|---|---|
committer | pravin shelar <pshelar@nicira.com> | 2011-07-28 09:05:25 -0700 |
commit | b85d8d61a6c3b9c2fa578fa62c795a93544764af (patch) | |
tree | 5b9d8259b78753e39590b63bc8cdbd81c4163325 /datapath | |
parent | 79b8c1edcb52286c8f62e0f7350b1817f82815ac (diff) | |
download | openvswitch-b85d8d61a6c3b9c2fa578fa62c795a93544764af.tar.gz |
Datapath action should not refer to controller
ODP_ACTION_ATTR_CONTROLLER in the kernel actually sends packets to
userspace, not the controller. To make it generic rename this action
to ODP_ACTION_ATTR_USERSPACE.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'datapath')
-rw-r--r-- | datapath/actions.c | 6 | ||||
-rw-r--r-- | datapath/datapath.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/datapath/actions.c b/datapath/actions.c index ed61039a0..78712c6a9 100644 --- a/datapath/actions.c +++ b/datapath/actions.c @@ -218,7 +218,7 @@ error: kfree_skb(skb); } -static int output_control(struct datapath *dp, struct sk_buff *skb, u64 arg) +static int output_userspace(struct datapath *dp, struct sk_buff *skb, u64 arg) { struct dp_upcall_info upcall; @@ -262,8 +262,8 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff *skb, prev_port = nla_get_u32(a); break; - case ODP_ACTION_ATTR_CONTROLLER: - err = output_control(dp, skb, nla_get_u64(a)); + case ODP_ACTION_ATTR_USERSPACE: + err = output_userspace(dp, skb, nla_get_u64(a)); break; case ODP_ACTION_ATTR_SET_TUNNEL: diff --git a/datapath/datapath.c b/datapath/datapath.c index d14934457..a964c27f4 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -84,7 +84,7 @@ EXPORT_SYMBOL(dp_ioctl_hook); static LIST_HEAD(dps); static struct vport *new_vport(const struct vport_parms *); -static int queue_control_packets(struct datapath *, struct sk_buff *, +static int queue_userspace_packets(struct datapath *, struct sk_buff *, const struct dp_upcall_info *); /* Must be called with rcu_read_lock, genl_mutex, or RTNL lock. */ @@ -415,7 +415,7 @@ int dp_upcall(struct datapath *dp, struct sk_buff *skb, const struct dp_upcall_i skb = nskb; } - err = queue_control_packets(dp, skb, upcall_info); + err = queue_userspace_packets(dp, skb, upcall_info); if (err) goto err; @@ -438,7 +438,7 @@ err: * 'upcall_info'. There will be only one packet unless we broke up a GSO * packet. */ -static int queue_control_packets(struct datapath *dp, struct sk_buff *skb, +static int queue_userspace_packets(struct datapath *dp, struct sk_buff *skb, const struct dp_upcall_info *upcall_info) { u32 group = packet_mc_group(dp, upcall_info->cmd); @@ -552,7 +552,7 @@ static int validate_actions(const struct nlattr *attr) nla_for_each_nested(a, attr, rem) { static const u32 action_lens[ODP_ACTION_ATTR_MAX + 1] = { [ODP_ACTION_ATTR_OUTPUT] = 4, - [ODP_ACTION_ATTR_CONTROLLER] = 8, + [ODP_ACTION_ATTR_USERSPACE] = 8, [ODP_ACTION_ATTR_SET_DL_TCI] = 2, [ODP_ACTION_ATTR_STRIP_VLAN] = 0, [ODP_ACTION_ATTR_SET_DL_SRC] = ETH_ALEN, @@ -575,7 +575,7 @@ static int validate_actions(const struct nlattr *attr) case ODP_ACTION_ATTR_UNSPEC: return -EINVAL; - case ODP_ACTION_ATTR_CONTROLLER: + case ODP_ACTION_ATTR_USERSPACE: case ODP_ACTION_ATTR_STRIP_VLAN: case ODP_ACTION_ATTR_SET_DL_SRC: case ODP_ACTION_ATTR_SET_DL_DST: |