[Intel-wired-lan] [PATCH net] ixgbe: fix parsing of TC actions for HW offload

Bowers, AndrewX andrewx.bowers at intel.com
Tue May 29 21:37:03 UTC 2018


> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Ondrej Hlavatý
> Sent: Monday, May 28, 2018 9:39 AM
> To: netdev at vger.kernel.org
> Cc: Ondřej Hlavatý <ohlavaty at redhat.com>; Jiri Pirko <jiri at resnulli.us>;
> intel-wired-lan at lists.osuosl.org; Jamal Hadi Salim <jhs at mojatatu.com>
> Subject: [Intel-wired-lan] [PATCH net] ixgbe: fix parsing of TC actions for HW
> offload
> 
> 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: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
> Cc: intel-wired-lan at lists.osuosl.org
> Cc: Jamal Hadi Salim <jhs at mojatatu.com>
> Cc: Jiri Pirko <jiri at resnulli.us>
> Signed-off-by: Ondřej Hlavatý <ohlavaty at redhat.com>
> 
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers at intel.com>




More information about the Intel-wired-lan mailing list