From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next v2] net: sched: split tc_ctl_tfilter into three handlers Date: Fri, 01 Jun 2018 11:14:30 -0400 (EDT) Message-ID: <20180601.111430.602727066620494974.davem@davemloft.net> References: <20180530202533.GE2010@nanopsycho> <1527749573-18654-1-git-send-email-vladbu@mellanox.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: jiri@resnulli.us, netdev@vger.kernel.org, jhs@mojatatu.com, xiyou.wangcong@gmail.com To: vladbu@mellanox.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:47202 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752028AbeFAPOe (ORCPT ); Fri, 1 Jun 2018 11:14:34 -0400 In-Reply-To: <1527749573-18654-1-git-send-email-vladbu@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Vlad Buslov Date: Thu, 31 May 2018 09:52:53 +0300 > tc_ctl_tfilter handles three netlink message types: RTM_NEWTFILTER, > RTM_DELTFILTER, RTM_GETTFILTER. However, implementation of this function > involves a lot of branching on specific message type because most of the > code is message-specific. This significantly complicates adding new > functionality and doesn't provide much benefit of code reuse. > > Split tc_ctl_tfilter to three standalone functions that handle filter new, > delete and get requests. > > The only truly protocol independent part of tc_ctl_tfilter is code that > looks up queue, class, and block. Refactor this code to standalone > tcf_block_find function that is used by all three new handlers. > > Signed-off-by: Vlad Buslov > --- > Changes V1 -> V2: > - Rebase on current net-next Applied, thank you.