On Thu, Jan 25, 2018 at 3:53 AM, Jakub Kicinski <kubak...@wp.pl> wrote:
>
> 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 <sathya.pe...@broadcom.com>
>
> 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.

I agree that for shared filters when skip_sw is false
tcf_block_cb_call() can return a
positive status even if the filter add on one of the devices fails.
I'll change the commit-log wording to indicate that this new check is
an optimization.
Thanks!

Reply via email to