From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH iproute2] tc: police: fix control action parsing Date: Mon, 27 Nov 2017 12:32:59 -0800 Message-ID: <20171127123259.324f20cf@xeon-e3> References: <01774dea3239d1127d2e174a48419db4089c4de3.1511805077.git.mprivozn@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jiri@mellanox.com To: Michal Privoznik Return-path: Received: from mail-pg0-f52.google.com ([74.125.83.52]:35357 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752655AbdK0UdH (ORCPT ); Mon, 27 Nov 2017 15:33:07 -0500 Received: by mail-pg0-f52.google.com with SMTP id l19so19229172pgo.2 for ; Mon, 27 Nov 2017 12:33:07 -0800 (PST) In-Reply-To: <01774dea3239d1127d2e174a48419db4089c4de3.1511805077.git.mprivozn@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: 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.