From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [PATCH] cls_flower: check if filter is in HW before calling fl_hw_destroy_filter() Date: Wed, 24 Jan 2018 14:23:17 -0800 Message-ID: <20180124142317.772643c7@cakuba.netronome.com> References: <1516794175-5679-1-git-send-email-sathya.perla@broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jiri@resnulli.us To: Sathya Perla Return-path: Received: from mx3.wp.pl ([212.77.101.10]:18465 "EHLO mx3.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932072AbeAXWXZ (ORCPT ); Wed, 24 Jan 2018 17:23:25 -0500 In-Reply-To: <1516794175-5679-1-git-send-email-sathya.perla@broadcom.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 24 Jan 2018 17:12:55 +0530, Sathya Perla wrote: > When a filter cannot be added in HW (i.e, fl_hw_replace_filter() returns > error), the TCA_CLS_FLAGS_IN_HW flag is not set in the filter flags. > > This flag (via tc_in_hw()) must be checked before issuing the call > to delete a filter in HW (fl_hw_destroy_filter()) and before issuing the > call to query stats (fl_hw_update_stats()). > > Signed-off-by: Sathya Perla Could you explain why you want to make that change? Saying "tc_in_hw() must be checked" is a bit strong, tc_in_hw() is useless from correctness POV. Your patch may be a good optimization, but with shared blocks in the picture now tc_in_hw() == true doesn't mean it's in *your* HW.