shortcut-fe: support ingress QoS shaping

Change-Id: I7d4c992f41df2220d0a07655950a1f4d25e06666
Signed-off-by: Xiaoping Fan <xfan@codeaurora.org>
diff --git a/simulated-driver/sfe_drv.c b/simulated-driver/sfe_drv.c
index 602dafb..357fa03 100644
--- a/simulated-driver/sfe_drv.c
+++ b/simulated-driver/sfe_drv.c
@@ -20,6 +20,7 @@
 #include <linux/skbuff.h>
 #include <net/addrconf.h>
 #include <linux/inetdevice.h>
+#include <net/pkt_sched.h>
 
 #include "../shortcut-fe/sfe.h"
 #include "../shortcut-fe/sfe_cm.h"
@@ -1159,6 +1160,16 @@
 
 	dev = skb->dev;
 
+#ifdef CONFIG_NET_CLS_ACT
+	/*
+	 * If ingress Qdisc configured, and packet not processed by ingress Qdisc yet
+	 * We can not accelerate this packet.
+	 */
+	if (dev->ingress_queue && !(skb->tc_verd & TC_NCLS)) {
+		return 0;
+	}
+#endif
+
 	/*
 	 * We're only interested in IPv4 and IPv6 packets.
 	 */