Ondřej Hlavatý 16e6653c82 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.

Signed-off-by: Ondřej Hlavatý <ohlavaty@redhat.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-31 23:01:00 -04:00
..
2018-05-13 20:22:58 -04:00
2018-05-24 23:05:30 -04:00
2018-03-20 12:08:45 -04:00
2018-02-22 10:44:36 +08:00
2018-05-22 13:42:05 -04:00
2018-01-02 16:14:49 -06:00
2018-05-08 22:54:18 -04:00
2018-04-27 20:21:07 -04:00
2018-01-17 18:04:43 -06:00
2017-11-16 22:58:12 +09:00