X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Floop_counter.c;h=3e1d890aafccb80b430a78e38f700b8f476c5467;hb=5bee6e2638989aff14429c5a85fa7cef196f2106;hp=fbfbdcfa319f88c452369b5a924d26cdbd2e931c;hpb=7eaa9830512604ea9f18e8efb306b9bd75a8248b;p=openvswitch diff --git a/datapath/loop_counter.c b/datapath/loop_counter.c index fbfbdcfa..3e1d890a 100644 --- a/datapath/loop_counter.c +++ b/datapath/loop_counter.c @@ -1,6 +1,6 @@ /* * Distributed under the terms of the GNU GPL version 2. - * Copyright (c) 2010 Nicira Networks. + * Copyright (c) 2010, 2011 Nicira Networks. * * Significant portions of this file may be copied from parts of the Linux * kernel, by Linus Torvalds and others. @@ -15,12 +15,13 @@ #include "loop_counter.h" -void loop_suppress(struct datapath *dp, struct sw_flow_actions *actions) +int loop_suppress(struct datapath *dp, struct sw_flow_actions *actions) { if (net_ratelimit()) pr_warn("%s: flow looped %d times, dropping\n", dp_name(dp), MAX_LOOPS); - actions->n_actions = 0; + actions->actions_len = 0; + return -ELOOP; } #ifndef CONFIG_PREEMPT_RT