[][openwrt][mt7988][tops][tnl-offload: support with crypto-eip]

[Description]
Add tunnel offload with crypto-eip support.

Tunnel parameter now records CDRT index to provide help for tunnel
decapsulation and encapsulation offload setup flow.

For decapsulation, If skb already carried with CDRT information, it means
that packet is already decrypted by HW offload engine crypto-eip and there
is already a CLS rule setup for that packet. Therefore, we should not
modify the exist CLS rule. Instead, we just need to update the TPORT to
that CLS entry.

For encapsulation, there is nothing more need to do.

[Release-log]
N/A

Change-Id: Ib4ff408836fa0ed16895fc486c5ebdee90cfa0b6
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7923905
diff --git a/package-21.02/kernel/tops/src/inc/tunnel.h b/package-21.02/kernel/tops/src/inc/tunnel.h
index 387d923..d00eebe 100644
--- a/package-21.02/kernel/tops/src/inc/tunnel.h
+++ b/package-21.02/kernel/tops/src/inc/tunnel.h
@@ -127,6 +127,7 @@
 	u16 protocol;
 	u8 tops_entry_proto;
 	u8 cls_entry;
+	u8 cdrt;
 	u8 flag; /* bit: enum tops_tnl_params_flag */
 	union {
 		struct l2tp_param l2tp; /* 4B */
@@ -147,6 +148,13 @@
 	u32 flag; /* bit: enum tops_tnl_info_flag */
 } __aligned(16);
 
+/*
+ * tnl_l2_param_update:
+ *	update tunnel l2 info only
+ *	return 1 on l2 params have difference
+ *	return 0 on l2 params are the same
+ *	return negative value on error
+ */
 struct tops_tnl_type {
 	const char *type_name;
 	enum tops_entry_type tops_entry;
@@ -162,6 +170,8 @@
 				     struct tops_tnl_params *tnl_params);
 	int (*tnl_debug_param_setup)(const char *buf, int *ofs,
 				     struct tops_tnl_params *tnl_params);
+	int (*tnl_l2_param_update)(struct sk_buff *skb,
+				   struct tops_tnl_params *tnl_params);
 	int (*tnl_dump_param)(char *buf, struct tops_tnl_params *tnl_params);
 	bool (*tnl_info_match)(struct tops_tnl_params *params1,
 			       struct tops_tnl_params *params2);