[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180531.154106.1949427114118876175.davem@davemloft.net>
Date: Thu, 31 May 2018 15:41:06 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: jeffrey.t.kirsher@...el.com
Cc: ohlavaty@...hat.com, netdev@...r.kernel.org, nhorman@...hat.com,
sassmann@...hat.com, jogreene@...hat.com, jhs@...atatu.com,
jiri@...nulli.us
Subject: Re: [net] ixgbe: fix parsing of TC actions for HW offload
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Date: Wed, 30 May 2018 11:01:34 -0700
> From: Ondřej Hlavatý <ohlavaty@...hat.com>
>
> 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.
>
> Cc: Jamal Hadi Salim <jhs@...atatu.com>
> Cc: Jiri Pirko <jiri@...nulli.us>
> Signed-off-by: Ondřej Hlavatý <ohlavaty@...hat.com>
> Tested-by: Andrew Bowers <andrewx.bowers@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
This introduces a new warning with gcc-8.1.1 on Fedora 28.
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function ‘ixgbe_configure_clsu32’:
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:9311:8: warning: ‘queue’ may be used uninitialized in this function [-Wmaybe-uninitialized]
err = ixgbe_fdir_write_perfect_filter_82599(hw, &input->filter,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
input->sw_idx, queue);
~~~~~~~~~~~~~~~~~~~~~
Powered by blists - more mailing lists