projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Eliminate ODPL_* from userspace-facing interface.
[openvswitch]
/
datapath
/
datapath.c
diff --git
a/datapath/datapath.c
b/datapath/datapath.c
index d4d68112b5bab2b08cc13488dfee4191b36c22d4..94f908a0ec5c26959a658ef7bee639d3b11ce81e 100644
(file)
--- a/
datapath/datapath.c
+++ b/
datapath/datapath.c
@@
-296,7
+296,7
@@
void dp_process_received_packet(struct vport *p, struct sk_buff *skb)
bool is_frag;
/* Extract flow from 'skb' into 'key'. */
bool is_frag;
/* Extract flow from 'skb' into 'key'. */
- error = flow_extract(skb, p
? p->port_no : ODPP_NONE
, &key, &is_frag);
+ error = flow_extract(skb, p
->port_no
, &key, &is_frag);
if (unlikely(error)) {
kfree_skb(skb);
return;
if (unlikely(error)) {
kfree_skb(skb);
return;
@@
-672,10
+672,10
@@
static const struct nla_policy execute_policy[ODP_PACKET_ATTR_MAX + 1] = {
[ODP_PACKET_ATTR_ACTIONS] = { .type = NLA_NESTED },
};
[ODP_PACKET_ATTR_ACTIONS] = { .type = NLA_NESTED },
};
-static int execute_packet(const struct odp_
upcall __user *uodp_upcall
)
+static int execute_packet(const struct odp_
packet __user *uodp_packet
)
{
struct nlattr *a[ODP_PACKET_ATTR_MAX + 1];
{
struct nlattr *a[ODP_PACKET_ATTR_MAX + 1];
- struct odp_
upcall *odp_upcall
;
+ struct odp_
packet *odp_packet
;
struct sk_buff *skb, *packet;
unsigned int actions_len;
struct nlattr *actions;
struct sk_buff *skb, *packet;
unsigned int actions_len;
struct nlattr *actions;
@@
-686,9
+686,9
@@
static int execute_packet(const struct odp_upcall __user *uodp_upcall)
u32 len;
int err;
u32 len;
int err;
- if (get_user(len, &uodp_
upcall
->len))
+ if (get_user(len, &uodp_
packet
->len))
return -EFAULT;
return -EFAULT;
- if (len < sizeof(struct odp_
upcall
))
+ if (len < sizeof(struct odp_
packet
))
return -EINVAL;
skb = alloc_skb(len, GFP_KERNEL);
return -EINVAL;
skb = alloc_skb(len, GFP_KERNEL);
@@
-696,15
+696,15
@@
static int execute_packet(const struct odp_upcall __user *uodp_upcall)
return -ENOMEM;
err = -EFAULT;
return -ENOMEM;
err = -EFAULT;
- if (copy_from_user(__skb_put(skb, len), uodp_
upcall
, len))
+ if (copy_from_user(__skb_put(skb, len), uodp_
packet
, len))
goto exit_free_skb;
goto exit_free_skb;
- odp_
upcall = (struct odp_upcall
*)skb->data;
+ odp_
packet = (struct odp_packet
*)skb->data;
err = -EINVAL;
err = -EINVAL;
- if (odp_
upcall
->len != len)
+ if (odp_
packet
->len != len)
goto exit_free_skb;
goto exit_free_skb;
- __skb_pull(skb, sizeof(struct odp_
upcall
));
+ __skb_pull(skb, sizeof(struct odp_
packet
));
err = nla_parse(a, ODP_PACKET_ATTR_MAX, (struct nlattr *)skb->data,
skb->len, execute_policy);
if (err)
err = nla_parse(a, ODP_PACKET_ATTR_MAX, (struct nlattr *)skb->data,
skb->len, execute_policy);
if (err)
@@
-744,7
+744,7
@@
static int execute_packet(const struct odp_upcall __user *uodp_upcall)
goto exit_free_skb;
rcu_read_lock();
goto exit_free_skb;
rcu_read_lock();
- dp = get_dp(odp_
upcall
->dp_idx);
+ dp = get_dp(odp_
packet
->dp_idx);
err = -ENODEV;
if (dp)
err = execute_actions(dp, packet, &key, actions, actions_len);
err = -ENODEV;
if (dp)
err = execute_actions(dp, packet, &key, actions, actions_len);
@@
-2036,7
+2036,7
@@
static long openvswitch_ioctl(struct file *f, unsigned int cmd,
goto exit;
case ODP_EXECUTE:
goto exit;
case ODP_EXECUTE:
- err = execute_packet((struct odp_
upcall
__user *)argp);
+ err = execute_packet((struct odp_
packet
__user *)argp);
goto exit;
}
goto exit;
}