dpif-netdev: Reduce netdev_flow_key size
authorDaniele Di Proietto <ddiproietto@vmware.com>
Wed, 23 Jul 2014 00:06:23 +0000 (17:06 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Wed, 23 Jul 2014 03:06:06 +0000 (20:06 -0700)
struct 'miniflow' already contains MINI_N_INLINE values, therefore
we can save few bytes in netdev_flow_key.

Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
lib/dpif-netdev.c

index cfd7539..cad8c7a 100644 (file)
@@ -205,7 +205,7 @@ struct dp_netdev_port {
 
 /* There are fields in the flow structure that we never use. Therefore we can
  * save a few words of memory */
-#define NETDEV_KEY_BUF_SIZE_U32 (FLOW_U32S \
+#define NETDEV_KEY_BUF_SIZE_U32 (FLOW_U32S - MINI_N_INLINE \
                                  - FLOW_U32_SIZE(regs) \
                                  - FLOW_U32_SIZE(metadata) \
                                 )