summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2014-09-08 12:46:03 -0700
committerPravin B Shelar <pshelar@nicira.com>2014-09-08 14:22:56 -0700
commit2c622e5aa9009faf7238a71e484416652b115a5d (patch)
tree3ff963dfee99337eb39de1c464f6d0b6e68a3666
parent3d76b86c6f0b56ee8649356c49e89dd5022451b2 (diff)
downloadopenvswitch-2c622e5aa9009faf7238a71e484416652b115a5d.tar.gz
datapath: Remove unused dp parameter.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
-rw-r--r--datapath/datapath.c26
-rw-r--r--datapath/flow_netlink.c2
-rw-r--r--datapath/flow_netlink.h2
3 files changed, 14 insertions, 16 deletions
diff --git a/datapath/datapath.c b/datapath/datapath.c
index d851cab42..59f73d7cb 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -462,7 +462,7 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
upcall->dp_ifindex = dp_ifindex;
nla = nla_nest_start(user_skb, OVS_PACKET_ATTR_KEY);
- err = ovs_nla_put_flow(dp, pkt_key, pkt_key, user_skb);
+ err = ovs_nla_put_flow(pkt_key, pkt_key, user_skb);
BUG_ON(err);
nla_nest_end(user_skb, nla);
@@ -676,8 +676,7 @@ static size_t ovs_flow_cmd_msg_size(const struct sw_flow_actions *acts)
}
/* Called with ovs_mutex or RCU read lock. */
-static int ovs_flow_cmd_fill_match(struct datapath *dp,
- const struct sw_flow *flow,
+static int ovs_flow_cmd_fill_match(const struct sw_flow *flow,
struct sk_buff *skb)
{
struct nlattr *nla;
@@ -688,7 +687,7 @@ static int ovs_flow_cmd_fill_match(struct datapath *dp,
if (!nla)
return -EMSGSIZE;
- err = ovs_nla_put_flow(dp, &flow->unmasked_key,
+ err = ovs_nla_put_flow(&flow->unmasked_key,
&flow->unmasked_key, skb);
if (err)
return err;
@@ -699,7 +698,7 @@ static int ovs_flow_cmd_fill_match(struct datapath *dp,
if (!nla)
return -EMSGSIZE;
- err = ovs_nla_put_flow(dp, &flow->key, &flow->mask->key, skb);
+ err = ovs_nla_put_flow(&flow->key, &flow->mask->key, skb);
if (err)
return err;
nla_nest_end(skb, nla);
@@ -773,8 +772,7 @@ static int ovs_flow_cmd_fill_actions(const struct sw_flow *flow,
}
/* Called with ovs_mutex or RCU read lock. */
-static int ovs_flow_cmd_fill_info(struct datapath *dp,
- const struct sw_flow *flow, int dp_ifindex,
+static int ovs_flow_cmd_fill_info(const struct sw_flow *flow, int dp_ifindex,
struct sk_buff *skb, u32 portid,
u32 seq, u32 flags, u8 cmd)
{
@@ -787,7 +785,7 @@ static int ovs_flow_cmd_fill_info(struct datapath *dp,
return -EMSGSIZE;
ovs_header->dp_ifindex = dp_ifindex;
- err = ovs_flow_cmd_fill_match(dp, flow, skb);
+ err = ovs_flow_cmd_fill_match(flow, skb);
if (err)
goto error;
@@ -839,7 +837,7 @@ static struct sk_buff *ovs_flow_cmd_build_info(struct datapath *dp,
if (!skb || IS_ERR(skb))
return skb;
- retval = ovs_flow_cmd_fill_info(dp, flow, dp_ifindex, skb,
+ retval = ovs_flow_cmd_fill_info(flow, dp_ifindex, skb,
info->snd_portid, info->snd_seq, 0,
cmd);
BUG_ON(retval < 0);
@@ -919,7 +917,7 @@ static int ovs_flow_cmd_new(struct sk_buff *skb, struct genl_info *info)
}
if (unlikely(reply)) {
- error = ovs_flow_cmd_fill_info(dp, new_flow,
+ error = ovs_flow_cmd_fill_info(new_flow,
ovs_header->dp_ifindex,
reply, info->snd_portid,
info->snd_seq, 0,
@@ -955,7 +953,7 @@ static int ovs_flow_cmd_new(struct sk_buff *skb, struct genl_info *info)
rcu_assign_pointer(flow->sf_acts, acts);
if (unlikely(reply)) {
- error = ovs_flow_cmd_fill_info(dp, flow,
+ error = ovs_flow_cmd_fill_info(flow,
ovs_header->dp_ifindex,
reply, info->snd_portid,
info->snd_seq, 0,
@@ -1063,7 +1061,7 @@ static int ovs_flow_cmd_set(struct sk_buff *skb, struct genl_info *info)
rcu_assign_pointer(flow->sf_acts, acts);
if (unlikely(reply)) {
- error = ovs_flow_cmd_fill_info(dp, flow,
+ error = ovs_flow_cmd_fill_info(flow,
ovs_header->dp_ifindex,
reply, info->snd_portid,
info->snd_seq, 0,
@@ -1192,7 +1190,7 @@ static int ovs_flow_cmd_del(struct sk_buff *skb, struct genl_info *info)
if (likely(reply)) {
if (likely(!IS_ERR(reply))) {
rcu_read_lock(); /* Keep RCU checker happy. */
- err = ovs_flow_cmd_fill_info(dp, flow,
+ err = ovs_flow_cmd_fill_info(flow,
ovs_header->dp_ifindex,
reply, info->snd_portid,
info->snd_seq, 0,
@@ -1238,7 +1236,7 @@ static int ovs_flow_cmd_dump(struct sk_buff *skb, struct netlink_callback *cb)
if (!flow)
break;
- if (ovs_flow_cmd_fill_info(dp, flow, ovs_header->dp_ifindex, skb,
+ if (ovs_flow_cmd_fill_info(flow, ovs_header->dp_ifindex, skb,
NETLINK_CB(cb->skb).portid,
cb->nlh->nlmsg_seq, NLM_F_MULTI,
OVS_FLOW_CMD_NEW) < 0)
diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
index 69d19193e..6c748410a 100644
--- a/datapath/flow_netlink.c
+++ b/datapath/flow_netlink.c
@@ -1103,7 +1103,7 @@ int ovs_nla_get_flow_metadata(const struct nlattr *attr,
return metadata_from_nlattrs(&match, &attrs, a, false);
}
-int ovs_nla_put_flow(struct datapath *dp, const struct sw_flow_key *swkey,
+int ovs_nla_put_flow(const struct sw_flow_key *swkey,
const struct sw_flow_key *output, struct sk_buff *skb)
{
struct ovs_key_ethernet *eth_key;
diff --git a/datapath/flow_netlink.h b/datapath/flow_netlink.h
index 941346dc3..90bbe3785 100644
--- a/datapath/flow_netlink.h
+++ b/datapath/flow_netlink.h
@@ -43,7 +43,7 @@ size_t ovs_key_attr_size(void);
void ovs_match_init(struct sw_flow_match *match,
struct sw_flow_key *key, struct sw_flow_mask *mask);
-int ovs_nla_put_flow(struct datapath *dp, const struct sw_flow_key *,
+int ovs_nla_put_flow(const struct sw_flow_key *,
const struct sw_flow_key *, struct sk_buff *);
int ovs_nla_get_flow_metadata(const struct nlattr *, struct sw_flow_key *);