]> git.baikalelectronics.ru Git - kernel.git/commit
pkt_cls: add new tc cls helper to check offload flag and chain index
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 25 Jan 2018 22:00:43 +0000 (14:00 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Jan 2018 02:23:07 +0000 (21:23 -0500)
commit52f2c7ed8c12ec1b6ae7d059abae9bfef4ac31fd
tree12cfa91f89d0b6e23ae7e03e095d9938df372d4c
parent0074e635ebdb7768a6c3087edad04faf0d2a07f6
pkt_cls: add new tc cls helper to check offload flag and chain index

Very few (mlxsw) upstream drivers seem to allow offload of chains
other than 0.  Save driver developers typing and add a helper for
checking both if ethtool's TC offload flag is on and if chain is 0.
This helper will set the extack appropriately in both error cases.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/pkt_cls.h