Patch nss-ecm to SPF11.3.CSU1
Change-Id: If313aa0f291f096e50ccc79e77c37a93da10df71
diff --git a/ecm_classifier.h b/ecm_classifier.h
index 9d2b77b..a4ffcf7 100644
--- a/ecm_classifier.h
+++ b/ecm_classifier.h
@@ -14,6 +14,8 @@
**************************************************************************
*/
+extern int ecm_classifier_accel_delay_pkts; /* Default slow path packets allowed before the acceleration */
+
struct ecm_classifier_instance;
/*
@@ -31,6 +33,12 @@
#ifdef ECM_CLASSIFIER_DSCP_ENABLE
ECM_CLASSIFIER_TYPE_DSCP, /* Provides DSCP and DSCP remarking support */
#endif
+#ifdef ECM_CLASSIFIER_MSCS_ENABLE
+ ECM_CLASSIFIER_TYPE_MSCS, /* Mirrored Stream Classification Signalling(MSCS) classifier */
+#endif
+#ifdef ECM_CLASSIFIER_EMESH_ENABLE
+ ECM_CLASSIFIER_TYPE_EMESH, /* E-Mesh classifier */
+#endif
#ifdef ECM_CLASSIFIER_NL_ENABLE
ECM_CLASSIFIER_TYPE_NL, /* Provides netlink interface */
#endif
@@ -92,6 +100,12 @@
#define ECM_CLASSIFIER_PROCESS_ACTION_OVS_MCAST_DENY_ACCEL 0x00000200 /* Multicast OVS flow */
#endif
+#ifdef ECM_CLASSIFIER_EMESH_ENABLE
+#define ECM_CLASSIFIER_PROCESS_ACTION_EMESH_SP_FLOW 0x00000400 /* Mark the E-MESH Service Prioritization flow */
+#endif
+
+#define ECM_CLASSIFIER_PROCESS_ACTION_TIMER_GROUP_NO_TOUCH 0x00000400 /* Do not update CI time */
+
/*
* struct ecm_classifier_process_response
* Response structure returned by a process call
@@ -108,9 +122,11 @@
bool drop; /* Drop packet at hand */
uint32_t flow_qos_tag; /* QoS tag to use for the packet */
uint32_t return_qos_tag; /* QoS tag to use for the packet */
+#ifdef ECM_CLASSIFIER_DSCP_ENABLE
+#ifdef ECM_CLASSIFIER_DSCP_IGS
uint16_t igs_flow_qos_tag; /* Ingress QoS tag to use for the packet */
uint16_t igs_return_qos_tag; /* Ingress QoS tag to use for the return packet */
-#ifdef ECM_CLASSIFIER_DSCP_ENABLE
+#endif
uint8_t flow_dscp; /* DSCP mark for flow */
uint8_t return_dscp; /* DSCP mark for return */
#endif
@@ -276,7 +292,6 @@
#ifdef ECM_MULTICAST_ENABLE
int i;
#endif
-
/*
* TODO: Clean up the function later to print classifier
* specific data in each classifier’s state_get function.
@@ -287,45 +302,18 @@
}
}
- if (pr->egress_vlan_tag[0] != ECM_FRONT_END_VLAN_ID_NOT_CONFIGURED) {
- if ((result = ecm_state_write(sfi, "egress_vlan_tag[0]", "0x%x", pr->egress_vlan_tag[0]))) {
- return result;
- }
- }
-
-#ifdef ECM_MULTICAST_ENABLE
- for (i = 0; i < ECM_DB_MULTICAST_IF_MAX; i++) {
-
- if (pr->egress_mc_vlan_tag[i][0] == ECM_FRONT_END_VLAN_ID_NOT_CONFIGURED) {
- continue;
- }
-
- if ((result = ecm_state_write(sfi, "port_interface_index", "%d", pr->egress_netdev_index[i]))) {
- return result;
- }
-
- if ((result = ecm_state_write(sfi, "port_egress_vlan_tag[0]", "0x%x", pr->egress_mc_vlan_tag[i][0]))) {
- return result;
- }
- }
-#endif
- }
-
- if (pr->process_actions & ECM_CLASSIFIER_PROCESS_ACTION_OVS_VLAN_QINQ_TAG) {
-#ifdef ECM_MULTICAST_ENABLE
- int i;
-#endif
-
- /*
- * TODO: Clean up the function later to print classifier
- * specific data in each classifier’s state_get function.
- */
if (pr->ingress_vlan_tag[1] != ECM_FRONT_END_VLAN_ID_NOT_CONFIGURED) {
if ((result = ecm_state_write(sfi, "ingress_vlan_tag[1]", "0x%x", pr->ingress_vlan_tag[1]))) {
return result;
}
}
+ if (pr->egress_vlan_tag[0] != ECM_FRONT_END_VLAN_ID_NOT_CONFIGURED) {
+ if ((result = ecm_state_write(sfi, "egress_vlan_tag[0]", "0x%x", pr->egress_vlan_tag[0]))) {
+ return result;
+ }
+ }
+
if (pr->egress_vlan_tag[1] != ECM_FRONT_END_VLAN_ID_NOT_CONFIGURED) {
if ((result = ecm_state_write(sfi, "egress_vlan_tag[1]", "0x%x", pr->egress_vlan_tag[1]))) {
return result;
@@ -334,24 +322,35 @@
#ifdef ECM_MULTICAST_ENABLE
for (i = 0; i < ECM_DB_MULTICAST_IF_MAX; i++) {
+ struct net_device *dev;
- if (pr->egress_mc_vlan_tag[i][1] == ECM_FRONT_END_VLAN_ID_NOT_CONFIGURED) {
+ if (pr->egress_mc_vlan_tag[i][0] == ECM_FRONT_END_VLAN_ID_NOT_CONFIGURED) {
continue;
}
- if ((result = ecm_state_write(sfi, "port_interface_index", "%d", pr->egress_netdev_index[i]))) {
+ dev = dev_get_by_index(&init_net, pr->egress_netdev_index[i]);
+ if (dev) {
+ if ((result = ecm_state_write(sfi, "port_egress", "%s", dev->name))) {
+ dev_put(dev);
+ return result;
+ }
+ dev_put(dev);
+ }
+
+ if ((result = ecm_state_write(sfi, "port_egress_vlan_tag[0]", "0x%x", pr->egress_mc_vlan_tag[i][0]))) {
return result;
}
- if ((result = ecm_state_write(sfi, "port_egress_vlan_tag[1]", "0x%x", pr->egress_mc_vlan_tag[i][1]))) {
- return result;
+ if (pr->egress_mc_vlan_tag[i][1] != ECM_FRONT_END_VLAN_ID_NOT_CONFIGURED) {
+ if ((result = ecm_state_write(sfi, "port_egress_vlan_tag[1]", "0x%x", pr->egress_mc_vlan_tag[i][1]))) {
+ return result;
+ }
}
}
#endif
}
#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))) {
return result;
@@ -360,7 +359,8 @@
return result;
}
}
-
+#ifdef ECM_CLASSIFIER_DSCP_ENABLE
+#ifdef ECM_CLASSIFIER_DSCP_IGS
if (pr->process_actions & ECM_CLASSIFIER_PROCESS_ACTION_IGS_QOS_TAG) {
if ((result = ecm_state_write(sfi, "igs_flow_qos_tag", "%u", pr->igs_flow_qos_tag))) {
return result;
@@ -369,7 +369,7 @@
return result;
}
}
-
+#endif
if (pr->process_actions & ECM_CLASSIFIER_PROCESS_ACTION_DSCP) {
if ((result = ecm_state_write(sfi, "flow_dscp", "%u", pr->flow_dscp))) {
return result;
@@ -379,6 +379,7 @@
}
}
#endif
+
if (pr->process_actions & ECM_CLASSIFIER_PROCESS_ACTION_TIMER_GROUP) {
if ((result = ecm_state_write(sfi, "timer_group", "%d", pr->timer_group))) {
return result;
@@ -391,4 +392,3 @@
extern struct ecm_classifier_instance *ecm_classifier_assign_classifier(struct ecm_db_connection_instance *ci, ecm_classifier_type_t type);
extern bool ecm_classifier_reclassify(struct ecm_db_connection_instance *ci, int assignment_count, struct ecm_classifier_instance *assignments[]);
-