X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fdatapath.c;h=fc00d78788a567c35a77d5505bc2ab699b726c6e;hb=0b9275b2c7ed2f88491898345e03618dbfbf4b0f;hp=46dc7379c4ee91d9e2f111af01a2c24ffbdb14e4;hpb=e0e57990f6d59db44e47b3991b8bea7392b9f30b;p=openvswitch diff --git a/datapath/datapath.c b/datapath/datapath.c index 46dc7379..fc00d787 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -49,7 +49,6 @@ #include "datapath.h" #include "actions.h" #include "flow.h" -#include "loop_counter.h" #include "table.h" #include "vlan.h" #include "vport-internal_dev.h" @@ -267,8 +266,6 @@ void dp_process_received_packet(struct vport *p, struct sk_buff *skb) struct datapath *dp = p->dp; struct dp_stats_percpu *stats; int stats_counter_off; - struct sw_flow_actions *acts; - struct loop_counter *loop; int error; OVS_CB(skb)->vport = p; @@ -313,32 +310,7 @@ void dp_process_received_packet(struct vport *p, struct sk_buff *skb) stats_counter_off = offsetof(struct dp_stats_percpu, n_hit); flow_used(OVS_CB(skb)->flow, skb); - - acts = rcu_dereference(OVS_CB(skb)->flow->sf_acts); - - /* Check whether we've looped too much. */ - loop = loop_get_counter(); - if (unlikely(++loop->count > MAX_LOOPS)) - loop->looping = true; - if (unlikely(loop->looping)) { - loop_suppress(dp, acts); - kfree_skb(skb); - goto out_loop; - } - - /* Execute actions. */ - execute_actions(dp, skb, &OVS_CB(skb)->flow->key, acts->actions, - acts->actions_len); - - /* Check whether sub-actions looped too much. */ - if (unlikely(loop->looping)) - loop_suppress(dp, acts); - -out_loop: - /* Decrement loop counter. */ - if (!--loop->count) - loop->looping = false; - loop_put_counter(); + execute_actions(dp, skb); out: /* Update datapath statistics. */ @@ -470,14 +442,8 @@ static int queue_control_packets(struct datapath *dp, struct sk_buff *skb, { u32 group = packet_mc_group(dp, upcall_info->cmd); struct sk_buff *nskb; - int port_no; int err; - if (OVS_CB(skb)->vport) - port_no = OVS_CB(skb)->vport->port_no; - else - port_no = ODPP_LOCAL; - do { struct odp_header *upcall; struct sk_buff *user_skb; /* to be queued to userspace */ @@ -739,9 +705,7 @@ static int odp_packet_cmd_execute(struct sk_buff *skb, struct genl_info *info) err = -ENODEV; if (!dp) goto err_unlock; - err = execute_actions(dp, packet, &flow->key, - nla_data(a[ODP_PACKET_ATTR_ACTIONS]), - nla_len(a[ODP_PACKET_ATTR_ACTIONS])); + err = execute_actions(dp, packet); rcu_read_unlock(); flow_put(flow);