[qca-nss-sfe] Change sfe connection structure alignment

Change CME structure element ordering to all elements accessed
during peak KPI test case to a single cache line.
This change is beneficial to peak KPIs with Wi-Fi.

Change-Id: I42755ec3494e728798bbffa0f154eaf749cf89f0
Signed-off-by: Sourav Poddar <quic_souravp@quicinc.com>
diff --git a/sfe_ipv4.h b/sfe_ipv4.h
index de11f72..22effa4 100644
--- a/sfe_ipv4.h
+++ b/sfe_ipv4.h
@@ -91,30 +91,47 @@
 	 */
 	struct hlist_node hnode;
 
-	struct sfe_ipv4_connection *connection;
-	struct sfe_ipv4_connection_match *counter_match;
-					/* Matches the flow in the opposite direction as the one in *connection */
 	/*
 	 * Characteristics that identify flows that match this rule.
 	 */
-	struct net_device *match_dev;	/* Network device */
-	u8 match_protocol;		/* Protocol */
 	__be32 match_src_ip;		/* Source IP address */
 	__be32 match_dest_ip;		/* Destination IP address */
 	__be16 match_src_port;		/* Source port/connection ident */
 	__be16 match_dest_port;		/* Destination port/connection ident */
+	u8 match_protocol;		/* Protocol */
+	u32 flags;			/* Bit flags */
+	u16 xmit_dest_mac[ETH_ALEN / 2];
+					/* Destination MAC address to use when forwarding */
+	u16 xmit_src_mac[ETH_ALEN / 2];
+					/* Source MAC address to use when forwarding */
+	struct net_device *xmit_dev;	/* Network device on which to transmit */
+	/*
+	 * xmit device's feature
+	 */
+	netdev_features_t features;
+	/*
+	 * Packet transmit information.
+	 */
+	unsigned short int xmit_dev_mtu;
+					/* Interface MTU */
 
-	struct udp_sock *up;		/* Stores UDP sock information; valid only in decap path */
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0))
-	const struct net_protocol *proto;	/* stores protocol handler; valid only in decap path */
-#else
-	struct net_protocol *proto;	/* stores protocol handler; valid only in decap path */
-#endif
+	/*
+	 * Size of all needed L2 headers
+	 */
+	u16 l2_hdr_size;
+
+	/*
+	 * Stats recorded in a sync period. These stats will be added to
+	 * rx_packet_count64/rx_byte_count64 after a sync period.
+	 */
+	atomic_t rx_packet_count;
+	atomic_t rx_byte_count;
+
+	struct net_device *match_dev;	/* Network device */
 
 	/*
 	 * Control the operations of the match.
 	 */
-	u32 flags;			/* Bit flags */
 #ifdef CONFIG_NF_FLOW_COOKIE
 	u32 flow_cookie;		/* used flow cookie, for debug */
 #endif
@@ -122,6 +139,10 @@
 	u32 flow_accel;             /* The flow accelerated or not */
 #endif
 
+	struct sfe_ipv4_connection *connection;
+	struct sfe_ipv4_connection_match *counter_match;
+					/* Matches the flow in the opposite direction as the one in *connection */
+
 	/*
 	 * Connection state that we track once we match.
 	 */
@@ -129,6 +150,14 @@
 		struct sfe_ipv4_tcp_connection_match tcp;
 	} protocol_state;
 
+	struct udp_sock *up;		/* Stores UDP sock information; valid only in decap path */
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0))
+	const struct net_protocol *proto;	/* stores protocol handler; valid only in decap path */
+#else
+	struct net_protocol *proto;	/* stores protocol handler; valid only in decap path */
+#endif
+
 	/*
 	 * VLAN headers
 	 */
@@ -136,13 +165,6 @@
 	struct sfe_vlan_hdr egress_vlan_hdr[SFE_MAX_VLAN_DEPTH];
 
 	/*
-	 * Stats recorded in a sync period. These stats will be added to
-	 * rx_packet_count64/rx_byte_count64 after a sync period.
-	 */
-	atomic_t rx_packet_count;
-	atomic_t rx_byte_count;
-
-	/*
 	 * Packet translation information.
 	 */
 	__be32 xlate_src_ip;		/* Address after source translation */
@@ -158,7 +180,6 @@
 					/* Transport layer checksum adjustment after destination translation */
 	u16 xlate_dest_partial_csum_adjustment;
 					/* Transport layer pseudo header checksum adjustment after destination translation */
-
 	/*
 	 * QoS information
 	 */
@@ -166,16 +187,6 @@
 	u32 dscp;
 	u32 mark;			/* mark for outgoing packet */
 
-	/*
-	 * Packet transmit information.
-	 */
-	struct net_device *xmit_dev;	/* Network device on which to transmit */
-	unsigned short int xmit_dev_mtu;
-					/* Interface MTU */
-	u16 xmit_dest_mac[ETH_ALEN / 2];
-					/* Destination MAC address to use when forwarding */
-	u16 xmit_src_mac[ETH_ALEN / 2];
-					/* Source MAC address to use when forwarding */
 
 	u8 ingress_vlan_hdr_cnt;        /* Ingress active vlan headers count */
 	u8 egress_vlan_hdr_cnt;         /* Egress active vlan headers count */
@@ -194,15 +205,6 @@
 
 	struct net_device *top_interface_dev;	/* Used by tun6rd to store decap VLAN netdevice.*/
 
-	/*
-	 * Size of all needed L2 headers
-	 */
-	u16 l2_hdr_size;
-
-	/*
-	 * xmit device's feature
-	 */
-	netdev_features_t features;
 	bool sawf_valid;		/* Indicates mark has valid SAWF information */
 };