From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH v2 net] ixgbe: fix parsing of TC actions for HW offload Date: Thu, 31 May 2018 23:01:29 -0400 (EDT) Message-ID: <20180531.230129.1440898141134890172.davem@davemloft.net> References: <20180531212104.23572-1-ohlavaty@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-2 Content-Transfer-Encoding: 8BIT Cc: ohlavaty@redhat.com, netdev@vger.kernel.org, andrewx.bowers@intel.com To: jeffrey.t.kirsher@intel.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:38128 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750715AbeFADBb (ORCPT ); Thu, 31 May 2018 23:01:31 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: From: Jeff Kirsher Date: Thu, 31 May 2018 14:46:08 -0700 > On Thu, 2018-05-31 at 23:21 +0200, Ondøej Hlavatý wrote: >> The previous code was optimistic, accepting the offload of whole >> action >> chain when there was a single known action (drop/redirect). This >> results >> in offloading a rule which should not be offloaded, because its >> behavior >> cannot be reproduced in the hardware. >> >> For example: >> >> $ tc filter add dev eno1 parent ffff: protocol ip \ >> u32 ht 800: order 1 match tcp src 42 FFFF \ >> action mirred egress mirror dev enp1s16 pipe \ >> drop >> >> The controller is unable to mirror the packet to a VF, but still >> offloads the rule by dropping the packet. >> >> Change the approach of the function to a pessimistic one, rejecting >> the >> chain when an unknown action is found. This is better suited for >> future >> extensions. >> >> Note that both recognized actions always return TC_ACT_SHOT, >> therefore >> it is safe to ignore actions behind them. >> >> Signed-off-by: Ondøej Hlavatý > > Signed-off-by: Jeff Kirsher > > Note- I am having our validation move to testing with GCC 8.1.1 or > later so that we can catch warnings like Dave found in the future. > > Dave- Please go ahead and pick this up. Ok, applied, thanks.