From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [PATCH iproute2] tc: police: fix control action parsing Date: Tue, 28 Nov 2017 14:02:02 +0100 Message-ID: <20171128130202.GC1971@nanopsycho.orion> References: <01774dea3239d1127d2e174a48419db4089c4de3.1511805077.git.mprivozn@redhat.com> <20171127123259.324f20cf@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Michal Privoznik , netdev@vger.kernel.org, jiri@mellanox.com To: Stephen Hemminger Return-path: Received: from mail-wr0-f181.google.com ([209.85.128.181]:43424 "EHLO mail-wr0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752037AbdK1NCE (ORCPT ); Tue, 28 Nov 2017 08:02:04 -0500 Received: by mail-wr0-f181.google.com with SMTP id z34so251299wrz.10 for ; Tue, 28 Nov 2017 05:02:04 -0800 (PST) Content-Disposition: inline In-Reply-To: <20171127123259.324f20cf@xeon-e3> Sender: netdev-owner@vger.kernel.org List-ID: Mon, Nov 27, 2017 at 09:32:59PM CET, stephen@networkplumber.org 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 tried to make all the x-specific parsing to go away and make all done in core. That should have been done from the very beginning, we would lot of mess.