On Mon, 4 Jul 2016 10:34:11 +0300 Amir Vadai <a...@vadai.me> wrote: > From: Amir Vadai <ami...@mellanox.com> > > On devices that support TC flower offloads, these flags enable a filter to be > added only to HW or only to SW. skip_sw and skip_hw are mutually exclusive > flags. By default without any flags, the filter is added to both HW and SW, > but no error checks are done in case of failure to add to HW. > With skip-sw, failure to add to HW is treated as an error. > > Here is a sample script that adds 2 filters, one with skip_sw and the other > with skip_hw flag. > > # add ingress qdisc > tc qdisc add dev enp0s9 ingress > > # enable hw tc offload. > ethtool -K enp0s9 hw-tc-offload on > > # add a flower filter with skip-sw flag. > tc filter add dev enp0s9 protocol ip parent ffff: flower \ > ip_proto 1 indev enp0s9 skip_sw \ > action drop > > # add a flower filter with skip-hw flag. > tc filter add dev enp0s9 protocol ip parent ffff: flower \ > ip_proto 3 indev enp0s9 skip_hw \ > action drop > > Signed-off-by: Amir Vadai <ami...@mellanox.com>
Looks sane. Applied