[qca-nss-sfe] SAWF related changes in SFE.
1. Adding sawf_metadata in SFE connection information
2. Addition of per cpu per service class stats DB as part of SFE.
Change-Id: I44e2a0d7b6144ee28a24fc5edd21fdc1cd439142
Signed-off-by: Parikshit Gune <quic_pgune@quicinc.com>
diff --git a/sfe_ipv4_tcp.c b/sfe_ipv4_tcp.c
index 14283ea..fdb73e3 100644
--- a/sfe_ipv4_tcp.c
+++ b/sfe_ipv4_tcp.c
@@ -127,6 +127,7 @@
struct sfe_ipv4_connection_match *counter_cm;
u8 ttl;
u32 flags;
+ u32 service_class_id;
struct net_device *xmit_dev;
bool ret;
bool hw_csum;
@@ -695,6 +696,13 @@
*/
if (unlikely(cm->flags & SFE_IPV4_CONNECTION_MATCH_FLAG_MARK)) {
skb->mark = cm->mark;
+ /*
+ * Update service class stats if SAWF is valid.
+ */
+ if (likely(cm->sawf_valid)) {
+ service_class_id = SFE_GET_SAWF_SERVICE_CLASS(cm->mark);
+ sfe_ipv4_service_class_stats_inc(si, service_class_id, len);
+ }
}
/*