[qca-nss-ecm] Add OVS VLAN support
A new external classifier module is addded.
This module will process the flow and decide
if there is VLAN tag[s] for this flow in the OVS
flow table.
Change-Id: I6a9705a82b6b2a8cb5fbb1083a541e50b111a757
Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
diff --git a/ecm_classifier.h b/ecm_classifier.h
index f24fd70..6679e73 100644
--- a/ecm_classifier.h
+++ b/ecm_classifier.h
@@ -86,6 +86,12 @@
#define ECM_CLASSIFIER_PROCESS_ACTION_IGS_QOS_TAG 0x00000040 /* Contains flow & return ingress qos tags */
#endif
+#ifdef ECM_CLASSIFIER_OVS_ENABLE
+#define ECM_CLASSIFIER_PROCESS_ACTION_OVS_VLAN_TAG 0x00000080 /* Contains OVS VLAN tags */
+#define ECM_CLASSIFIER_PROCESS_ACTION_OVS_VLAN_QINQ_TAG 0x00000100
+ /* Contains OVS QinQ VLAN tags */
+#endif
+
/*
* struct ecm_classifier_process_response
* Response structure returned by a process call
@@ -108,6 +114,10 @@
uint8_t flow_dscp; /* DSCP mark for flow */
uint8_t return_dscp; /* DSCP mark for return */
#endif
+#ifdef ECM_CLASSIFIER_OVS_ENABLE
+ uint32_t ingress_vlan_tag[2]; /* Ingress VLAN tags */
+ uint32_t egress_vlan_tag[2]; /* Egress VLAN tags */
+#endif
ecm_classifier_acceleration_mode_t accel_mode; /* Acceleration needed for this connection */
ecm_db_timer_group_t timer_group; /* Timer group the connection should be in */
};
@@ -264,6 +274,26 @@
}
}
+#ifdef ECM_CLASSIFIER_OVS_ENABLE
+ if (pr->process_actions & ECM_CLASSIFIER_PROCESS_ACTION_OVS_VLAN_TAG) {
+ if ((result = ecm_state_write(sfi, "ingress_vlan_tag[0]", "0x%x", pr->ingress_vlan_tag[0]))) {
+ return result;
+ }
+ if ((result = ecm_state_write(sfi, "egress_vlan_tag[0]", "0x%x", pr->egress_vlan_tag[0]))) {
+ return result;
+ }
+ }
+
+ if (pr->process_actions & ECM_CLASSIFIER_PROCESS_ACTION_OVS_VLAN_QINQ_TAG) {
+ if ((result = ecm_state_write(sfi, "ingress_vlan_tag[1]", "0x%x", pr->ingress_vlan_tag[1]))) {
+ return result;
+ }
+ if ((result = ecm_state_write(sfi, "egress_vlan_tag[1]", "0x%x", pr->egress_vlan_tag[1]))) {
+ return result;
+ }
+ }
+#endif
+
#ifdef ECM_CLASSIFIER_DSCP_ENABLE
if (pr->process_actions & ECM_CLASSIFIER_PROCESS_ACTION_QOS_TAG) {
if ((result = ecm_state_write(sfi, "flow_qos_tag", "%u", pr->flow_qos_tag))) {