From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Privoznik Subject: Re: [PATCH iproute2] tc: police: fix control action parsing Date: Tue, 28 Nov 2017 13:57:33 +0100 Message-ID: <19219c79-a2f0-6091-4530-598c1cf9c1b2@redhat.com> References: <01774dea3239d1127d2e174a48419db4089c4de3.1511805077.git.mprivozn@redhat.com> <20171127123259.324f20cf@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jiri@mellanox.com To: Stephen Hemminger Return-path: Received: from mx1.redhat.com ([209.132.183.28]:48306 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752466AbdK1M5f (ORCPT ); Tue, 28 Nov 2017 07:57:35 -0500 In-Reply-To: <20171127123259.324f20cf@xeon-e3> Content-Language: en-GB Sender: netdev-owner@vger.kernel.org List-ID: On 11/27/2017 09:32 PM, Stephen Hemminger wrote: > On Mon, 27 Nov 2017 19:00:14 +0100 > Michal Privoznik wrote: > >> parse_action_control helper does advancing of the arg inside. So don't >> do it outside. >> >> Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions") >> Signed-off-by: Michal Privoznik > > The helpers are not helping here. > Adding another layer of indirection on moving argc/argv then causing caller > to have to keep track is bad design. > > Also since pars_action_control_slash is only used by police, why was it > moved into tc_util in the first place? I would prefer just to rip out that > bit and put it back in policer. > I'm not the author of that function so I'll let Jiri to answer that. Michal