]> git.baikalelectronics.ru Git - kernel.git/commit
net: tc_skbedit: Factor a helper out of is_tcf_skbedit_{mark, ptype}()
authorPetr Machata <petrm@mellanox.com>
Thu, 19 Mar 2020 13:47:20 +0000 (15:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Mar 2020 04:09:19 +0000 (21:09 -0700)
commit1f8cb3eefb97335f9fa46d70378a2c9116e71c3f
tree6815c1294faa3d411e90bfa7de6fcd7ddb93767a
parentc5badd525a7531112e1da0ae41c13ce477602384
net: tc_skbedit: Factor a helper out of is_tcf_skbedit_{mark, ptype}()

The two functions is_tcf_skbedit_mark() and is_tcf_skbedit_ptype() have a
very similar structure. A follow-up patch will add one more such function.
Instead of more cut'n'pasting, extract a helper function that checks
whether a TC action is an skbedit with the required flag. Convert the two
existing functions into thin wrappers around the helper.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tc_act/tc_skbedit.h