X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Floop_counter.c;h=3e1d890aafccb80b430a78e38f700b8f476c5467;hb=a7844aaf5ebccf1a8762f68bcbb62e463fc3809b;hp=491305d97e5f93090e2c50fb997e12a58d347321;hpb=cdee00fd635d1e0f1eeb5d9c009daeb59abd4777;p=openvswitch diff --git a/datapath/loop_counter.c b/datapath/loop_counter.c index 491305d9..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->actions_len = 0; + return -ELOOP; } #ifndef CONFIG_PREEMPT_RT