ila: Add a hook type for LWT routes

In LWT tunnels both an input and output route method is defined.
If both of these are executed in the same path then double translation
happens and the effect is not correct.

This patch adds a new attribute that indicates the hook type. Two
values are defined for route output and route output. ILA
translation is only done for the one that is set. The default is
to enable ILA on route output.

Signed-off-by: Tom Herbert <tom@quantonium.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Tom Herbert 2017-11-05 15:58:25 -08:00 committed by David S. Miller
parent 70d5aef48a
commit fddb231ebe
2 changed files with 43 additions and 3 deletions

View file

@ -18,6 +18,7 @@ enum {
ILA_ATTR_PAD,
ILA_ATTR_CSUM_MODE, /* u8 */
ILA_ATTR_IDENT_TYPE, /* u8 */
ILA_ATTR_HOOK_TYPE, /* u8 */
__ILA_ATTR_MAX,
};
@ -57,4 +58,10 @@ enum {
ILA_ATYPE_USE_FORMAT = 32, /* Get type from type field in identifier */
};
enum {
ILA_HOOK_ROUTE_OUTPUT,
ILA_HOOK_ROUTE_INPUT,
};
#endif /* _UAPI_LINUX_ILA_H */